mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-16 22:00:05 -04:00
More Magic Armor Options (#1691)
* More Magic Armor Options - Add a 3rd option to lose rupees only on damage * More Choices - Add cosmetic and double defense options These both have been requested a couple times * Shorten Description The description was very, very long before * Web Editor Got Me Fix my syntax
This commit is contained in:
@@ -75,6 +75,14 @@ constexpr std::array kMenuScalingModeLabels = {
|
||||
"Dusklight",
|
||||
};
|
||||
|
||||
constexpr std::array kMagicArmorModes = {
|
||||
"Normal",
|
||||
"On Damage",
|
||||
"Double Defense",
|
||||
"Invincible",
|
||||
"Cosmetic",
|
||||
};
|
||||
|
||||
bool try_parse_backend(std::string_view backend, AuroraBackend& outBackend) {
|
||||
if (backend == "auto") {
|
||||
outBackend = BACKEND_AUTO;
|
||||
@@ -211,7 +219,7 @@ void reset_for_speedrun_mode() {
|
||||
getSettings().game.canTransformAnywhere.setSpeedrunValue(false);
|
||||
getSettings().game.fastRoll.setSpeedrunValue(false);
|
||||
getSettings().game.fastSpinner.setSpeedrunValue(false);
|
||||
getSettings().game.freeMagicArmor.setSpeedrunValue(false);
|
||||
getSettings().game.armorRupeeDrain.setSpeedrunValue(MagicArmorMode::NORMAL);
|
||||
getSettings().game.invincibleEnemies.setSpeedrunValue(false);
|
||||
|
||||
getSettings().game.pauseOnFocusLost.setSpeedrunValue(false);
|
||||
@@ -1272,8 +1280,38 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
"Makes Link's roll animation and movement twice as fast.");
|
||||
addCheat("Fast Spinner", getSettings().game.fastSpinner,
|
||||
"Speeds up Spinner movement while holding R.");
|
||||
addCheat("Free Magic Armor", getSettings().game.freeMagicArmor,
|
||||
"Lets the magic armor work without consuming rupees.");
|
||||
leftPane.register_control(
|
||||
leftPane.add_select_button({
|
||||
.key = "Magic Armor Behavior",
|
||||
.getValue =
|
||||
[] {
|
||||
return kMagicArmorModes[static_cast<u8>(getSettings().game.armorRupeeDrain.getValue())];
|
||||
},
|
||||
.isDisabled = [] { return getSettings().game.speedrunMode; },
|
||||
.isModified =
|
||||
[] {
|
||||
return getSettings().game.armorRupeeDrain.getValue() !=
|
||||
getSettings().game.armorRupeeDrain.getDefaultValue();
|
||||
},
|
||||
}),
|
||||
rightPane, [](Pane& pane) {
|
||||
for (int i = 0; i < kMagicArmorModes.size(); i++) {
|
||||
pane.add_button({
|
||||
.text = kMagicArmorModes[i],
|
||||
.isSelected =
|
||||
[i] {
|
||||
return getSettings().game.armorRupeeDrain.getValue() == static_cast<MagicArmorMode>(i);
|
||||
},
|
||||
})
|
||||
.on_pressed([i] {
|
||||
mDoAud_seStartMenu(kSoundItemChange);
|
||||
getSettings().game.armorRupeeDrain.setValue(static_cast<MagicArmorMode>(i));
|
||||
config::Save();
|
||||
});
|
||||
}
|
||||
pane.add_rml(
|
||||
"<br/>Control the behavior of the Magic Armor.");
|
||||
});
|
||||
addCheat("Invincible Enemies", getSettings().game.invincibleEnemies,
|
||||
"Prevents enemies from taking damage.");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user