mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-22 21:51:55 -05:00
Adds more options for Link's starting item.
This commit is contained in:
parent
2015e3a041
commit
36cc9d562c
@ -2592,6 +2592,8 @@ namespace Settings {
|
|||||||
|
|
||||||
NightGSExpectSuns.SetSelectedIndex(cvarSettings[RSK_SKULLS_SUNS_SONG]);
|
NightGSExpectSuns.SetSelectedIndex(cvarSettings[RSK_SKULLS_SUNS_SONG]);
|
||||||
|
|
||||||
|
LinksPocketItem.SetSelectedIndex(cvarSettings[RSK_LINKS_POCKET]);
|
||||||
|
|
||||||
// RANDOTODO implement chest shuffle with keysanity
|
// RANDOTODO implement chest shuffle with keysanity
|
||||||
// ShuffleChestMinigame.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_CHEST_MINIGAME]);
|
// ShuffleChestMinigame.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_CHEST_MINIGAME]);
|
||||||
|
|
||||||
|
@ -567,6 +567,7 @@ std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEn
|
|||||||
{ "Open Settings:Token Count", RSK_RAINBOW_BRIDGE_TOKEN_COUNT },
|
{ "Open Settings:Token Count", RSK_RAINBOW_BRIDGE_TOKEN_COUNT },
|
||||||
{ "Open Settings:Random Ganon's Trials", RSK_RANDOM_TRIALS },
|
{ "Open Settings:Random Ganon's Trials", RSK_RANDOM_TRIALS },
|
||||||
{ "Open Settings:Trial Count", RSK_TRIAL_COUNT },
|
{ "Open Settings:Trial Count", RSK_TRIAL_COUNT },
|
||||||
|
{ "Shuffle Settings:Link's Pocket", RSK_LINKS_POCKET},
|
||||||
{ "Shuffle Settings:Shuffle Gerudo Card", RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD },
|
{ "Shuffle Settings:Shuffle Gerudo Card", RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD },
|
||||||
{ "Shuffle Settings:Scrub Shuffle", RSK_SHUFFLE_SCRUBS },
|
{ "Shuffle Settings:Scrub Shuffle", RSK_SHUFFLE_SCRUBS },
|
||||||
{ "Shuffle Settings:Shuffle Cows", RSK_SHUFFLE_COWS },
|
{ "Shuffle Settings:Shuffle Cows", RSK_SHUFFLE_COWS },
|
||||||
@ -969,6 +970,17 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
|
|||||||
gSaveContext.randoSettings[index].value = 3;
|
gSaveContext.randoSettings[index].value = 3;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case RSK_LINKS_POCKET:
|
||||||
|
if (it.value() == "Dungeon Reward") {
|
||||||
|
gSaveContext.randoSettings[index].value = 0;
|
||||||
|
} else if (it.value() == "Advancement") {
|
||||||
|
gSaveContext.randoSettings[index].value = 1;
|
||||||
|
} else if (it.value() == "Anything") {
|
||||||
|
gSaveContext.randoSettings[index].value = 2;
|
||||||
|
} else if (it.value() == "Nothing") {
|
||||||
|
gSaveContext.randoSettings[index].value = 3;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
@ -3457,6 +3469,9 @@ void GenerateRandomizerImgui() {
|
|||||||
cvarSettings[RSK_ENABLE_GLITCH_CUTSCENES] = CVar_GetS32("gRandomizeEnableGlitchCutscenes", 0);
|
cvarSettings[RSK_ENABLE_GLITCH_CUTSCENES] = CVar_GetS32("gRandomizeEnableGlitchCutscenes", 0);
|
||||||
|
|
||||||
cvarSettings[RSK_SKULLS_SUNS_SONG] = CVar_GetS32("gRandomizeGsExpectSunsSong", 0);
|
cvarSettings[RSK_SKULLS_SUNS_SONG] = CVar_GetS32("gRandomizeGsExpectSunsSong", 0);
|
||||||
|
// Link's Pocket has to have a dungeon reward if the other rewards are shuffled to end of dungeon.
|
||||||
|
cvarSettings[RSK_LINKS_POCKET] = CVar_GetS32("gRandomizeShuffleDungeonReward", 0) != 0 ?
|
||||||
|
CVar_GetS32("gRandomizeLinksPocket", 0) : 0;
|
||||||
|
|
||||||
// todo: this efficently when we build out cvar array support
|
// todo: this efficently when we build out cvar array support
|
||||||
std::set<RandomizerCheck> excludedLocations;
|
std::set<RandomizerCheck> excludedLocations;
|
||||||
@ -4506,6 +4521,13 @@ void DrawRandoEditor(bool& open) {
|
|||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
window->DC.CurrLineTextBaseOffset = 0.0f;
|
window->DC.CurrLineTextBaseOffset = 0.0f;
|
||||||
ImGui::BeginChild("ChildStartingEquipment", ImVec2(0, -8));
|
ImGui::BeginChild("ChildStartingEquipment", ImVec2(0, -8));
|
||||||
|
// Don't display this option if Dungeon Rewards are Shuffled to End of Dungeon.
|
||||||
|
// TODO: Show this but disabled when we have options for disabled Comboboxes.
|
||||||
|
if (CVar_GetS32("gRandomizeShuffleDungeonReward", 0) != 0) {
|
||||||
|
ImGui::Text(Settings::LinksPocketItem.GetName().c_str());
|
||||||
|
SohImGui::EnhancementCombobox("gRandomizeLinksPocket", randoLinksPocket, 4, 0);
|
||||||
|
PaddedSeparator();
|
||||||
|
}
|
||||||
|
|
||||||
SohImGui::EnhancementCheckbox(Settings::StartingKokiriSword.GetName().c_str(),
|
SohImGui::EnhancementCheckbox(Settings::StartingKokiriSword.GetName().c_str(),
|
||||||
"gRandomizeStartingKokiriSword");
|
"gRandomizeStartingKokiriSword");
|
||||||
|
@ -1018,7 +1018,8 @@ 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_BOMBCHUS_IN_LOGIC
|
RSK_BOMBCHUS_IN_LOGIC,
|
||||||
|
RSK_LINKS_POCKET
|
||||||
} RandomizerSettingKey;
|
} RandomizerSettingKey;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -560,10 +560,16 @@ void GiveLinkAdultTradeItem(GetItemID giid) {
|
|||||||
INV_CONTENT(ITEM_TRADE_ADULT) = item;
|
INV_CONTENT(ITEM_TRADE_ADULT) = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GiveLinksPocketMedallion() {
|
void GiveLinksPocketItem() {
|
||||||
|
if (Randomizer_GetSettingValue(RSK_LINKS_POCKET) < 3) {
|
||||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LINKS_POCKET, RG_NONE);
|
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LINKS_POCKET, RG_NONE);
|
||||||
|
|
||||||
GiveLinkDungeonReward(getItemEntry.getItemId);
|
if (getItemEntry.modIndex == MOD_NONE) {
|
||||||
|
Item_Give(NULL, getItemEntry.itemId);
|
||||||
|
} else if (getItemEntry.modIndex == MOD_RANDOMIZER) {
|
||||||
|
Randomizer_Item_Give(NULL, getItemEntry);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -802,7 +808,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Give Link's pocket item
|
// Give Link's pocket item
|
||||||
GiveLinksPocketMedallion();
|
GiveLinksPocketItem();
|
||||||
|
|
||||||
int openForest = Randomizer_GetSettingValue(RSK_FOREST);
|
int openForest = Randomizer_GetSettingValue(RSK_FOREST);
|
||||||
switch (openForest) {
|
switch (openForest) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user