APCs are now usable by multiple entities at the same time, with no jank! #32356
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.
About the PR
Why / Balance
#32312 exposed a bit of detail where the AI was capable of preventing people from physically toggling APCs, regardless of access. At the very least, the AI will have to fight for it now, as multiple users can fight over the toggle switch if they have the right access.
Those unable to toggle the breaker before are still unable, the button will just tell them "insufficient access" instead of being disabled.
Technical details
The code had 2 different methods by which access was determined, one was tied to disabling the button - that method is entirely removed. Technically, this doesn't solve the TODO in ApcSystem.cs ("this should be per-player not stored on the apc"), so I've left that comment in - maints can remove it if they want.
This does mean it's now the server's responsibility to reject button toggles, so people can spam the button. I have no way to test if this makes the implemented solution non-viable.
If the removed HasAccess method is desirable to be returned for whatever reason, that can be done - but be warned it causes a lot of jank, and would need singleUser within apc.yml to be made true again.
Media
Requirements
Breaking changes
Removes HasAccess arguments and variables from APCs entirely. Not certain this will break anything, but it doesn't have a replacement.
Changelog
🆑