Exemple #1
0
        public void ModuleRetrieve(JournalModuleRetrieve e)
        {
            ShipInformation sm = EnsureShip(e.ShipId);            // this either gets current ship or makes a new one.

            if (e.SwapOutItem.Length > 0)
            {
                StoredModules = StoredModules.StoreModule(e.SwapOutItem, e.SwapOutItemLocalised);
            }

            Ships[e.ShipId] = sm.AddModule(e.Slot, e.SlotFD, e.RetrievedItem, e.RetrievedItemFD, e.RetrievedItemLocalised);

            StoredModules = StoredModules.RemoveModule(e.RetrievedItem);
        }
        public void ModuleRetrieve(JournalModuleRetrieve e)
        {
            string sid = Key(e.ShipFD, e.ShipId);

            ShipInformation sm = EnsureShip(sid);       // this either gets current ship or makes a new one.

            sm = sm.SetShipDetails(e.Ship, e.ShipFD);   // shallow copy if changed
            if (e.SwapOutItem.Length > 0)
            {
                StoredModules = StoredModules.StoreModule(e.SwapOutItem, e.SwapOutItemLocalised);
            }

            Ships[sid] = sm.AddModule(e.Slot, e.SlotFD, e.RetrievedItem, e.RetrievedItemFD, e.RetrievedItemLocalised);

            StoredModules = StoredModules.RemoveModule(e.RetrievedItem);
            VerifyList();
        }