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

Add event "OnResourceStateChange" #3325

Merged
merged 5 commits into from
May 23, 2024

Conversation

TracerDS
Copy link
Contributor

#3305

Some might say this event is pointless. But it might be a good alternative for onResourceLoadStateChange.
It will also help resources that monitor changing resources. Connecting that event with tables and other data would be easier than tracking 3 separate events.

Syntax: `onResourceStateChange ( resource changedResource, string oldState, string newState )`
Refactoring is a separate issue that will be discussed in another PR
@znvjder
Copy link
Contributor

znvjder commented Mar 9, 2024

I'm in favor of accepting this, but removing the onResourceLoadStateChange event. It's entirely pointless and unnecessary.

@TracerDS
Copy link
Contributor Author

TracerDS commented Mar 9, 2024

I'm in favor of accepting this, but removing the onResourceLoadStateChange event. It's entirely pointless and unnecessary.

For backwards compatibility its better to leave it for now and deprecate it when this PR gets merged

Copy link
Contributor

@Nico8340 Nico8340 left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

Copy link
Member

@Lpsd Lpsd left a comment

Choose a reason for hiding this comment

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

LGTM. Please add the relevant wiki page once the nightly build has been created, following the "new feature" format (example)

@Lpsd Lpsd merged commit cfe9cd9 into multitheftauto:master May 23, 2024
6 checks passed
@TracerDS TracerDS deleted the 290224_Add_onResourceStateChange branch May 23, 2024 17:39
MTABot pushed a commit that referenced this pull request May 23, 2024
@TheNormalnij TheNormalnij added this to the 1.6.1 milestone May 25, 2024
@TheNormalnij TheNormalnij added the enhancement New feature or request label May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants