@kayahr/ed-journal
Version:
Typescript library to read/watch the player journal of Frontier's game Elite Dangerous
11 lines • 460 B
JavaScript
/*
* Copyright (C) 2022 Klaus Reimer <k@ailis.de>
* See LICENSE.md for licensing information.
*/
import { registerJournalEventUpdate } from "../../JournalEvent.js";
registerJournalEventUpdate("Scan", (from, to) => {
if (to.PlanetClass != null && from.Materials != null && !(from.Materials instanceof Array)) {
to.Materials = Object.entries(from.Materials).map(([Name, Percent]) => ({ Name, Percent }));
}
});
//# sourceMappingURL=Scan.js.map