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

Align fatigue level comparisons for UI and effects #59055

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

actually-a-cat
Copy link
Contributor

@actually-a-cat actually-a-cat commented Jul 8, 2022

Summary

Bugfixes "Fixed Tired status showing up with delay after fatigue penalties start"

Purpose of change

The effect of fatigue on focus starts on greater-or-equal to threshold, while UI uses greater, so the effects start 1 focus point before "Tired" pops up. Same for further transitions. This can be confusing if you notice your focus tanking, stop to investigate, but the reason isn't visible until a while later.

Describe the solution

Change > to >= and <= to <.

Describe alternatives you've considered

Change it the other way around.

It bothers me a little that the logic is duplicated in sidebar and in the hardcoded function but I'll leave it to the sidebar enthusiasts to worry about.

Testing

Debugged a character to 190 fatigue (1 point before the exact threshold between not tired and Tired)

Before: focus cap starts after 5 minutes, "Tired" doesn't appear on sidebar and medical menu until 5 more minutes
After: focus cap and "Tired" labels appear at the same time

Also tried the other thresholds (383, 575)

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Info / User Interface Game - player communication, menus, etc. <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Jul 8, 2022
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jul 8, 2022
@dseguin dseguin merged commit 658bbe4 into CleverRaven:master Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants