forked from cmss13-devs/cmss13
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bitwise ops (including sentry flamer ammo) (cmss13-devs#7729)
# 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:
- Loading branch information
Showing
5 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
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
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