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

@Eat trigger stat increases are not disabled #1333

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

canerksk
Copy link
Contributor

@canerksk canerksk commented Nov 11, 2024

The trigger was triggered after the values ​​were changed and there was no option to turn off hits, stamina, mana gain.

Additionally, animation and sound changes were added to local variables.

Trigger was triggered after values ​​were changed and hits, stam, mana gain could not be turned off.
@cbnolok
Copy link
Contributor

cbnolok commented Nov 19, 2024

Could you please explain better why does this need to trigger twice?

@cbnolok
Copy link
Contributor

cbnolok commented Nov 19, 2024

Also we need to avoid integer overflows, i'll provide a saturating add function (i think i only wrote a saturating subtraction one). Anyways, i might be wrong, but isn't it there a method that changes the given stat value and does that overflow check itself?

@canerksk
Copy link
Contributor Author

Could you please explain better why does this need to trigger twice?

In order to get the food values ​​before and after eating, it is unclear how much food value there is after eating under this trigger since it is triggered before eating in its initial state.

@cbnolok
Copy link
Contributor

cbnolok commented Nov 26, 2024

I'd be cautious with changing how a trigger is called, since it can have profound compatibility issues with old scripts. I'm more open to add an @aftereat trigger, even if i'd ask why couldn't i get the new value with something like local.newhits = <max , +<local.hits>>

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.

2 participants