Add Active Exception to deploy_furn
#2300
Merged
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.
Summary
SUMMARY: Bugfix "Add Active Exception to
deploy_furn
"Purpose of change
Arcana's candle of warding couldn't be set to active when actually active as it would proc the
deploy_furn
iuse action on every turn. A closer look revealed that it was because unlike most other iuse_actors it didn't check the bool that denoted that an item was being processed because of active item processing.Describe the solution
Adds the check that most other iuse_actors use to prevent undesired triggers of iuse_actor. This merely prevents it from continuously proc'ing when active, it doesn't prevent the player from activating an item and using the
deploy_furn
action.Describe alternatives you've considered
-Rework entire system so that we know what iuse actors are active/passive.
Not particularly useful unless we actually have a way to json define iuse_actors, future project?
Testing
Installed Arcana mod, edited candle of warding to turn active when transforming to active form. Loaded game, checked that both versions could be deployed by player activation, checked that on version of candle of warding didn't trigger
deploy_furn
every turn.Additional context
Underlying system with if hooks for each iuse is kind of clunky, but for now it will suffice, reworking it should be on the agenda at some point.
Also @chaosvolt just so it's in your notifications.