public bool HasModule(ShipMod.ShipModTypes type) { foreach (ShipNode node in nodes) { if (node.ModType == type && !node.Empty) { return(true); } } return(false); }
public List <InventorySlot> GetInventoryList(ShipMod.ShipModTypes modType) { List <InventorySlot> modList = GetInventoryList(ItemTypes.ShipMod); if (modType == ShipMod.ShipModTypes.Any) { return(modList); //Return all mods if Any } //Remove any mod that doesn't match the type for (int i = 0; i < modList.Count; i++) { if ((modList[i].Item as ShipMod).ModType != modType) { modList.RemoveAt(i--); } } return(modList); }
public ShipNode(int x, int y, ShipMod.ShipModTypes type) { Empty = true; ModType = type; Location = new Point(x, y); }