Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mission goals hook #6534

Merged
merged 3 commits into from
Jan 18, 2025
Merged

Conversation

MjnMixael
Copy link
Contributor

Adds an overridable On Mission Objectives Changed hook that runs when an objective is failed or completed. Overriding the hook only overrides display and music methods. The objective state still gets added to the mission log and all background logic continues.

@wookieejedi
Copy link
Member

Code looks good! Only thing I'd suggest is tuning the hook name to "On Mission Goal Status Changed". Two reasons is that in most places they are referred to as goals, and "On Mission Objectives Changed" might imply adding or removing objectives, or validation/invalidation of objectives, which are the case with this hook :)

@MjnMixael
Copy link
Contributor Author

Code looks good! Only thing I'd suggest is tuning the hook name to "On Mission Goal Status Changed". Two reasons is that in most places they are referred to as goals, and "On Mission Objectives Changed" might imply adding or removing objectives, or validation/invalidation of objectives, which are the case with this hook :)

Good thought. Done.

Copy link
Member

@wookieejedi wookieejedi left a comment

Choose a reason for hiding this comment

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

Thanks and looks good!

Copy link
Member

@wookieejedi wookieejedi left a comment

Choose a reason for hiding this comment

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

Thanks!

@wookieejedi wookieejedi added enhancement A new feature or upgrade of an existing feature to add additional functionality. scripting A feature or issue related to LUA scripting labels Jan 18, 2025
@wookieejedi wookieejedi merged commit bcea174 into scp-fs2open:master Jan 18, 2025
16 checks passed
@MjnMixael MjnMixael deleted the mission_goals_hook branch January 18, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or upgrade of an existing feature to add additional functionality. scripting A feature or issue related to LUA scripting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants