PopupSystem public methods rejig (#12830)

This commit is contained in:
Leon Friedrich
2022-12-19 10:41:47 +13:00
committed by GitHub
parent e459452333
commit 881a2b2ece
164 changed files with 721 additions and 631 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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.
}
}

View File

@@ -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;

View File

@@ -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;