Esempio n. 1
0
        public void ModuleSell(JournalModuleSell e)
        {
            ShipInformation sm = EnsureShip(e.ShipId);            // this either gets current ship or makes a new one.

            Ships[e.ShipId] = sm.RemoveModule(e.Slot, e.SellItem);

            if (e.SellItem.Length > 0)
            {
                itemlocalisation[e.SellItem] = e.SellItemLocalised;
            }

            currentid = e.ShipId;           // must be in it to do this
        }
Esempio n. 2
0
        public void ModuleStore(JournalModuleStore e)
        {
            ShipInformation sm = EnsureShip(e.ShipId);            // this either gets current ship or makes a new one.

            if (e.ReplacementItem.Length > 0)
            {
                Ships[e.ShipId] = sm.AddModule(e.Slot, e.SlotFD, e.ReplacementItem, e.ReplacementItemFD, e.ReplacementItemLocalised);
            }
            else
            {
                Ships[e.ShipId] = sm.RemoveModule(e.Slot, e.StoredItem);
            }

            StoredModules = StoredModules.StoreModule(e.StoredItem, e.StoredItemLocalised);
            currentid     = e.ShipId;       // must be in it to do this
        }