public static int DroneTaskTypeToInt(DroneTaskType type) { switch (type) { case DroneTaskType.build: return(0); case DroneTaskType.destroy: return(1); } return(-1); }
public DroneTask(Construction cons) { construction = cons; if (construction.isConstruction) { myType = DroneTaskType.build; } else { myType = DroneTaskType.destroy; } location = construction.center; var inv = cons.constructionInventory.inventory; materials.Clear(); for (int i = 0; i < inv.Count; i++) { materials.Add(new InventoryItemSlot(inv[i].myItem, 0, inv[i].maxCount, InventoryItemSlot.SlotType.storage)); } }
public DroneTask(DataSaver.DroneSaveData saveData) { construction = Grid.s.GetTile(saveData.currentTaskPosition).myConstruction; if (construction != null) { if (construction.isConstruction) { myType = DroneTaskType.build; } else { myType = DroneTaskType.destroy; } location = construction.center; materials = DataSaver.InventoryData.ConvertToRegularData(saveData.currentTaskMaterials); } else { location = Position.InvalidPosition(); } }
public DroneTask(DroneTaskType type, Station station) { Type = type; Station = station; }
public DroneTask(DroneTaskType type, Package package, Station station) { Type = type; Package = package; Station = station; }