From b371860eb1740ff475304333f8a5e141b5238f1b Mon Sep 17 00:00:00 2001 From: Blampharos Date: Sun, 25 Oct 2020 22:46:04 +0100 Subject: [PATCH] Fix extraneous header flags being saved Fixes a bug where the program would put map header flags from firered and emerald to ruby-based projects. --- src/project.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/project.cpp b/src/project.cpp index 3ef73e35..270e9346 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -1361,9 +1361,11 @@ void Project::saveMap(Map *map) { mapObj["requires_flash"] = map->requiresFlash.toInt() > 0 || map->requiresFlash == "TRUE"; mapObj["weather"] = map->weather; mapObj["map_type"] = map->type; - mapObj["allow_cycling"] = map->allowBiking.toInt() > 0 || map->allowBiking == "TRUE"; - mapObj["allow_escaping"] = map->allowEscapeRope.toInt() > 0 || map->allowEscapeRope == "TRUE"; - mapObj["allow_running"] = map->allowRunning.toInt() > 0 || map->allowRunning == "TRUE"; + if (projectConfig.getBaseGameVersion() != BaseGameVersion::pokeruby) { + mapObj["allow_cycling"] = map->allowBiking.toInt() > 0 || map->allowBiking == "TRUE"; + mapObj["allow_escaping"] = map->allowEscapeRope.toInt() > 0 || map->allowEscapeRope == "TRUE"; + mapObj["allow_running"] = map->allowRunning.toInt() > 0 || map->allowRunning == "TRUE"; + } mapObj["show_map_name"] = map->show_location.toInt() > 0 || map->show_location == "TRUE"; if (projectConfig.getFloorNumberEnabled()) { mapObj["floor_number"] = map->floorNumber;