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

Fix for Ceiling(). #5637

Merged
merged 1 commit into from
Feb 3, 2024
Merged

Fix for Ceiling(). #5637

merged 1 commit into from
Feb 3, 2024

Conversation

Segrain
Copy link
Contributor

@Segrain Segrain commented Feb 2, 2024

About the pull request

Somebody mentioned seeing incorrect numbers for "you need to play X more xeno hours to unlock prefix/postfix". Turns out, time_left_until() is defined as Ceiling(target_time - current time), which translates to -round( - target_time - current time), or in other words, round(target_time + current_time).
In general, any byond macro involving doing math on the argument should probably have that argument bracketed every time it appears to avoid precisely this nonsense.

Explain why it's good for the game

Is fix.

Changelog

🆑
fix: Some cases of calculations for "time remaining until something" no longer display incorrect results.
/:cl:

@github-actions github-actions bot added the Fix Fix one bug, make ten more label Feb 2, 2024
@Drulikar Drulikar added the Testmerge Candidate we'll test this while you're asleep and the server has 10 players label Feb 2, 2024
@Nanu308 Nanu308 added this pull request to the merge queue Feb 3, 2024
Merged via the queue into cmss13-devs:master with commit 598eacc Feb 3, 2024
28 checks passed
cm13-github added a commit that referenced this pull request Feb 3, 2024
@Doubleumc Doubleumc mentioned this pull request Feb 3, 2024
github-merge-queue bot pushed a commit that referenced this pull request Feb 5, 2024
# About the pull request

Following on the heels of
#5637 adds parentheses around
the arguments of several other global defines, to ensure the order of
operations resolves as intended. While some of these aren't strictly
necessary due to operator precedence better safe than sorry.

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game

Pre-empts possible issues in the future.
# Testing Photographs and Procedure
Boots without obvious issue.


# Changelog
No player-facing changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Fix one bug, make ten more Testmerge Candidate we'll test this while you're asleep and the server has 10 players
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants