@kayahr/ed-journal
Version:
Typescript library to read/watch the player journal of Frontier's game Elite Dangerous
13 lines • 579 B
JavaScript
/*
* Copyright (C) 2022 Klaus Reimer <k@ailis.de>
* See LICENSE.md for licensing information.
*/
import { registerJournalEventUpdate } from "../../JournalEvent.js";
registerJournalEventUpdate("Statistics", (from, to) => {
// Convert string format travel-distance to number format.
if (typeof from.FLEETCARRIER?.FLEETCARRIER_DISTANCE_TRAVELLED === "string" && to.FLEETCARRIER != null) {
to.FLEETCARRIER.FLEETCARRIER_DISTANCE_TRAVELLED
= parseFloat(from.FLEETCARRIER?.FLEETCARRIER_DISTANCE_TRAVELLED);
}
});
//# sourceMappingURL=Statistics.js.map