PopupSystem public methods rejig (#12830)
This commit is contained in:
@@ -57,7 +57,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
{
|
||||
if (!args.CanReach)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("gas-analyzer-component-player-cannot-reach-message"), args.User, Filter.Entities(args.User));
|
||||
_popup.PopupEntity(Loc.GetString("gas-analyzer-component-player-cannot-reach-message"), args.User, args.User);
|
||||
return;
|
||||
}
|
||||
ActivateAnalyzer(uid, component, args.User, args.Target);
|
||||
@@ -99,7 +99,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
private void OnDropped(EntityUid uid, GasAnalyzerComponent component, DroppedEvent args)
|
||||
{
|
||||
if(args.User is { } userId && component.Enabled)
|
||||
_popup.PopupEntity(Loc.GetString("gas-analyzer-shutoff"), userId, Filter.Entities(userId));
|
||||
_popup.PopupEntity(Loc.GetString("gas-analyzer-shutoff"), userId, userId);
|
||||
DisableAnalyzer(uid, component, args.User);
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
if (!component.LastPosition.Value.InRange(EntityManager, userPos, SharedInteractionSystem.InteractionRange))
|
||||
{
|
||||
if(component.User is { } userId && component.Enabled)
|
||||
_popup.PopupEntity(Loc.GetString("gas-analyzer-shutoff"), userId, Filter.Entities(userId));
|
||||
_popup.PopupEntity(Loc.GetString("gas-analyzer-shutoff"), userId, userId);
|
||||
DisableAnalyzer(uid, component, component.User);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ public sealed class AirAlarmSystem : EntitySystem
|
||||
|
||||
if (!_accessSystem.IsAllowed(user.Value, reader))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("air-alarm-ui-access-denied"), user.Value, Filter.Entities(user.Value));
|
||||
_popup.PopupEntity(Loc.GetString("air-alarm-ui-access-denied"), user.Value, user.Value);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Content.Server.Atmos.Piping.EntitySystems
|
||||
{
|
||||
args.Delay += 2f;
|
||||
_popup.PopupEntity(Loc.GetString("comp-atmos-unsafe-unanchor-warning"), pipe.Owner,
|
||||
Filter.Entities(args.User), PopupType.MediumCaution);
|
||||
args.User, PopupType.MediumCaution);
|
||||
return; // Show the warning only once.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace Content.Server.Atmos.Piping.Trinary.EntitySystems
|
||||
}
|
||||
else
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("comp-gas-filter-ui-needs-anchor"), Filter.Entities(args.User));
|
||||
_popupSystem.PopupCursor(Loc.GetString("comp-gas-filter-ui-needs-anchor"), args.User);
|
||||
}
|
||||
|
||||
args.Handled = true;
|
||||
|
||||
@@ -228,7 +228,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
return;
|
||||
if (TryComp<LockComponent>(uid, out var lockComponent) && lockComponent.Locked)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("gas-canister-popup-denied"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("gas-canister-popup-denied"), uid, args.User);
|
||||
if (component.AccessDeniedSound != null)
|
||||
_audioSys.PlayPvs(component.AccessDeniedSound, uid);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user