BUI bugfixes / improvements (#23881)

* Fix ActivatableUIRequiresPowerCellComponent stopping power draw when one of two people closes the UI.

Also fixes it to check UiKey properly.

* Remove unnecessary CrewManifestViewer on PDAs

This is for a pop-up crew manifest UI, which the PDA doesn't use.

* Fix BoundUIClosedEvents that didn't check UI key/not correctly at least.

Uses the new helper method in engine.

* Fix drone (cargo shuttle) pilot console UI breaking if two people open it and one person closes it.

* Fixes for disposal router/tagger UI.

Code was badly copy pasted without changing identifiers, never worked.

Also cleaned up some of the logic (text trimming, sounds).

Also removed the "refuse to work if you have something in your active hand" check like why.

* Avoid running most ActivatableUIComponent logic when closing a UI via toggle

Activating the UI while it's already open closes it via toggle. Except it still ran 99% of the "attempting to open" logic which makes no sense.

This probably fixes a bug or some other dumb behavior somewhere.

* Bitch
This commit is contained in:
Pieter-Jan Briers
2024-01-14 08:18:39 +01:00
committed by GitHub
parent b51d69184e
commit 123a4147de
22 changed files with 174 additions and 125 deletions

View File

@@ -10,7 +10,10 @@ public sealed partial class SensorMonitoringConsoleSystem
{
private void InitUI()
{
SubscribeLocalEvent<SensorMonitoringConsoleComponent, BoundUIClosedEvent>(ConsoleUIClosed);
Subs.BuiEvents<SensorMonitoringConsoleComponent>(SensorMonitoringConsoleUiKey.Key, subs =>
{
subs.Event<BoundUIClosedEvent>(ConsoleUIClosed);
});
}
private void UpdateConsoleUI(EntityUid uid, SensorMonitoringConsoleComponent comp)