internal static CargoEvent Execute(string json, API.EliteDangerousAPI api) { var jsonEvent = api.FromJson <CargoEvent>(json); var fileEvent = api.FromJsonFile <CargoEvent>(Path.Combine(api.JournalDirectory.FullName, "Cargo.json")); return(api.ShipEvents.InvokeEvent(fileEvent ?? jsonEvent)); }
internal static MarketEvent Execute(string json, API.EliteDangerousAPI api) { var jsonEvent = api.FromJson <MarketEvent>(json); var fileEvent = api.FromJsonFile <MarketEvent>(Path.Combine(api.JournalDirectory.FullName, "Market.json")); if (jsonEvent != null & fileEvent != null && fileEvent.MarketId != jsonEvent.MarketId) { api.LogJournalWarning(new JournalEventConsistencyException <MarketEvent>(jsonEvent, fileEvent)); } return(api.StationEvents.InvokeEvent(fileEvent ?? jsonEvent)); }
internal static ContinuedEvent Execute(string json, API.EliteDangerousAPI api) => api.GameEvents.InvokeEvent(api.FromJson <ContinuedEvent>(json));
internal static SupercruiseExitEvent Execute(string json, API.EliteDangerousAPI api) => api.TravelEvents.InvokeEvent(api.FromJson <SupercruiseExitEvent>(json));
internal CrewHandler(API.EliteDangerousAPI api) { _api = api; }
internal static DockSrvEvent Execute(string json, API.EliteDangerousAPI api) => api.ShipEvents.InvokeEvent(api.FromJson <DockSrvEvent>(json));
internal static UndockedEvent Execute(string json, API.EliteDangerousAPI api) => api.TravelEvents.InvokeEvent(api.FromJson <UndockedEvent>(json));
internal static DataScannedEvent Execute(string json, API.EliteDangerousAPI api) => api.ExplorationEvents.InvokeEvent(api.FromJson <DataScannedEvent>(json));
internal new static CapShipBondEvent Execute(string json, API.EliteDangerousAPI api) => api.CombatEvents.InvokeEvent(api.FromJson <CapShipBondEvent>(json));
internal static EscapeInterdictionEvent Execute(string json, API.EliteDangerousAPI api) => api.CombatEvents.InvokeEvent(api.FromJson <EscapeInterdictionEvent>(json));
internal static SrvDestroyedEvent Execute(string json, API.EliteDangerousAPI api) => api.CombatEvents.InvokeEvent(api.FromJson <SrvDestroyedEvent>(json));
internal static ReservoirReplenishedEvent Execute(string json, API.EliteDangerousAPI api) => api.ShipEvents.InvokeEvent(api.FromJson <ReservoirReplenishedEvent>(json));
internal static ScreenshotEvent Execute(string json, API.EliteDangerousAPI api) => api.ExplorationEvents.InvokeEvent(api.FromJson <ScreenshotEvent>(json));
internal CombatHandler(API.EliteDangerousAPI api) { _api = api; }
internal static ShipyardSwapEvent Execute(string json, API.EliteDangerousAPI api) => api.StationEvents.InvokeEvent(api.FromJson <ShipyardSwapEvent>(json));
internal static CrewMemberQuitsEvent Execute(string json, API.EliteDangerousAPI api) => api.CrewEvents.InvokeEvent(api.FromJson <CrewMemberQuitsEvent>(json));
internal static FactionKillBondEvent Execute(string json, API.EliteDangerousAPI api) => api.CombatEvents.InvokeEvent(api.FromJson <FactionKillBondEvent>(json));
internal static CommunityGoalEvent Execute(string json, API.EliteDangerousAPI api) => api.StationEvents.InvokeEvent(api.FromJson <CommunityGoalEvent>(json));
internal static SquadronPromotionEvent Execute(string json, API.EliteDangerousAPI api) => api.SquadronEvents.InvokeEvent(api.FromJson <SquadronPromotionEvent>(json));
internal static PowerplayCollectEvent Execute(string json, API.EliteDangerousAPI api) => api.PowerplayEvents.InvokeEvent(api.FromJson <PowerplayCollectEvent>(json));
internal new static NewCommanderEvent Execute(string json, API.EliteDangerousAPI api) => api.PlayerEvents.InvokeEvent(api.FromJson <NewCommanderEvent>(json));
internal static UnderAttackEvent Execute(string json, API.EliteDangerousAPI api) => api.CombatEvents.InvokeEvent(api.FromJson <UnderAttackEvent>(json));
internal static MaterialsEvent Execute(string json, API.EliteDangerousAPI api) => api.TradeEvents.InvokeEvent(api.FromJson <MaterialsEvent>(json));
internal static HeatDamageEvent Execute(string json, API.EliteDangerousAPI api) => api.CombatEvents.InvokeEvent(api.FromJson <HeatDamageEvent>(json));
internal TradeHandler(API.EliteDangerousAPI api) { _api = api; }
internal static WonATrophyForSquadronEvent Execute(string json, API.EliteDangerousAPI api) => api.SquadronEvents.InvokeEvent(api.FromJson <WonATrophyForSquadronEvent>(json));
internal static CodexEntryEvent Execute(string json, API.EliteDangerousAPI api) => api.ExplorationEvents.InvokeEvent(api.FromJson <CodexEntryEvent>(json));
internal static MissionAcceptedEvent Execute(string json, API.EliteDangerousAPI api) => api.StationEvents.InvokeEvent(api.FromJson <MissionAcceptedEvent>(json));
internal static SellDronesEvent Execute(string json, API.EliteDangerousAPI api) => api.StationEvents.InvokeEvent(api.FromJson <SellDronesEvent>(json));
internal static CrimeVictimEvent Execute(string json, API.EliteDangerousAPI api) => api.CombatEvents.InvokeEvent(api.FromJson <CrimeVictimEvent>(json));