diff --git a/soh/soh/Enhancements/randomizer/location_access.cpp b/soh/soh/Enhancements/randomizer/location_access.cpp index c7af0de0a..269ca674e 100644 --- a/soh/soh/Enhancements/randomizer/location_access.cpp +++ b/soh/soh/Enhancements/randomizer/location_access.cpp @@ -14,6 +14,7 @@ #include "3drando/shops.hpp" #include +#include "logic_expression.h" extern "C" { extern PlayState* gPlayState; } @@ -914,17 +915,32 @@ void RegionTable_Init() { for (uint32_t i = RR_ROOT; i <= RR_GANONS_CASTLE; i++) { for (EventAccess& eventAccess : areaTable[i].events) { - ss << eventAccess.GetConditionStr() << std::endl; + try { + LogicExpression::Parse(eventAccess.GetConditionStr()); + } + catch (std::exception& ex) { + ss << eventAccess.GetConditionStr() << std::endl; + } } for (LocationAccess& locPair : areaTable[i].locations) { - ss << locPair.GetConditionStr() << std::endl; + try { + LogicExpression::Parse(locPair.GetConditionStr()); + } + catch (std::exception& ex) { + ss << locPair.GetConditionStr() << std::endl; + } } for (Entrance& exit : areaTable[i].exits) { - ss << exit.GetConditionStr() << std::endl; + try { + LogicExpression::Parse(exit.GetConditionStr()); + } + catch (std::exception& ex) { + ss << exit.GetConditionStr() << std::endl; + } } } - SPDLOG_INFO("All Conditions:\n{}", ss.str()); + SPDLOG_INFO("Parse Failure Conditions:\n{}", ss.str()); #endif }