Skip to content

Fix food buffs potentially resulting in negative stamina #4908

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

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

Absolucy
Copy link
Member

@Absolucy Absolucy commented Jan 16, 2025

About The Pull Request

I somehow ended up with a maximum stamina of -650, and after code diving - the only thing that ever sets stamina.maximum is food buffs. So I decided to clean up some of that code a bit, and add a new wrapper, /datum/stamina_container/proc/set_maximum, which ensures that the maximum value is never 0 or below.

Why It's Good For The Game

mrrrp mrrp mrrow :3

Changelog

🆑
fix: Fixed food buffs potentially resulting in negative maximum stamina, resulting in permanent slowdown.
/:cl:

@Absolucy Absolucy added the Code: Fix fix da bug label Jan 16, 2025
@Absolucy Absolucy requested a review from wraith-54321 January 16, 2025 13:48
This was referenced Jan 20, 2025
@Absolucy Absolucy merged commit 9b785dc into Monkestation:master Jan 21, 2025
24 checks passed
@Absolucy Absolucy deleted the food-fixes branch January 21, 2025 01:14
github-actions bot added a commit that referenced this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Fix fix da bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants