mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 21:03:42 -07:00
Move IsFireLoopLocked to method instead of being variable
This commit is contained in:
parent
44e28a9cf9
commit
b3f5318c09
5 changed files with 11 additions and 11 deletions
|
@ -38,7 +38,7 @@ $basePath = (Resolve-Path .).Path
|
|||
$files = Get-ChildItem -Path $basePath\soh -Recurse -File `
|
||||
| Where-Object { ($_.Extension -eq '.c' -or $_.Extension -eq '.cpp' -or `
|
||||
(($_.Extension -eq '.h' -or $_.Extension -eq '.hpp') -and `
|
||||
(-not ($_.FullName -like "*\soh\src\*" -or $_.FullName -like "*\soh\include\*")))) -and `
|
||||
(-not ($_.FullName -like "*\soh\src\*" -or $_.FullName -like "*\soh\include\*" -or $_.FullName -like "*\soh\soh\Enhancements\randomizer\generated\*")))) -and `
|
||||
(-not ($_.FullName -like "*\soh\assets\*" -or $_.FullName -like "*\soh\build\*")) }
|
||||
|
||||
for ($i = 0; $i -lt $files.Length; $i++) {
|
||||
|
|
|
@ -26,4 +26,4 @@
|
|||
# and pass it as an argument to clang-format
|
||||
# verbose to print files being formatted and X out of Y status
|
||||
|
||||
find soh -type f \( -name "*.c" -o -name "*.cpp" -o \( \( -name "*.h" -o -name "*.hpp" \) ! -path "soh/src/*" ! -path "soh/include/*" \) \) ! -path "soh/assets/*" -print0 | xargs -0 clang-format-14 -i --verbose
|
||||
find soh -type f \( -name "*.c" -o -name "*.cpp" -o \( \( -name "*.h" -o -name "*.hpp" \) ! -path "soh/src/*" ! -path "soh/include/*" ! -path "soh/soh/Enhancements/randomizer/generated/*" \) \) ! -path "soh/assets/*" -print0 | xargs -0 clang-format-14 -i --verbose
|
||||
|
|
|
@ -194,7 +194,6 @@ LOGIC = {
|
|||
"AtNight",
|
||||
"LoweredWaterInBotw",
|
||||
"BigPoes",
|
||||
"IsFireLoopLocked",
|
||||
}
|
||||
|
||||
RANDO = {
|
||||
|
@ -276,6 +275,7 @@ logicFUNC = {
|
|||
"HasBottle",
|
||||
"ScarecrowsSong",
|
||||
"SmallKeys",
|
||||
"IsFireLoopLocked",
|
||||
"OcarinaButtons",
|
||||
"Hearts",
|
||||
"EffectiveHealth",
|
||||
|
|
|
@ -1442,6 +1442,12 @@ bool Logic::SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmountGlitchless
|
|||
}
|
||||
}
|
||||
|
||||
bool Logic::IsFireLoopLocked() {
|
||||
return ctx->GetOption(RSK_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_ANYWHERE) ||
|
||||
ctx->GetOption(RSK_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_OVERWORLD) ||
|
||||
ctx->GetOption(RSK_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_ANY_DUNGEON);
|
||||
}
|
||||
|
||||
std::map<RandomizerGet, uint32_t> Logic::RandoGetToEquipFlag = {
|
||||
{ RG_KOKIRI_SWORD, EQUIP_FLAG_SWORD_KOKIRI }, { RG_MASTER_SWORD, EQUIP_FLAG_SWORD_MASTER },
|
||||
{ RG_BIGGORON_SWORD, EQUIP_FLAG_SWORD_BGS }, { RG_DEKU_SHIELD, EQUIP_FLAG_SHIELD_DEKU },
|
||||
|
@ -2338,10 +2344,6 @@ void Logic::Reset(bool resetSaveContext /*= true*/) {
|
|||
}
|
||||
StartPerformanceTimer(PT_LOGIC_RESET);
|
||||
memset(inLogic, false, sizeof(inLogic));
|
||||
// Settings-dependent variables
|
||||
IsFireLoopLocked = ctx->GetOption(RSK_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_ANYWHERE) ||
|
||||
ctx->GetOption(RSK_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_OVERWORLD) ||
|
||||
ctx->GetOption(RSK_KEYSANITY).Is(RO_DUNGEON_ITEM_LOC_ANY_DUNGEON);
|
||||
|
||||
// AmmoCanDrop = /*AmmoDrops.IsNot(AMMODROPS_NONE)*/ false; TODO: AmmoDrop setting
|
||||
|
||||
|
@ -2407,7 +2409,7 @@ void Logic::Reset(bool resetSaveContext /*= true*/) {
|
|||
|
||||
// If not keysanity, start with 1 logical key to account for automatically unlocking the basement door in
|
||||
// vanilla FiT
|
||||
if (!IsFireLoopLocked && ctx->GetDungeon(Rando::FIRE_TEMPLE)->IsVanilla()) {
|
||||
if (!IsFireLoopLocked() && ctx->GetDungeon(Rando::FIRE_TEMPLE)->IsVanilla()) {
|
||||
SetSmallKeyCount(SCENE_FIRE_TEMPLE, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,9 +59,6 @@ class Logic {
|
|||
bool ShadowTrialClear = false;
|
||||
bool LightTrialClear = false;
|
||||
|
||||
// Logical keysanity
|
||||
bool IsFireLoopLocked = false;
|
||||
|
||||
// Bottle Count
|
||||
uint8_t Bottles = 0;
|
||||
uint8_t NumBottles = 0;
|
||||
|
@ -194,6 +191,7 @@ class Logic {
|
|||
bool CanOpenOverworldDoor(RandomizerGet itemName);
|
||||
bool SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmount);
|
||||
bool SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmountGlitchless, uint8_t requiredAmountGlitched);
|
||||
bool IsFireLoopLocked();
|
||||
bool CanOpenUnderwaterChest();
|
||||
bool CanDoGlitch(GlitchType glitch);
|
||||
bool CanEquipSwap(RandomizerGet itemName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue