mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-25 09:39:00 -05:00
Merge pull request #1399 from aMannus/rando-bombchu-drops
Rando: Add Bombchu Drops
This commit is contained in:
commit
8e49f0465c
@ -2561,8 +2561,10 @@ namespace Settings {
|
|||||||
|
|
||||||
MapsAndCompasses.SetSelectedIndex(cvarSettings[RSK_STARTING_MAPS_COMPASSES]);
|
MapsAndCompasses.SetSelectedIndex(cvarSettings[RSK_STARTING_MAPS_COMPASSES]);
|
||||||
|
|
||||||
|
// RANDOTODO: Implement disabling ammo drops. Currently only "On" (index 0) or "On + Bombchus" (index 1) is implemented.
|
||||||
|
AmmoDrops.SetSelectedIndex(cvarSettings[RSK_ENABLE_BOMBCHU_DROPS]);
|
||||||
|
|
||||||
BombchusInLogic.SetSelectedIndex(cvarSettings[RSK_BOMBCHUS_IN_LOGIC]);
|
BombchusInLogic.SetSelectedIndex(cvarSettings[RSK_BOMBCHUS_IN_LOGIC]);
|
||||||
AmmoDrops.SetSelectedIndex(AMMODROPS_VANILLA); // Ensure logic knows bombchu drops aren't implemented yet
|
|
||||||
|
|
||||||
StartingConsumables.SetSelectedIndex(cvarSettings[RSK_STARTING_CONSUMABLES]);
|
StartingConsumables.SetSelectedIndex(cvarSettings[RSK_STARTING_CONSUMABLES]);
|
||||||
StartingMaxRupees.SetSelectedIndex(cvarSettings[RSK_FULL_WALLETS]);
|
StartingMaxRupees.SetSelectedIndex(cvarSettings[RSK_FULL_WALLETS]);
|
||||||
|
@ -582,6 +582,7 @@ std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEn
|
|||||||
{ "Shuffle Dungeon Items:Gerudo Fortress Keys", RSK_GERUDO_KEYS },
|
{ "Shuffle Dungeon Items:Gerudo Fortress Keys", RSK_GERUDO_KEYS },
|
||||||
{ "Shuffle Dungeon Items:Boss Keys", RSK_BOSS_KEYSANITY },
|
{ "Shuffle Dungeon Items:Boss Keys", RSK_BOSS_KEYSANITY },
|
||||||
{ "Shuffle Dungeon Items:Ganon's Boss Key", RSK_GANONS_BOSS_KEY },
|
{ "Shuffle Dungeon Items:Ganon's Boss Key", RSK_GANONS_BOSS_KEY },
|
||||||
|
{ "World Settings:Ammo Drops", RSK_ENABLE_BOMBCHU_DROPS },
|
||||||
{ "World Settings:Bombchus in Logic", RSK_BOMBCHUS_IN_LOGIC },
|
{ "World Settings:Bombchus in Logic", RSK_BOMBCHUS_IN_LOGIC },
|
||||||
{ "Misc Settings:Gossip Stone Hints", RSK_GOSSIP_STONE_HINTS },
|
{ "Misc Settings:Gossip Stone Hints", RSK_GOSSIP_STONE_HINTS },
|
||||||
{ "Misc Settings:Hint Clarity", RSK_HINT_CLARITY },
|
{ "Misc Settings:Hint Clarity", RSK_HINT_CLARITY },
|
||||||
@ -831,6 +832,16 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
|
|||||||
gSaveContext.randoSettings[index].value = 1;
|
gSaveContext.randoSettings[index].value = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
// Uses Ammo Drops option for now. "Off" not yet implemented
|
||||||
|
case RSK_ENABLE_BOMBCHU_DROPS:
|
||||||
|
if (it.value() == "On") {
|
||||||
|
gSaveContext.randoSettings[index].value = 0;
|
||||||
|
} else if (it.value() == "On + Bombchu") {
|
||||||
|
gSaveContext.randoSettings[index].value = 1;
|
||||||
|
} else if (it.value() == "Off") {
|
||||||
|
gSaveContext.randoSettings[index].value = 2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case RSK_STARTING_MAPS_COMPASSES:
|
case RSK_STARTING_MAPS_COMPASSES:
|
||||||
if(it.value() == "Start With") {
|
if(it.value() == "Start With") {
|
||||||
gSaveContext.randoSettings[index].value = 0;
|
gSaveContext.randoSettings[index].value = 0;
|
||||||
@ -3435,6 +3446,7 @@ void GenerateRandomizerImgui() {
|
|||||||
cvarSettings[RSK_SHUFFLE_COWS] = CVar_GetS32("gRandomizeShuffleCows", 0);
|
cvarSettings[RSK_SHUFFLE_COWS] = CVar_GetS32("gRandomizeShuffleCows", 0);
|
||||||
cvarSettings[RSK_SHUFFLE_ADULT_TRADE] = CVar_GetS32("gRandomizeShuffleAdultTrade", 0);
|
cvarSettings[RSK_SHUFFLE_ADULT_TRADE] = CVar_GetS32("gRandomizeShuffleAdultTrade", 0);
|
||||||
cvarSettings[RSK_SHUFFLE_MAGIC_BEANS] = CVar_GetS32("gRandomizeShuffleBeans", 0);
|
cvarSettings[RSK_SHUFFLE_MAGIC_BEANS] = CVar_GetS32("gRandomizeShuffleBeans", 0);
|
||||||
|
cvarSettings[RSK_ENABLE_BOMBCHU_DROPS] = CVar_GetS32("gRandomizeEnableBombchuDrops", 0);
|
||||||
cvarSettings[RSK_BOMBCHUS_IN_LOGIC] = CVar_GetS32("gRandomizeBombchusInLogic", 0);
|
cvarSettings[RSK_BOMBCHUS_IN_LOGIC] = CVar_GetS32("gRandomizeBombchusInLogic", 0);
|
||||||
cvarSettings[RSK_SKIP_CHILD_ZELDA] = CVar_GetS32("gRandomizeSkipChildZelda", 0);
|
cvarSettings[RSK_SKIP_CHILD_ZELDA] = CVar_GetS32("gRandomizeSkipChildZelda", 0);
|
||||||
|
|
||||||
@ -4310,6 +4322,14 @@ void DrawRandoEditor(bool& open) {
|
|||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
|
// Enable Bombchu Drops
|
||||||
|
UIWidgets::EnhancementCheckbox("Enable Bombchu Drops", "gRandomizeEnableBombchuDrops");
|
||||||
|
UIWidgets::InsertHelpHoverText(
|
||||||
|
"Once you obtain bombchus for the first time, refills can be found in bushes and other places where bomb drops can normally spawn."
|
||||||
|
);
|
||||||
|
|
||||||
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
UIWidgets::EnhancementCheckbox("WIP - Blue Fire Arrows", "gRandomizeBlueIceArrows", true, "In development");
|
UIWidgets::EnhancementCheckbox("WIP - Blue Fire Arrows", "gRandomizeBlueIceArrows", true, "In development");
|
||||||
UIWidgets::InsertHelpHoverText(
|
UIWidgets::InsertHelpHoverText(
|
||||||
"Ice Arrows act like Blue Fire, making them able to melt red ice. "
|
"Ice Arrows act like Blue Fire, making them able to melt red ice. "
|
||||||
|
@ -1018,6 +1018,7 @@ typedef enum {
|
|||||||
RSK_SKULLS_SUNS_SONG,
|
RSK_SKULLS_SUNS_SONG,
|
||||||
RSK_SHUFFLE_ADULT_TRADE,
|
RSK_SHUFFLE_ADULT_TRADE,
|
||||||
RSK_SHUFFLE_MAGIC_BEANS,
|
RSK_SHUFFLE_MAGIC_BEANS,
|
||||||
|
RSK_ENABLE_BOMBCHU_DROPS,
|
||||||
RSK_BOMBCHUS_IN_LOGIC,
|
RSK_BOMBCHUS_IN_LOGIC,
|
||||||
RSK_LINKS_POCKET
|
RSK_LINKS_POCKET
|
||||||
} RandomizerSettingKey;
|
} RandomizerSettingKey;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "UIWidgets.hpp"
|
#include "UIWidgets.hpp"
|
||||||
|
#include "include/global.h"
|
||||||
#include "include/z64audio.h"
|
#include "include/z64audio.h"
|
||||||
|
|
||||||
#define EXPERIMENTAL() \
|
#define EXPERIMENTAL() \
|
||||||
@ -745,7 +746,12 @@ namespace GameMenuBar {
|
|||||||
);
|
);
|
||||||
UIWidgets::PaddedEnhancementCheckbox("No Random Drops", "gNoRandomDrops", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("No Random Drops", "gNoRandomDrops", true, false);
|
||||||
UIWidgets::Tooltip("Disables random drops, except from the Goron Pot, Dampe, and bosses");
|
UIWidgets::Tooltip("Disables random drops, except from the Goron Pot, Dampe, and bosses");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Enable Bombchu Drops", "gBombchuDrops", true, false);
|
bool forceEnableBombchuDrops = gSaveContext.n64ddFlag &&
|
||||||
|
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1;
|
||||||
|
const char* forceEnableBombchuDropsText =
|
||||||
|
"This setting is forcefully enabled because a savefile\nwith \"Enable Bombchu Drops\" is loaded.";
|
||||||
|
UIWidgets::PaddedEnhancementCheckbox("Enable Bombchu Drops", "gBombchuDrops", true, false,
|
||||||
|
forceEnableBombchuDrops, forceEnableBombchuDropsText, UIWidgets::CheckboxGraphics::Checkmark);
|
||||||
UIWidgets::Tooltip("Bombchus will sometimes drop in place of bombs");
|
UIWidgets::Tooltip("Bombchus will sometimes drop in place of bombs");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("No Heart Drops", "gNoHeartDrops", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("No Heart Drops", "gNoHeartDrops", true, false);
|
||||||
UIWidgets::Tooltip("Disables heart drops, but not heart placements, like from a Deku Scrub running off\nThis simulates Hero Mode from other games in the series");
|
UIWidgets::Tooltip("Disables heart drops, but not heart placements, like from a Deku Scrub running off\nThis simulates Hero Mode from other games in the series");
|
||||||
|
@ -1507,7 +1507,8 @@ s16 func_8001F404(s16 dropId) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CVar_GetS32("gBombchuDrops", 0) &&
|
if ((CVar_GetS32("gBombchuDrops", 0) ||
|
||||||
|
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) &&
|
||||||
(dropId == ITEM00_BOMBS_A || dropId == ITEM00_BOMBS_B || dropId == ITEM00_BOMBS_SPECIAL)) {
|
(dropId == ITEM00_BOMBS_A || dropId == ITEM00_BOMBS_B || dropId == ITEM00_BOMBS_SPECIAL)) {
|
||||||
dropId = EnItem00_ConvertBombDropToBombchu(dropId);
|
dropId = EnItem00_ConvertBombDropToBombchu(dropId);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user