-
Notifications
You must be signed in to change notification settings - Fork 579
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 bitwise ops (including sentry flamer ammo) #7729
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmss13-ci
bot
added
Fix
Fix one bug, make ten more
Balance
You need to be a professional veteran game maintainer to comprehend what is being done here.
labels
Dec 3, 2024
Drulikar
added
the
Balance Approved
This PR has had its balance and gameplay-affecting aspects approved. Cry to the Head-maint about it.
label
Dec 3, 2024
This comment was marked as resolved.
This comment was marked as resolved.
harryob
approved these changes
Dec 4, 2024
HIDgamer
pushed a commit
to HIDgamer/cmss13
that referenced
this pull request
Dec 8, 2024
# About the pull request This PR corrects a few bitwise ops I found using `&[^\|\(]*\|[^\|]` because of operation order. Basically `flag & ALPHA|BRAVO` is going to always be a truthy result (depends on the actual value for `BRAVO`) since its resolved as `(flag & ALPHA)|BRAVO`. The fixes to matrix editor would have already been caught by checking the admin holder. I don't know about dropship runway. But a potentially concerning one is w/ flame ammo. Adds a grep lint to find ambiguous bitwise ORs like this using `^(?:[^\/\n]|\/[^\/\n])*(&[ \t]*\w+[ \t]*\|[ \t]*\w+)` (complication came from supporting `//` though block quotes will still trip it which IMO is fine) # Explain why it's good for the game These are clear mistakes, but this may make sentry flamer ammo more effective on non-immune xenos. Fixes: ![image](https://github.com/user-attachments/assets/86cab12d-c274-4848-ac04-af75715cb4ca) # Testing Photographs and Procedure <details> <summary>Screenshots & Videos</summary> ![fire](https://github.com/user-attachments/assets/824e9c72-878e-4b21-a962-a6eb78cdf7f2) Linter: https://github.com/cmss13-devs/cmss13/actions/runs/12153015470/job/33890398213?pr=7729#step:7:36 </details> # Changelog :cl: Drathek fix: Fix code mistakes involving bitwise OR balance: Sentry flamer ammo now actually applies its initial damage (~30) to non-immune xenos balance: AMMO_ANTISTRUCT|AMMO_ANTIVEHICLE are now actually required for a vehicle damage multiplier code: Bitwise OR mistakes like this are now linted against /:cl:
HIDgamer
pushed a commit
to HIDgamer/cmss13
that referenced
this pull request
Dec 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Balance Approved
This PR has had its balance and gameplay-affecting aspects approved. Cry to the Head-maint about it.
Balance
You need to be a professional veteran game maintainer to comprehend what is being done here.
Code Improvement
Make the code longer
Fix
Fix one bug, make ten more
Github
We don't really know what else this belongs to
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the pull request
This PR corrects a few bitwise ops I found using
&[^\|\(]*\|[^\|]
because of operation order. Basicallyflag & ALPHA|BRAVO
is going to always be a truthy result (depends on the actual value forBRAVO
) since its resolved as(flag & ALPHA)|BRAVO
. The fixes to matrix editor would have already been caught by checking the admin holder. I don't know about dropship runway. But a potentially concerning one is w/ flame ammo.Adds a grep lint to find ambiguous bitwise ORs like this using
^(?:[^\/\n]|\/[^\/\n])*(&[ \t]*\w+[ \t]*\|[ \t]*\w+)
(complication came from supporting//
though block quotes will still trip it which IMO is fine)Explain why it's good for the game
These are clear mistakes, but this may make sentry flamer ammo more effective on non-immune xenos.
Fixes:
Testing Photographs and Procedure
Screenshots & Videos
Linter: https://github.com/cmss13-devs/cmss13/actions/runs/12153015470/job/33890398213?pr=7729#step:7:36
Changelog
🆑 Drathek
fix: Fix code mistakes involving bitwise OR
balance: Sentry flamer ammo now actually applies its initial damage (~30) to non-immune xenos
balance: AMMO_ANTISTRUCT|AMMO_ANTIVEHICLE are now actually required for a vehicle damage multiplier
code: Bitwise OR mistakes like this are now linted against
/:cl: