Example #1
0
 public JournalRepair(JObject evt) : base(evt, JournalTypeEnum.Repair)
 {
     ItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["Item"].Str());
     Item          = JournalFieldNaming.GetBetterItemName(ItemFD);
     ItemLocalised = JournalFieldNaming.CheckLocalisation(evt["Item_Localised"].Str(), Item);
     Cost          = evt["Cost"].Long();
 }
Example #2
0
        public JournalDocked(JObject evt) : base(evt, JournalTypeEnum.Docked)
        {
            StationName   = evt["StationName"].Str();
            StationType   = evt["StationType"].Str().SplitCapsWord();
            StarSystem    = evt["StarSystem"].Str();
            SystemAddress = evt["SystemAddress"].LongNull();
            MarketID      = evt["MarketID"].LongNull();
            CockpitBreach = evt["CockpitBreach"].Bool();

            Faction      = JSONObjectExtensions.GetMultiStringDef(evt, new string[] { "StationFaction", "Faction" });
            FactionState = evt["FactionState"].Str().SplitCapsWord();

            Allegiance = JSONObjectExtensions.GetMultiStringDef(evt, new string[] { "StationAllegiance", "Allegiance" });

            Economy           = JSONObjectExtensions.GetMultiStringDef(evt, new string[] { "StationEconomy", "Economy" });
            Economy_Localised = JournalFieldNaming.CheckLocalisation(JSONObjectExtensions.GetMultiStringDef(evt, new string[] { "StationEconomy_Localised", "Economy_Localised" }), Economy);
            EconomyList       = evt["StationEconomies"]?.ToObjectProtected <Economies[]>();

            Government           = JSONObjectExtensions.GetMultiStringDef(evt, new string[] { "StationGovernment", "Government" });
            Government_Localised = JournalFieldNaming.CheckLocalisation(JSONObjectExtensions.GetMultiStringDef(evt, new string[] { "StationGovernment_Localised", "Government_Localised" }), Government);

            Wanted = evt["Wanted"].Bool();

            StationServices = evt["StationServices"]?.ToObjectProtected <string[]>();

            // Government = None only happens in Training
            if (Government == "$government_None;")
            {
                IsTrainingEvent = true;
            }
        }
 public JournalPowerplayDeliver(JObject evt) : base(evt, JournalTypeEnum.PowerplayDeliver)
 {
     Power          = evt["Power"].Str();
     Type           = evt["Type"].Str();
     Type_Localised = JournalFieldNaming.CheckLocalisation(evt["Type_Localised"].Str(), Type);
     Count          = evt["Count"].Int();
 }
Example #4
0
 public JournalPowerplayCollect(JObject evt) : base(evt, JournalTypeEnum.PowerplayCollect)
 {
     Power          = evt["Power"].Str();
     Type           = JournalFieldNaming.FixCommodityName(evt["Type"].Str());
     Type_Localised = JournalFieldNaming.CheckLocalisation(evt["Type_Localised"].Str(), Type);
     Count          = evt["Count"].Int();
 }
Example #5
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();
        }
Example #6
0
 public JournalCodexEntry(JObject evt) : base(evt, JournalTypeEnum.CodexEntry)
 {
     EntryID                      = evt["EntryID"].Long();
     Name                         = evt["Name"].Str();
     Name_Localised               = JournalFieldNaming.CheckLocalisation(evt["Name_Localised"].Str(), Name);
     SubCategory                  = evt["SubCategory"].Str();
     SubCategory_Localised        = JournalFieldNaming.CheckLocalisation(evt["SubCategory_Localised"].Str(), SubCategory);
     Category                     = evt["Category"].Str();
     Category_Localised           = JournalFieldNaming.CheckLocalisation(evt["Category_Localised"].Str(), Category);
     Region                       = evt["Region"].Str();
     Region_Localised             = evt["Region_Localised"].Str();
     System                       = evt["System"].Str();
     SystemAddress                = evt["SystemAddress"].LongNull();
     IsNewEntry                   = evt["IsNewEntry"].BoolNull();
     NewTraitsDiscovered          = evt["NewTraitsDiscovered"].BoolNull();
     NearestDestination           = evt["NearestDestination"].StrNull();
     NearestDestination_Localised = JournalFieldNaming.CheckLocalisation(evt["NearestDestination_Localised"].StrNull(), NearestDestination);
     if (evt["Traits"] != null)
     {
         Traits = evt["Traits"].ToObjectQ <string[]>();
     }
     VoucherAmount = evt["VoucherAmount"].LongNull();
     Latitude      = evt["Latitude"].Double();   // odyssey
     Longitude     = evt["Longitude"].Double();
 }
        public JournalRepair(JObject evt) : base(evt, JournalTypeEnum.Repair)
        {
            if (evt["Items"] is JArray)
            {
                Items = new List <RepairItem>();

                ItemLocalised = Item = ItemFD = "";

                foreach (var jitem in evt["Items"])
                {
                    var itemfd = JournalFieldNaming.NormaliseFDItemName(jitem.Str());
                    var item   = JournalFieldNaming.GetBetterItemName(itemfd);

                    var repairitem = new RepairItem
                    {
                        ItemFD        = itemfd,
                        Item          = item,
                        ItemLocalised = item.SplitCapsWordFull()
                    };

                    ItemLocalised = ItemLocalised.AppendPrePad(repairitem.ItemLocalised, ", "); // for the voice pack, keep this going

                    Items.Add(repairitem);
                }
            }
            else
            {
                ItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["Item"].Str());
                Item          = JournalFieldNaming.GetBetterItemName(ItemFD);
                ItemLocalised = JournalFieldNaming.CheckLocalisation(evt["Item_Localised"].Str(), Item);
            }

            Cost = evt["Cost"].Long();
        }
Example #8
0
        public JournalModuleSwap(JObject evt) : base(evt, JournalTypeEnum.ModuleSwap)
        {
            FromSlotFD = JournalFieldNaming.NormaliseFDSlotName(evt["FromSlot"].Str());
            FromSlot   = JournalFieldNaming.GetBetterSlotName(FromSlotFD);

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

            FromItemFD        = JournalFieldNaming.NormaliseFDItemName(evt["FromItem"].Str());
            FromItem          = JournalFieldNaming.GetBetterItemName(FromItemFD);
            FromItemLocalised = JournalFieldNaming.CheckLocalisation(evt["FromItem_Localised"].Str(), FromItem);

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

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

            MarketID = evt["MarketID"].LongNull();
        }
        public JournalBounty(JObject evt) : base(evt, JournalTypeEnum.Bounty)
        {
            TotalReward = evt["TotalReward"].Long();     // others of them..

            VictimFaction          = evt["VictimFaction"].Str();
            VictimFactionLocalised = JournalFieldNaming.CheckLocalisation(evt["VictimFaction_Localised"].Str(), VictimFaction);

            SharedWithOthers = evt["SharedWithOthers"].Bool(false);
            Rewards          = evt["Rewards"]?.ToObjectProtected <BountyReward[]>();

            Target = evt["Target"].StrNull();       // only set for skimmer target missions

            if (Rewards == null)                    // for skimmers, its Faction/Reward.  Bug in manual reported to FD 23/5/2018
            {
                string faction = evt["Faction"].StrNull();
                long?  reward  = evt["Reward"].IntNull();

                if (faction != null && reward != null)
                {
                    Rewards    = new BountyReward[1];
                    Rewards[0] = new BountyReward()
                    {
                        Faction = faction, Reward = reward.Value
                    };
                    TotalReward = reward.Value;
                }
            }
        }
Example #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 JournalEngineerContribution(JObject evt) : base(evt, JournalTypeEnum.EngineerContribution)
        {
            Engineer   = evt["Engineer"].Str();
            EngineerID = evt["EngineerID"].LongNull();
            Type       = evt["Type"].Str();

            if (Type.Equals("Commodity") || Type.Equals("Materials") || Type.Equals("Credits") || Type.Equals("Bond") || Type.Equals("Bounty"))
            {
                unknownType = false;
            }
            else
            {
                unknownType = true;
            }

            Commodity           = evt["Commodity"].Str();
            Commodity           = JournalFieldNaming.FDNameTranslation(Commodity); // pre-mangle to latest names, in case we are reading old journal records
            FriendlyCommodity   = MaterialCommodityData.GetNameByFDName(Commodity);
            Commodity_Localised = JournalFieldNaming.CheckLocalisation(evt["Commodity_Localised"].Str(), FriendlyCommodity);

            Material           = evt["Material"].Str();
            Material           = JournalFieldNaming.FDNameTranslation(Material); // pre-mangle to latest names, in case we are reading old journal records
            FriendlyMaterial   = MaterialCommodityData.GetNameByFDName(Material);
            Material_Localised = JournalFieldNaming.CheckLocalisation(evt["Material_Localised"].Str(), FriendlyMaterial);

            Quantity      = evt["Quantity"].Int();
            TotalQuantity = evt["TotalQuantity"].Int();
        }
        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);
                }
            }
        }
Example #13
0
 public JournalSendText(JObject evt) : base(evt, JournalTypeEnum.SendText)
 {
     To           = evt["To"].Str();
     To_Localised = JournalFieldNaming.CheckLocalisation(evt["To_Localised"].Str(), To);
     Message      = evt["Message"].Str();
     Command      = Message.StartsWith("/") && To.Equals("Local", StringComparison.InvariantCultureIgnoreCase);
 }
Example #14
0
            public FSSSignal(JObject evt, System.DateTime EventTimeUTC)
            {
                SignalName           = evt["SignalName"].Str();
                SignalName_Localised = JournalFieldNaming.CheckLocalisation(evt["SignalName_Localised"].Str(), SignalName);

                SpawingState           = evt["SpawingState"].Str();
                SpawingState_Localised = JournalFieldNaming.CheckLocalisation(evt["SpawingState_Localised"].Str(), SpawingState);

                SpawingFaction           = evt["SpawingFaction"].Str();
                SpawingFaction_Localised = JournalFieldNaming.CheckLocalisation(evt["SpawingFaction_Localised"].Str(), SpawingFaction);

                TimeRemaining = evt["TimeRemaining"].DoubleNull();

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

                ThreatLevel      = evt["USSThreat"].IntNull();
                USSType          = evt["USSType"].Str();
                USSTypeLocalised = JournalFieldNaming.CheckLocalisation(evt["USSType_Localised"].Str(), USSType);
                IsStation        = evt["IsStation"].BoolNull();

                if (TimeRemaining != null)
                {
                    ExpiryUTC   = EventTimeUTC.AddSeconds(TimeRemaining.Value);
                    ExpiryLocal = ExpiryUTC.ToLocalTime();
                }
            }
Example #15
0
        // presuming its co-incident with commit crime so don't double count bounties

        public JournalCrimeVictim(JObject evt) : base(evt, JournalTypeEnum.CrimeVictim)
        {
            CrimeType         = evt["CrimeType"].Str().SplitCapsWordFull();
            Offender          = evt["Offender"].Str();
            OffenderLocalised = JournalFieldNaming.CheckLocalisation(evt["Offender_Localised"].Str(), Offender);
            Bounty            = evt["Bounty"].Long();
        }
Example #16
0
        public JournalShipTargeted(JObject evt) : base(evt, JournalTypeEnum.ShipTargeted)
        {
            TargetLocked = evt["TargetLocked"].Bool();

            ShipFD = evt["Ship"].StrNull();
            if (ItemData.IsShip(ShipFD))
            {
                ShipFD = JournalFieldNaming.NormaliseFDShipName(ShipFD);
                Ship   = JournalFieldNaming.GetBetterShipName(ShipFD);
            }
            Ship_Localised = JournalFieldNaming.CheckLocalisation(evt["Ship_Localised"].Str(), Ship);

            ScanStage           = evt["ScanStage"].IntNull();
            PilotName           = evt["PilotName"].StrNull();
            PilotName_Localised = JournalFieldNaming.CheckLocalisation(evt["PilotName_Localised"].Str(), 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();
            Power           = evt["Power"].StrNull();
        }
 public JournalTouchdown(JObject evt) : base(evt, JournalTypeEnum.Touchdown)
 {
     Latitude                     = evt["Latitude"].Double();
     Longitude                    = evt["Longitude"].Double();
     PlayerControlled             = evt["PlayerControlled"].BoolNull();
     NearestDestination           = evt["NearestDestination"].StrNull();
     NearestDestination_Localised = JournalFieldNaming.CheckLocalisation(evt["NearestDestination_Localised"].StrNull(), NearestDestination);
 }
Example #18
0
 public JournalReceiveText(JObject evt) : base(evt, JournalTypeEnum.ReceiveText)
 {
     From             = evt["From"].Str();
     FromLocalised    = evt["From_Localised"].Str().Alt(From);
     Message          = evt["Message"].Str();
     MessageLocalised = JournalFieldNaming.CheckLocalisation(evt["Message_Localised"].Str(), Message);
     Channel          = evt["Channel"].Str();
 }
Example #19
0
 public JournalCollectCargo(JObject evt) : base(evt, JournalTypeEnum.CollectCargo)
 {
     Type           = evt["Type"].Str();                                                               //FDNAME
     Type           = JournalFieldNaming.FDNameTranslation(Type);                                      // pre-mangle to latest names, in case we are reading old journal records
     FriendlyType   = MaterialCommodityData.GetNameByFDName(Type);
     Type_Localised = JournalFieldNaming.CheckLocalisation(evt["Type_Localised"].Str(), FriendlyType); // always ensure we have one
     Stolen         = evt["Stolen"].Bool();
 }
 public JournalFactionKillBond(JObject evt) : base(evt, JournalTypeEnum.FactionKillBond)
 {
     AwardingFaction           = evt["AwardingFaction"].Str();
     AwardingFaction_Localised = JournalFieldNaming.CheckLocalisation(evt["AwardingFaction_Localised"].Str(), AwardingFaction);
     VictimFaction             = evt["VictimFaction"].Str();
     VictimFaction_Localised   = JournalFieldNaming.CheckLocalisation(evt["VictimFaction_Localised"].Str(), VictimFaction);
     Reward = evt["Reward"].Long();
 }
Example #21
0
 public JournalAfmuRepairs(JObject evt) : base(evt, JournalTypeEnum.AfmuRepairs)
 {
     ModuleFD        = JournalFieldNaming.NormaliseFDItemName(evt["Module"].Str());
     Module          = JournalFieldNaming.GetBetterItemName(ModuleFD);
     ModuleLocalised = JournalFieldNaming.CheckLocalisation(evt["Module_Localised"].Str(), Module);
     FullyRepaired   = evt["FullyRepaired"].Bool();
     Health          = evt["Health"].Float() * 100.0F;
 }
Example #22
0
 public JournalApproachSettlement(JObject evt) : base(evt, JournalTypeEnum.ApproachSettlement)
 {
     Name           = evt["Name"].Str();
     Name_Localised = JournalFieldNaming.CheckLocalisation(evt["Name_Localised"].Str(), Name);
     MarketID       = evt["MarketID"].LongNull();
     Latitude       = evt["Latitude"].DoubleNull();
     Longitude      = evt["Longitude"].DoubleNull();
 }
Example #23
0
        public JournalMissionCompleted(JObject evt) : base(evt, JournalTypeEnum.MissionCompleted)
        {
            FDName  = evt["Name"].Str();
            Name    = JournalFieldNaming.GetBetterMissionName(FDName);
            Faction = evt["Faction"].Str();

            Commodity          = JournalFieldNaming.FixCommodityName(evt["Commodity"].Str()); // evidence of $_name problem, fix to fdname
            Commodity          = JournalFieldNaming.FDNameTranslation(Commodity);             // pre-mangle to latest names, in case we are reading old journal records
            FriendlyCommodity  = MaterialCommodityData.GetNameByFDName(Commodity);
            CommodityLocalised = JournalFieldNaming.CheckLocalisationTranslation(evt["Commodity_Localised"].Str(), FriendlyCommodity);

            Count = evt["Count"].IntNull();

            TargetType          = evt["TargetType"].Str();
            TargetTypeFriendly  = JournalFieldNaming.GetBetterTargetTypeName(TargetType);                                     // remove $, underscores etc
            TargetTypeLocalised = JournalFieldNaming.CheckLocalisation(evt["TargetTypeLocalised"].Str(), TargetTypeFriendly); // may be empty..

            TargetFaction = evt["TargetFaction"].Str();

            Target          = evt["Target"].Str();
            TargetFriendly  = JournalFieldNaming.GetBetterTargetTypeName(Target);                                  // remove $, underscores etc
            TargetLocalised = JournalFieldNaming.CheckLocalisation(evt["Target_Localised"].Str(), TargetFriendly); // copied from Accepted.. no evidence

            Reward    = evt["Reward"].LongNull();
            Donation  = evt["Donation"].LongNull();
            MissionId = evt["MissionID"].Int();

            DestinationSystem = evt["DestinationSystem"].Str().Replace("$MISSIONUTIL_MULTIPLE_INNER_SEPARATOR;", ",")
                                .Replace("$MISSIONUTIL_MULTIPLE_FINAL_SEPARATOR;", ",");                                     // multi missions get this strange list;
            DestinationStation = evt["DestinationStation"].Str();

            PermitsAwarded = evt["PermitsAwarded"]?.ToObjectProtected <string[]>();

            // 7/3/2018 journal 16 3.02

            CommodityReward = evt["CommodityReward"]?.ToObjectProtected <CommodityRewards[]>();

            if (CommodityReward != null)
            {
                foreach (CommodityRewards c in CommodityReward)
                {
                    c.Normalise();
                }
            }

            MaterialsReward = evt["MaterialsReward"]?.ToObjectProtected <MaterialRewards[]>();

            if (MaterialsReward != null)
            {
                foreach (MaterialRewards m in MaterialsReward)
                {
                    m.Normalise();
                }
            }

            FactionEffects = evt["FactionEffects"]?.ToObjectProtected <FactionEffectsEntry[]>();      // NEEDS TEST
        }
 public JournalPayFines(JObject evt) : base(evt, JournalTypeEnum.PayFines)
 {
     Amount            = evt["Amount"].Long();
     BrokerPercentage  = evt["BrokerPercentage"].Double();
     AllFines          = evt["AllFines"].Bool();
     Faction           = evt["Faction"].Str();
     Faction_Localised = JournalFieldNaming.CheckLocalisation(evt["Faction_Localised"].Str(), Faction);
     ShipId            = evt["ShipID"].Int();
 }
 public JournalCommitCrime(JObject evt) : base(evt, JournalTypeEnum.CommitCrime)
 {
     CrimeType       = evt["CrimeType"].Str().SplitCapsWordFull();
     Faction         = evt["Faction"].Str();
     Victim          = evt["Victim"].Str();
     VictimLocalised = JournalFieldNaming.CheckLocalisation(evt["Victim_Localised"].Str(), Victim);
     Fine            = evt["Fine"].LongNull();
     Bounty          = evt["Bounty"].LongNull();
 }
        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);
                }
            }
        }
 public JournalInterdicted(JObject evt) : base(evt, JournalTypeEnum.Interdicted)         // some nasty pilot has got you
 {
     Submitted             = evt["Submitted"].Bool();
     Interdictor           = evt["Interdictor"].Str();
     Interdictor_Localised = JournalFieldNaming.CheckLocalisation(evt["Interdictor_Localised"].Str(), Interdictor);
     IsPlayer   = evt["IsPlayer"].Bool();
     CombatRank = evt["CombatRank"].Enum <CombatRank>(CombatRank.Unknown);
     Faction    = evt["Faction"].Str();
     Power      = evt["Power"].Str();
 }
 public JournalInterdiction(JObject evt) : base(evt, JournalTypeEnum.Interdiction)       // you've been naughty and interdicted someone
 {
     Success               = evt["Success"].Bool();
     Interdicted           = evt["Interdicted"].Str();
     Interdicted_Localised = JournalFieldNaming.CheckLocalisation(evt["Interdicted_Localised"].Str(), Interdicted);
     IsPlayer              = evt["IsPlayer"].Bool();
     CombatRank            = evt["CombatRank"].Enum <CombatRank>(CombatRank.Unknown);
     Faction               = evt["Faction"].Str();
     Power = evt["Power"].Str();
 }
Example #29
0
 public JournalJetConeDamage(JObject evt) : base(evt, JournalTypeEnum.JetConeDamage)
 {
     ModuleFD        = JournalFieldNaming.NormaliseFDItemName(evt["Module"].Str());
     Module          = JournalFieldNaming.GetBetterItemName(ModuleFD);
     ModuleLocalised = JournalFieldNaming.CheckLocalisation(evt["Module_Localised"].Str(), Module);
     if (ModuleLocalised.Length == 0)
     {
         ModuleLocalised = evt["_Localised"].Str();       //Frontier bug - jet cone boost entries are bugged in journal at the moment up to 2.2.
     }
     ModuleLocalised = ModuleLocalised.Alt(Module);
 }
Example #30
0
 public JournalCarrierTradeOrder(JObject evt) : base(evt, JournalTypeEnum.CarrierTradeOrder)
 {
     CarrierID           = evt["CarrierID"].Long();
     BlackMarket         = evt["BlackMarket"].Bool();
     Commodity           = evt["Commodity"].Str();
     Commodity_Localised = JournalFieldNaming.CheckLocalisation(evt["Commodity_Localised"].Str(), Commodity);
     PurchaseOrder       = evt["PurchaseOrder"].IntNull();
     SaleOrder           = evt["SaleOrder"].IntNull();
     CancelTrade         = evt["CancelTrade"].BoolNull();
     Price = evt["Price"].Int();
 }