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 Trigger for Infinite Fuel Toggle #270

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

coleminer0112
Copy link

@coleminer0112 coleminer0112 commented Dec 26, 2021

Allows custom fuel resources to watch for infinite fuel in vMenu within other client-sided scripts.

Event name: "vMenu:InfiniteFuelToggled"
Passes one arg, the boolean representing whether the box is checked or not

@MichaelCoding25
Copy link
Contributor

I'm pretty sure you also need to register the event, so people can just AddEventHandler to it in their script.

@coleminer0112
Copy link
Author

I'm pretty sure you also need to register the event, so people can just AddEventHandler to it in their script.

It doesn't require registering unless it's going across the Net, which it isn't - it is a client side only event

@TomGrobbe TomGrobbe changed the base branch from master to development May 5, 2022 20:32
@TomGrobbe
Copy link
Owner

I have a suggestion for an additional change, that'd make this more useful, whenever the resource loads and it sets the original value form the saved preferences, it should trigger the event once so your other resource has a chance of knowing what the status is once a player joins and doesn't toggle it manually. Or exposing an export function that gets the current value.

@TomGrobbe
Copy link
Owner

Other than that it's a useful feature

@TomGrobbe TomGrobbe force-pushed the development branch 2 times, most recently from b6f3ea2 to 7504416 Compare March 4, 2023 14:59
@TomGrobbe
Copy link
Owner

Could you rebase your changes based on the latest development branch and resolve the conflicts please?

Copy link
Owner

@TomGrobbe TomGrobbe left a comment

Choose a reason for hiding this comment

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

Comments need to be resolved

@TomGrobbe TomGrobbe added the needs fixing This is a confirmed issue/bug that needs to be fixed. label Mar 4, 2023
coleminer0112 and others added 3 commits March 7, 2023 22:57
Allows custom fuel resources to watch for infinite fuel in vMenu
Co-authored-by: Christopher M. <10535902+cm8263@users.noreply.github.com>
@coleminer0112
Copy link
Author

I have a suggestion for an additional change, that'd make this more useful, whenever the resource loads and it sets the original value form the saved preferences, it should trigger the event once so your other resource has a chance of knowing what the status is once a player joins and doesn't toggle it manually. Or exposing an export function that gets the current value.

The current development version has no userDefault for this setting, so it may not be necessary to do an initial check!

Also, I rebased, but I am not a Git-master... so I am unsure why it is now 3 commits despite only the 1 change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs fixing This is a confirmed issue/bug that needs to be fixed. needs review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants