mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-25 19:02:19 -05:00
Check Tracker - Collecting a compass now spoils the area
This commit is contained in:
parent
af4f528e7c
commit
a8d15bf391
@ -20,6 +20,7 @@ extern "C" uint32_t ResourceMgr_IsSceneMasterQuest(s16 sceneNum);
|
|||||||
void Teardown();
|
void Teardown();
|
||||||
void InitializeChecks();
|
void InitializeChecks();
|
||||||
void UpdateChecks();
|
void UpdateChecks();
|
||||||
|
void UpdateInventoryChecks();
|
||||||
void DrawLocation(RandomizerCheckObject rcObj, RandomizerCheckShow* thisCheckStatus);
|
void DrawLocation(RandomizerCheckObject rcObj, RandomizerCheckShow* thisCheckStatus);
|
||||||
void BeginFloatWindows(std::string UniqueName, ImGuiWindowFlags flags = 0);
|
void BeginFloatWindows(std::string UniqueName, ImGuiWindowFlags flags = 0);
|
||||||
void EndFloatWindows();
|
void EndFloatWindows();
|
||||||
@ -142,6 +143,7 @@ void DrawCheckTracker(bool& open) {
|
|||||||
//Only update the checks if something has changed
|
//Only update the checks if something has changed
|
||||||
if (ShouldUpdateChecks()) {
|
if (ShouldUpdateChecks()) {
|
||||||
UpdateChecks();
|
UpdateChecks();
|
||||||
|
UpdateInventoryChecks();
|
||||||
UpdateOrdering();
|
UpdateOrdering();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -384,6 +386,7 @@ void InitializeChecks() {
|
|||||||
//showVOrMQ = (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_RANDOM_MQ_DUNGEONS) != RO_GENERIC_OFF);
|
//showVOrMQ = (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_RANDOM_MQ_DUNGEONS) != RO_GENERIC_OFF);
|
||||||
|
|
||||||
UpdateChecks();
|
UpdateChecks();
|
||||||
|
UpdateInventoryChecks();
|
||||||
UpdateOrdering(true);
|
UpdateOrdering(true);
|
||||||
doInitialize = false;
|
doInitialize = false;
|
||||||
initialized = true;
|
initialized = true;
|
||||||
@ -435,6 +438,13 @@ bool ShouldUpdateChecks() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UpdateInventoryChecks() {
|
||||||
|
//For all the areas with compasses, if you have one, spoil the area
|
||||||
|
for (u8 i = RCAREA_DEKU_TREE; i <= RCAREA_ICE_CAVERN; i++)
|
||||||
|
if (gSaveContext.inventory.dungeonItems[i - RCAREA_DEKU_TREE] & 0x02)
|
||||||
|
areasSpoiled |= (1 << i);
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateChecks() {
|
void UpdateChecks() {
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
RandomizerCheckObject* lastCheck;
|
RandomizerCheckObject* lastCheck;
|
||||||
@ -460,7 +470,6 @@ void UpdateChecks() {
|
|||||||
areasSpoiled |= (1 << rcObj.rcArea);
|
areasSpoiled |= (1 << rcObj.rcArea);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
lastCheck = &rcObj;
|
lastCheck = &rcObj;
|
||||||
|
|
||||||
idx++;
|
idx++;
|
||||||
|
Loading…
Reference in New Issue
Block a user