From 30f8fd872566ba75d89a9ec011554f503a5db46b Mon Sep 17 00:00:00 2001 From: Timo Schwarzer Date: Wed, 20 Nov 2024 22:01:28 +0100 Subject: [PATCH] Fix TeleportReason not being serialized correctly --- projects/Randomizer/stats/game_stats.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/projects/Randomizer/stats/game_stats.h b/projects/Randomizer/stats/game_stats.h index f17fd359bc..f74e05e529 100644 --- a/projects/Randomizer/stats/game_stats.h +++ b/projects/Randomizer/stats/game_stats.h @@ -118,17 +118,6 @@ namespace randomizer::timing { Portal, }; - NLOHMANN_JSON_SERIALIZE_ENUM( - TeleportReason, - { - {TeleportReason::Unknown, "Unknown" }, - {TeleportReason::Teleporter, "Teleporter"}, - {TeleportReason::Death, "Death" }, - {TeleportReason::Door, "Door" }, - {TeleportReason::Portal, "Portal" }, - } - ); - struct Teleport { float from_x = 0.f; float from_y = 0.f; @@ -231,4 +220,15 @@ namespace randomizer::timing { void json_deserialize(nlohmann::json& j) override; }; + + NLOHMANN_JSON_SERIALIZE_ENUM( + SaveFileGameStats::TeleportReason, + { + {SaveFileGameStats::TeleportReason::Unknown, "Unknown" }, + {SaveFileGameStats::TeleportReason::Teleporter, "Teleporter"}, + {SaveFileGameStats::TeleportReason::Death, "Death" }, + {SaveFileGameStats::TeleportReason::Door, "Door" }, + {SaveFileGameStats::TeleportReason::Portal, "Portal" }, + } + ); } // namespace randomizer::timing