PopupSystem public methods rejig (#12830)
This commit is contained in:
@@ -56,7 +56,7 @@ namespace Content.Server.Construction
|
||||
xform.Anchored = false;
|
||||
RaiseLocalEvent(uid, new UserUnanchoredEvent(args.User, args.Using));
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("anchorable-unanchored"), uid, Filter.Pvs(uid, entityManager: EntityManager));
|
||||
_popup.PopupEntity(Loc.GetString("anchorable-unanchored"), uid);
|
||||
|
||||
_adminLogger.Add(
|
||||
LogType.Unanchor,
|
||||
@@ -77,7 +77,7 @@ namespace Content.Server.Construction
|
||||
if (TryComp<PhysicsComponent>(uid, out var anchorBody) &&
|
||||
!TileFree(xform.Coordinates, anchorBody))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("anchorable-occupied"), uid, Filter.Entities(args.User));
|
||||
_popup.PopupEntity(Loc.GetString("anchorable-occupied"), uid, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace Content.Server.Construction
|
||||
xform.Anchored = true;
|
||||
RaiseLocalEvent(uid, new UserAnchoredEvent(args.User, args.Using));
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("anchorable-anchored"), uid, Filter.Pvs(uid, entityManager: EntityManager));
|
||||
_popup.PopupEntity(Loc.GetString("anchorable-anchored"), uid);
|
||||
|
||||
_adminLogger.Add(
|
||||
LogType.Anchor,
|
||||
@@ -190,7 +190,7 @@ namespace Content.Server.Construction
|
||||
if (TryComp<PhysicsComponent>(uid, out var anchorBody) &&
|
||||
!TileFree(transform.Coordinates, anchorBody))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("anchorable-occupied"), uid, Filter.Entities(userUid));
|
||||
_popup.PopupEntity(Loc.GetString("anchorable-occupied"), uid, userUid);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Content.Server.Construction.Completions
|
||||
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
|
||||
{
|
||||
entityManager.EntitySysManager.GetEntitySystem<PopupSystem>()
|
||||
.PopupEntity(Loc.GetString(Text), uid, Filter.Pvs(uid, entityManager:entityManager));
|
||||
.PopupEntity(Loc.GetString(Text), uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Construction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Player;
|
||||
@@ -20,9 +20,9 @@ namespace Content.Server.Construction.Completions
|
||||
var popupSystem = entityManager.EntitySysManager.GetEntitySystem<PopupSystem>();
|
||||
|
||||
if(Cursor)
|
||||
popupSystem.PopupCursor(Loc.GetString(Text), Filter.Entities(userUid.Value));
|
||||
popupSystem.PopupCursor(Loc.GetString(Text), userUid.Value);
|
||||
else
|
||||
popupSystem.PopupEntity(Loc.GetString(Text), uid, Filter.Entities(userUid.Value));
|
||||
popupSystem.PopupEntity(Loc.GetString(Text), uid, userUid.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,11 +52,11 @@ namespace Content.Server.Construction
|
||||
if (component.TargetNode == null)
|
||||
{
|
||||
// Maybe check, but on the flip-side a better solution might be to not make it undeconstructible in the first place, no?
|
||||
_popup.PopupEntity(Loc.GetString("deconstructible-verb-activate-no-target-text"), uid, Filter.Entities(uid));
|
||||
_popup.PopupEntity(Loc.GetString("deconstructible-verb-activate-no-target-text"), uid, uid);
|
||||
}
|
||||
else
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("deconstructible-verb-activate-text"), args.User, Filter.Entities(args.User));
|
||||
_popup.PopupEntity(Loc.GetString("deconstructible-verb-activate-text"), args.User, args.User);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace Content.Server.Construction
|
||||
|
||||
if (existed)
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("construction-system-construct-cannot-start-another-construction"), Filter.Entities(user));
|
||||
_popup.PopupCursor(Loc.GetString("construction-system-construct-cannot-start-another-construction"), user);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace Content.Server.Construction
|
||||
|
||||
if (failed)
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("construction-system-construct-no-materials"), Filter.Entities(user));
|
||||
_popup.PopupCursor(Loc.GetString("construction-system-construct-no-materials"), user);
|
||||
FailCleanup();
|
||||
return null;
|
||||
}
|
||||
@@ -379,7 +379,7 @@ namespace Content.Server.Construction
|
||||
|
||||
if (_container.IsEntityInContainer(user))
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("construction-system-inside-container"), Filter.Entities(user));
|
||||
_popup.PopupCursor(Loc.GetString("construction-system-inside-container"), user);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ namespace Content.Server.Construction
|
||||
{
|
||||
if (!set.Add(ev.Ack))
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("construction-system-already-building"), Filter.Entities(user));
|
||||
_popup.PopupCursor(Loc.GetString("construction-system-already-building"), user);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Content.Server.Construction.Components;
|
||||
using Content.Server.DoAfter;
|
||||
@@ -109,7 +109,7 @@ public sealed class PartExchangerSystem : EntitySystem
|
||||
if (TryComp<WiresComponent>(args.Target, out var wires) && !wires.IsPanelOpen)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("construction-step-condition-wire-panel-open"),
|
||||
args.Target.Value, Filter.Pvs(args.Target.Value, entityManager: EntityManager));
|
||||
args.Target.Value);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user