From 118a9701c94730a563afe271a3502800464cc771 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 8 Feb 2023 12:52:28 -0500 Subject: [PATCH] Add event type errors --- tools/mapjson/mapjson.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index 0f2f4f5bb..10283eb08 100644 --- a/tools/mapjson/mapjson.cpp +++ b/tools/mapjson/mapjson.cpp @@ -224,6 +224,8 @@ string generate_map_events_text(Json map_data) { << json_to_string(obj_event, "y") << ", " << json_to_string(obj_event, "target_local_id") << ", " << json_to_string(obj_event, "target_map") << "\n"; + } else { + FATAL_ERROR("Unknown object event type '%s'. Expected 'object' or 'clone'.\n", type.c_str()); } } text << "\n"; @@ -267,6 +269,8 @@ string generate_map_events_text(Json map_data) { << json_to_string(coord_event, "y") << ", " << json_to_string(coord_event, "elevation") << ", " << json_to_string(coord_event, "weather") << "\n"; + } else { + FATAL_ERROR("Unknown coord event type '%s'. Expected 'trigger' or 'weather'.\n", type.c_str()); } } text << "\n"; @@ -307,6 +311,8 @@ string generate_map_events_text(Json map_data) { << json_to_string(bg_event, "y") << ", " << json_to_string(bg_event, "elevation") << ", " << json_to_string(bg_event, "secret_base_id") << "\n"; + } else { + FATAL_ERROR("Unknown bg event type '%s'. Expected 'sign', 'hidden_item', or 'secret_base'.\n", type.c_str()); } } text << "\n";