public void ShipInformation(ShipInformationList shp, string whereami, ISystem system, DB.SQLiteConnectionUser conn) { DateTime arrival = EventTimeUTC.AddSeconds(nTransferTime ?? 0); //System.Diagnostics.Debug.WriteLine(EventTimeUTC + " Transfer"); shp.Transfer(ShipType, ShipTypeFD, ShipId, FromSystem, system.Name, whereami, arrival); }
public JObject CreateFSDJournalEntryJson() // minimal version, not the whole schebang { JObject jo = new JObject(); jo["timestamp"] = EventTimeUTC.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'"); jo["event"] = "FSDJump"; jo["StarSystem"] = StarSystem; jo["StarPos"] = new JArray(StarPos.X, StarPos.Y, StarPos.Z); jo["EDDMapColor"] = MapColor; jo["EDD_EDSMFirstDiscover"] = EDSMFirstDiscover; return(jo); }
public JObject ToJSON() { JObject j = new JObject() { ["timestamp"] = EventTimeUTC.ToStringZulu(), ["event"] = EventTypeStr, ["starsystem"] = StarSystem, ["station"] = Station, ["MarketID"] = MarketID, ["commodities"] = JToken.FromObject(Commodities, true) }; return(j); }
public JObject ToJSON() { JArray itemlist = new JArray(ItemList.Items.Select(x => new JObject() { { "id", x.id }, { "Name", x.FDName }, { "BuyPrice", x.BuyPrice } })); JObject j = new JObject() { ["timestamp"] = EventTimeUTC.ToStringZulu(), ["event"] = EventTypeStr, ["StationName"] = ItemList.StationName, ["StarSystem"] = ItemList.StarSystem, ["MarketID"] = MarketID, ["Horizons"] = Horizons, ["Items"] = itemlist, }; return(j); }
public JObject ToJSON() { JArray itemlist = new JArray(Yard.Ships.Select(x => new JObject() { { "id", x.id }, { "ShipType", x.ShipType }, { "ShipType_Localised", x.ShipType_Localised }, { "ShipPrice", x.ShipPrice } })); JObject j = new JObject() { ["timestamp"] = EventTimeUTC.ToStringZulu(), ["event"] = EventTypeStr, ["StationName"] = Yard.StationName, ["StarSystem"] = Yard.StarSystem, ["MarketID"] = MarketID, ["Horizons"] = Horizons, ["AllowCobraMkIV"] = AllowCobraMkIV, ["PriceList"] = itemlist, }; return(j); }
public void LoadoutInformation(SuitLoadoutList shp, SuitWeaponList weap, string whereami, ISystem system) { if (SuitID != ulong.MaxValue) { System.Diagnostics.Debug.WriteLine("{0} Equip suit {1} Loadout {2} slot {3} with {4}", EventTimeUTC.ToString(), SuitID, LoadoutID, SlotName, ModuleName); shp.Equip(LoadoutID, SlotName, new SuitLoadout.LoadoutModule(SlotName, SuitModuleID, ModuleName, ModuleName_Localised)); } }
public bool ReadAdditionalFiles(string directory, bool historyrefreshparse) { if (Items == null || Components == null || Consumables == null || Data == null) // if any null, try the file, otherwise its in the event { System.Diagnostics.Debug.WriteLine("Shiplocker {0} reload from file ", EventTimeUTC.ToString()); JObject jnew = ReadAdditionalFile(System.IO.Path.Combine(directory, "backpack.json"), waitforfile: !historyrefreshparse, checktimestamptype: true); if (jnew != null) // new json, rescan { Rescan(jnew); UpdateJson(jnew); } return(jnew != null); } else { return(true); } }
public int CompareTo(TradingCalenderEvent other) { return(EventTimeUTC.CompareTo(other.EventTimeUTC)); }