Add custom outputs to door with buttons #6194
Closed
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.
What this PR does is adds an activate_out wiring output to doors with buttons, windowed doors with buttons, and hatches with buttons. It also allows users to suppress the default door open/close action that normally accompanies these integrated button/door assemblies. The idea is that this allows doors and hatches with integrated buttons to act as triggers for downstream logic circuits which may enable more advanced opening and closing functionality. This also has the added benefit that when AI goes to activate doors and hatches with buttons via waypoints to traverse thresholds it also triggers these custom logic circuits and #JustWorks.
For example, with this change merged and the following XML, both players and AI just "clicking" on a door or hatch with buttons can now trigger complex door activation logic:
AI waypoints in action with telescoping hatch logic:
barotrauma.e.2021.06.27.-.16.05.05.11.DVR_5.mp4
Hatch telescoping logic (suppressed default behaviour with complex opening logic) and door powered lightswitch raves (default door opening actions):
barotrauma.e.2021.06.27.-.16.05.05.11.DVR_4.mp4