Example #1
0
 protected bool BaseIsAugmentable(Object Item)
 {
     if (Item == null || !Item.bigCraftable || !Item.isPlaceable())
     {
         return(false);
     }
     else
     {
         return(IsAugmentable(Item));
     }
 }
        /// <summary>Checks the given tile position of each augmented location, to find a <see cref="AugmentedTile"/> with the matching Machine.</summary>
        public bool TryFindAugmentedTile(Object Machine, int TileX, int TileY, out AugmentedTile Result)
        {
            Result = null;
            if (Machine == null || !Machine.bigCraftable || !Machine.isPlaceable())
            {
                return(false);
            }

            string Key = AugmentedLocation.EncodeTileToString(TileX, TileY);

            foreach (AugmentedLocation AL in this.Locations.Values)
            {
                AugmentedTile Tile;
                if (AL.Tiles.TryGetValue(Key, out Tile) && Tile.Machine == Machine)
                {
                    Result = Tile;
                    return(true);
                }
            }

            return(false);
        }
Example #3
0
 public static bool IsDestructible(Object Machine)
 {
     return(Machine != null && Machine.bigCraftable && Machine.CanBeSetDown && Machine.isPlaceable() && !IndestructibleMachineIds.Contains(Machine.ParentSheetIndex));
 }