mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-24 07:41:29 -04:00
TPHD Button Fishing (#1949)
Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net>
This commit is contained in:
@@ -153,6 +153,7 @@ struct UserSettings {
|
||||
ConfigVar<bool> noMissClimbing;
|
||||
ConfigVar<bool> fastTears;
|
||||
ConfigVar<bool> no2ndFishForCat;
|
||||
ConfigVar<bool> buttonFishing;
|
||||
ConfigVar<bool> instantSaves;
|
||||
ConfigVar<bool> instantText;
|
||||
ConfigVar<bool> sunsSong;
|
||||
|
||||
@@ -5755,6 +5755,12 @@ static void play_camera_u(dmg_rod_class* i_this) {
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
BOOL item_any_fishing_rod(int itemId) {
|
||||
return itemId == dItemNo_FISHING_ROD_1_e || (itemId >= dItemNo_BEE_ROD_e && itemId <= dItemNo_JEWEL_WORM_ROD_e);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int dmg_rod_Execute(dmg_rod_class* i_this) {
|
||||
fopAc_ac_c* actor = &i_this->actor;
|
||||
|
||||
@@ -5821,6 +5827,17 @@ static int dmg_rod_Execute(dmg_rod_class* i_this) {
|
||||
i_this->prev_rod_substick_y = i_this->rod_substick_y;
|
||||
i_this->rod_substick_y = mDoCPd_c::getSubStickY(PAD_1);
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.buttonFishing) {
|
||||
if ((item_any_fishing_rod(dComIfGp_getSelectItem(0)) && mDoCPd_c::getHoldX(PAD_1)) ||
|
||||
(item_any_fishing_rod(dComIfGp_getSelectItem(1)) && mDoCPd_c::getHoldY(PAD_1)))
|
||||
{
|
||||
i_this->rod_stick_y = -1.0f;
|
||||
i_this->rod_substick_y = -1.0f;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
i_this->reel_speed = 5.0f;
|
||||
i_this->reel_btn_flags = mDoCPd_c::getHoldB(PAD_1) | mDoCPd_c::getHoldDown(PAD_1);
|
||||
if (mDoCPd_c::getHoldDown(PAD_1)) {
|
||||
|
||||
@@ -41,6 +41,7 @@ UserSettings g_userSettings = {
|
||||
.noMissClimbing {"game.noMissClimbing", false},
|
||||
.fastTears {"game.fastTears", false},
|
||||
.no2ndFishForCat {"game.no2ndFishForCat", false},
|
||||
.buttonFishing {"game.buttonFishing", false},
|
||||
.instantSaves {"game.instantSaves", false},
|
||||
.instantText {"game.instantText", false},
|
||||
.sunsSong {"game.sunsSong", false},
|
||||
@@ -223,6 +224,7 @@ void registerSettings() {
|
||||
Register(g_userSettings.game.fastClimbing);
|
||||
Register(g_userSettings.game.fastTears);
|
||||
Register(g_userSettings.game.no2ndFishForCat);
|
||||
Register(g_userSettings.game.buttonFishing);
|
||||
Register(g_userSettings.game.instantSaves);
|
||||
Register(g_userSettings.game.instantText);
|
||||
Register(g_userSettings.game.sunsSong);
|
||||
|
||||
@@ -37,6 +37,7 @@ void applyPresetDusk() {
|
||||
s.game.invertCameraXAxis.setValue(true);
|
||||
s.game.invertFirstPersonYAxis.setValue(true);
|
||||
s.game.no2ndFishForCat.setValue(true);
|
||||
s.game.buttonFishing.setValue(true);
|
||||
s.game.enableAchievementToasts.setValue(true);
|
||||
s.game.enableControllerToasts.setValue(true);
|
||||
s.game.enableQuickTransform.setValue(true);
|
||||
|
||||
@@ -1173,6 +1173,8 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
"Link will not recoil when his sword hits walls.");
|
||||
addOption("No 2nd Fish for Cat", getSettings().game.no2ndFishForCat,
|
||||
"Skip needing to catch a second fish for Sera's cat.");
|
||||
addOption("Button Fishing", getSettings().game.buttonFishing,
|
||||
"Allow fishing with the Fishing Rod using the button the item is assigned to.");
|
||||
addOption("Show Poe Count on Map", getSettings().game.enhancedMapMenus,
|
||||
"Displays collected/total number of Poe Souls for a region on the map.");
|
||||
addSpeedrunDisabledOption("Sun's Song (R+X)", getSettings().game.sunsSong,
|
||||
|
||||
Reference in New Issue
Block a user