Adds a UI for gas mixers (#5165)
Co-authored-by: E F R <602406+Efruit@users.noreply.github.com> Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com> Co-authored-by: ike709 <ike709@github.com>
This commit is contained in:
@@ -8,6 +8,7 @@ using Content.Shared.Atmos.Piping;
|
||||
using Content.Shared.Atmos.Piping.Binary.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Popups;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -94,8 +95,15 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
|
||||
if (!args.User.TryGetComponent(out ActorComponent? actor))
|
||||
return;
|
||||
|
||||
_userInterfaceSystem.TryOpen(uid, GasPressurePumpUiKey.Key, actor.PlayerSession);
|
||||
DirtyUI(uid, component);
|
||||
if (component.Owner.Transform.Anchored)
|
||||
{
|
||||
_userInterfaceSystem.TryOpen(uid, GasPressurePumpUiKey.Key, actor.PlayerSession);
|
||||
DirtyUI(uid, component);
|
||||
}
|
||||
else
|
||||
{
|
||||
args.User.PopupMessageCursor(Loc.GetString("comp-gas-pump-ui-needs-anchor"));
|
||||
}
|
||||
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user