Updated location_access.cpp to only log Parse Failures.

This commit is contained in:
xxAtrain223 2025-07-12 22:44:07 -05:00
commit 030a1d92f8

View file

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