-
Notifications
You must be signed in to change notification settings - Fork 280
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: Tear out toolweapon_on
and toolweapon_off
and dependent iuse actions. Add WATER_DISABLE
flag. Add need_dry
variable to transforms.
#5488
Conversation
Remove all our shitty `toolweapon_on` and `toolweapon_off` iuse actions, make them use transforms like everything else. Add transform bool that denotes if an item cannot transform while submerged in water. Add a flag that reverts an item when it is submerged in water. Also added an example conversion so @RoyalFox2140 can help me convert all the items over.
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nobody merge it until I'm done working on the hellish amounts of json.
These apparently had a special fast_startup tag for their activation speed in the `toolweapon_off` action
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Compiled and load-tested.
- Started up a chainsaw, it runs as expected and only eats a few charges when started, as expected.
- Deactivated the chainsaw and could re-start it without issue.
- Walked into shallow water, can activate the chainsaw just fine, moving around doesn't extinguingish it.
- Deep water correctly reverts a running chainsaw to inactive state and disallows starting it, stepping back out lets it work again.
Left a single smol proposal for a more clear message, everything else seems fine. :3
Co-authored-by: Chaosvolt <[email protected]>
Checklist
Required
main
so it won't cause conflict when updatingmain
branch later.Optional
doc/
folder.Purpose of change
Describe the solution
toolweapon_on
andtoolweapon_off
iuse actions and their dependent actions for stuff like chainsaws and lajatangs. Adds aneed_dry
field to transforms to the behaviour closely mimics that of thetoolweapon_*
iuse actions and aWATER_DISABLE
flag that disables an item that gets submerged in water, asWATER_EXTINGUISH
would mean even rain can kill it which we don't want. (Not to mention it adds the (lit) modifier to the name of the item)Describe alternatives you've considered
Testing
Additional context
I heard you liked removing fossilized spaghetti code, so I removed spaghetti code so I can remove more spaghetti code.