void AddMiningAttachment(Ship ship, ShipAttachment attachment) { GameObject shipObject = ship.gameObject; CmpMining cmp = shipObject.GetComponent <CmpMining>(); if (!cmp) { cmp = shipObject.AddComponent <CmpMining>() as CmpMining; ship.CmpMining = cmp; } cmp.Add((MiningAttachment)attachment); }
void AddSolarPanelAttachment(Ship ship, ShipAttachment attachment) { }
void AddTowingAttachment(Ship ship, ShipAttachment attachment) { }
// Add Attachments void AddConstructionAttachment(Ship ship, ShipAttachment attachment) { }
void AddStorageAttachment(Ship ship, ShipAttachment attachment) { // TODO //ship.CmpCargo.MaxCargoSpace += ((StorageAttachment)attachment).CargoSize; }