-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
jsonize toolweapon actions #70791
jsonize toolweapon actions #70791
Conversation
Isn't there only a chance to start a saw when you activate it? Or it's only for generic chainsaw? |
Yeah, that's only for the generic chainsaw, the combat saws are guaranteed-start. Though with this change it'd be possible to tweak that in JSON :) |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Also jsonized carver_off here. It had a "works underwater" flag set in the C++, but the JSON for that object has the "WATER_BREAK_ACTIVE" flag, which makes more sense. |
Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details. Click to expand
This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to |
I'm going to let you handle the conflict on this one. |
May i ask to document new effects that was added in this PR? specifically |
@GuardianDll will do in a followup now that this has been merged. |
Summary
Infrastructure "Added transform_item and turn_cost EOC effects, and has_ammo condition"
Purpose of change
Expands the capabilities of item EOCs enough to JSONize all the
toolweapon effects (trimmer, carver, chainsaw, masonrysaw etc.).
Describe the solution
has_ammo
conditional to allow the EOC to fail if the chainsaw isout of ammo. This calls
ammo_sufficient
under the hood.transform_item
effect which callsconvert
.turn_cost
effect to add a move cost to an activation EOC. Countsin turns instead of moves because this way I could reuse the duration_var
infrastructure, so you can specify this in seconds in a string if you want.
The only thing I haven't ported over is the chainsaw idle / theme ambient sounds. I'll add an EOC effect to control ambient sounds once #70898 lands.
Describe alternatives you've considered
Maybe this is better off staying in C++? I feel like the JSON is more flexible
and moddable, and it seems weird to me for chainsaws to be "blessed" in this
way. But the new JSON is quite a bit more verbose than the old JSON. It would
be nice if there were a less-verbose way to say "invoke this EOC with these
variables".
Testing
message is printed when you successfully start a chainsaw.)
Additional context