public DirectionType Direction { get; set; }                   // TransferMicroResources.

        public void Normalise()
        {
            Name_Localised = JournalFieldNaming.CheckLocalisation(Name_Localised, Name);
            Name = JournalFieldNaming.FDNameTranslation(Name);      // this lower cases the name
            FriendlyName = MaterialCommodityMicroResourceType.GetNameByFDName(Name);      // normalises to lower case  
            Category = Category.Alt(Type);      // for some reason category is called type in places..
        }
예제 #2
0
        public override void FillInformation(ISystem sys, out string info, out string detailed)
        {
            MaterialCommodityMicroResourceType mcd = MaterialCommodityMicroResourceType.GetByFDName(Resource.Name);     // may be null

            info     = BaseUtils.FieldBuilder.Build("", Resource.FriendlyName, "< (;)", mcd?.TranslatedCategory, "< ; items".T(EDTx.JournalEntry_MatC), Resource.Count);
            detailed = "";
        }
예제 #3
0
 public JournalMaterialDiscovered(JObject evt) : base(evt, JournalTypeEnum.MaterialDiscovered)
 {
     Category        = JournalFieldNaming.NormaliseMaterialCategory(evt["Category"].Str());
     Name            = JournalFieldNaming.FDNameTranslation(evt["Name"].Str()); // pre-mangle to latest names, in case we are reading old journal records
     FriendlyName    = MaterialCommodityMicroResourceType.GetNameByFDName(Name);
     DiscoveryNumber = evt["DiscoveryNumber"].Int();
 }
예제 #4
0
 public MaterialCommodityMicroResource(MaterialCommodityMicroResource c)
 {
     Counts = new int[NoCounts];
     Array.Copy(c.Counts, Counts, NoCounts);
     Price        = c.Price;
     this.Details = c.Details;       // can copy this, its fixed
 }
        public override void Init()
        {
            DBBaseName = "UCSearchMC";

            dataGridView.CheckEDSM = true;
            dataGridView.MakeDoubleBuffered();
            dataGridView.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridView.RowTemplate.Height        = Font.ScalePixels(26);
            dataGridView.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx

            var enumlist = new Enum[] { EDTx.SearchMaterialsCommodities_ColumnDate, EDTx.SearchMaterialsCommodities_ColumnStar, EDTx.SearchMaterialsCommodities_ColumnLocation, EDTx.SearchMaterialsCommodities_ColumnCurrentDistance, EDTx.SearchMaterialsCommodities_ColumnPosition, EDTx.SearchMaterialsCommodities_buttonExtFind, EDTx.SearchMaterialsCommodities_label2, EDTx.SearchMaterialsCommodities_label1 };

            BaseUtils.Translator.Instance.TranslateControls(this, enumlist, new Control[] {  });

            dataGridView.Init(discoveryform);

            itemlist = MaterialCommodityMicroResourceType.GetAll();
            Array.Sort(itemlist, (left, right) => left.Name.CompareTo(right.Name));

            var list = (from x in itemlist select x.Name + " (" + x.TranslatedCategory + ", " + x.TranslatedType + (x.Rarity ? ", Rare Commodity".T(EDTx.SearchMaterialsCommodities_RareCommodity):"") + ")");

            comboBoxCustomCM1.Items.AddRange(list);
            comboBoxCustomCM1.SelectedIndex = Math.Min(GetSetting(dbCM1, 0), list.Count() - 1);
            comboBoxCustomCM2.Items.Add("----");
            comboBoxCustomCM2.Items.AddRange(list);
            comboBoxCustomCM2.SelectedIndex = Math.Min(GetSetting(dbCM2, 0), list.Count() - 1);

            comboBoxCustomCMANDOR.Items.AddRange(new string[] { "AND".T(EDTx.SearchMaterialsCommodities_AND), "OR".T(EDTx.SearchMaterialsCommodities_OR) });
            comboBoxCustomCMANDOR.SelectedIndex = GetSetting(dbCMANDOR, 0);

            dataGridView.GotoEntryClicked += (he) => { uctg.GotoPosByJID(he.Journalid); };
        }
 public JournalMiningRefined(JObject evt) : base(evt, JournalTypeEnum.MiningRefined)
 {
     Type           = JournalFieldNaming.FixCommodityName(evt["Type"].Str()); // instances of $.._name, translate to FDNAME
     Type           = JournalFieldNaming.FDNameTranslation(Type);             // pre-mangle to latest names, in case we are reading old journal records
     FriendlyType   = MaterialCommodityMicroResourceType.GetNameByFDName(Type);
     Type_Localised = JournalFieldNaming.CheckLocalisationTranslation(evt["Type_Localised"].Str(), FriendlyType);
 }
예제 #7
0
 public void UpdateMicroResource(MaterialCommoditiesMicroResourceList mc, JournalEntry previous)
 {
     if (previous?.EventTypeID != JournalTypeEnum.ShipLocker)      // if we have a shiplocker before, its been taken off, so don't change.
     {
         MaterialCommodityMicroResourceType.EnsurePresent(Resource.Category, Resource.Name, Resource.Name_Localised);
         mc.Change(EventTimeUTC, Resource.Category, Resource.Name, Resource.Count, Price, MicroResource.ShipLocker);
     }
 }
예제 #8
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   = MaterialCommodityMicroResourceType.GetNameByFDName(Type);
     Type_Localised = JournalFieldNaming.CheckLocalisationTranslation(evt["Type_Localised"].Str(), FriendlyType); // always ensure we have one
     Stolen         = evt["Stolen"].Bool();
     MissionID      = evt["MissionID"].ULongNull();
 }
예제 #9
0
        public void FillInformation(ISystem sys, out string info, out string detailed, int maxcol)
        {
            info = BaseUtils.FieldBuilder.Build("Prices on ; items".T(EDTx.JournalCommodityPricesBase_PON), Commodities.Count,
                                                "< at ".T(EDTx.JournalCommodityPricesBase_CPBat), Station,
                                                "< in ".T(EDTx.JournalCommodityPricesBase_CPBin), StarSystem);

            int col = 0;

            detailed = "Items to buy: ".T(EDTx.JournalCommodityPricesBase_Itemstobuy) + System.Environment.NewLine;
            foreach (CCommodities c in Commodities)
            {
                if (c.buyPrice > 0)
                {
                    string name = MaterialCommodityMicroResourceType.GetNameByFDName(c.fdname);

                    if (c.sellPrice > 0)
                    {
                        detailed += string.Format("{0}: {1} sell {2} Diff {3} {4}%  ".T(EDTx.JournalCommodityPricesBase_CPBBuySell),
                                                  name, c.buyPrice, c.sellPrice, c.buyPrice - c.sellPrice,
                                                  ((double)(c.buyPrice - c.sellPrice) / (double)c.sellPrice * 100.0).ToString("0.#"));
                    }
                    else
                    {
                        detailed += string.Format("{0}: {1}  ".T(EDTx.JournalCommodityPricesBase_CPBBuy), name, c.buyPrice);
                    }

                    if (++col == maxcol)
                    {
                        detailed += System.Environment.NewLine;
                        col       = 0;
                    }
                }
            }

            if (col == maxcol - 1)
            {
                detailed += System.Environment.NewLine;
            }

            col       = 0;
            detailed += "Sell only Items: ".T(EDTx.JournalCommodityPricesBase_SO) + System.Environment.NewLine;
            foreach (CCommodities c in Commodities)
            {
                if (c.buyPrice <= 0)
                {
                    string name = MaterialCommodityMicroResourceType.GetNameByFDName(c.fdname);

                    detailed += string.Format("{0}: {1}  ".T(EDTx.JournalCommodityPricesBase_CPBBuy), name, c.sellPrice);
                    if (++col == maxcol)
                    {
                        detailed += System.Environment.NewLine;
                        col       = 0;
                    }
                }
            }
        }
예제 #10
0
 public JournalSearchAndRescue(JObject evt) : base(evt, JournalTypeEnum.SearchAndRescue)
 {
     FDName         = evt["Name"].Str();
     FDName         = JournalFieldNaming.FDNameTranslation(FDName);                                               // some premangling
     FriendlyName   = MaterialCommodityMicroResourceType.GetNameByFDName(FDName);
     Name_Localised = JournalFieldNaming.CheckLocalisationTranslation(evt["Name_Localised"].Str(), FriendlyName); // always ensure we have one
     Count          = evt["Count"].Int();
     Reward         = evt["Reward"].Long();
     MarketID       = evt["MarketID"].LongNull();
 }
예제 #11
0
 public JournalMarketBuy(JObject evt) : base(evt, JournalTypeEnum.MarketBuy)
 {
     MarketID       = evt["MarketID"].LongNull();
     Type           = evt["Type"].Str();                                                                          // must be FD name
     Type           = JournalFieldNaming.FDNameTranslation(Type);                                                 // pre-mangle to latest names, in case we are reading old journal records
     FriendlyType   = MaterialCommodityMicroResourceType.GetNameByFDName(Type);                                   // our translation..
     Type_Localised = JournalFieldNaming.CheckLocalisationTranslation(evt["Type_Localised"].Str(), FriendlyType); // always ensure we have one
     Count          = evt["Count"].Int();
     BuyPrice       = evt["BuyPrice"].Long();
     TotalCost      = evt["TotalCost"].Long();
 }
예제 #12
0
 public void UpdateMicroResource(MaterialCommoditiesMicroResourceList mc, JournalEntry previous)        // Odyssey from 11/6/21 this comes after shiplocker, so don't change
 {
     if (previous?.EventTypeID != JournalTypeEnum.ShipLocker)
     {
         foreach (var m in Items.EmptyIfNull())
         {
             MaterialCommodityMicroResourceType.EnsurePresent(m.Category, m.Name, m.Name_Localised);
             mc.Change(EventTimeUTC, m.Category, m.Name, -m.Count, 0, MicroResource.ShipLocker);
         }
     }
 }
 public void UpdateMicroResource(MaterialCommoditiesMicroResourceList mc)
 {
     if (Items != null )
     {
         foreach (var m in Items)
         {
             MaterialCommodityMicroResourceType.EnsurePresent(m.Category, m.Name, m.Name_Localised);
             mc.Change(EventTimeUTC, m.Category, m.Name, -m.Count, 0, MicroResource.ShipLocker);
         }
     }
 }
예제 #14
0
        public JournalEjectCargo(JObject evt) : base(evt, JournalTypeEnum.EjectCargo)
        {
            Type           = evt["Type"].Str();                                                                          // fdname
            Type           = JournalFieldNaming.FDNameTranslation(Type);                                                 // pre-mangle to latest names, in case we are reading old journal records
            FriendlyType   = MaterialCommodityMicroResourceType.GetNameByFDName(Type);
            Type_Localised = JournalFieldNaming.CheckLocalisationTranslation(evt["Type_Localised"].Str(), FriendlyType); // always ensure we have one

            Count           = evt["Count"].Int();
            Abandoned       = evt["Abandoned"].Bool();
            PowerplayOrigin = evt["PowerplayOrigin"].Str();
            MissionID       = evt["MissionID"].ULongNull();
        }
예제 #15
0
            public void Normalise()
            {
                Material           = JournalFieldNaming.FDNameTranslation(Material);
                FriendlyMaterial   = MaterialCommodityMicroResourceType.GetNameByFDName(Material);
                Material_Localised = JournalFieldNaming.CheckLocalisationTranslation(Material_Localised ?? "", FriendlyMaterial); // ensure.

                if (Category != null)                                                                                             // some entries do not have this
                {
                    Category           = JournalFieldNaming.NormaliseMaterialCategory(Category);                                  // fix up any strangeness
                    Category_Localised = JournalFieldNaming.CheckLocalisation(Category_Localised ?? "", Category);
                }
            }
예제 #16
0
            public void Normalise()
            {
                Name           = JournalFieldNaming.FDNameTranslation(Name);
                FriendlyName   = MaterialCommodityMicroResourceType.GetNameByFDName(Name);
                Name_Localised = JournalFieldNaming.CheckLocalisationTranslation(Name_Localised ?? "", FriendlyName);

                if (Category != null)
                {
                    Category           = JournalFieldNaming.NormaliseMaterialCategory(Category);
                    Category_Localised = JournalFieldNaming.CheckLocalisation(Category_Localised ?? "", Category);
                }
            }
예제 #17
0
        public override void FillInformation(ISystem sys, out string info, out string detailed)
        {
            info = Name;
            if (Materials != null)
            {
                foreach (KeyValuePair <string, int> k in Materials)
                {
                    info += ", " + MaterialCommodityMicroResourceType.GetNameByFDName(k.Key) + ": " + k.Value.ToString();
                }
            }

            detailed = "";
        }
예제 #18
0
        }                                                       // BuyMicroResources, SellMicroResource, TradeMicroResources, TransferMicroResources. These call it type: BackPackChange, UseConsumable, CollectItems, DropItems

        public void Normalise(string cat)
        {
            if (Name.HasChars())
            {
                Name_Localised = JournalFieldNaming.CheckLocalisation(Name_Localised, Name);
                Name           = JournalFieldNaming.FDNameTranslation(Name);               // this lower cases the name
                FriendlyName   = MaterialCommodityMicroResourceType.GetNameByFDName(Name); // normalises to lower case
                if (cat != null)
                {
                    Category = cat;
                }
            }
        }
예제 #19
0
        // change entry 0
        public void Change(DateTime utc, string catname, string fdname, int num, long price, int cnum = 0, bool setit = false)
        {
            var cat = MaterialCommodityMicroResourceType.CategoryFrom(catname);

            if (cat.HasValue)
            {
                Change(utc, cat.Value, fdname, num, price, cnum, setit);
            }
            else
            {
                System.Diagnostics.Debug.WriteLine("MCMRLIST Unknown Cat " + catname);
            }
        }
        public JournalTradeMicroResources(JObject evt) : base(evt, JournalTypeEnum.TradeMicroResources)
        {
            Offered = evt["Offered"]?.ToObjectQ<MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
            MicroResource.Normalise(Offered);
            Received = evt["Received"].Str();
            Received_Localised = evt["Received_Localised"].Str();
            Category = evt["Category"].Str();
            Count = evt["Count"].Int();
            MarketID = evt["MarketID"].Long();

            Received_Localised = JournalFieldNaming.CheckLocalisation(Received_Localised, Received);
            Received = JournalFieldNaming.FDNameTranslation(Received);
            Received_FriendlyName = MaterialCommodityMicroResourceType.GetNameByFDName(Received);
        }
        public void UpdateMicroResource(MaterialCommoditiesMicroResourceList mc)
        {
            foreach (var m in Offered.EmptyIfNull())
            {
                MaterialCommodityMicroResourceType.EnsurePresent(m.Category, m.Name, m.Name_Localised);
                mc.Change(EventTimeUTC, m.Category, m.Name, -m.Count, 0, MicroResource.ShipLocker);
            }

            if ( Received.HasChars())
            {
                MaterialCommodityMicroResourceType.EnsurePresent(Category, Received, Received_Localised);
                mc.Change(EventTimeUTC, Category, Received, Count, 0, MicroResource.ShipLocker);
            }
        }
예제 #22
0
        public override void FillInformation(ISystem sys, out string info, out string detailed)
        {
            MaterialCommodityMicroResourceType mcd = MaterialCommodityMicroResourceType.GetByFDName(Type);

            if (mcd != null)
            {
                info = BaseUtils.FieldBuilder.Build("", Type_Localised, "< (", mcd.TranslatedCategory, ";)", mcd.TranslatedType, "Total: ".T(EDTx.JournalEntry_Total), Total);
            }
            else
            {
                info = Type_Localised;
            }
            detailed = "";
        }
 public bool FromString(string s)                    // serialise from string
 {
     string[] parts = s.Split(',');
     if (parts.Length == 4)
     {
         fromelement = MaterialCommodityMicroResourceType.GetByFDName(parts[0]);
         element     = MaterialCommodityMicroResourceType.GetByFDName(parts[1]);
         return(fromelement != null && element != null && parts[2].InvariantParse(out offer) && parts[3].InvariantParse(out receive));
     }
     else
     {
         return(false);
     }
 }
예제 #24
0
 public JournalMarketSell(JObject evt) : base(evt, JournalTypeEnum.MarketSell)
 {
     MarketID       = evt["MarketID"].LongNull();
     Type           = evt["Type"].Str();                                                                          // FDNAME
     Type           = JournalFieldNaming.FDNameTranslation(Type);                                                 // pre-mangle to latest names, in case we are reading old journal records
     FriendlyType   = MaterialCommodityMicroResourceType.GetNameByFDName(Type);                                   // goes thru the translator..
     Type_Localised = JournalFieldNaming.CheckLocalisationTranslation(evt["Type_Localised"].Str(), FriendlyType); // always ensure we have one
     Count          = evt["Count"].Int();
     SellPrice      = evt["SellPrice"].Long();
     TotalSale      = evt["TotalSale"].Long();
     AvgPricePaid   = evt["AvgPricePaid"].Long();
     IllegalGoods   = evt["IllegalGoods"].Bool();
     StolenGoods    = evt["StolenGoods"].Bool();
     BlackMarket    = evt["BlackMarket"].Bool();
 }
            public int[] content;                  // number in each cat, high/med/low

            public static MaterialsFound Find(string fdname, List <MaterialsFound> list)
            {
                MaterialsFound mat = list.Find(x => x.matnamefd2.Equals(fdname, StringComparison.InvariantCultureIgnoreCase));

                if (mat == null)
                {
                    mat                   = new MaterialsFound();
                    mat.matnamefd2        = fdname;
                    mat.friendlyname      = MaterialCommodityMicroResourceType.GetByFDName(fdname)?.Name ?? fdname;
                    mat.prospectedamounts = new List <double>();
                    mat.content           = new int[3];
                    list.Add(mat);
                }

                return(mat);
            }
예제 #26
0
        public override void FillInformation(ISystem sys, out string info, out string detailed)
        {
            info = BaseUtils.FieldBuilder.Build("", FriendlyName);
            MaterialCommodityMicroResourceType mcd = MaterialCommodityMicroResourceType.GetByFDName(Name);

            if (mcd != null)
            {
                info += BaseUtils.FieldBuilder.Build(" (", mcd.TranslatedCategory, ";)", mcd.TranslatedType);
            }

            if (DiscoveryNumber > 0)
            {
                info += string.Format(", Discovery {0}".T(EDTx.JournalMaterialDiscovered_DN), DiscoveryNumber);
            }
            detailed = "";
        }
예제 #27
0
        // counts/set array can be of length 1 to maximum number of counts
        // to set a value, set count/set=1 for that entry
        // to change a value, set count/set = 0 for that entry
        // to leave a value, set count=0,set=0 for that entry
        // set means set to value, else add to value
        public bool Change(DateTime utc, MaterialCommodityMicroResourceType.CatType cat, string fdname, int[] counts, bool[] set, long price)
        {
            fdname = fdname.ToLowerInvariant();

            MaterialCommodityMicroResource mc = items.GetLast(fdname);                                                   // find last entry, may return null if none stored

            if (mc == null)                                                                                              // not stored, make new
            {
                MaterialCommodityMicroResourceType mcdb = MaterialCommodityMicroResourceType.EnsurePresent(cat, fdname); // get a MCDB of this
                mc = new MaterialCommodityMicroResource(mcdb);
            }
            else
            {
                mc = new MaterialCommodityMicroResource(mc);                // copy constructor, new copy of it
            }

            double costprev  = mc.Counts[0] * mc.Price;
            double costofnew = counts[0] * price;
            bool   changed   = false;

            for (int i = 0; i < counts.Length; i++)
            {
                int newcount = set[i] ? counts[i] : Math.Max(mc.Counts[i] + counts[i], 0);       // don't let it go below zero if changing
                if (newcount != mc.Counts[i])
                {
                    changed = true;
                    //  System.Diagnostics.Debug.WriteLine("MCMRLIST {0} Gen {1} Changed {2}:{3} Entry {4} {5} -> {6} {7}", utc.ToString(), items.Generation, mc.Details.Category, mc.Details.FDName, i, mc.Counts[i], newcount, mc.Counts[i]<newcount ? "+++" : "---");
                    //   System.Diagnostics.Debug.WriteLine(Environment.StackTrace);
                    mc.Counts[i] = newcount;
                }
            }

            if (changed)                                                    // only store back a new entry if material change to counts
            {
                if (mc.Counts[0] > 0 && counts[0] > 0)                      // if bought (defensive with mc.counts)
                {
                    mc.Price = (costprev + costofnew) / mc.Counts[0];       // price is now a combination of the current cost and the new cost. in case we buy in tranches
                }
                items[fdname] = mc;                                         // and set fdname to mc - this allows for any repeat adds due to frontier data repeating stuff in things like cargo
            }
            else
            {
                // System.Diagnostics.Debug.WriteLine("{0} Not changed {1} {2}", utc.ToString(), mc.Details.FDName, mc.Count);
            }

            return(changed);
        }
        public JournalTechnologyBroker(JObject evt) : base(evt, JournalTypeEnum.TechnologyBroker)
        {
            BrokerType = evt["BrokerType"].Str("Unknown");
            MarketID   = evt["MarketID"].LongNull();

            ItemsUnlocked = evt["ItemsUnlocked"]?.ToObjectQ <Unlocked[]>();      //3.03 entry
            CommodityList = evt["Commodities"]?.ToObjectQ <Commodities[]>();
            MaterialList  = evt["Materials"]?.ToObjectQ <Materials[]>();

            if (ItemsUnlocked != null)
            {
                foreach (Unlocked u in ItemsUnlocked)
                {
                    u.Name_Localised = JournalFieldNaming.CheckLocalisation(u.Name_Localised ?? "", u.Name);
                }
            }

            if (CommodityList != null)
            {
                foreach (Commodities c in CommodityList)
                {
                    c.FriendlyName = MaterialCommodityMicroResourceType.GetNameByFDName(c.Name);
                }
            }

            if (MaterialList != null)
            {
                foreach (Materials m in MaterialList)
                {
                    m.FriendlyName = MaterialCommodityMicroResourceType.GetNameByFDName(m.Name);
                    m.Category     = JournalFieldNaming.NormaliseMaterialCategory(m.Category);
                }
            }

            string oldentry = evt["ItemUnlocked"].StrNull();        // 3.02 journal entry

            if (ItemsUnlocked == null && oldentry != null)
            {
                ItemsUnlocked = new Unlocked[] { new Unlocked()
                                                 {
                                                     Name = oldentry, Name_Localised = oldentry
                                                 } }
            }
            ;
        }
예제 #29
0
        public override void FillInformation(ISystem sys, out string info, out string detailed)
        {
            info = BaseUtils.FieldBuilder.Build("In Slot: ".T(EDTx.JournalEntry_InSlot), Slot, "", Module, "By: ".T(EDTx.JournalEntry_By), Engineering.Engineer, "Blueprint: ".T(EDTx.JournalEntry_Blueprint), Engineering.FriendlyBlueprintName, "Level: ".T(EDTx.JournalEntry_Level), Engineering.Level);

            detailed = "";
            if (Ingredients != null)
            {
                foreach (KeyValuePair <string, int> k in Ingredients)        // may be commodities or materials
                {
                    detailed += BaseUtils.FieldBuilder.Build("", MaterialCommodityMicroResourceType.GetNameByFDName(k.Key), "", k.Value) + "; ";
                }
            }

            if (Engineering != null)
            {
                detailed = detailed.AppendPrePad(Engineering.ToString(), System.Environment.NewLine);
            }
        }
예제 #30
0
        public JournalMissionAccepted(JObject evt) : base(evt, JournalTypeEnum.MissionAccepted)
        {
            Faction       = evt["Faction"].Str();
            FDName        = evt["Name"].Str();
            Name          = JournalFieldNaming.GetBetterMissionName(FDName);
            LocalisedName = JournalFieldNaming.CheckLocalisation(evt["LocalisedName"].Str(), Name);

            TargetType          = evt["TargetType"].Str();
            TargetTypeFriendly  = JournalFieldNaming.GetBetterTargetTypeName(TargetType);   // remove $, underscore it
            TargetTypeLocalised = JournalFieldNaming.CheckLocalisation(evt["TargetType_Localised"].Str(), TargetTypeFriendly);

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

            Target          = evt["Target"].Str();
            TargetFriendly  = JournalFieldNaming.GetBetterTargetTypeName(Target);                                  // remove $, underscore it
            TargetLocalised = JournalFieldNaming.CheckLocalisation(evt["Target_Localised"].Str(), TargetFriendly); // not all

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

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

            Influence  = evt["Influence"].Str();
            Reputation = evt["Reputation"].Str();

            MissionId = evt["MissionID"].ULong();

            Commodity          = JournalFieldNaming.FixCommodityName(evt["Commodity"].Str()); // instances of $_name, fix to fdname
            FriendlyCommodity  = MaterialCommodityMicroResourceType.GetNameByFDName(Commodity);
            CommodityLocalised = JournalFieldNaming.CheckLocalisationTranslation(evt["Commodity_Localised"].Str(), FriendlyCommodity);

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

            PassengerCount  = evt["PassengerCount"].IntNull();
            PassengerVIPs   = evt["PassengerVIPs"].BoolNull();
            PassengerWanted = evt["PassengerWanted"].BoolNull();
            PassengerType   = evt["PassengerType"].StrNull();

            Reward = evt["Reward"].IntNull();   // not in DOC V13, but present in latest journal entries

            Wing = evt["Wing"].BoolNull();      // new 3.02
        }