Skip to content

Hookify Shooting Gallery options - #6972

Merged
serprex merged 3 commits into
HarbourMasters:developfrom
JordanLongstaff:shooting-gallery-hooks
Jul 23, 2026
Merged

Hookify Shooting Gallery options#6972
serprex merged 3 commits into
HarbourMasters:developfrom
JordanLongstaff:shooting-gallery-hooks

Conversation

@JordanLongstaff

@JordanLongstaff JordanLongstaff commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Comment on lines 113 to 115
s32 ammunition = 15;
if (CVarGetInteger(CVAR_ENHANCEMENT("CustomizeShootingGallery"), 0)) {
ammunition = CVarGetInteger(LINK_IS_ADULT ? CVAR_ENHANCEMENT("ShootingGalleryAmmoAdult")
: CVAR_ENHANCEMENT("ShootingGalleryAmmoChild"),
15);
}
GameInteractor_Should(VB_SET_SHOOTING_GALLERY_AMMO, true, &ammunition);
func_8008EF44(play, ammunition);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this kind of pattern is good for our current standards, at the beginning of VB it wasn't but that might have changed since then.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would our "current standards" involve only using GameInteractor_Should as a conditional? I think that's how it would've been used at first, but it's more flexible than that. Making this change is easier than using an if statement and putting func_8008EF44 inside the hook.

I'm not thrilled with it either, but that's just how it is.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our current standards have changed, & with #6468 at some point I'm in no rush to refactor for non-conditional VB

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm adding plenty of work to that migration with these added minigame hooks. 😅

@serprex
serprex merged commit cca66cd into HarbourMasters:develop Jul 23, 2026
5 checks passed
@JordanLongstaff
JordanLongstaff deleted the shooting-gallery-hooks branch July 24, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants