public JournalLoadGame(JObject evt) : base(evt, JournalTypeEnum.LoadGame)
        {
            LoadGameCommander = evt["Commander"].Str();
            ShipFD            = evt["Ship"].Str();
            if (ShipFD.Length > 0)      // Vega logs show no ship on certain logs.. handle it to prevent warnings.
            {
                ShipFD = JournalFieldNaming.NormaliseFDShipName(ShipFD);
                Ship   = JournalFieldNaming.GetBetterShipName(ShipFD);
                ShipId = evt["ShipID"].Int();
            }
            else
            {       // leave ShipFD as blank.
                Ship = "Unknown";
            }

            StartLanded = evt["StartLanded"].Bool();
            StartDead   = evt["StartDead"].Bool();
            GameMode    = evt["GameMode"].Str();
            Group       = evt["Group"].Str();
            Credits     = evt["Credits"].Long();
            Loan        = evt["Loan"].Long();

            ShipName     = evt["ShipName"].Str();
            ShipIdent    = evt["ShipIdent"].Str();
            FuelLevel    = evt["FuelLevel"].Double();
            FuelCapacity = evt["FuelCapacity"].Double();

            Horizons = evt["Horizons"].BoolNull();

            FID = evt["FID"].Str();     // 3.3 on
        }
예제 #2
0
        public JournalShipyardBuy(JObject evt) : base(evt, JournalTypeEnum.ShipyardBuy)
        {
            ShipTypeFD = JournalFieldNaming.NormaliseFDShipName(evt["ShipType"].Str());
            ShipType   = JournalFieldNaming.GetBetterShipName(ShipTypeFD);
            ShipPrice  = evt["ShipPrice"].Long();

            StoreOldShipFD = evt["StoreOldShip"].StrNull();
            if (StoreOldShipFD != null)
            {
                StoreOldShipFD = JournalFieldNaming.NormaliseFDShipName(StoreOldShipFD);
                StoreOldShip   = JournalFieldNaming.GetBetterShipName(StoreOldShipFD);
            }

            StoreOldShipId = evt["StoreShipID"].IntNull();

            SellOldShipFD = evt["SellOldShip"].StrNull();
            if (SellOldShipFD != null)
            {
                SellOldShipFD = JournalFieldNaming.NormaliseFDShipName(SellOldShipFD);
                SellOldShip   = JournalFieldNaming.GetBetterShipName(SellOldShipFD);
            }

            SellOldShipId = evt["SellShipID"].IntNull();

            SellPrice = evt["SellPrice"].LongNull();

            MarketID = evt["MarketID"].LongNull();
        }
예제 #3
0
            public string TransferTimeString;        // computed

            public void Normalise()
            {
                ShipType           = JournalFieldNaming.GetBetterShipName(ShipType);
                ShipType_Localised = ShipType_Localised.Alt(ShipType);
                TransferTimeSpan   = new System.TimeSpan((int)(TransferTime / 60 / 60), (int)((TransferTime / 60) % 60), (int)(TransferTime % 60));
                TransferTimeString = TransferTimeSpan.ToString();
            }
예제 #4
0
        public JournalModuleSwap(JObject evt) : base(evt, JournalTypeEnum.ModuleSwap)
        {
            FromSlot   = JournalFieldNaming.GetBetterSlotName(evt["FromSlot"].Str());
            FromSlotFD = JournalFieldNaming.NormaliseFDSlotName(evt["FromSlot"].Str());

            ToSlot   = JournalFieldNaming.GetBetterSlotName(evt["ToSlot"].Str());
            ToSlotFD = JournalFieldNaming.NormaliseFDSlotName(evt["ToSlot"].Str());

            FromItem          = JournalFieldNaming.GetBetterItemNameEvents(evt["FromItem"].Str());
            FromItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["FromItem"].Str());
            FromItemLocalised = evt["FromItem_Localised"].Str().Alt(FromItem);

            ToItem   = JournalFieldNaming.GetBetterItemNameEvents(evt["ToItem"].Str());
            ToItemFD = JournalFieldNaming.NormaliseFDItemName(evt["ToItem"].Str());
            if (ToItem.Equals("Null"))      // Frontier bug.. something Null is here.. remove
            {
                ToItem = ToItemFD = "";
            }
            ToItemLocalised = evt["ToItem_Localised"].Str().Alt(ToItem);        // if ToItem is null or not there, this won't be

            ShipFD = evt["Ship"].Str();
            Ship   = JournalFieldNaming.GetBetterShipName(evt["Ship"].Str());
            ShipId = evt["ShipID"].Int();

            MarketID = evt["MarketID"].LongNull();
        }
예제 #5
0
 public JournalRestockVehicle(JObject evt) : base(evt, JournalTypeEnum.RestockVehicle)
 {
     Type    = JournalFieldNaming.GetBetterShipName(evt["Type"].Str());
     Loadout = evt["Loadout"].Str();
     Cost    = evt["Cost"].Long();
     Count   = evt["Count"].Int();
 }
예제 #6
0
        public JournalLoadout(JObject evt) : base(evt, JournalTypeEnum.Loadout)
        {
            Ship      = JournalFieldNaming.GetBetterShipName(evt["Ship"].Str());
            ShipFD    = JournalFieldNaming.NormaliseFDShipName(evt["Ship"].Str());
            ShipId    = evt["ShipID"].Int();
            ShipName  = evt["ShipName"].Str();
            ShipIdent = evt["ShipIdent"].Str();

            ShipModules = new List <ShipModule>();

            JArray jmodules = (JArray)evt["Modules"];

            if (jmodules != null)       // paranoia
            {
                foreach (JObject jo in jmodules)
                {
                    ShipModule module = new ShipModule(JournalFieldNaming.GetBetterSlotName(jo["Slot"].Str()),
                                                       JournalFieldNaming.NormaliseFDSlotName(jo["Slot"].Str()),
                                                       JournalFieldNaming.GetBetterItemNameLoadout(jo["Item"].Str()),
                                                       JournalFieldNaming.NormaliseFDItemName(jo["Item"].Str()),
                                                       jo["On"].BoolNull(),
                                                       jo["Priority"].IntNull(),
                                                       jo["AmmoInClip"].IntNull(),
                                                       jo["AmmoInHopper"].IntNull(),
                                                       jo["EngineerBlueprint"].Str().SplitCapsWordFull(),
                                                       jo["EngineerLevel"].IntNull(),
                                                       jo["Health"].DoubleNull(),
                                                       jo["Value"].IntNull());
                    ShipModules.Add(module);
                }

                ShipModules = ShipModules.OrderBy(x => x.Slot).ToList();            // sort for presentation..
            }
        }
예제 #7
0
 public JournalSellShipOnRebuy(JObject evt) : base(evt, JournalTypeEnum.SellShipOnRebuy)
 {
     ShipType   = JournalFieldNaming.GetBetterShipName(evt["ShipType"].Str());
     System     = evt["System"].Str();
     SellShipId = evt["SellShipId"].Int();
     ShipPrice  = evt["ShipPrice"].Long();
 }
예제 #8
0
        public JournalDied(JObject evt) : base(evt, JournalTypeEnum.Died)
        {
            string killerName = evt["KillerName"].Str();

            if (string.IsNullOrEmpty(killerName))
            {
                if (evt["Killers"] != null)
                {
                    Killers = evt["Killers"].ToObjectProtected <Killer[]>();
                }
            }
            else
            {
                // it was an individual
                Killers = new Killer[1]
                {
                    new Killer
                    {
                        Name           = killerName,
                        Name_Localised = evt["KillerName_Localised"].Str(),
                        Ship           = evt["KillerShip"].Str(),
                        Rank           = evt["KillerRank"].Str()
                    }
                };
            }

            if (Killers != null)
            {
                foreach (Killer k in Killers)
                {
                    k.Ship           = JournalFieldNaming.GetBetterShipName(k.Ship);
                    k.Name_Localised = JournalFieldNaming.CheckLocalisation(k.Name_Localised ?? "", k.Name);
                }
            }
        }
예제 #9
0
        public JournalModuleRetrieve(JObject evt) : base(evt, JournalTypeEnum.ModuleRetrieve)
        {
            Slot   = JournalFieldNaming.GetBetterSlotName(evt["Slot"].Str());
            SlotFD = JournalFieldNaming.NormaliseFDSlotName(evt["Slot"].Str());

            ShipFD = evt["Ship"].Str();
            Ship   = JournalFieldNaming.GetBetterShipName(evt["Ship"].Str());
            ShipId = evt["ShipID"].Int();

            RetrievedItem          = JournalFieldNaming.GetBetterItemNameEvents(evt["RetrievedItem"].Str());
            RetrievedItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["RetrievedItem"].Str());
            RetrievedItemLocalised = evt["RetrievedItem_Localised"].Str().Alt(RetrievedItem);

            EngineerModifications = evt["EngineerModifications"].Str().SplitCapsWordFull();

            SwapOutItem          = JournalFieldNaming.GetBetterItemNameEvents(evt["SwapOutItem"].Str());
            SwapOutItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["SwapOutItem"].Str());
            SwapOutItemLocalised = evt["SwapOutItem_Localised"].Str().Alt(SwapOutItem);

            Cost = evt["Cost"].Long();

            Hot     = evt["Hot"].BoolNull();
            Level   = evt["Level"].IntNull();
            Quality = evt["Quality"].DoubleNull();

            MarketID = evt["MarketID"].LongNull();
        }
예제 #10
0
        public JournalModuleBuy(JObject evt) : base(evt, JournalTypeEnum.ModuleBuy)
        {
            SlotFD = JournalFieldNaming.NormaliseFDSlotName(evt["Slot"].Str());
            Slot   = JournalFieldNaming.GetBetterSlotName(SlotFD);

            BuyItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["BuyItem"].Str());
            BuyItem          = JournalFieldNaming.GetBetterItemName(BuyItemFD);
            BuyItemLocalised = JournalFieldNaming.CheckLocalisation(evt["BuyItem_Localised"].Str(), BuyItem);
            BuyPrice         = evt["BuyPrice"].Long();

            ShipFD = JournalFieldNaming.NormaliseFDShipName(evt["Ship"].Str());
            Ship   = JournalFieldNaming.GetBetterShipName(ShipFD);
            ShipId = evt["ShipID"].Int();

            SellItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["SellItem"].Str());
            SellItem          = JournalFieldNaming.GetBetterItemName(SellItemFD);
            SellItemLocalised = JournalFieldNaming.CheckLocalisation(evt["SellItem_Localised"].Str(), SellItem);
            SellPrice         = evt["SellPrice"].LongNull();

            StoredItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["StoredItem"].Str());
            StoredItem          = JournalFieldNaming.GetBetterItemName(StoredItemFD);
            StoredItemLocalised = JournalFieldNaming.CheckLocalisation(evt["StoredItem_Localised"].Str(), StoredItem);

            MarketID = evt["MarketID"].LongNull();
        }
        public JournalShipTargeted(JObject evt) : base(evt, JournalTypeEnum.ShipTargeted)
        {
            TargetLocked = evt["TargetLocked"].Bool();

            ShipFD = evt["Ship"].StrNull();
            if (ShipFD != null)
            {
                ShipFD = JournalFieldNaming.NormaliseFDShipName(ShipFD);
                Ship   = JournalFieldNaming.GetBetterShipName(ShipFD);
            }
            Ship_Localised = evt["Ship_Localised"].Str().Alt(Ship);

            ScanStage           = evt["ScanStage"].IntNull();
            PilotName           = evt["PilotName"].StrNull();
            PilotName_Localised = evt["PilotName_Localised"].Str().Alt(PilotName);

            PilotRank       = evt["PilotRank"].StrNull();
            ShieldHealth    = evt["ShieldHealth"].DoubleNull();
            HullHealth      = evt["HullHealth"].DoubleNull();
            Faction         = evt["Faction"].StrNull();
            LegalStatus     = evt["LegalStatus"].StrNull();
            Bounty          = evt["Bounty"].IntNull();
            SubSystem       = evt["SubSystem"].StrNull();
            SubSystemHealth = evt["SubSystemHealth"].DoubleNull();
        }
        public JournalStoredShips(JObject evt) : base(evt, JournalTypeEnum.StoredShips)
        {
            StationName = evt["StationName"].Str();
            StarSystem  = evt["StarSystem"].Str();
            MarketID    = evt["MarketID"].LongNull();

            ShipsHere   = evt["ShipsHere"]?.ToObject <StoredShipItem[]>();
            ShipsRemote = evt["ShipsRemote"]?.ToObject <StoredShipItem[]>();

            if (ShipsHere != null)
            {
                foreach (StoredShipItem i in ShipsHere)
                {
                    i.ShipType = JournalFieldNaming.GetBetterShipName(i.ShipType);
                }
            }

            if (ShipsRemote != null)
            {
                foreach (StoredShipItem i in ShipsRemote)
                {
                    i.ShipType = JournalFieldNaming.GetBetterShipName(i.ShipType);
                }
            }
        }
예제 #13
0
        public JournalModuleStore(JObject evt) : base(evt, JournalTypeEnum.ModuleStore)
        {
            SlotFD = JournalFieldNaming.NormaliseFDSlotName(evt["Slot"].Str());
            Slot   = JournalFieldNaming.GetBetterSlotName(SlotFD);

            ShipFD = JournalFieldNaming.NormaliseFDShipName(evt["Ship"].Str());
            Ship   = JournalFieldNaming.GetBetterShipName(ShipFD);
            ShipId = evt["ShipID"].Int();

            StoredItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["StoredItem"].Str());
            StoredItem          = JournalFieldNaming.GetBetterItemName(StoredItemFD);
            StoredItemLocalised = JournalFieldNaming.CheckLocalisation(evt["StoredItem_Localised"].Str(), StoredItem);

            EngineerModifications = evt["EngineerModifications"].StrNull().SplitCapsWordFull();

            ReplacementItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["ReplacementItem"].Str());
            ReplacementItem          = JournalFieldNaming.GetBetterItemName(ReplacementItemFD);
            ReplacementItemLocalised = JournalFieldNaming.CheckLocalisation(evt["ReplacementItem_Localised"].Str(), ReplacementItem);

            Cost = evt["Cost"].LongNull();

            Hot     = evt["Hot"].BoolNull();
            Level   = evt["Level"].IntNull();
            Quality = evt["Quality"].DoubleNull();

            MarketID = evt["MarketID"].LongNull();
        }
예제 #14
0
 public JournalShipyardSwap(JObject evt) : base(evt, JournalTypeEnum.ShipyardSwap)
 {
     ShipType     = JournalFieldNaming.GetBetterShipName(evt["ShipType"].Str());
     ShipFD       = JournalFieldNaming.NormaliseFDShipName(evt["ShipType"].Str());
     ShipId       = evt["ShipID"].Int();
     StoreOldShip = JournalFieldNaming.GetBetterShipName(evt["StoreOldShip"].Str());
     StoreShipId  = evt["StoreShipID"].IntNull();
 }
예제 #15
0
 //When Written: when selling a ship stored in the shipyard
 //Parameters:
 //•	ShipType: type of ship being sold
 //•	SellShipID
 //•	ShipPrice: sale price
 //•	System: (if ship is in another system) name of system
 public JournalShipyardSell(JObject evt) : base(evt, JournalTypeEnum.ShipyardSell)
 {
     MarketID   = evt["MarketID"].LongNull();
     ShipType   = JournalFieldNaming.GetBetterShipName(evt["ShipType"].Str());
     SellShipId = evt["SellShipID"].Int();
     ShipPrice  = evt["ShipPrice"].Long();
     System     = evt["System"].Str();
 }
예제 #16
0
 public JournalSetUserShipName(JObject evt) : base(evt, JournalTypeEnum.SetUserShipName)
 {
     Ship      = JournalFieldNaming.GetBetterShipName(evt["Ship"].Str());
     ShipFD    = JournalFieldNaming.NormaliseFDShipName(evt["Ship"].Str());
     ShipID    = evt["ShipID"].Int();
     ShipName  = evt["UserShipName"].Str(); // name to match LoadGame
     ShipIdent = evt["UserShipId"].Str();   // name to match LoadGame
 }
        public JournalDied(JObject evt) : base(evt, JournalTypeEnum.Died)
        {
            string killerName = evt["KillerName"].Str();

            if (string.IsNullOrEmpty(killerName))       // no killer name
            {
                if (evt["Killers"] != null)             // by a wing
                {
                    Killers = evt["Killers"].ToObjectQ <Killer[]>();
                }
                else
                {
                    string killerShip = evt["KillerShip"].Str();        // by an automated device
                    if (killerShip.HasChars())
                    {
                        ItemData.Actor a = ItemData.GetActor(killerShip);

                        Killers = new Killer[1]
                        {
                            new Killer
                            {
                                Name           = killerShip,
                                Name_Localised = a != null ? a.Name : killerShip.SplitCapsWordFull(),
                                Ship           = "",
                                Rank           = "",
                            }
                        };
                    }
                }
            }
            else
            {
                // it was an individual
                Killers = new Killer[1]
                {
                    new Killer
                    {
                        Name           = killerName,
                        Name_Localised = evt["KillerName_Localised"].Str(),
                        Ship           = evt["KillerShip"].Str(),
                        Rank           = evt["KillerRank"].Str()
                    }
                };
            }

            if (Killers != null)
            {
                foreach (Killer k in Killers)
                {
                    if (ItemData.IsShip(k.Ship))
                    {
                        k.Ship = JournalFieldNaming.GetBetterShipName(k.Ship);
                    }
                    k.Name_Localised = JournalFieldNaming.CheckLocalisation(k.Name_Localised ?? "", k.Name);
                }
            }
        }
예제 #18
0
 public JournalShipyardBuy(JObject evt) : base(evt, JournalTypeEnum.ShipyardBuy)
 {
     ShipType     = JournalFieldNaming.GetBetterShipName(evt["ShipType"].Str());
     ShipPrice    = evt["ShipPrice"].Long();
     StoreOldShip = JournalFieldNaming.GetBetterShipName(evt["StoreOldShip"].Str());
     StoreShipId  = evt["StoreShipID"].IntNull();
     SellOldShip  = JournalFieldNaming.GetBetterShipName(evt["SellOldShip"].Str());
     SellShipId   = evt["SellShipID"].IntNull();
     SellPrice    = evt["SellPrice"].LongNull();
 }
예제 #19
0
        public JournalLoadout(JObject evt) : base(evt, JournalTypeEnum.Loadout)
        {
            ShipFD     = JournalFieldNaming.NormaliseFDShipName(evt["Ship"].Str());
            Ship       = JournalFieldNaming.GetBetterShipName(ShipFD);
            ShipId     = evt["ShipID"].Int();
            ShipName   = evt["ShipName"].Str();
            ShipIdent  = evt["ShipIdent"].Str();
            HullValue  = evt["HullValue"].LongNull();
            HullHealth = evt["HullHealth"].DoubleNull();
            if (HullHealth != null)
            {
                HullHealth *= 100.0;        // convert to 0-100
            }
            ModulesValue = evt["ModulesValue"].LongNull();
            Rebuy        = evt["Rebuy"].LongNull();
            Hot          = evt["Hot"].BoolNull(); // 3.3

            ShipModules = new List <ShipModule>();

            JArray jmodules = (JArray)evt["Modules"];

            if (jmodules != null)       // paranoia
            {
                foreach (JObject jo in jmodules)
                {
                    ShipModule.EngineeringData engineering = null;

                    JObject jeng = (JObject)jo["Engineering"];
                    if (jeng != null)
                    {
                        engineering = new ShipModule.EngineeringData(jeng);
                    }

                    string slotfdname = JournalFieldNaming.NormaliseFDSlotName(jo["Slot"].Str());
                    string itemfdname = JournalFieldNaming.NormaliseFDItemName(jo["Item"].Str());

                    ShipModule module = new ShipModule(JournalFieldNaming.GetBetterSlotName(slotfdname),
                                                       slotfdname,
                                                       JournalFieldNaming.GetBetterItemName(itemfdname),
                                                       itemfdname,
                                                       jo["On"].BoolNull(),
                                                       jo["Priority"].IntNull(),
                                                       jo["AmmoInClip"].IntNull(),
                                                       jo["AmmoInHopper"].IntNull(),
                                                       jo["Health"].DoubleNull(),
                                                       jo["Value"].IntNull(),
                                                       null,   //power not received here
                                                       engineering);
                    ShipModules.Add(module);
                }

                ShipModules = ShipModules.OrderBy(x => x.Slot).ToList();            // sort for presentation..
            }
        }
예제 #20
0
 public void Normalise(StoredShipInformation[] s)
 {
     if (s != null)
     {
         foreach (StoredShipInformation i in s)
         {
             i.ShipType           = JournalFieldNaming.GetBetterShipName(i.ShipType);
             i.TransferTimeSpan   = new System.TimeSpan((int)(i.TransferTime / 60 / 60), (int)((i.TransferTime / 60) % 60), (int)(i.TransferTime % 60));
             i.TransferTimeString = i.TransferTimeSpan.ToString();
         }
     }
 }
예제 #21
0
        public JournalShipyardTransfer(JObject evt) : base(evt, JournalTypeEnum.ShipyardTransfer)
        {
            ShipType      = JournalFieldNaming.GetBetterShipName(evt["ShipType"].Str());
            ShipId        = evt["ShipID"].Int();
            System        = evt["System"].Str();
            Distance      = evt["Distance"].Double();
            TransferPrice = evt["TransferPrice"].Long();

            if (Distance > 100000.0)       // previously, it was in m, now they have changed it to LY per 2.3. So if its large (over 100k ly, impossible) convert
            {
                Distance = Distance / 299792458.0 / 365 / 24 / 60 / 60;
            }
        }
예제 #22
0
        public JournalModuleSellRemote(JObject evt) : base(evt, JournalTypeEnum.ModuleSellRemote)
        {
            Slot = evt["StorageSlot"].Str();         // this is NOT a ship slot name, just a index

            SellItem          = JournalFieldNaming.GetBetterItemNameEvents(evt["SellItem"].Str());
            SellItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["SellItem"].Str());
            SellItemLocalised = evt["SellItem_Localised"].Str();

            SellPrice = evt["SellPrice"].Long();
            Ship      = JournalFieldNaming.GetBetterShipName(evt["Ship"].Str());
            ShipId    = evt["ShipID"].Int();
            ServerId  = evt["ServerId"].Int();
        }
예제 #23
0
        public JournalModuleSell(JObject evt) : base(evt, JournalTypeEnum.ModuleSell)
        {
            Slot   = JournalFieldNaming.GetBetterSlotName(evt["Slot"].Str());
            SlotFD = JournalFieldNaming.NormaliseFDSlotName(evt["Slot"].Str());

            SellItem          = JournalFieldNaming.GetBetterItemNameEvents(evt["SellItem"].Str());
            SellItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["SellItem"].Str());
            SellItemLocalised = evt["SellItem_Localised"].Str();

            SellPrice = evt["SellPrice"].Long();

            Ship   = JournalFieldNaming.GetBetterShipName(evt["Ship"].Str());
            ShipId = evt["ShipID"].Int();
        }
        public JournalFetchRemoteModule(JObject evt) : base(evt, JournalTypeEnum.FetchRemoteModule)
        {
            StorageSlot = evt["StorageSlot"].Str();          // Slot number, not a slot on our ship

            StoredItem          = JournalFieldNaming.GetBetterItemNameEvents(evt["StoredItem"].Str());
            StoredItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["StoredItem"].Str());
            StoredItemLocalised = evt["StoredItem_Localised"].Str();

            TransferCost = evt["TransferCost"].Long();

            Ship     = JournalFieldNaming.GetBetterShipName(evt["Ship"].Str());
            ShipId   = evt["ShipID"].Int();
            ServerId = evt["ServerId"].Int();
        }
예제 #25
0
        public JournalShipyardSwap(JObject evt) : base(evt, JournalTypeEnum.ShipyardSwap)
        {
            ShipFD   = JournalFieldNaming.NormaliseFDShipName(evt["ShipType"].Str());
            ShipType = JournalFieldNaming.GetBetterShipName(ShipFD);
            ShipId   = evt["ShipID"].Int();

            StoreOldShipFD = JournalFieldNaming.NormaliseFDShipName(evt["StoreOldShip"].Str());
            StoreOldShip   = JournalFieldNaming.GetBetterShipName(StoreOldShipFD);
            StoreShipId    = evt["StoreShipID"].IntNull();

            MarketID = evt["MarketID"].LongNull();

            //•	SellShipID -- NO EVIDENCE seen
        }
        public JournalMassModuleStore(JObject evt) : base(evt, JournalTypeEnum.MassModuleStore)
        {
            Ship        = JournalFieldNaming.GetBetterShipName(evt["Ship"].Str());
            ShipId      = evt["ShipID"].Int();
            ModuleItems = evt["Items"]?.ToObject <ModuleItem[]>();

            if (ModuleItems != null)
            {
                foreach (ModuleItem i in ModuleItems)
                {
                    i.Slot = JournalFieldNaming.GetBetterSlotName(i.Slot);
                    i.Name = JournalFieldNaming.GetBetterItemNameEvents(i.Name);
                }
            }
        }
예제 #27
0
        public void Rescan(JObject evt)
        {
            StationName = evt["StationName"].Str();
            StarSystem  = evt["StarSystem"].Str();
            MarketID    = evt["MarketID"].LongNull();

            ShipyardItems = evt["PriceList"]?.ToObject <ShipyardItem[]>();

            if (ShipyardItems != null)
            {
                foreach (ShipyardItem i in ShipyardItems)
                {
                    i.ShipType = JournalFieldNaming.GetBetterShipName(i.ShipType);
                }
            }
        }
예제 #28
0
        public JournalLoadGame(JObject evt) : base(evt, JournalTypeEnum.LoadGame)
        {
            LoadGameCommander = evt["Commander"].Str();
            Ship        = JournalFieldNaming.GetBetterShipName(evt["Ship"].Str());
            ShipFD      = JournalFieldNaming.NormaliseFDShipName(evt["Ship"].Str());
            ShipId      = evt["ShipID"].Int();
            StartLanded = evt["StartLanded"].Bool();
            StartDead   = evt["StartDead"].Bool();
            GameMode    = evt["GameMode"].Str();
            Group       = evt["Group"].Str();
            Credits     = evt["Credits"].Long();
            Loan        = evt["Loan"].Long();

            ShipName     = evt["ShipName"].Str();
            ShipIdent    = evt["ShipIdent"].Str();
            FuelLevel    = evt["FuelLevel"].Double();
            FuelCapacity = evt["FuelCapacity"].Double();
        }
예제 #29
0
        public JournalFetchRemoteModule(JObject evt) : base(evt, JournalTypeEnum.FetchRemoteModule)
        {
            StorageSlot = evt["StorageSlot"].Str();          // Slot number, not a slot on our ship

            StoredItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["StoredItem"].Str());
            StoredItem          = JournalFieldNaming.GetBetterItemName(StoredItemFD);
            StoredItemLocalised = JournalFieldNaming.CheckLocalisation(evt["StoredItem_Localised"].Str(), StoredItem);

            TransferCost = evt["TransferCost"].Long();

            ShipFD = JournalFieldNaming.NormaliseFDShipName(evt["Ship"].Str());
            Ship   = JournalFieldNaming.GetBetterShipName(ShipFD);
            ShipId = evt["ShipID"].Int();

            ServerId             = evt["ServerId"].Int();
            nTransferTime        = evt["TransferTime"].IntNull();
            FriendlyTransferTime = nTransferTime.HasValue ? nTransferTime.Value.SecondsToString() : "";
        }
예제 #30
0
        public JournalMassModuleStore(JObject evt) : base(evt, JournalTypeEnum.MassModuleStore)
        {
            ShipFD      = JournalFieldNaming.NormaliseFDShipName(evt["Ship"].Str());
            Ship        = JournalFieldNaming.GetBetterShipName(ShipFD);
            ShipId      = evt["ShipID"].Int();
            ModuleItems = evt["Items"]?.ToObjectProtected <ModuleItem[]>();
            MarketID    = evt["MarketID"].LongNull();

            if (ModuleItems != null)
            {
                foreach (ModuleItem i in ModuleItems)
                {
                    i.SlotFD = JournalFieldNaming.NormaliseFDSlotName(i.Slot);
                    i.Slot   = JournalFieldNaming.GetBetterSlotName(i.SlotFD);
                    i.NameFD = JournalFieldNaming.NormaliseFDItemName(i.Name);
                    i.Name   = JournalFieldNaming.GetBetterItemName(i.NameFD);
                }
            }
        }