mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
Reimplements vanilla bug, adds cvar and checkbox for the fix.
This commit is contained in:
parent
f71470adea
commit
ff4966f146
3 changed files with 15 additions and 5 deletions
|
@ -705,6 +705,8 @@ namespace SohImGui {
|
|||
Tooltip("Show dungeon entrances icon only when it should be");
|
||||
EnhancementCheckbox("Fix Two Handed idle animations", "gTwoHandedIdle");
|
||||
Tooltip("Makes two handed idle animation play, a seemingly finished animation that was disabled on accident in the original game");
|
||||
EnhancementCheckbox("Fix the Gravedigging Tour Glitch", "gGravediggingTourFix");
|
||||
Tooltip("Fixes a vanilla bug where you can permanently miss the Gravedigging Tour Heart Piece in Kakariko Graveyard if you spawn the Heart Piece and leave without picking it up");
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ void BootCommands_Init()
|
|||
CVar_RegisterS32("gNewDrops", 0);
|
||||
CVar_RegisterS32("gVisualAgony", 0);
|
||||
CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French
|
||||
CVar_RegisterS32("gGravediggingTourFix", 0);
|
||||
}
|
||||
|
||||
//void BootCommands_ParseBootArgs(char* str)
|
||||
|
|
|
@ -606,21 +606,28 @@ void EnTk_Dig(EnTk* this, GlobalContext* globalCtx) {
|
|||
rewardPos.z += this->actor.world.pos.z;
|
||||
|
||||
this->currentReward = EnTk_ChooseReward(this);
|
||||
s32 collectibleParams = rewardParams[this->currentReward];
|
||||
this->currentReward = 3;
|
||||
if (this->currentReward == 3) {
|
||||
/*
|
||||
* Upgrade the purple rupee reward to the heart piece if this
|
||||
* is the first grand prize dig.
|
||||
*/
|
||||
if (Flags_GetCollectible(globalCtx, 0x19) == 0) {
|
||||
// Initialized with bugfixed condition, overriden with original check if bugfix cvar is 0 (which is default).
|
||||
bool condition = Flags_GetCollectible(globalCtx, 0x19) == 0;
|
||||
if (CVar_GetS32("gGravediggingTourFix", 0) == 0) {
|
||||
condition = !(gSaveContext.itemGetInf[1] & 0x1000);
|
||||
}
|
||||
if (condition) {
|
||||
this->currentReward = 4;
|
||||
collectibleParams = ITEM00_HEART_PIECE;
|
||||
gSaveContext.itemGetInf[1] |= 0x1000;
|
||||
}
|
||||
}
|
||||
|
||||
EnItem00* reward = Item_DropCollectible(globalCtx, &rewardPos, collectibleParams);
|
||||
EnItem00* reward = Item_DropCollectible(globalCtx, &rewardPos, rewardParams[this->currentReward]);
|
||||
if (this->currentReward == 4) {
|
||||
reward->collectibleFlag = 0x19;
|
||||
if (CVar_GetS32("gGravediggingTourFix", 0) != 0) {
|
||||
reward->collectibleFlag = 0x19;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue