From 7bb8b0a1dde05c7124051f0862053041bc8d0f17 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 22 Apr 2024 11:01:57 -0400 Subject: More backwards compatibility with 0.4.5 --- src/ap_state.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/ap_state.cpp') diff --git a/src/ap_state.cpp b/src/ap_state.cpp index aeed914..8feb78b 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp @@ -241,8 +241,11 @@ struct APState { pilgrimage_allows_paintings = slot_data.contains("pilgrimage_allows_paintings") && slot_data["pilgrimage_allows_paintings"].get() == 1; - sunwarp_access = slot_data["sunwarp_access"].get(); - sunwarp_shuffle = slot_data["shuffle_sunwarps"].get() == 1; + sunwarp_access = slot_data.contains("sunwarp_access") + ? slot_data["sunwarp_access"].get() + : kSUNWARP_ACCESS_NORMAL; + sunwarp_shuffle = slot_data.contains("shuffle_sunwarps") && + slot_data["shuffle_sunwarps"].get() == 1; if (painting_shuffle && slot_data.contains("painting_entrance_to_exit")) { painting_mapping.clear(); @@ -380,7 +383,7 @@ struct APState { } else { data_storage.erase(key); } - + TrackerLog("Data storage " + key + " retrieved as null"); } } -- cgit 1.4.1