Closed dakkhuza closed 1 week ago
Thank you for taking the time to investigate this! :) The fix looks correct to me and seems to work with no issues. Merged to our private repo in https://github.com/FakeFishGames/Barotrauma-development/commit/c782d90e6d05ff20cacc828d08b1e8c961ce7b6b (commit in our private repo).
Related to #14216
Fixes the issue mentioned in the above discussion by implementing the suggested fix, that being changing
operateItemObjective.OperateTarget == target
tooperateItemObjective.Component.Item == target
This could also be fixed by actually assigning the
OperateTarget
in the objective constructor, however I didn't want to change how the action operated and potentially cause unexpected compatibility issues.Here's a mod to test that it's working correctly, this is the same mod in the above issue. NPCOperateAction.zip
To test:
triggerevent npcoperateaction_example
into the consoleExpected behavior with this pull request is the NPC cancels the operate objective correctly and starts following the player.