public JournalBackpackChange(JObject evt) : base(evt, JournalTypeEnum.BackpackChange)
 {
     Added = evt["Added"]?.ToObjectQ<MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
     MicroResource.Normalise(Added);
     Removed = evt["Removed"]?.ToObjectQ<MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
     MicroResource.Normalise(Removed);
 }
 public JournalSellMicroResources(JObject evt) : base(evt, JournalTypeEnum.SellMicroResources)
 {
     Items = evt["MicroResources"]?.ToObjectQ<MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
     MicroResource.Normalise(Items);
     Price = evt["Price"].Long();
     MarketID = evt["MarketID"].Long();
 }
Beispiel #3
0
 public JournalBackpackChange(JObject evt) : base(evt, JournalTypeEnum.BackpackChange)
 {
     // collect Name, Name_localised, OwnerId, Count, Type
     Added = evt["Added"]?.ToObject <MicroResource[]>(false, true)?.OrderBy(x => x.Name)?.ToArray();
     MicroResource.Normalise(Added, null);
     Removed = evt["Removed"]?.ToObject <MicroResource[]>(false, true)?.OrderBy(x => x.Name)?.ToArray();
     MicroResource.Normalise(Removed, null);
 }
Beispiel #4
0
 public JournalSellMicroResources(JObject evt) : base(evt, JournalTypeEnum.SellMicroResources)
 {
     // collect Name, Name_Localised, Category, Count
     Items = evt["MicroResources"]?.ToObjectQ <MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
     MicroResource.Normalise(Items, null);
     Price    = evt["Price"].Long();
     MarketID = evt["MarketID"].Long();
 }
 public void Rescan( JObject evt)
 {
     Items = evt["Items"]?.ToObjectQ<MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
     MicroResource.Normalise(Items);
     Components = evt["Components"]?.ToObjectQ<MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
     MicroResource.Normalise(Components);
     Consumables = evt["Consumables"]?.ToObjectQ<MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
     MicroResource.Normalise(Consumables);
     Data = evt["Data"]?.ToObjectQ<MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
     MicroResource.Normalise(Data);
 }
Beispiel #6
0
        public void Rescan(JObject evt)
        {
            // these collect Name, Name_Localised, MissionID, OwnerID, Count

            Items = evt["Items"]?.ToObjectQ <MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
            MicroResource.Normalise(Items, "Items");
            Components = evt["Components"]?.ToObjectQ <MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
            MicroResource.Normalise(Components, "Components");
            Consumables = evt["Consumables"]?.ToObjectQ <MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
            MicroResource.Normalise(Consumables, "Consumables");
            Data = evt["Data"]?.ToObjectQ <MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
            MicroResource.Normalise(Data, "Data");
        }
        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 JournalTransferMicroResources(JObject evt) : base(evt, JournalTypeEnum.TransferMicroResources)
 {
     Items = evt["Transfers"]?.ToObjectQ<MicroResource[]>()?.OrderBy(x => x.Name)?.ToArray();
     MicroResource.Normalise(Items);
 }