PopupSystem public methods rejig (#12830)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Server.Singularity.Components;
|
||||
using Content.Server.Singularity.Components;
|
||||
using Content.Shared.Singularity.Components;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Server.GameObjects;
|
||||
@@ -89,7 +89,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
|
||||
TurnOn(component);
|
||||
else if (component.Enabled && component.IsConnected)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-toggle-warning"), args.User, Filter.Entities(args.User), PopupType.LargeCaution);
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-toggle-warning"), args.User, args.User, PopupType.LargeCaution);
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -114,7 +114,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
|
||||
{
|
||||
if (component.Enabled)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-anchor-warning"), args.User, Filter.Entities(args.User), PopupType.LargeCaution);
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-anchor-warning"), args.User, args.User, PopupType.LargeCaution);
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
@@ -123,14 +123,14 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
|
||||
{
|
||||
component.Enabled = true;
|
||||
ChangeFieldVisualizer(component);
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-turned-on"), component.Owner, Filter.Pvs(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-turned-on"), component.Owner);
|
||||
}
|
||||
|
||||
private void TurnOff(ContainmentFieldGeneratorComponent component)
|
||||
{
|
||||
component.Enabled = false;
|
||||
ChangeFieldVisualizer(component);
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-turned-off"), component.Owner, Filter.Pvs(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-turned-off"), component.Owner);
|
||||
}
|
||||
|
||||
private void OnComponentRemoved(EntityUid uid, ContainmentFieldGeneratorComponent component, ComponentRemove args)
|
||||
@@ -163,7 +163,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
|
||||
component.IsConnected = false;
|
||||
ChangeOnLightVisualizer(component);
|
||||
ChangeFieldVisualizer(component);
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-disconnected"), component.Owner, Filter.Pvs(component.Owner), PopupType.LargeCaution);
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-disconnected"), component.Owner, PopupType.LargeCaution);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -275,7 +275,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
|
||||
|
||||
ChangeFieldVisualizer(component);
|
||||
UpdateConnectionLights(component);
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-connected"), component.Owner, Filter.Pvs(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-containment-connected"), component.Owner);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public sealed class ContainmentFieldSystem : EntitySystem
|
||||
|
||||
if (TryComp<SpaceGarbageComponent>(otherBody, out var garbage))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-field-vaporized", ("entity", otherBody)), component.Owner, Filter.Pvs(component.Owner), PopupType.LargeCaution);
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-field-vaporized", ("entity", otherBody)), component.Owner, PopupType.LargeCaution);
|
||||
QueueDel(garbage.Owner);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Content.Server.Singularity.EntitySystems
|
||||
if (EntityManager.TryGetComponent(uid, out LockComponent? lockComp) && lockComp.Locked)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("comp-emitter-access-locked",
|
||||
("target", component.Owner)), uid, Filter.Entities(args.User));
|
||||
("target", component.Owner)), uid, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -58,13 +58,13 @@ namespace Content.Server.Singularity.EntitySystems
|
||||
{
|
||||
SwitchOn(component);
|
||||
_popup.PopupEntity(Loc.GetString("comp-emitter-turned-on",
|
||||
("target", component.Owner)), uid, Filter.Entities(args.User));
|
||||
("target", component.Owner)), uid, args.User);
|
||||
}
|
||||
else
|
||||
{
|
||||
SwitchOff(component);
|
||||
_popup.PopupEntity(Loc.GetString("comp-emitter-turned-off",
|
||||
("target", component.Owner)), uid, Filter.Entities(args.User));
|
||||
("target", component.Owner)), uid, args.User);
|
||||
}
|
||||
|
||||
_adminLogger.Add(LogType.Emitter,
|
||||
@@ -74,7 +74,7 @@ namespace Content.Server.Singularity.EntitySystems
|
||||
else
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("comp-emitter-not-anchored",
|
||||
("target", component.Owner)), uid, Filter.Entities(args.User));
|
||||
("target", component.Owner)), uid, args.User);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Content.Server.Singularity.EntitySystems
|
||||
if (user != null)
|
||||
{
|
||||
var msg = component.Enabled ? "radiation-collector-component-use-on" : "radiation-collector-component-use-off";
|
||||
_popupSystem.PopupEntity(Loc.GetString(msg), uid, Filter.Pvs(user.Value));
|
||||
_popupSystem.PopupEntity(Loc.GetString(msg), uid);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user