mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 01:12:19 -05:00
Fix scrubs behaving as if shuffled despite not being. (#4468)
Convert shop tracking to checking for shuffled. Change "Hide right-side shop item checks" to "Hide unshuffled shop item checks" on the check tracker.
This commit is contained in:
parent
75a0979bc7
commit
2ffd62a5b1
@ -1181,10 +1181,10 @@ ScrubIdentity Randomizer::IdentifyScrub(s32 sceneNum, s32 actorParams, s32 respa
|
|||||||
scrubIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
|
scrubIdentity.randomizerInf = rcToRandomizerInf[location->GetRandomizerCheck()];
|
||||||
scrubIdentity.randomizerCheck = location->GetRandomizerCheck();
|
scrubIdentity.randomizerCheck = location->GetRandomizerCheck();
|
||||||
scrubIdentity.getItemId = (GetItemID)Rando::StaticData::RetrieveItem(location->GetVanillaItem()).GetItemID();
|
scrubIdentity.getItemId = (GetItemID)Rando::StaticData::RetrieveItem(location->GetVanillaItem()).GetItemID();
|
||||||
scrubIdentity.isShuffled = GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) != RO_SCRUBS_OFF;
|
scrubIdentity.isShuffled = GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) == RO_SCRUBS_ALL;
|
||||||
|
|
||||||
if (location->GetRandomizerCheck() == RC_HF_DEKU_SCRUB_GROTTO || location->GetRandomizerCheck() == RC_LW_DEKU_SCRUB_GROTTO_FRONT || location->GetRandomizerCheck() == RC_LW_DEKU_SCRUB_NEAR_BRIDGE) {
|
if (location->GetRandomizerCheck() == RC_HF_DEKU_SCRUB_GROTTO || location->GetRandomizerCheck() == RC_LW_DEKU_SCRUB_GROTTO_FRONT || location->GetRandomizerCheck() == RC_LW_DEKU_SCRUB_NEAR_BRIDGE) {
|
||||||
scrubIdentity.isShuffled = true;
|
scrubIdentity.isShuffled = GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) != RO_SCRUBS_OFF;;
|
||||||
}
|
}
|
||||||
|
|
||||||
scrubIdentity.itemPrice = OTRGlobals::Instance->gRandoContext->GetItemLocation(scrubIdentity.randomizerCheck)->GetPrice();
|
scrubIdentity.itemPrice = OTRGlobals::Instance->gRandoContext->GetItemLocation(scrubIdentity.randomizerCheck)->GetPrice();
|
||||||
|
@ -44,6 +44,7 @@ bool showOverworldTokens;
|
|||||||
bool showDungeonTokens;
|
bool showDungeonTokens;
|
||||||
bool showBeans;
|
bool showBeans;
|
||||||
bool showScrubs;
|
bool showScrubs;
|
||||||
|
bool showMajorScrubs;
|
||||||
bool showMerchants;
|
bool showMerchants;
|
||||||
bool showBeehives;
|
bool showBeehives;
|
||||||
bool showCows;
|
bool showCows;
|
||||||
@ -73,7 +74,7 @@ bool fishsanityAgeSplit;
|
|||||||
bool initialized;
|
bool initialized;
|
||||||
bool doAreaScroll;
|
bool doAreaScroll;
|
||||||
bool previousShowHidden = false;
|
bool previousShowHidden = false;
|
||||||
bool hideShopRightChecks = true;
|
bool hideShopUnshuffledChecks = true;
|
||||||
bool hideTriforceCompleted = true;
|
bool hideTriforceCompleted = true;
|
||||||
bool alwaysShowGS = false;
|
bool alwaysShowGS = false;
|
||||||
|
|
||||||
@ -1115,6 +1116,9 @@ void LoadSettings() {
|
|||||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_MERCHANTS) == RO_SHUFFLE_MERCHANTS_ALL
|
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_MERCHANTS) == RO_SHUFFLE_MERCHANTS_ALL
|
||||||
: true;
|
: true;
|
||||||
showScrubs = IS_RANDO ?
|
showScrubs = IS_RANDO ?
|
||||||
|
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) == RO_SCRUBS_ALL
|
||||||
|
: false;
|
||||||
|
showMajorScrubs = IS_RANDO ?
|
||||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) != RO_SCRUBS_OFF
|
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) != RO_SCRUBS_OFF
|
||||||
: false;
|
: false;
|
||||||
showMerchants = IS_RANDO ?
|
showMerchants = IS_RANDO ?
|
||||||
@ -1221,6 +1225,9 @@ void LoadSettings() {
|
|||||||
|
|
||||||
bool IsCheckShuffled(RandomizerCheck rc) {
|
bool IsCheckShuffled(RandomizerCheck rc) {
|
||||||
Rando::Location* loc = Rando::StaticData::GetLocation(rc);
|
Rando::Location* loc = Rando::StaticData::GetLocation(rc);
|
||||||
|
if (loc->GetRCType() == RCTYPE_SHOP) {
|
||||||
|
auto identity = OTRGlobals::Instance->gRandomizer->IdentifyShopItem(loc->GetScene(), loc->GetActorParams() + 1);
|
||||||
|
}
|
||||||
if (IS_RANDO && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_LOGIC_RULES) != RO_LOGIC_VANILLA) {
|
if (IS_RANDO && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_LOGIC_RULES) != RO_LOGIC_VANILLA) {
|
||||||
return
|
return
|
||||||
(loc->GetArea() != RCAREA_INVALID) && // don't show Invalid locations
|
(loc->GetArea() != RCAREA_INVALID) && // don't show Invalid locations
|
||||||
@ -1234,14 +1241,15 @@ bool IsCheckShuffled(RandomizerCheck rc) {
|
|||||||
loc->GetQuest() == RCQUEST_MQ && OTRGlobals::Instance->gRandoContext->GetDungeons()->GetDungeonFromScene(loc->GetScene())->IsMQ() ||
|
loc->GetQuest() == RCQUEST_MQ && OTRGlobals::Instance->gRandoContext->GetDungeons()->GetDungeonFromScene(loc->GetScene())->IsMQ() ||
|
||||||
loc->GetQuest() == RCQUEST_VANILLA && OTRGlobals::Instance->gRandoContext->GetDungeons()->GetDungeonFromScene(loc->GetScene())->IsVanilla()
|
loc->GetQuest() == RCQUEST_VANILLA && OTRGlobals::Instance->gRandoContext->GetDungeons()->GetDungeonFromScene(loc->GetScene())->IsVanilla()
|
||||||
) &&
|
) &&
|
||||||
(loc->GetRCType() != RCTYPE_SHOP || (showShops && loc->GetActorParams() > 0x03)) &&
|
(loc->GetRCType() != RCTYPE_SHOP ||
|
||||||
|
(showShops && OTRGlobals::Instance->gRandomizer->IdentifyShopItem(loc->GetScene(), loc->GetActorParams() + 1).enGirlAShopItem == 50)) &&
|
||||||
(rc != RC_TRIFORCE_COMPLETED || !hideTriforceCompleted) &&
|
(rc != RC_TRIFORCE_COMPLETED || !hideTriforceCompleted) &&
|
||||||
(rc != RC_GIFT_FROM_SAGES || !IS_RANDO) &&
|
(rc != RC_GIFT_FROM_SAGES || !IS_RANDO) &&
|
||||||
(loc->GetRCType() != RCTYPE_SCRUB ||
|
(loc->GetRCType() != RCTYPE_SCRUB ||
|
||||||
showScrubs ||
|
showScrubs ||
|
||||||
rc == RC_LW_DEKU_SCRUB_NEAR_BRIDGE || // The 3 scrubs that are always randomized
|
(showMajorScrubs && (rc == RC_LW_DEKU_SCRUB_NEAR_BRIDGE || // The 3 scrubs that are always randomized
|
||||||
rc == RC_HF_DEKU_SCRUB_GROTTO ||
|
rc == RC_HF_DEKU_SCRUB_GROTTO ||
|
||||||
rc == RC_LW_DEKU_SCRUB_GROTTO_FRONT
|
rc == RC_LW_DEKU_SCRUB_GROTTO_FRONT))
|
||||||
) &&
|
) &&
|
||||||
(loc->GetRCType() != RCTYPE_MERCHANT || showMerchants) &&
|
(loc->GetRCType() != RCTYPE_MERCHANT || showMerchants) &&
|
||||||
(loc->GetRCType() != RCTYPE_BEEHIVE || showBeehives) &&
|
(loc->GetRCType() != RCTYPE_BEEHIVE || showBeehives) &&
|
||||||
@ -1287,7 +1295,7 @@ bool IsVisibleInCheckTracker(RandomizerCheck rc) {
|
|||||||
auto loc = Rando::StaticData::GetLocation(rc);
|
auto loc = Rando::StaticData::GetLocation(rc);
|
||||||
if (IS_RANDO) {
|
if (IS_RANDO) {
|
||||||
return IsCheckShuffled(rc) || (loc->GetRCType() == RCTYPE_SKULL_TOKEN && alwaysShowGS) ||
|
return IsCheckShuffled(rc) || (loc->GetRCType() == RCTYPE_SKULL_TOKEN && alwaysShowGS) ||
|
||||||
(loc->GetRCType() == RCTYPE_SHOP && (showShops && (!hideShopRightChecks)));
|
(loc->GetRCType() == RCTYPE_SHOP && (showShops && (!hideShopUnshuffledChecks)));
|
||||||
} else {
|
} else {
|
||||||
return loc->IsVanillaCompletion() && (!loc->IsDungeon() || (loc->IsDungeon() && loc->GetQuest() == gSaveContext.questId));
|
return loc->IsVanillaCompletion() && (!loc->IsDungeon() || (loc->IsDungeon() && loc->GetQuest() == gSaveContext.questId));
|
||||||
}
|
}
|
||||||
@ -1683,14 +1691,14 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
|||||||
}
|
}
|
||||||
UIWidgets::EnhancementCheckbox("Vanilla/MQ Dungeon Spoilers", CVAR_TRACKER_CHECK("MQSpoilers"));
|
UIWidgets::EnhancementCheckbox("Vanilla/MQ Dungeon Spoilers", CVAR_TRACKER_CHECK("MQSpoilers"));
|
||||||
UIWidgets::Tooltip("If enabled, Vanilla/MQ dungeons will show on the tracker immediately. Otherwise, Vanilla/MQ dungeon locations must be unlocked.");
|
UIWidgets::Tooltip("If enabled, Vanilla/MQ dungeons will show on the tracker immediately. Otherwise, Vanilla/MQ dungeon locations must be unlocked.");
|
||||||
if (UIWidgets::EnhancementCheckbox("Hide right-side shop item checks", CVAR_TRACKER_CHECK("HideRightShopChecks"), false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
if (UIWidgets::EnhancementCheckbox("Hide unshuffled shop item checks", CVAR_TRACKER_CHECK("HideUnshuffledShopChecks"), false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||||
hideShopRightChecks = !hideShopRightChecks;
|
hideShopUnshuffledChecks = !hideShopUnshuffledChecks;
|
||||||
RecalculateAllAreaTotals();
|
UpdateFilters();
|
||||||
}
|
}
|
||||||
UIWidgets::Tooltip("If enabled, will prevent the tracker from displaying slots 1-4 in all shops.");
|
UIWidgets::Tooltip("If enabled, will prevent the tracker from displaying slots with non-shop-item shuffles.");
|
||||||
if (UIWidgets::EnhancementCheckbox("Always show gold skulltulas", CVAR_TRACKER_CHECK("AlwaysShowGSLocs"), false, "")) {
|
if (UIWidgets::EnhancementCheckbox("Always show gold skulltulas", CVAR_TRACKER_CHECK("AlwaysShowGSLocs"), false, "")) {
|
||||||
alwaysShowGS = !alwaysShowGS;
|
alwaysShowGS = !alwaysShowGS;
|
||||||
RecalculateAllAreaTotals();
|
UpdateFilters();
|
||||||
}
|
}
|
||||||
UIWidgets::Tooltip("If enabled, will show GS locations in the tracker regardless of tokensanity settings.");
|
UIWidgets::Tooltip("If enabled, will show GS locations in the tracker regardless of tokensanity settings.");
|
||||||
UIWidgets::EnhancementCheckbox("Show Logic", "gCheckTrackerOptionShowLogic");
|
UIWidgets::EnhancementCheckbox("Show Logic", "gCheckTrackerOptionShowLogic");
|
||||||
@ -1762,7 +1770,7 @@ void CheckTrackerWindow::UpdateElement() {
|
|||||||
mystery = CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0);
|
mystery = CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0);
|
||||||
showLogicTooltip = CVarGetInteger("gCheckTrackerOptionShowLogic", 0);
|
showLogicTooltip = CVarGetInteger("gCheckTrackerOptionShowLogic", 0);
|
||||||
|
|
||||||
hideShopRightChecks = CVarGetInteger(CVAR_TRACKER_CHECK("HideRightShopChecks"), 1);
|
hideShopUnshuffledChecks = CVarGetInteger(CVAR_TRACKER_CHECK("HideUnshuffledShopChecks"), 1);
|
||||||
alwaysShowGS = CVarGetInteger(CVAR_TRACKER_CHECK("AlwaysShowGSLocs"), 0);
|
alwaysShowGS = CVarGetInteger(CVAR_TRACKER_CHECK("AlwaysShowGSLocs"), 0);
|
||||||
}
|
}
|
||||||
} // namespace CheckTracker
|
} // namespace CheckTracker
|
||||||
|
@ -1292,7 +1292,7 @@ namespace SOH {
|
|||||||
{ MigrationAction::Rename, "gCheckTrackerHudEditMode", "gTrackers.CheckTracker.Draggable" },
|
{ MigrationAction::Rename, "gCheckTrackerHudEditMode", "gTrackers.CheckTracker.Draggable" },
|
||||||
{ MigrationAction::Rename, "gCheckTrackerKnownHide", "gTrackers.CheckTracker.Scummed.Hide" },
|
{ MigrationAction::Rename, "gCheckTrackerKnownHide", "gTrackers.CheckTracker.Scummed.Hide" },
|
||||||
{ MigrationAction::Rename, "gCheckTrackerOptionAlwaysShowGSLocs", "gTrackers.CheckTracker.AlwaysShowGSLocs" },
|
{ MigrationAction::Rename, "gCheckTrackerOptionAlwaysShowGSLocs", "gTrackers.CheckTracker.AlwaysShowGSLocs" },
|
||||||
{ MigrationAction::Rename, "gCheckTrackerOptionHideRightShopChecks", "gTrackers.CheckTracker.HideRightShopChecks" },
|
{ MigrationAction::Rename, "gCheckTrackerOptionHideRightShopChecks", "gTrackers.CheckTracker.HideUnshuffledShopChecks" },
|
||||||
{ MigrationAction::Rename, "gCheckTrackerOptionMQSpoilers", "gTrackers.CheckTracker.MQSpoilers" },
|
{ MigrationAction::Rename, "gCheckTrackerOptionMQSpoilers", "gTrackers.CheckTracker.MQSpoilers" },
|
||||||
{ MigrationAction::Rename, "gCheckTrackerOptionShowHidden", "gTrackers.CheckTracker.ShowHidden" },
|
{ MigrationAction::Rename, "gCheckTrackerOptionShowHidden", "gTrackers.CheckTracker.ShowHidden" },
|
||||||
{ MigrationAction::Rename, "gCheckTrackerSavedExtraColor", "gTrackers.CheckTracker.Saved.ExtraColor" },
|
{ MigrationAction::Rename, "gCheckTrackerSavedExtraColor", "gTrackers.CheckTracker.Saved.ExtraColor" },
|
||||||
|
Loading…
Reference in New Issue
Block a user