From a2a3255bddaf1c1afae350c811d6f266bffdaabe Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 12 Oct 2024 03:30:35 -0400 Subject: [PATCH] Fix typo, remove old size check --- include/constants/event_objects.h | 2 +- tools/mapjson/mapjson.cpp | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/constants/event_objects.h b/include/constants/event_objects.h index 8ede403c15ff..3efcf1d98993 100644 --- a/include/constants/event_objects.h +++ b/include/constants/event_objects.h @@ -296,7 +296,7 @@ // Each object event template gets an ID that can be used to refer to it in scripts and elsewhere. // This is referred to as the "local id" (and it's really just 1 + its index in the templates array). -// There are a few special IDs reserved for objects that don't have a templates in the map data -- one for the player +// There are a few special IDs reserved for objects that don't have templates in the map data -- one for the player // in regular offline play, five for linked players while playing Berry Blender, and one for an invisible object that // can be spawned for the camera to track instead of the player. Additionally, the value 0 is reserved as an "empty" indicator. #define LOCALID_NONE 0 diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index 597118db8ea3..99b67d82eace 100644 --- a/tools/mapjson/mapjson.cpp +++ b/tools/mapjson/mapjson.cpp @@ -422,12 +422,10 @@ void process_event_constants(const vector &map_filepaths, string output_ } // Get IDs from the warp events. auto warp_events = map_data["warp_events"].array_items(); - if (warp_events.size()) { - for (unsigned int i = 0; i < warp_events.size(); i++) { - auto warp_event = warp_events[i]; - if (warp_event.object_items().find("warp_id") != warp_event.object_items().end()) - map_ids_text << "#define " << json_to_string(warp_event, "warp_id") << " " << i << "\n"; - } + for (unsigned int i = 0; i < warp_events.size(); i++) { + auto warp_event = warp_events[i]; + if (warp_event.object_items().find("warp_id") != warp_event.object_items().end()) + map_ids_text << "#define " << json_to_string(warp_event, "warp_id") << " " << i << "\n"; } // Only output if we found any IDs string temp = map_ids_text.str();