mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-30 23:10:14 -05:00
Option for projectile ammo to match item instead of age (#2453)
* Projectile ammo matches ItemAction instead of age extracted logic from months-old PR * Added cvar under "Enhancements -> Gameplay -> Items" for bow/slingshot ammo * Update GameMenuBar.cpp
This commit is contained in:
parent
462ab00c7e
commit
218971c4a9
@ -403,6 +403,8 @@ namespace GameMenuBar {
|
||||
UIWidgets::Tooltip("Makes nuts explode bombs, similar to how they interact with bombchus. This does not affect bombflowers.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Equip Multiple Arrows at Once", "gSeparateArrows", true, false);
|
||||
UIWidgets::Tooltip("Allow the bow and magic arrows to be equipped at the same time on different slots");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Bow as Child/Slingshot as Adult", "gBowSlingShotAmmoFix", true, false);
|
||||
UIWidgets::Tooltip("Allows child to use bow with arrows.\nAllows adult to use slingshot with seeds.\n\nRequires glitches or 'Timeless Equipment' cheat to equip.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Better Farore's Wind", "gBetterFW", true, false);
|
||||
UIWidgets::Tooltip("Helps FW persist between ages, gives child and adult separate FW points, and can be used in more places.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Static Explosion Radius", "gStaticExplosionRadius", true, false);
|
||||
|
@ -2182,7 +2182,11 @@ void func_80834298(Player* this, PlayState* play) {
|
||||
|
||||
// Determine projectile type for bow or slingshot
|
||||
s32 func_80834380(PlayState* play, Player* this, s32* itemPtr, s32* typePtr) {
|
||||
if (LINK_IS_ADULT) {
|
||||
bool useBow = LINK_IS_ADULT;
|
||||
if(CVarGetInteger("gBowSlingShotAmmoFix", 0)){
|
||||
useBow = this->heldItemAction != PLAYER_IA_SLINGSHOT;
|
||||
}
|
||||
if (useBow) {
|
||||
*itemPtr = ITEM_BOW;
|
||||
if (this->stateFlags1 & PLAYER_STATE1_23) {
|
||||
*typePtr = ARROW_NORMAL_HORSE;
|
||||
@ -11450,7 +11454,12 @@ s32 func_8084B3CC(PlayState* play, Player* this) {
|
||||
func_80835C58(play, this, func_8084FA54, 0);
|
||||
|
||||
if (!func_8002DD6C(this) || Player_HoldsHookshot(this)) {
|
||||
func_80835F44(play, this, 3);
|
||||
s32 projectileItemToUse = ITEM_BOW;
|
||||
if(CVarGetInteger("gBowSlingShotAmmoFix", 0)){
|
||||
projectileItemToUse = LINK_IS_ADULT ? ITEM_BOW : ITEM_SLINGSHOT;
|
||||
}
|
||||
|
||||
func_80835F44(play, this, projectileItemToUse);
|
||||
}
|
||||
|
||||
this->stateFlags1 |= PLAYER_STATE1_20;
|
||||
|
Loading…
Reference in New Issue
Block a user