@kayahr/ed-journal
Version:
Typescript library to read/watch the player journal of Frontier's game Elite Dangerous
12 lines • 546 B
JavaScript
/*
* Copyright (C) 2022 Klaus Reimer <k@ailis.de>
* See LICENSE.md for licensing information.
*/
import { registerJournalEventUpdate } from "../../JournalEvent.js";
registerJournalEventUpdate("EngineerCraft", (json) => {
// Since ED 2.3 the Ingredients data has changed from an object to an array of objects.
if (json.Ingredients != null && !(json.Ingredients instanceof Array)) {
json.Ingredients = Object.entries(json.Ingredients).map(([Name, Count]) => ({ Name, Count }));
}
});
//# sourceMappingURL=EngineerCraft.js.map