PopupSystem public methods rejig (#12830)
This commit is contained in:
@@ -9,6 +9,7 @@ using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -35,38 +36,6 @@ namespace Content.Client.Popups
|
||||
SubscribeNetworkEvent<RoundRestartCleanupEvent>(OnRoundRestart);
|
||||
}
|
||||
|
||||
#region Actual Implementation
|
||||
|
||||
public void PopupCursor(string message, PopupType type=PopupType.Small)
|
||||
{
|
||||
var label = new CursorPopupLabel(_inputManager.MouseScreenPosition)
|
||||
{
|
||||
Text = message,
|
||||
StyleClasses = { GetStyleClass(type) },
|
||||
};
|
||||
_userInterfaceManager.PopupRoot.AddChild(label);
|
||||
_aliveCursorLabels.Add(label);
|
||||
}
|
||||
|
||||
public void PopupCoordinates(string message, EntityCoordinates coordinates, PopupType type=PopupType.Small)
|
||||
{
|
||||
if (_eyeManager.CurrentMap != Transform(coordinates.EntityId).MapID)
|
||||
return;
|
||||
PopupMessage(message, type, coordinates, null);
|
||||
}
|
||||
|
||||
public void PopupEntity(string message, EntityUid uid, PopupType type=PopupType.Small)
|
||||
{
|
||||
if (!EntityManager.EntityExists(uid))
|
||||
return;
|
||||
|
||||
var transform = EntityManager.GetComponent<TransformComponent>(uid);
|
||||
if (_eyeManager.CurrentMap != transform.MapID)
|
||||
return; // TODO: entity may be outside of PVS, but enter PVS at a later time. So the pop-up should still get tracked?
|
||||
|
||||
PopupMessage(message, type, transform.Coordinates, uid);
|
||||
}
|
||||
|
||||
private void PopupMessage(string message, PopupType type, EntityCoordinates coordinates, EntityUid? entity = null)
|
||||
{
|
||||
var label = new WorldPopupLabel(_eyeManager, EntityManager)
|
||||
@@ -83,32 +52,77 @@ namespace Content.Client.Popups
|
||||
_aliveWorldLabels.Add(label);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Abstract Method Implementations
|
||||
|
||||
public override void PopupCursor(string message, Filter filter, PopupType type=PopupType.Small)
|
||||
public override void PopupCoordinates(string message, EntityCoordinates coordinates, PopupType type = PopupType.Small)
|
||||
{
|
||||
if (!filter.CheckPrediction)
|
||||
return;
|
||||
|
||||
PopupCursor(message, type);
|
||||
PopupMessage(message, type, coordinates, null);
|
||||
}
|
||||
|
||||
public override void PopupCoordinates(string message, EntityCoordinates coordinates, Filter filter, PopupType type=PopupType.Small)
|
||||
public override void PopupCoordinates(string message, EntityCoordinates coordinates, ICommonSession recipient, PopupType type = PopupType.Small)
|
||||
{
|
||||
if (!filter.CheckPrediction)
|
||||
return;
|
||||
if (_playerManager.LocalPlayer?.Session == recipient)
|
||||
PopupMessage(message, type, coordinates, null);
|
||||
}
|
||||
|
||||
public override void PopupCoordinates(string message, EntityCoordinates coordinates, EntityUid recipient, PopupType type = PopupType.Small)
|
||||
{
|
||||
if (_playerManager.LocalPlayer?.ControlledEntity == recipient)
|
||||
PopupMessage(message, type, coordinates, null);
|
||||
}
|
||||
|
||||
public override void PopupCursor(string message, PopupType type = PopupType.Small)
|
||||
{
|
||||
var label = new CursorPopupLabel(_inputManager.MouseScreenPosition)
|
||||
{
|
||||
Text = message,
|
||||
StyleClasses = { GetStyleClass(type) },
|
||||
};
|
||||
_userInterfaceManager.PopupRoot.AddChild(label);
|
||||
_aliveCursorLabels.Add(label);
|
||||
}
|
||||
|
||||
public override void PopupCursor(string message, ICommonSession recipient, PopupType type = PopupType.Small)
|
||||
{
|
||||
if (_playerManager.LocalPlayer?.Session == recipient)
|
||||
PopupCursor(message, type);
|
||||
}
|
||||
|
||||
public override void PopupCursor(string message, EntityUid recipient, PopupType type = PopupType.Small)
|
||||
{
|
||||
if (_playerManager.LocalPlayer?.ControlledEntity == recipient)
|
||||
PopupCursor(message, type);
|
||||
}
|
||||
|
||||
public override void PopupCoordinates(string message, EntityCoordinates coordinates, Filter filter, bool replayRecord, PopupType type = PopupType.Small)
|
||||
{
|
||||
PopupCoordinates(message, coordinates, type);
|
||||
}
|
||||
|
||||
public override void PopupEntity(string message, EntityUid uid, Filter filter, PopupType type=PopupType.Small)
|
||||
public override void PopupEntity(string message, EntityUid uid, EntityUid recipient, PopupType type = PopupType.Small)
|
||||
{
|
||||
if (!filter.CheckPrediction)
|
||||
if (_playerManager.LocalPlayer?.ControlledEntity == recipient)
|
||||
PopupCursor(message, type);
|
||||
}
|
||||
|
||||
public override void PopupEntity(string message, EntityUid uid, ICommonSession recipient, PopupType type = PopupType.Small)
|
||||
{
|
||||
if (_playerManager.LocalPlayer?.Session == recipient)
|
||||
PopupCursor(message, type);
|
||||
}
|
||||
|
||||
public override void PopupEntity(string message, EntityUid uid, Filter filter, bool recordReplay, PopupType type=PopupType.Small)
|
||||
{
|
||||
PopupEntity(message, uid, type);
|
||||
}
|
||||
|
||||
public override void PopupEntity(string message, EntityUid uid, PopupType type = PopupType.Small)
|
||||
{
|
||||
if (!EntityManager.EntityExists(uid))
|
||||
return;
|
||||
|
||||
PopupEntity(message, uid, type);
|
||||
var transform = EntityManager.GetComponent<TransformComponent>(uid);
|
||||
|
||||
PopupMessage(message, type, transform.Coordinates, uid);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -239,7 +239,7 @@ public sealed partial class MeleeWeaponSystem : SharedMeleeWeaponSystem
|
||||
return true;
|
||||
|
||||
if (Timing.IsFirstTimePredicted && HasComp<MobStateComponent>(ev.Target.Value))
|
||||
PopupSystem.PopupEntity(Loc.GetString("disarm-action-disarmable", ("targetName", ev.Target.Value)), ev.Target.Value, Filter.Local());
|
||||
PopupSystem.PopupEntity(Loc.GetString("disarm-action-disarmable", ("targetName", ev.Target.Value)), ev.Target.Value);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ public sealed partial class MeleeWeaponSystem : SharedMeleeWeaponSystem
|
||||
if (!Timing.IsFirstTimePredicted || uid == null)
|
||||
return;
|
||||
|
||||
PopupSystem.PopupEntity(message, uid.Value, Filter.Local());
|
||||
PopupSystem.PopupEntity(message, uid.Value);
|
||||
}
|
||||
|
||||
private void OnMeleeLunge(MeleeLungeEvent ev)
|
||||
|
||||
@@ -227,7 +227,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
protected override void Popup(string message, EntityUid? uid, EntityUid? user)
|
||||
{
|
||||
if (uid == null || user == null || !Timing.IsFirstTimePredicted) return;
|
||||
PopupSystem.PopupEntity(message, uid.Value, Filter.Entities(user.Value));
|
||||
PopupSystem.PopupEntity(message, uid.Value, user.Value);
|
||||
}
|
||||
|
||||
protected override void CreateEffect(EntityUid uid, MuzzleFlashEvent message, EntityUid? user = null)
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Content.Server.AME
|
||||
{
|
||||
if (!TryComp(args.User, out HandsComponent? hands))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-controller-component-interact-using-no-hands-text"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-controller-component-interact-using-no-hands-text"), uid, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -64,20 +64,20 @@ namespace Content.Server.AME
|
||||
{
|
||||
if (component.HasJar)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-controller-component-interact-using-already-has-jar"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-controller-component-interact-using-already-has-jar"), uid, args.User);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
component.JarSlot.Insert(args.Used);
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-controller-component-interact-using-success"), uid,
|
||||
Filter.Entities(args.User), PopupType.Medium);
|
||||
args.User, PopupType.Medium);
|
||||
component.UpdateUserInterface();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-controller-component-interact-using-fail"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-controller-component-interact-using-fail"), uid, args.User);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Content.Server.AME
|
||||
{
|
||||
if (!HasComp<HandsComponent>(args.User))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-part-component-interact-using-no-hands"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-part-component-interact-using-no-hands"), uid, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace Content.Server.AME
|
||||
var snapPos = mapGrid.TileIndicesFor(args.ClickLocation);
|
||||
if (mapGrid.GetAnchoredEntities(snapPos).Any(sc => HasComp<AMEShieldComponent>(sc)))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-part-component-shielding-already-present"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-part-component-shielding-already-present"), uid, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Content.Server.Abilities.Mime
|
||||
continue;
|
||||
|
||||
mime.ReadyToRepent = true;
|
||||
_popupSystem.PopupEntity(Loc.GetString("mime-ready-to-repent"), mime.Owner, Filter.Entities(mime.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("mime-ready-to-repent"), mime.Owner, mime.Owner);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Content.Server.Abilities.Mime
|
||||
if (!component.Enabled)
|
||||
return;
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("mime-cant-speak"), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("mime-cant-speak"), uid, uid);
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
@@ -79,11 +79,11 @@ namespace Content.Server.Abilities.Mime
|
||||
((Resolve(entity, ref physics, false) && (physics.CollisionLayer & (int) CollisionGroup.Impassable) != 0) // Is it impassable?
|
||||
&& !(TryComp<DoorComponent>(entity, out var door) && door.State != DoorState.Closed))) // Is it a door that's open and so not actually impassable?
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("mime-invisible-wall-failed"), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("mime-invisible-wall-failed"), uid, uid);
|
||||
return;
|
||||
}
|
||||
}
|
||||
_popupSystem.PopupEntity(Loc.GetString("mime-invisible-wall-popup", ("mime", uid)), uid, Filter.Pvs(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("mime-invisible-wall-popup", ("mime", uid)), uid);
|
||||
// Make sure we set the invisible wall to despawn properly
|
||||
Spawn(component.WallPrototype, coords);
|
||||
// Handle args so cooldown works
|
||||
@@ -119,7 +119,7 @@ namespace Content.Server.Abilities.Mime
|
||||
|
||||
if (!mimePowers.ReadyToRepent)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("mime-not-ready-repent"), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("mime-not-ready-repent"), uid, uid);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,15 +39,15 @@ namespace Content.Server.Access.Systems
|
||||
|
||||
if (addedLength == 0)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("agent-id-no-new", ("card", args.Target)), args.Target.Value, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("agent-id-no-new", ("card", args.Target)), args.Target.Value, args.User);
|
||||
return;
|
||||
}
|
||||
else if (addedLength == 1)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("agent-id-new-1", ("card", args.Target)), args.Target.Value, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("agent-id-new-1", ("card", args.Target)), args.Target.Value, args.User);
|
||||
return;
|
||||
}
|
||||
_popupSystem.PopupEntity(Loc.GetString("agent-id-new", ("number", addedLength), ("card", args.Target)), args.Target.Value, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("agent-id-new", ("number", addedLength), ("card", args.Target)), args.Target.Value, args.User);
|
||||
}
|
||||
|
||||
private void AfterUIOpen(EntityUid uid, AgentIDCardComponent component, AfterActivatableUIOpenEvent args)
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Content.Server.Access.Systems
|
||||
if (transformComponent != null)
|
||||
{
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("id-card-component-microwave-burnt", ("id", uid)),
|
||||
transformComponent.Coordinates, Filter.Pvs(uid), PopupType.Medium);
|
||||
transformComponent.Coordinates, PopupType.Medium);
|
||||
EntityManager.SpawnEntity("FoodBadRecipe",
|
||||
transformComponent.Coordinates);
|
||||
}
|
||||
@@ -54,14 +54,12 @@ namespace Content.Server.Access.Systems
|
||||
// If they're unlucky, brick their ID
|
||||
if (randomPick <= 0.25f)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("id-card-component-microwave-bricked", ("id", uid)),
|
||||
uid, Filter.Pvs(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("id-card-component-microwave-bricked", ("id", uid)), uid);
|
||||
access.Tags.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("id-card-component-microwave-safe", ("id", uid)),
|
||||
uid, Filter.Pvs(uid), PopupType.Medium);
|
||||
_popupSystem.PopupEntity(Loc.GetString("id-card-component-microwave-safe", ("id", uid)), uid, PopupType.Medium);
|
||||
}
|
||||
|
||||
// Give them a wonderful new access to compensate for everything
|
||||
|
||||
@@ -123,10 +123,10 @@ public sealed partial class AdminVerbSystem
|
||||
RemComp<PhysicsComponent>(args.Target); // So they can be dragged around.
|
||||
var xform = Transform(args.Target);
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-chess-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.LargeCaution);
|
||||
args.Target, PopupType.LargeCaution);
|
||||
_popupSystem.PopupCoordinates(
|
||||
Loc.GetString("admin-smite-chess-others", ("name", args.Target)), xform.Coordinates,
|
||||
Filter.PvsExcept(args.Target), PopupType.MediumCaution);
|
||||
Filter.PvsExcept(args.Target), true, PopupType.MediumCaution);
|
||||
var board = Spawn("ChessBoard", xform.Coordinates);
|
||||
var session = _tabletopSystem.EnsureSession(Comp<TabletopGameComponent>(board));
|
||||
xform.Coordinates = EntityCoordinates.FromMap(_mapManager, session.Position);
|
||||
@@ -151,9 +151,9 @@ public sealed partial class AdminVerbSystem
|
||||
_flammableSystem.Ignite(args.Target);
|
||||
var xform = Transform(args.Target);
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-set-alight-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.LargeCaution);
|
||||
args.Target, PopupType.LargeCaution);
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-set-alight-others", ("name", args.Target)), xform.Coordinates,
|
||||
Filter.PvsExcept(args.Target), PopupType.MediumCaution);
|
||||
Filter.PvsExcept(args.Target), true, PopupType.MediumCaution);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-smite-set-alight-description")
|
||||
@@ -285,9 +285,9 @@ public sealed partial class AdminVerbSystem
|
||||
_bloodstreamSystem.SpillAllSolutions(args.Target, bloodstream);
|
||||
var xform = Transform(args.Target);
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-remove-blood-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.LargeCaution);
|
||||
args.Target, PopupType.LargeCaution);
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-remove-blood-others", ("name", args.Target)), xform.Coordinates,
|
||||
Filter.PvsExcept(args.Target), PopupType.MediumCaution);
|
||||
Filter.PvsExcept(args.Target), true, PopupType.MediumCaution);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-smite-remove-blood-description")
|
||||
@@ -318,9 +318,9 @@ public sealed partial class AdminVerbSystem
|
||||
}
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-vomit-organs-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.LargeCaution);
|
||||
args.Target, PopupType.LargeCaution);
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-vomit-organs-others", ("name", args.Target)), baseXform.Coordinates,
|
||||
Filter.PvsExcept(args.Target), PopupType.MediumCaution);
|
||||
Filter.PvsExcept(args.Target), true, PopupType.MediumCaution);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-smite-vomit-organs-description")
|
||||
@@ -340,9 +340,9 @@ public sealed partial class AdminVerbSystem
|
||||
_bodySystem.DropPartAt(part.Id, baseXform.Coordinates, part.Component);
|
||||
}
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-remove-hands-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.LargeCaution);
|
||||
args.Target, PopupType.LargeCaution);
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-remove-hands-others", ("name", args.Target)), baseXform.Coordinates,
|
||||
Filter.PvsExcept(args.Target), PopupType.Medium);
|
||||
Filter.PvsExcept(args.Target), true, PopupType.Medium);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-smite-remove-hands-description")
|
||||
@@ -363,9 +363,9 @@ public sealed partial class AdminVerbSystem
|
||||
break;
|
||||
}
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-remove-hands-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.LargeCaution);
|
||||
args.Target, PopupType.LargeCaution);
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-remove-hands-others", ("name", args.Target)), baseXform.Coordinates,
|
||||
Filter.PvsExcept(args.Target), PopupType.Medium);
|
||||
Filter.PvsExcept(args.Target), true, PopupType.Medium);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-smite-remove-hand-description")
|
||||
@@ -385,7 +385,7 @@ public sealed partial class AdminVerbSystem
|
||||
}
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-stomach-removal-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.LargeCaution);
|
||||
args.Target, PopupType.LargeCaution);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-smite-stomach-removal-description"),
|
||||
@@ -405,7 +405,7 @@ public sealed partial class AdminVerbSystem
|
||||
}
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-lung-removal-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.LargeCaution);
|
||||
args.Target, PopupType.LargeCaution);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-smite-lung-removal-description"),
|
||||
@@ -616,8 +616,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
EntityManager.QueueDeleteEntity(args.Target);
|
||||
Spawn("Ash", Transform(args.Target).Coordinates);
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-turned-ash-other", ("name", args.Target)), args.Target,
|
||||
Filter.Pvs(args.Target), PopupType.LargeCaution);
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-turned-ash-other", ("name", args.Target)), args.Target, PopupType.LargeCaution);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-smite-dust-description"),
|
||||
@@ -768,7 +767,7 @@ public sealed partial class AdminVerbSystem
|
||||
Dirty(movementSpeed);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-run-walk-swap-prompt"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.LargeCaution);
|
||||
args.Target, PopupType.LargeCaution);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-smite-run-walk-swap-description"),
|
||||
@@ -814,7 +813,7 @@ public sealed partial class AdminVerbSystem
|
||||
_movementSpeedModifierSystem?.ChangeBaseSpeed(args.Target, 400, 8000, 40, movementSpeed);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-super-speed-prompt"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.LargeCaution);
|
||||
args.Target, PopupType.LargeCaution);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-smite-super-speed-description"),
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Content.Server.AirlockPainter
|
||||
if (!grp.StylePaths.TryGetValue(style, out var sprite))
|
||||
{
|
||||
string msg = Loc.GetString("airlock-painter-style-not-available");
|
||||
_popupSystem.PopupEntity(msg, args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(msg, args.User, args.User);
|
||||
return;
|
||||
}
|
||||
component.IsSpraying = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Server.Actions;
|
||||
using Content.Server.Actions;
|
||||
using Content.Server.Animals.Components;
|
||||
using Content.Server.Nutrition.Components;
|
||||
using Content.Server.Popups;
|
||||
@@ -73,7 +73,7 @@ public sealed class EggLayerSystem : EntitySystem
|
||||
{
|
||||
if (hunger.CurrentHunger < component.HungerUsage)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("action-popup-lay-egg-too-hungry"), uid, Filter.Entities(uid));
|
||||
_popup.PopupEntity(Loc.GetString("action-popup-lay-egg-too-hungry"), uid, uid);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -87,8 +87,8 @@ public sealed class EggLayerSystem : EntitySystem
|
||||
|
||||
// Sound + popups
|
||||
SoundSystem.Play(component.EggLaySound.GetSound(), Filter.Pvs(uid), uid, component.EggLaySound.Params);
|
||||
_popup.PopupEntity(Loc.GetString("action-popup-lay-egg-user"), uid, Filter.Entities(uid));
|
||||
_popup.PopupEntity(Loc.GetString("action-popup-lay-egg-others", ("entity", uid)), uid, Filter.PvsExcept(uid));
|
||||
_popup.PopupEntity(Loc.GetString("action-popup-lay-egg-user"), uid, uid);
|
||||
_popup.PopupEntity(Loc.GetString("action-popup-lay-egg-others", ("entity", uid)), uid, Filter.PvsExcept(uid), true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Content.Server.Animals.Systems
|
||||
|
||||
if (udder.BeingMilked)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("udder-system-already-milking"), uid, Filter.Entities(userUid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("udder-system-already-milking"), uid, userUid);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Content.Server.Animals.Systems
|
||||
var quantity = solution.TotalVolume;
|
||||
if(quantity == 0)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("udder-system-dry"), uid, Filter.Entities(ev.UserUid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("udder-system-dry"), uid, ev.UserUid);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace Content.Server.Animals.Systems
|
||||
_solutionContainerSystem.TryAddSolution(ev.ContainerUid, targetSolution, split);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("udder-system-success", ("amount", quantity), ("target", Identity.Entity(ev.ContainerUid, EntityManager))), uid,
|
||||
Filter.Entities(ev.UserUid), PopupType.Medium);
|
||||
ev.UserUid, PopupType.Medium);
|
||||
}
|
||||
|
||||
private void OnMilkingFailed(EntityUid uid, UdderComponent component, MilkingFailEvent ev)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace Content.Server.Bed.Sleep
|
||||
if (user != null)
|
||||
{
|
||||
SoundSystem.Play("/Audio/Effects/thudswoosh.ogg", Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.05f, _robustRandom));
|
||||
_popupSystem.PopupEntity(Loc.GetString("wake-other-failure", ("target", Identity.Entity(uid, EntityManager))), uid, Filter.Entities(user.Value), Shared.Popups.PopupType.SmallCaution);
|
||||
_popupSystem.PopupEntity(Loc.GetString("wake-other-failure", ("target", Identity.Entity(uid, EntityManager))), uid, user.Value, Shared.Popups.PopupType.SmallCaution);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ namespace Content.Server.Bed.Sleep
|
||||
if (user != null)
|
||||
{
|
||||
SoundSystem.Play("/Audio/Effects/thudswoosh.ogg", Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.05f, _robustRandom));
|
||||
_popupSystem.PopupEntity(Loc.GetString("wake-other-success", ("target", Identity.Entity(uid, EntityManager))), uid, Filter.Entities(user.Value));
|
||||
_popupSystem.PopupEntity(Loc.GetString("wake-other-success", ("target", Identity.Entity(uid, EntityManager))), uid, user.Value);
|
||||
}
|
||||
RemComp<SleepingComponent>(uid);
|
||||
return true;
|
||||
|
||||
@@ -78,8 +78,7 @@ namespace Content.Server.Bible
|
||||
summonableComp.Summon = null;
|
||||
}
|
||||
summonableComp.AlreadySummoned = false;
|
||||
_popupSystem.PopupEntity(Loc.GetString("bible-summon-respawn-ready", ("book", summonableComp.Owner)), summonableComp.Owner,
|
||||
Filter.Pvs(summonableComp.Owner), PopupType.Medium);
|
||||
_popupSystem.PopupEntity(Loc.GetString("bible-summon-respawn-ready", ("book", summonableComp.Owner)), summonableComp.Owner, PopupType.Medium);
|
||||
SoundSystem.Play("/Audio/Effects/radpulse9.ogg", Filter.Pvs(summonableComp.Owner), summonableComp.Owner, AudioParams.Default.WithVolume(-4f));
|
||||
// Clean up the accumulator and respawn tracking component
|
||||
summonableComp.Accumulator = 0;
|
||||
@@ -104,7 +103,7 @@ namespace Content.Server.Bible
|
||||
|
||||
if (!HasComp<BibleUserComponent>(args.User))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("bible-sizzle"), args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("bible-sizzle"), args.User, args.User);
|
||||
|
||||
SoundSystem.Play(component.SizzleSoundPath.GetSound(), Filter.Pvs(args.User), args.User);
|
||||
_damageableSystem.TryChangeDamage(args.User, component.DamageOnUntrainedUse, true, origin: uid);
|
||||
@@ -119,10 +118,10 @@ namespace Content.Server.Bible
|
||||
if (_random.Prob(component.FailChance))
|
||||
{
|
||||
var othersFailMessage = Loc.GetString(component.LocPrefix + "-heal-fail-others", ("user", Identity.Entity(args.User, EntityManager)),("target", Identity.Entity(args.Target.Value, EntityManager)),("bible", uid));
|
||||
_popupSystem.PopupEntity(othersFailMessage, args.User, Filter.PvsExcept(args.User), PopupType.SmallCaution);
|
||||
_popupSystem.PopupEntity(othersFailMessage, args.User, Filter.PvsExcept(args.User), true, PopupType.SmallCaution);
|
||||
|
||||
var selfFailMessage = Loc.GetString(component.LocPrefix + "-heal-fail-self", ("target", Identity.Entity(args.Target.Value, EntityManager)),("bible", uid));
|
||||
_popupSystem.PopupEntity(selfFailMessage, args.User, Filter.Entities(args.User), PopupType.MediumCaution);
|
||||
_popupSystem.PopupEntity(selfFailMessage, args.User, args.User, PopupType.MediumCaution);
|
||||
|
||||
SoundSystem.Play("/Audio/Effects/hit_kick.ogg", Filter.Pvs(args.Target.Value), args.User);
|
||||
_damageableSystem.TryChangeDamage(args.Target.Value, component.DamageOnFail, true, origin: uid);
|
||||
@@ -136,18 +135,18 @@ namespace Content.Server.Bible
|
||||
if (damage == null || damage.Total == 0)
|
||||
{
|
||||
var othersMessage = Loc.GetString(component.LocPrefix + "-heal-success-none-others", ("user", Identity.Entity(args.User, EntityManager)),("target", Identity.Entity(args.Target.Value, EntityManager)),("bible", uid));
|
||||
_popupSystem.PopupEntity(othersMessage, args.User, Filter.PvsExcept(args.User), PopupType.Medium);
|
||||
_popupSystem.PopupEntity(othersMessage, args.User, Filter.PvsExcept(args.User), true, PopupType.Medium);
|
||||
|
||||
var selfMessage = Loc.GetString(component.LocPrefix + "-heal-success-none-self", ("target", Identity.Entity(args.Target.Value, EntityManager)),("bible", uid));
|
||||
_popupSystem.PopupEntity(selfMessage, args.User, Filter.Entities(args.User), PopupType.Large);
|
||||
_popupSystem.PopupEntity(selfMessage, args.User, args.User, PopupType.Large);
|
||||
}
|
||||
else
|
||||
{
|
||||
var othersMessage = Loc.GetString(component.LocPrefix + "-heal-success-others", ("user", Identity.Entity(args.User, EntityManager)),("target", Identity.Entity(args.Target.Value, EntityManager)),("bible", uid));
|
||||
_popupSystem.PopupEntity(othersMessage, args.User, Filter.PvsExcept(args.User), PopupType.Medium);
|
||||
_popupSystem.PopupEntity(othersMessage, args.User, Filter.PvsExcept(args.User), true, PopupType.Medium);
|
||||
|
||||
var selfMessage = Loc.GetString(component.LocPrefix + "-heal-success-self", ("target", Identity.Entity(args.Target.Value, EntityManager)),("bible", uid));
|
||||
_popupSystem.PopupEntity(selfMessage, args.User, Filter.Entities(args.User), PopupType.Large);
|
||||
_popupSystem.PopupEntity(selfMessage, args.User, args.User, PopupType.Large);
|
||||
SoundSystem.Play(component.HealSoundPath.GetSound(), Filter.Pvs(args.Target.Value), args.User);
|
||||
_delay.BeginDelay(uid, delay);
|
||||
}
|
||||
@@ -235,7 +234,7 @@ namespace Content.Server.Bible
|
||||
// If this is going to use a ghost role mob spawner, attach it to the bible.
|
||||
if (HasComp<GhostRoleMobSpawnerComponent>(familiar))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("bible-summon-requested"), user, Filter.Pvs(user), PopupType.Medium);
|
||||
_popupSystem.PopupEntity(Loc.GetString("bible-summon-requested"), user, PopupType.Medium);
|
||||
Transform(familiar).AttachParent(component.Owner);
|
||||
}
|
||||
component.AlreadySummoned = true;
|
||||
|
||||
@@ -176,7 +176,7 @@ public sealed class BloodstreamSystem : EntitySystem
|
||||
// We'll play a special sound and popup for feedback.
|
||||
SoundSystem.Play(component.BloodHealedSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default);
|
||||
_popupSystem.PopupEntity(Loc.GetString("bloodstream-component-wounds-cauterized"), uid,
|
||||
Filter.Entities(uid), PopupType.Medium);
|
||||
uid, PopupType.Medium);
|
||||
; }
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public sealed class InternalsSystem : EntitySystem
|
||||
// If they're not on then check if we have a mask to use
|
||||
if (internals.BreathToolEntity == null)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("internals-no-breath-tool"), uid, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("internals-no-breath-tool"), uid, user);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public sealed class InternalsSystem : EntitySystem
|
||||
|
||||
if (tank == null)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("internals-no-tank"), uid, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("internals-no-tank"), uid, user);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Content.Server.Body.Systems
|
||||
if (_gameTiming.CurTime >= respirator.LastGaspPopupTime + respirator.GaspPopupCooldown)
|
||||
{
|
||||
respirator.LastGaspPopupTime = _gameTiming.CurTime;
|
||||
_popupSystem.PopupEntity(Loc.GetString("lung-behavior-gasp"), uid, Filter.Pvs(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("lung-behavior-gasp"), uid);
|
||||
}
|
||||
|
||||
TakeSuffocationDamage(uid, respirator);
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Content.Server.Botany.Systems
|
||||
{
|
||||
// Pick up pollen
|
||||
args.Swab.SeedData = args.Plant.Seed;
|
||||
_popupSystem.PopupEntity(Loc.GetString("botany-swab-from"), args.Target.Value, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("botany-swab-from"), args.Target.Value, args.User);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -97,7 +97,7 @@ namespace Content.Server.Botany.Systems
|
||||
return;
|
||||
args.Plant.Seed = _mutationSystem.Cross(args.Swab.SeedData, old); // Cross-pollenate
|
||||
args.Swab.SeedData = old; // Transfer old plant pollen to swab
|
||||
_popupSystem.PopupEntity(Loc.GetString("botany-swab-to"), args.Target.Value, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("botany-swab-to"), args.Target.Value, args.User);
|
||||
}
|
||||
|
||||
if (args.Swab.CancelToken != null)
|
||||
|
||||
@@ -119,13 +119,11 @@ public sealed partial class BotanySystem : EntitySystem
|
||||
{
|
||||
if (proto.ProductPrototypes.Count == 0 || proto.Yield <= 0)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("botany-harvest-fail-message"),
|
||||
Filter.Entities(user), PopupType.Medium);
|
||||
_popupSystem.PopupCursor(Loc.GetString("botany-harvest-fail-message"), user, PopupType.Medium);
|
||||
return Enumerable.Empty<EntityUid>();
|
||||
}
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString("botany-harvest-success-message", ("name", proto.DisplayName)),
|
||||
Filter.Entities(user), PopupType.Medium);
|
||||
_popupSystem.PopupCursor(Loc.GetString("botany-harvest-success-message", ("name", proto.DisplayName)), user, PopupType.Medium);
|
||||
return GenerateProduct(proto, Transform(user).Coordinates, yieldMod);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace Content.Server.Botany.Systems
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-plant-success-message",
|
||||
("seedName", seed.Name),
|
||||
("seedNoun", seed.Noun)), Filter.Entities(args.User), PopupType.Medium);
|
||||
("seedNoun", seed.Noun)), args.User, PopupType.Medium);
|
||||
|
||||
component.Seed = seed;
|
||||
component.Dead = false;
|
||||
@@ -153,7 +153,7 @@ namespace Content.Server.Botany.Systems
|
||||
}
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-already-seeded-message",
|
||||
("name", Comp<MetaDataComponent>(uid).EntityName)), Filter.Entities(args.User), PopupType.Medium);
|
||||
("name", Comp<MetaDataComponent>(uid).EntityName)), args.User, PopupType.Medium);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -162,15 +162,15 @@ namespace Content.Server.Botany.Systems
|
||||
if (component.WeedLevel > 0)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-remove-weeds-message",
|
||||
("name", Comp<MetaDataComponent>(uid).EntityName)), Filter.Entities(args.User), PopupType.Medium);
|
||||
("name", Comp<MetaDataComponent>(uid).EntityName)), args.User, PopupType.Medium);
|
||||
_popupSystem.PopupEntity(Loc.GetString("plant-holder-component-remove-weeds-others-message",
|
||||
("otherName", Comp<MetaDataComponent>(args.User).EntityName)), uid, Filter.PvsExcept(args.User));
|
||||
("otherName", Comp<MetaDataComponent>(args.User).EntityName)), uid, Filter.PvsExcept(args.User), true);
|
||||
component.WeedLevel = 0;
|
||||
UpdateSprite(uid, component);
|
||||
}
|
||||
else
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-no-weeds-message"), Filter.Entities(args.User));
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-no-weeds-message"), args.User);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -181,15 +181,15 @@ namespace Content.Server.Botany.Systems
|
||||
if (component.Seed != null)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-remove-plant-message",
|
||||
("name", Comp<MetaDataComponent>(uid).EntityName)), Filter.Entities(args.User), PopupType.Medium);
|
||||
("name", Comp<MetaDataComponent>(uid).EntityName)), args.User, PopupType.Medium);
|
||||
_popupSystem.PopupEntity(Loc.GetString("plant-holder-component-remove-plant-others-message",
|
||||
("name", Comp<MetaDataComponent>(args.User).EntityName)), uid, Filter.PvsExcept(args.User));
|
||||
("name", Comp<MetaDataComponent>(args.User).EntityName)), uid, Filter.PvsExcept(args.User), true);
|
||||
RemovePlant(uid, component);
|
||||
}
|
||||
else
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-no-plant-message",
|
||||
("name", Comp<MetaDataComponent>(uid).EntityName)), Filter.Entities(args.User));
|
||||
("name", Comp<MetaDataComponent>(uid).EntityName)), args.User);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -211,13 +211,13 @@ namespace Content.Server.Botany.Systems
|
||||
if (split.TotalVolume == 0)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-no-plant-message",
|
||||
("owner", args.Used)), Filter.Entities(args.User));
|
||||
("owner", args.Used)), args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-spray-message",
|
||||
("owner", uid),
|
||||
("amount", split.TotalVolume)), Filter.Entities(args.User), PopupType.Medium);
|
||||
("amount", split.TotalVolume)), args.User, PopupType.Medium);
|
||||
|
||||
_solutionSystem.TryAddSolution(targetEntity, targetSolution, split);
|
||||
|
||||
@@ -230,19 +230,19 @@ namespace Content.Server.Botany.Systems
|
||||
{
|
||||
if (component.Seed == null)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-nothing-to-sample-message"), Filter.Entities(args.User));
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-nothing-to-sample-message"), args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.Sampled)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-already-sampled-message"), Filter.Entities(args.User));
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-already-sampled-message"), args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.Dead)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-dead-plant-message"), Filter.Entities(args.User));
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-dead-plant-message"), args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace Content.Server.Botany.Systems
|
||||
var seed = _botanySystem.SpawnSeedPacket(component.Seed, Transform(args.User).Coordinates);
|
||||
seed.RandomOffset(0.25f);
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-take-sample-message",
|
||||
("seedName", component.Seed.DisplayName)), Filter.Entities(args.User));
|
||||
("seedName", component.Seed.DisplayName)), args.User);
|
||||
component.Health -= (_random.Next(3, 5) * 10);
|
||||
|
||||
if (_random.Prob(0.3f))
|
||||
@@ -270,11 +270,11 @@ namespace Content.Server.Botany.Systems
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-compost-message",
|
||||
("owner", uid),
|
||||
("usingItem", args.Used)), Filter.Entities(args.User), PopupType.Medium);
|
||||
("usingItem", args.Used)), args.User, PopupType.Medium);
|
||||
_popupSystem.PopupEntity(Loc.GetString("plant-holder-component-compost-others-message",
|
||||
("user", Identity.Entity(args.User, EntityManager)),
|
||||
("usingItem", args.Used),
|
||||
("owner", uid)), uid, Filter.PvsExcept(args.User));
|
||||
("owner", uid)), uid, Filter.PvsExcept(args.User), true);
|
||||
|
||||
if (_solutionSystem.TryGetSolution(args.Used, produce.SolutionName, out var solution2))
|
||||
{
|
||||
|
||||
@@ -33,12 +33,12 @@ public sealed class SeedExtractorSystem : EntitySystem
|
||||
if (!_botanySystem.TryGetSeed(produce, out var seed) || seed.Seedless)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("seed-extractor-component-no-seeds",("name", args.Used)),
|
||||
Filter.Entities(args.User), PopupType.MediumCaution);
|
||||
args.User, PopupType.MediumCaution);
|
||||
return;
|
||||
}
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString("seed-extractor-component-interact-message",("name", args.Used)),
|
||||
Filter.Entities(args.User), PopupType.Medium);
|
||||
args.User, PopupType.Medium);
|
||||
|
||||
QueueDel(args.Used);
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ public sealed partial class BuckleSystem
|
||||
|
||||
if (!HasComp<SharedHandsComponent>(user))
|
||||
{
|
||||
_popups.PopupEntity(Loc.GetString("buckle-component-no-hands-message"), user, Filter.Entities(user));
|
||||
_popups.PopupEntity(Loc.GetString("buckle-component-no-hands-message"), user, user);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ public sealed partial class BuckleSystem
|
||||
? "buckle-component-already-buckled-message"
|
||||
: "buckle-component-other-already-buckled-message",
|
||||
("owner", Identity.Entity(buckleId, EntityManager)));
|
||||
_popups.PopupEntity(message, user, Filter.Entities(user));
|
||||
_popups.PopupEntity(message, user, user);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ public sealed partial class BuckleSystem
|
||||
var message = Loc.GetString(buckleId == user
|
||||
? "buckle-component-cannot-buckle-message"
|
||||
: "buckle-component-other-cannot-buckle-message", ("owner", Identity.Entity(buckleId, EntityManager)));
|
||||
_popups.PopupEntity(message, user, Filter.Entities(user));
|
||||
_popups.PopupEntity(message, user, user);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ public sealed partial class BuckleSystem
|
||||
var message = Loc.GetString(buckleId == user
|
||||
? "buckle-component-cannot-fit-message"
|
||||
: "buckle-component-other-cannot-fit-message", ("owner", Identity.Entity(buckleId, EntityManager)));
|
||||
_popups.PopupEntity(message, user, Filter.Entities(user));
|
||||
_popups.PopupEntity(message, user, user);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ public sealed partial class BuckleSystem
|
||||
var message = Loc.GetString(buckleId == user
|
||||
? "buckle-component-cannot-buckle-message"
|
||||
: "buckle-component-other-cannot-buckle-message", ("owner", Identity.Entity(buckleId, EntityManager)));
|
||||
_popups.PopupEntity(message, user, Filter.Entities(user));
|
||||
_popups.PopupEntity(message, user, user);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -229,10 +229,7 @@ namespace Content.Server.Cargo.Systems
|
||||
_uiSystem.GetUiOrNull(component.Owner, CargoConsoleUiKey.Orders)?.SetState(state);
|
||||
}
|
||||
|
||||
private void ConsolePopup(ICommonSession session, string text)
|
||||
{
|
||||
_popup.PopupCursor(text, Filter.SinglePlayer(session));
|
||||
}
|
||||
private void ConsolePopup(ICommonSession session, string text) => _popup.PopupCursor(text, session);
|
||||
|
||||
private void PlayDenySound(EntityUid uid, CargoOrderConsoleComponent component)
|
||||
{
|
||||
|
||||
@@ -499,19 +499,19 @@ public sealed partial class CargoSystem
|
||||
|
||||
if (!TryComp<CargoShuttleComponent>(orderDatabase.Shuttle, out var shuttle))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("cargo-no-shuttle"), args.Entity, Filter.Entities(args.Entity));
|
||||
_popup.PopupEntity(Loc.GetString("cargo-no-shuttle"), args.Entity, args.Entity);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_shuttle.CanFTL(shuttle.Owner, out var reason))
|
||||
{
|
||||
_popup.PopupEntity(reason, args.Entity, Filter.Entities(args.Entity));
|
||||
_popup.PopupEntity(reason, args.Entity, args.Entity);
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsBlocked(shuttle))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("cargo-shuttle-console-organics"), player.Value, Filter.Entities(player.Value));
|
||||
_popup.PopupEntity(Loc.GetString("cargo-shuttle-console-organics"), player.Value, player.Value);
|
||||
SoundSystem.Play(component.DenySound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), uid);
|
||||
return;
|
||||
};
|
||||
|
||||
@@ -39,7 +39,7 @@ public sealed class PriceGunSystem : EntitySystem
|
||||
{
|
||||
Act = () =>
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("price-gun-pricing-result", ("object", Identity.Entity(args.Target, EntityManager)), ("price", $"{price:F2}")), args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("price-gun-pricing-result", ("object", Identity.Entity(args.Target, EntityManager)), ("price", $"{price:F2}")), args.User, args.User);
|
||||
_useDelay.BeginDelay(uid, useDelay);
|
||||
},
|
||||
Text = Loc.GetString("price-gun-verb-text"),
|
||||
@@ -58,7 +58,7 @@ public sealed class PriceGunSystem : EntitySystem
|
||||
|
||||
var price = _pricingSystem.GetPrice(args.Target.Value);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("price-gun-pricing-result", ("object", Identity.Entity(args.Target.Value, EntityManager)), ("price", $"{price:F2}")), args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("price-gun-pricing-result", ("object", Identity.Entity(args.Target.Value, EntityManager)), ("price", $"{price:F2}")), args.User, args.User);
|
||||
_useDelay.BeginDelay(uid, useDelay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Server.DeviceNetwork;
|
||||
using Content.Server.DeviceNetwork;
|
||||
using Content.Server.DeviceNetwork.Components;
|
||||
using Content.Shared.CartridgeLoader;
|
||||
using Content.Shared.CartridgeLoader.Cartridges;
|
||||
@@ -51,7 +51,7 @@ public sealed class NetProbeCartridgeSystem : EntitySystem
|
||||
//Why is there no NextFloat(float min, float max)???
|
||||
var audioParams = AudioParams.Default.WithVolume(-2f).WithPitchScale((float)_random.Next(12, 21) / 10);
|
||||
_audioSystem.PlayEntity(component.SoundScan, args.InteractEvent.User, target, audioParams);
|
||||
_popupSystem.PopupCursor(Loc.GetString("net-probe-scan", ("device", target)), Filter.Entities(args.InteractEvent.User));
|
||||
_popupSystem.PopupCursor(Loc.GetString("net-probe-scan", ("device", target)), args.InteractEvent.User);
|
||||
|
||||
|
||||
//Limit the amount of saved probe results to 9
|
||||
|
||||
@@ -72,7 +72,7 @@ public sealed partial class ChatSystem
|
||||
|
||||
if (channel == null)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("chat-manager-no-such-channel"), source, Filter.Entities(source));
|
||||
_popup.PopupEntity(Loc.GetString("chat-manager-no-such-channel"), source, source);
|
||||
channel = null;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public sealed partial class ChatSystem
|
||||
|
||||
if (!hasHeadset && !HasComp<IntrinsicRadioTransmitterComponent>(source))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("chat-manager-no-headset-on-message"), source, Filter.Entities(source));
|
||||
_popup.PopupEntity(Loc.GetString("chat-manager-no-headset-on-message"), source, source);
|
||||
}
|
||||
|
||||
return (message, channel);
|
||||
|
||||
@@ -288,17 +288,18 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
return false;
|
||||
}
|
||||
|
||||
var filter = user.HasValue ? Filter.Entities(user.Value) : Filter.Empty();
|
||||
if (solution.TotalVolume == 0)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("chem-master-window-buffer-empty-text"), filter);
|
||||
if (user.HasValue)
|
||||
_popupSystem.PopupCursor(Loc.GetString("chem-master-window-buffer-empty-text"), user.Value);
|
||||
return false;
|
||||
}
|
||||
|
||||
// ReSharper disable once InvertIf
|
||||
if (neededVolume > solution.CurrentVolume)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("chem-master-window-buffer-low-text"), filter);
|
||||
if (user.HasValue)
|
||||
_popupSystem.PopupCursor(Loc.GetString("chem-master-window-buffer-low-text"), user.Value);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ public sealed partial class ChemistrySystem
|
||||
else
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-cannot-transfer-message",
|
||||
("target", Identity.Entity(target, EntityManager))), component.Owner, Filter.Entities(user));
|
||||
("target", Identity.Entity(target, EntityManager))), component.Owner, user);
|
||||
}
|
||||
}
|
||||
else if (component.ToggleState == SharedInjectorComponent.InjectorToggleMode.Draw)
|
||||
@@ -125,7 +125,7 @@ public sealed partial class ChemistrySystem
|
||||
else
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-cannot-draw-message",
|
||||
("target", Identity.Entity(target, EntityManager))), component.Owner, Filter.Entities(user));
|
||||
("target", Identity.Entity(target, EntityManager))), component.Owner, user);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -226,7 +226,7 @@ public sealed partial class ChemistrySystem
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
_popup.PopupEntity(Loc.GetString(msg), component.Owner, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString(msg), component.Owner, user);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -235,7 +235,7 @@ public sealed partial class ChemistrySystem
|
||||
private void InjectDoAfter(InjectorComponent component, EntityUid user, EntityUid target)
|
||||
{
|
||||
// Create a pop-up for the user
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-injecting-user"), target, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-injecting-user"), target, user);
|
||||
|
||||
if (!_solutions.TryGetSolution(component.Owner, InjectorComponent.SolutionName, out var solution))
|
||||
return;
|
||||
@@ -250,7 +250,7 @@ public sealed partial class ChemistrySystem
|
||||
// Create a pop-up for the target
|
||||
var userName = Identity.Entity(user, EntityManager);
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-injecting-target",
|
||||
("user", userName)), user, Filter.Entities(target));
|
||||
("user", userName)), user, target);
|
||||
|
||||
// Check if the target is incapacitated or in combat mode and modify time accordingly.
|
||||
if (_mobState.IsIncapacitated(target))
|
||||
@@ -311,7 +311,7 @@ public sealed partial class ChemistrySystem
|
||||
if (realTransferAmount <= 0)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-cannot-inject-message", ("target", Identity.Entity(targetBloodstream.Owner, EntityManager))),
|
||||
component.Owner, Filter.Entities(user));
|
||||
component.Owner, user);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ public sealed partial class ChemistrySystem
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-inject-success-message",
|
||||
("amount", removedSolution.TotalVolume),
|
||||
("target", Identity.Entity(targetBloodstream.Owner, EntityManager))), component.Owner, Filter.Entities(user));
|
||||
("target", Identity.Entity(targetBloodstream.Owner, EntityManager))), component.Owner, user);
|
||||
|
||||
Dirty(component);
|
||||
AfterInject(component);
|
||||
@@ -344,7 +344,7 @@ public sealed partial class ChemistrySystem
|
||||
if (realTransferAmount <= 0)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-target-already-full-message", ("target", Identity.Entity(targetEntity, EntityManager))),
|
||||
component.Owner, Filter.Entities(user));
|
||||
component.Owner, user);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@ public sealed partial class ChemistrySystem
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-transfer-success-message",
|
||||
("amount", removedSolution.TotalVolume),
|
||||
("target", Identity.Entity(targetEntity, EntityManager))), component.Owner, Filter.Entities(user));
|
||||
("target", Identity.Entity(targetEntity, EntityManager))), component.Owner, user);
|
||||
|
||||
Dirty(component);
|
||||
AfterInject(component);
|
||||
@@ -404,7 +404,7 @@ public sealed partial class ChemistrySystem
|
||||
if (realTransferAmount <= 0)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-target-is-empty-message", ("target", Identity.Entity(targetEntity, EntityManager))),
|
||||
component.Owner, Filter.Entities(user));
|
||||
component.Owner, user);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ public sealed partial class ChemistrySystem
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-draw-success-message",
|
||||
("amount", removedSolution.TotalVolume),
|
||||
("target", Identity.Entity(targetEntity, EntityManager))), component.Owner, Filter.Entities(user));
|
||||
("target", Identity.Entity(targetEntity, EntityManager))), component.Owner, user);
|
||||
|
||||
Dirty(component);
|
||||
AfterDraw(component);
|
||||
@@ -450,7 +450,7 @@ public sealed partial class ChemistrySystem
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-draw-success-message",
|
||||
("amount", transferAmount),
|
||||
("target", Identity.Entity(target, EntityManager))), component.Owner, Filter.Entities(user));
|
||||
("target", Identity.Entity(target, EntityManager))), component.Owner, user);
|
||||
|
||||
Dirty(component);
|
||||
AfterDraw(component);
|
||||
|
||||
@@ -79,21 +79,21 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
|
||||
if (hypoSpraySolution == null || hypoSpraySolution.CurrentVolume == 0)
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("hypospray-component-empty-message"), Filter.Entities(user));
|
||||
_popup.PopupCursor(Loc.GetString("hypospray-component-empty-message"), user);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!_solutions.TryGetInjectableSolution(target.Value, out var targetSolution))
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("hypospray-cant-inject", ("target", Identity.Entity(target.Value, _entMan))), Filter.Entities(user));
|
||||
_popup.PopupCursor(Loc.GetString("hypospray-cant-inject", ("target", Identity.Entity(target.Value, _entMan))), user);
|
||||
return false;
|
||||
}
|
||||
|
||||
_popup.PopupCursor(Loc.GetString(msgFormat ?? "hypospray-component-inject-other-message", ("other", target)), Filter.Entities(user));
|
||||
_popup.PopupCursor(Loc.GetString(msgFormat ?? "hypospray-component-inject-other-message", ("other", target)), user);
|
||||
|
||||
if (target != user)
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("hypospray-component-feel-prick-message"), Filter.Entities(target.Value));
|
||||
_popup.PopupCursor(Loc.GetString("hypospray-component-feel-prick-message"), target.Value);
|
||||
var meleeSys = EntitySystem.Get<MeleeWeaponSystem>();
|
||||
var angle = Angle.FromWorldVec(_entMan.GetComponent<TransformComponent>(target.Value).WorldPosition - _entMan.GetComponent<TransformComponent>(user).WorldPosition);
|
||||
// TODO: This should just be using melee attacks...
|
||||
@@ -107,7 +107,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
|
||||
if (realTransferAmount <= 0)
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("hypospray-component-transfer-already-full-message",("owner", target)), Filter.Entities(user));
|
||||
_popup.PopupCursor(Loc.GetString("hypospray-component-transfer-already-full-message",("owner", target)), user);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public sealed class SolutionSpikableSystem : EntitySystem
|
||||
|
||||
if (targetSolution.CurrentVolume == 0 && !spikableSource.IgnoreEmpty)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString(spikableSource.PopupEmpty, ("spiked-entity", target), ("spike-entity", source)), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString(spikableSource.PopupEmpty, ("spiked-entity", target), ("spike-entity", source)), user, user);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public sealed class SolutionSpikableSystem : EntitySystem
|
||||
RaiseLocalEvent(target, new SolutionSpikeOverflowEvent(overflow));
|
||||
}
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString(spikableSource.Popup, ("spiked-entity", target), ("spike-entity", source)), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString(spikableSource.Popup, ("spiked-entity", target), ("spike-entity", source)), user, user);
|
||||
|
||||
sourceSolution.RemoveAllSolution();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
@@ -27,9 +27,9 @@ namespace Content.Server.Chemistry.ReagentEffects
|
||||
("organ", args.OrganEntity.GetValueOrDefault()),
|
||||
};
|
||||
if (Type == PopupRecipients.Local)
|
||||
popupSys.PopupEntity(Loc.GetString(msg, msgArgs), args.SolutionEntity, Filter.Entities(args.SolutionEntity), VisualType);
|
||||
popupSys.PopupEntity(Loc.GetString(msg, msgArgs), args.SolutionEntity, args.SolutionEntity, VisualType);
|
||||
else if (Type == PopupRecipients.Pvs)
|
||||
popupSys.PopupEntity(Loc.GetString(msg, msgArgs), args.SolutionEntity, Filter.Pvs(args.SolutionEntity), VisualType);
|
||||
popupSys.PopupEntity(Loc.GetString(msg, msgArgs), args.SolutionEntity, VisualType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public sealed class ClimbSystem : SharedClimbSystem
|
||||
: CanVault(component, args.User, args.Dragged, args.Target, out reason);
|
||||
|
||||
if (!canVault)
|
||||
_popupSystem.PopupEntity(reason, args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(reason, args.User, args.User);
|
||||
|
||||
args.CanDrop = canVault;
|
||||
args.Handled = true;
|
||||
@@ -368,7 +368,7 @@ public sealed class ClimbSystem : SharedClimbSystem
|
||||
// Not shown to the user, since they already get a 'you climb on the glass table' popup
|
||||
_popupSystem.PopupEntity(
|
||||
Loc.GetString("glass-table-shattered-others", ("table", uid), ("climber", Identity.Entity(args.Climber, EntityManager))), args.Climber,
|
||||
Filter.Pvs(uid).RemoveWhereAttachedEntity(puid => puid == args.Climber));
|
||||
Filter.PvsExcept(args.Climber), true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -59,9 +59,9 @@ namespace Content.Server.Clothing
|
||||
_identity.QueueIdentityUpdate(args.Performer);
|
||||
|
||||
if (mask.IsToggled)
|
||||
_popupSystem.PopupEntity(Loc.GetString("action-mask-pull-down-popup-message", ("mask", mask.Owner)), args.Performer, Filter.Entities(args.Performer));
|
||||
_popupSystem.PopupEntity(Loc.GetString("action-mask-pull-down-popup-message", ("mask", mask.Owner)), args.Performer, args.Performer);
|
||||
else
|
||||
_popupSystem.PopupEntity(Loc.GetString("action-mask-pull-up-popup-message", ("mask", mask.Owner)), args.Performer, Filter.Entities(args.Performer));
|
||||
_popupSystem.PopupEntity(Loc.GetString("action-mask-pull-up-popup-message", ("mask", mask.Owner)), args.Performer, args.Performer);
|
||||
|
||||
ToggleMaskComponents(uid, mask, args.Performer);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace Content.Server.Communications
|
||||
if (message.Session.AttachedEntity is not {Valid: true} mob) return;
|
||||
if (!CanUse(mob, uid))
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("comms-console-permission-denied"), Filter.Entities(mob), PopupType.Medium);
|
||||
_popupSystem.PopupCursor(Loc.GetString("comms-console-permission-denied"), message.Session, PopupType.Medium);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ namespace Content.Server.Communications
|
||||
|
||||
if (!CanUse(mob, uid))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comms-console-permission-denied"), uid, Filter.Entities(mob));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comms-console-permission-denied"), uid, message.Session);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ namespace Content.Server.Communications
|
||||
if (message.Session.AttachedEntity is not {Valid: true} mob) return;
|
||||
if (!CanUse(mob, uid))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comms-console-permission-denied"), uid, Filter.Entities(mob));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comms-console-permission-denied"), uid, message.Session);
|
||||
return;
|
||||
}
|
||||
_roundEndSystem.RequestRoundEnd(uid);
|
||||
@@ -285,7 +285,7 @@ namespace Content.Server.Communications
|
||||
if (message.Session.AttachedEntity is not {Valid: true} mob) return;
|
||||
if (!CanUse(mob, uid))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comms-console-permission-denied"), uid, Filter.Entities(mob));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comms-console-permission-denied"), uid, message.Session);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public sealed class CrayonSystem : SharedCrayonSystem
|
||||
if (component.DeleteEmpty)
|
||||
UseUpCrayon(uid, args.User);
|
||||
else
|
||||
_popup.PopupEntity(Loc.GetString("crayon-interact-not-enough-left-text"), uid, Filter.Entities(args.User));
|
||||
_popup.PopupEntity(Loc.GetString("crayon-interact-not-enough-left-text"), uid, args.User);
|
||||
|
||||
args.Handled = true;
|
||||
return;
|
||||
@@ -59,7 +59,7 @@ public sealed class CrayonSystem : SharedCrayonSystem
|
||||
|
||||
if (!args.ClickLocation.IsValid(EntityManager))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("crayon-interact-invalid-location"), uid, Filter.Entities(args.User));
|
||||
_popup.PopupEntity(Loc.GetString("crayon-interact-invalid-location"), uid, args.User);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ public sealed class CrayonSystem : SharedCrayonSystem
|
||||
|
||||
private void UseUpCrayon(EntityUid uid, EntityUid user)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("crayon-interact-used-up-text", ("owner", uid)), user, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString("crayon-interact-used-up-text", ("owner", uid)), user, user);
|
||||
EntityManager.QueueDeleteEntity(uid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,10 +70,10 @@ namespace Content.Server.Cuffs
|
||||
{
|
||||
if (args.Target is not {Valid: true} target)
|
||||
return;
|
||||
|
||||
|
||||
if (!args.CanReach)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-too-far-away-error"), args.User, Filter.Entities(args.User));
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-too-far-away-error"), args.User, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -88,31 +88,31 @@ namespace Content.Server.Cuffs
|
||||
|
||||
if (component.Broken)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-cuffs-broken-error"), user, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-cuffs-broken-error"), user, user);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!EntityManager.TryGetComponent<HandsComponent?>(target, out var hands))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-target-has-no-hands-error",("targetName", target)), user, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-target-has-no-hands-error",("targetName", target)), user, user);
|
||||
return;
|
||||
}
|
||||
|
||||
if (cuffed.CuffedHandCount >= hands.Count)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-target-has-no-free-hands-error",("targetName", target)), user, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-target-has-no-free-hands-error",("targetName", target)), user, user);
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO these messages really need third-party variants. I.e., "{$user} starts cuffing {$target}!"
|
||||
if (target == user)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-target-self"), user, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-target-self"), user, user);
|
||||
}
|
||||
else
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-start-cuffing-target-message",("targetName", target)), user, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-start-cuffing-by-other-message",("otherName", user)), target, Filter.Entities(target));
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-start-cuffing-target-message",("targetName", target)), user, user);
|
||||
_popup.PopupEntity(Loc.GetString("handcuff-component-start-cuffing-by-other-message",("otherName", user)), target, target);
|
||||
}
|
||||
|
||||
_audio.PlayPvs(component.StartCuffSound, handcuff);
|
||||
@@ -121,7 +121,7 @@ namespace Content.Server.Cuffs
|
||||
}
|
||||
|
||||
private void OnCuffMeleeHit(EntityUid uid, HandcuffComponent component, MeleeHitEvent args)
|
||||
{
|
||||
{
|
||||
if (!args.HitEntities.Any())
|
||||
return;
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace Content.Server.Cuffs
|
||||
}
|
||||
if (args.Cancelled)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("cuffable-component-cannot-interact-message"), args.Target, Filter.Entities(args.User));
|
||||
_popup.PopupEntity(Loc.GetString("cuffable-component-cannot-interact-message"), args.Target, args.User);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Server.Damage.Components;
|
||||
using Content.Server.Damage.Components;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Damage;
|
||||
using Robust.Shared.Player;
|
||||
@@ -30,7 +30,7 @@ public sealed class DamagePopupSystem : EntitySystem
|
||||
DamagePopupType.Hit => "!",
|
||||
_ => "Invalid type",
|
||||
};
|
||||
_popupSystem.PopupEntity(msg, uid, Filter.Pvs(uid, 2F, EntityManager));
|
||||
_popupSystem.PopupEntity(msg, uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Content.Server.DeviceNetwork.Components;
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.Access.Components;
|
||||
@@ -102,7 +102,7 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
||||
if (MetaData(targetUid.Value).EntityLifeStage == EntityLifeStage.MapInitialized)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("network-configurator-device-failed", ("device", targetUid)),
|
||||
Filter.Entities(userUid));
|
||||
userUid);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -111,13 +111,13 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
||||
|
||||
if (configurator.Devices.ContainsValue(targetUid.Value))
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("network-configurator-device-already-saved", ("device", targetUid)), Filter.Entities(userUid));
|
||||
_popupSystem.PopupCursor(Loc.GetString("network-configurator-device-already-saved", ("device", targetUid)), userUid);
|
||||
return;
|
||||
}
|
||||
|
||||
configurator.Devices.Add(address, targetUid.Value);
|
||||
_popupSystem.PopupCursor(Loc.GetString("network-configurator-device-saved", ("address", device.Address), ("device", targetUid)),
|
||||
Filter.Entities(userUid), PopupType.Medium);
|
||||
userUid, PopupType.Medium);
|
||||
|
||||
UpdateUiState(configurator.Owner, configurator);
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
||||
return true;
|
||||
|
||||
SoundSystem.Play(component.SoundNoAccess.GetSound(), Filter.Pvs(user.Value), target, AudioParams.Default.WithVolume(-2f).WithPitchScale(1.2f));
|
||||
_popupSystem.PopupEntity(Loc.GetString("network-configurator-device-access-denied"), target, Filter.Entities(user.Value));
|
||||
_popupSystem.PopupEntity(Loc.GetString("network-configurator-device-access-denied"), target, user.Value);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
||||
_ => "error"
|
||||
};
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString(resultText), Filter.SinglePlayer(args.Session), PopupType.Medium);
|
||||
_popupSystem.PopupCursor(Loc.GetString(resultText), args.Session, PopupType.Medium);
|
||||
_uiSystem.TrySetUiState(
|
||||
component.Owner,
|
||||
NetworkConfiguratorUiKey.Configure,
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace Content.Server.Disease
|
||||
|
||||
if (swab.Used)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("swab-already-used"), args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("swab-already-used"), args.User, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace Content.Server.Disease
|
||||
EntityManager.TryGetComponent<IngestionBlockerComponent>(maskUid, out var blocker) &&
|
||||
blocker.Enabled)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("swab-mask-blocked", ("target", Identity.Entity(args.Target.Value, EntityManager)), ("mask", maskUid)), args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("swab-mask-blocked", ("target", Identity.Entity(args.Target.Value, EntityManager)), ("mask", maskUid)), args.User, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -156,10 +156,10 @@ namespace Content.Server.Disease
|
||||
|
||||
if (!TryComp<DiseaseSwabComponent>(args.Used, out var swab))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("diagnoser-cant-use-swab", ("machine", uid), ("swab", args.Used)), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("diagnoser-cant-use-swab", ("machine", uid), ("swab", args.Used)), uid, args.User);
|
||||
return;
|
||||
}
|
||||
_popupSystem.PopupEntity(Loc.GetString("machine-insert-item", ("machine", uid), ("item", args.Used), ("user", args.User)), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("machine-insert-item", ("machine", uid), ("item", args.Used), ("user", args.User)), uid, args.User);
|
||||
|
||||
|
||||
machine.Disease = swab.Disease;
|
||||
@@ -188,10 +188,10 @@ namespace Content.Server.Disease
|
||||
|
||||
if (!TryComp<DiseaseSwabComponent>(args.Used, out var swab) || swab.Disease == null || !swab.Disease.Infectious)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("diagnoser-cant-use-swab", ("machine", uid), ("swab", args.Used)), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("diagnoser-cant-use-swab", ("machine", uid), ("swab", args.Used)), uid, args.User);
|
||||
return;
|
||||
}
|
||||
_popupSystem.PopupEntity(Loc.GetString("machine-insert-item", ("machine", uid), ("item", args.Used), ("user", args.User)), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("machine-insert-item", ("machine", uid), ("item", args.Used), ("user", args.User)), uid, args.User);
|
||||
var machine = Comp<DiseaseMachineComponent>(uid);
|
||||
machine.Disease = swab.Disease;
|
||||
EntityManager.DeleteEntity(args.Used);
|
||||
@@ -321,7 +321,7 @@ namespace Content.Server.Disease
|
||||
return;
|
||||
|
||||
args.Swab.Used = true;
|
||||
_popupSystem.PopupEntity(Loc.GetString("swab-swabbed", ("target", Identity.Entity(args.Target.Value, EntityManager))), args.Target.Value, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("swab-swabbed", ("target", Identity.Entity(args.Target.Value, EntityManager))), args.Target.Value, args.User);
|
||||
|
||||
if (args.Swab.Disease != null || args.Carrier.Diseases.Count == 0)
|
||||
return;
|
||||
|
||||
@@ -242,7 +242,7 @@ namespace Content.Server.Disease
|
||||
{
|
||||
var CureTuple = (carrier, disease);
|
||||
CureQueue.Enqueue(CureTuple);
|
||||
_popupSystem.PopupEntity(Loc.GetString("disease-cured"), carrier.Owner, Filter.Entities(carrier.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("disease-cured"), carrier.Owner, carrier.Owner);
|
||||
}
|
||||
|
||||
public void CureAllDiseases(EntityUid uid, DiseaseCarrierComponent? carrier = null)
|
||||
@@ -298,7 +298,7 @@ namespace Content.Server.Disease
|
||||
|
||||
if (vaxx.Used)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("vaxx-already-used"), args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("vaxx-already-used"), args.User, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ namespace Content.Server.Disease
|
||||
if (attemptSneezeCoughEvent.Cancelled) return false;
|
||||
|
||||
if (!string.IsNullOrEmpty(snoughMessage))
|
||||
_popupSystem.PopupEntity(Loc.GetString(snoughMessage, ("person", Identity.Entity(uid, EntityManager))), uid, Filter.Pvs(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString(snoughMessage, ("person", Identity.Entity(uid, EntityManager))), uid);
|
||||
|
||||
if (snoughSound != null)
|
||||
_audioSystem.PlayPvs(snoughSound, uid);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Content.Server.Disease.Effects
|
||||
SoundSystem.Play(PolymorphSound.GetSound(), Filter.Pvs(polyUid.Value), polyUid.Value, AudioHelpers.WithVariation(0.2f));
|
||||
|
||||
if (PolymorphMessage != null && polyUid != null)
|
||||
EntitySystem.Get<SharedPopupSystem>().PopupEntity(Loc.GetString(PolymorphMessage), polyUid.Value, Filter.Entities(polyUid.Value), Shared.Popups.PopupType.Large);
|
||||
EntitySystem.Get<SharedPopupSystem>().PopupEntity(Loc.GetString(PolymorphMessage), polyUid.Value, polyUid.Value, Shared.Popups.PopupType.Large);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@ namespace Content.Server.Disease.Effects
|
||||
var popupSys = args.EntityManager.EntitySysManager.GetEntitySystem<SharedPopupSystem>();
|
||||
|
||||
if (Type == PopupRecipients.Local)
|
||||
popupSys.PopupEntity(Loc.GetString(Message), args.DiseasedEntity, Filter.Entities(args.DiseasedEntity), VisualType);
|
||||
popupSys.PopupEntity(Loc.GetString(Message), args.DiseasedEntity, args.DiseasedEntity, VisualType);
|
||||
else if (Type == PopupRecipients.Pvs)
|
||||
popupSys.PopupEntity(Loc.GetString(Message, ("person", Identity.Entity(args.DiseasedEntity, args.EntityManager))), args.DiseasedEntity, Filter.Pvs(args.DiseasedEntity), VisualType);
|
||||
popupSys.PopupEntity(Loc.GetString(Message, ("person", Identity.Entity(args.DiseasedEntity, args.EntityManager))), args.DiseasedEntity, VisualType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
_robustRandom.NextDouble() > 0.75 ||
|
||||
!component.Container.Insert(args.Thrown))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("disposal-unit-thrown-missed"), uid, Filter.Pvs(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("disposal-unit-thrown-missed"), uid);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
|
||||
if (userId.HasValue && !HasComp<SharedHandsComponent>(userId) && toInsertId != userId) // Mobs like mouse can Jump inside even with no hands
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("disposal-unit-no-hands"), userId.Value, Filter.Entities(userId.Value), PopupType.SmallCaution);
|
||||
_popupSystem.PopupEntity(Loc.GetString("disposal-unit-no-hands"), userId.Value, userId.Value, PopupType.SmallCaution);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -144,12 +144,12 @@ namespace Content.Server.Doors.Systems
|
||||
if (state.Fire)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("firelock-component-is-holding-fire-message"),
|
||||
uid, Filter.Pvs(uid, entityManager: EntityManager));
|
||||
uid);
|
||||
}
|
||||
else if (state.Pressure)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("firelock-component-is-holding-pressure-message"),
|
||||
uid, Filter.Pvs(uid, entityManager: EntityManager));
|
||||
uid);
|
||||
}
|
||||
|
||||
if (state.Fire || state.Pressure)
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace Content.Server.Dragon
|
||||
// We can't predict the rift being destroyed anyway so no point adding weakened to shared.
|
||||
dragon.WeakenedAccumulator = dragon.WeakenedDuration;
|
||||
_movement.RefreshMovementSpeedModifiers(component.Dragon);
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-destroyed"), component.Dragon, Filter.Entities(component.Dragon));
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-destroyed"), component.Dragon, component.Dragon);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,19 +212,19 @@ namespace Content.Server.Dragon
|
||||
{
|
||||
if (component.Weakened)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-weakened"), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-weakened"), uid, uid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.Rifts.Count >= RiftsAllowed)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-max"), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-max"), uid, uid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.Rifts.Count > 0 && TryComp<DragonRiftComponent>(component.Rifts[^1], out var rift) && rift.State != DragonRiftState.Finished)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-duplicate"), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-duplicate"), uid, uid);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ namespace Content.Server.Dragon
|
||||
// Have to be on a grid fam
|
||||
if (!_mapManager.TryGetGrid(xform.GridUid, out var grid))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-anchor"), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-anchor"), uid, uid);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace Content.Server.Dragon
|
||||
{
|
||||
if (riftXform.Coordinates.InRange(EntityManager, xform.Coordinates, RiftRange))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-proximity", ("proximity", RiftRange)), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-proximity", ("proximity", RiftRange)), uid, uid);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -251,7 +251,7 @@ namespace Content.Server.Dragon
|
||||
if (!tile.IsSpace(_tileDef))
|
||||
continue;
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-space-proximity", ("proximity", RiftTileRadius)), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("carp-rift-space-proximity", ("proximity", RiftTileRadius)), uid, uid);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -379,14 +379,14 @@ namespace Content.Server.Dragon
|
||||
});
|
||||
break;
|
||||
default:
|
||||
_popupSystem.PopupEntity(Loc.GetString("devour-action-popup-message-fail-target-alive"), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("devour-action-popup-message-fail-target-alive"), uid, uid);
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("devour-action-popup-message-structure"), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("devour-action-popup-message-structure"), uid, uid);
|
||||
|
||||
if (component.SoundStructureDevour != null)
|
||||
_audioSystem.PlayPvs(component.SoundStructureDevour, uid, component.SoundStructureDevour.Params);
|
||||
|
||||
@@ -94,8 +94,7 @@ namespace Content.Server.Drone
|
||||
private void OnMindAdded(EntityUid uid, DroneComponent drone, MindAddedMessage args)
|
||||
{
|
||||
UpdateDroneAppearance(uid, DroneStatus.On);
|
||||
_popupSystem.PopupEntity(Loc.GetString("drone-activated"), uid,
|
||||
Filter.Pvs(uid), PopupType.Large);
|
||||
_popupSystem.PopupEntity(Loc.GetString("drone-activated"), uid, PopupType.Large);
|
||||
}
|
||||
|
||||
private void OnMindRemoved(EntityUid uid, DroneComponent drone, MindRemovedMessage args)
|
||||
@@ -135,7 +134,7 @@ namespace Content.Server.Drone
|
||||
if ((TryComp<MobStateComponent>(entity, out var entityMobState) && HasComp<GhostTakeoverAvailableComponent>(entity) && entityMobState.IsDead()))
|
||||
continue;
|
||||
if (_gameTiming.IsFirstTimePredicted)
|
||||
_popupSystem.PopupEntity(Loc.GetString("drone-too-close", ("being", Identity.Entity(entity, EntityManager))), uid, Filter.Entities(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("drone-too-close", ("being", Identity.Entity(entity, EntityManager))), uid, uid);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,23 +383,21 @@ namespace Content.Server.Electrocution
|
||||
_jitteringSystem.DoJitter(uid, time * JitterTimeMultiplier, refresh, JitterAmplitude, JitterFrequency, true,
|
||||
statusEffects);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("electrocuted-component-mob-shocked-popup-player"), uid,
|
||||
Filter.Entities(uid).Unpredicted());
|
||||
_popupSystem.PopupEntity(Loc.GetString("electrocuted-component-mob-shocked-popup-player"), uid, uid);
|
||||
|
||||
var filter = Filter.Pvs(uid, 2f, EntityManager).RemoveWhereAttachedEntity(puid => puid == uid)
|
||||
.Unpredicted();
|
||||
var filter = Filter.PvsExcept(uid, entityManager: EntityManager);
|
||||
|
||||
// TODO: Allow being able to pass EntityUid to Loc...
|
||||
if (sourceUid != null)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("electrocuted-component-mob-shocked-by-source-popup-others",
|
||||
("mob", uid), ("source", (sourceUid.Value))), uid, filter);
|
||||
("mob", uid), ("source", (sourceUid.Value))), uid, filter, true);
|
||||
PlayElectrocutionSound(uid, sourceUid.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("electrocuted-component-mob-shocked-popup-others",
|
||||
("mob", uid)), uid, filter);
|
||||
("mob", uid)), uid, filter, true);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Content.Server.Emag
|
||||
|
||||
if (component.Charges <= 0)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("emag-no-charges"), args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("emag-no-charges"), args.User, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Content.Server.Emag
|
||||
if (handled)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("emag-success", ("target", Identity.Entity(args.Target.Value, EntityManager))), args.User,
|
||||
Filter.Entities(args.User), PopupType.Medium);
|
||||
args.User, PopupType.Medium);
|
||||
_adminLogger.Add(LogType.Emag, LogImpact.High, $"{ToPrettyString(args.User):player} emagged {ToPrettyString(args.Target.Value):target}");
|
||||
component.Charges--;
|
||||
return;
|
||||
|
||||
@@ -110,11 +110,11 @@ public sealed partial class EnsnareableSystem
|
||||
_doAfter.DoAfter(doAfterEventArgs);
|
||||
|
||||
if (isOwner)
|
||||
_popup.PopupEntity(Loc.GetString("ensnare-component-try-free", ("ensnare", component.Owner)), target, Filter.Entities(target));
|
||||
_popup.PopupEntity(Loc.GetString("ensnare-component-try-free", ("ensnare", component.Owner)), target, target);
|
||||
|
||||
if (!isOwner && user != null)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("ensnare-component-try-free-other", ("ensnare", component.Owner), ("user", Identity.Entity(target, EntityManager))), user.Value, Filter.Entities(user.Value));
|
||||
_popup.PopupEntity(Loc.GetString("ensnare-component-try-free-other", ("ensnare", component.Owner), ("user", Identity.Entity(target, EntityManager))), user.Value, user.Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public sealed partial class EnsnareableSystem : SharedEnsnareableSystem
|
||||
ensnaring.Ensnared = null;
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("ensnare-component-try-free-complete", ("ensnare", args.EnsnaringEntity)),
|
||||
uid, Filter.Entities(uid), PopupType.Large);
|
||||
uid, uid, PopupType.Large);
|
||||
|
||||
UpdateAlert(component);
|
||||
var ev = new EnsnareRemoveEvent();
|
||||
@@ -58,6 +58,6 @@ public sealed partial class EnsnareableSystem : SharedEnsnareableSystem
|
||||
ensnaring.CancelToken = null;
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("ensnare-component-try-free-fail", ("ensnare", args.EnsnaringEntity)),
|
||||
uid, Filter.Entities(uid), PopupType.Large);
|
||||
uid, uid, PopupType.Large);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public sealed partial class TriggerSystem
|
||||
|
||||
if (component.PreventSuicide)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("suicide-prevented"), args.Victim, Filter.Entities(args.Victim));
|
||||
_popupSystem.PopupEntity(Loc.GetString("suicide-prevented"), args.Victim, args.Victim);
|
||||
args.BlockSuicideAttempt(component.PreventSuicide);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public sealed partial class TriggerSystem
|
||||
Act = () =>
|
||||
{
|
||||
component.Delay = option;
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", option)), args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", option)), args.User, args.User);
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public sealed partial class TriggerSystem
|
||||
if (component.DelayOptions[^1] <= component.Delay)
|
||||
{
|
||||
component.Delay = component.DelayOptions[0];
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", component.Delay)), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", component.Delay)), user, user);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public sealed partial class TriggerSystem
|
||||
if (option > component.Delay)
|
||||
{
|
||||
component.Delay = option;
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", option)), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-timer-set", ("time", option)), user, user);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -130,12 +130,12 @@ public sealed partial class TriggerSystem
|
||||
if (comp.StartOnStick)
|
||||
{
|
||||
comp.StartOnStick = false;
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-start-on-stick-off"), grenade, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-start-on-stick-off"), grenade, user);
|
||||
}
|
||||
else
|
||||
{
|
||||
comp.StartOnStick = true;
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-start-on-stick-on"), grenade, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-start-on-stick-on"), grenade, user);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
_adminLogger.Add(LogType.Trigger, LogImpact.Low,
|
||||
$"A voice-trigger on {ToPrettyString(component.Owner):entity} has started recording. User: {ToPrettyString(user):user}");
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-start-recording"), component.Owner, Filter.Pvs(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-start-recording"), component.Owner);
|
||||
}
|
||||
|
||||
public void StopRecording(TriggerOnVoiceComponent component)
|
||||
@@ -95,7 +95,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
if (string.IsNullOrWhiteSpace(component.KeyPhrase))
|
||||
RemComp<ActiveListenerComponent>(component.Owner);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-stop-recording"), component.Owner, Filter.Pvs(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-stop-recording"), component.Owner);
|
||||
}
|
||||
|
||||
public void FinishRecording(TriggerOnVoiceComponent component, EntityUid source, string message)
|
||||
@@ -106,7 +106,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
_adminLogger.Add(LogType.Trigger, LogImpact.Low,
|
||||
$"A voice-trigger on {ToPrettyString(component.Owner):entity} has recorded a new keyphrase: '{component.KeyPhrase}'. Recorded from {ToPrettyString(source):speaker}");
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-recorded", ("keyphrase", component.KeyPhrase!)), component.Owner, Filter.Pvs(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("popup-trigger-voice-recorded", ("keyphrase", component.KeyPhrase!)), component.Owner);
|
||||
}
|
||||
|
||||
private void OnVoiceExamine(EntityUid uid, TriggerOnVoiceComponent component, ExaminedEvent args)
|
||||
|
||||
@@ -62,7 +62,7 @@ public sealed class FireExtinguisherSystem : EntitySystem
|
||||
if (component.HasSafety && component.Safety)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("fire-extinguisher-component-safety-on-message"), uid,
|
||||
Filter.Entities(args.User));
|
||||
args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public sealed class FireExtinguisherSystem : EntitySystem
|
||||
|
||||
SoundSystem.Play(component.RefillSound.GetSound(), Filter.Pvs(uid), uid);
|
||||
_popupSystem.PopupEntity(Loc.GetString("fire-extinguisher-component-after-interact-refilled-message", ("owner", uid)),
|
||||
uid, Filter.Entities(args.Target.Value));
|
||||
uid, args.Target.Value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public sealed class FireExtinguisherSystem : EntitySystem
|
||||
if (component.HasSafety && component.Safety)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("fire-extinguisher-component-safety-on-message"), uid,
|
||||
Filter.Entities(args.User));
|
||||
args.User);
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Content.Server.Eye.Blinding
|
||||
|
||||
if (TryComp<BlindableComponent>(args.User, out var blindable) && blindable.Sources > 0)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("blindness-fail-attempt"), Filter.Entities(args.User), Shared.Popups.PopupType.MediumCaution);
|
||||
_popupSystem.PopupCursor(Loc.GetString("blindness-fail-attempt"), args.User, Shared.Popups.PopupType.MediumCaution);
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,21 +42,21 @@ public sealed class FaxSystem : EntitySystem
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
|
||||
// Hooks
|
||||
SubscribeLocalEvent<FaxMachineComponent, ComponentInit>(OnComponentInit);
|
||||
SubscribeLocalEvent<FaxMachineComponent, MapInitEvent>(OnMapInit);
|
||||
SubscribeLocalEvent<FaxMachineComponent, ComponentRemove>(OnComponentRemove);
|
||||
|
||||
|
||||
SubscribeLocalEvent<FaxMachineComponent, EntInsertedIntoContainerMessage>(OnItemSlotChanged);
|
||||
SubscribeLocalEvent<FaxMachineComponent, EntRemovedFromContainerMessage>(OnItemSlotChanged);
|
||||
SubscribeLocalEvent<FaxMachineComponent, PowerChangedEvent>(OnPowerChanged);
|
||||
SubscribeLocalEvent<FaxMachineComponent, DeviceNetworkPacketEvent>(OnPacketReceived);
|
||||
|
||||
|
||||
// Interaction
|
||||
SubscribeLocalEvent<FaxMachineComponent, InteractUsingEvent>(OnInteractUsing);
|
||||
SubscribeLocalEvent<FaxMachineComponent, GotEmaggedEvent>(OnEmagged);
|
||||
|
||||
|
||||
// UI
|
||||
SubscribeLocalEvent<FaxMachineComponent, AfterActivatableUIOpenEvent>(OnToggleInterface);
|
||||
SubscribeLocalEvent<FaxMachineComponent, FaxSendMessage>(OnSendButtonPressed);
|
||||
@@ -92,7 +92,7 @@ public sealed class FaxSystem : EntitySystem
|
||||
SpawnPaperFromQueue(comp.Owner, comp);
|
||||
UpdateUserInterface(comp.Owner, comp);
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -182,13 +182,13 @@ public sealed class FaxSystem : EntitySystem
|
||||
{
|
||||
component.PrintingTimeRemaining = 0f; // Reset animation
|
||||
}
|
||||
|
||||
|
||||
if (isInsertInterrupted || isPrintInterrupted)
|
||||
UpdateAppearance(component.Owner, component);
|
||||
|
||||
_itemSlotsSystem.SetLock(uid, component.PaperSlot, !args.Powered); // Lock slot when power is off
|
||||
}
|
||||
|
||||
|
||||
private void OnInteractUsing(EntityUid uid, FaxMachineComponent component, InteractUsingEvent args)
|
||||
{
|
||||
if (args.Handled ||
|
||||
@@ -206,26 +206,26 @@ public sealed class FaxSystem : EntitySystem
|
||||
|
||||
if (newName.Length > 20)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("fax-machine-popup-name-long"), uid, Filter.Pvs(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("fax-machine-popup-name-long"), uid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.KnownFaxes.ContainsValue(newName) && !component.Emagged) // Allow exist names if emagged for fun
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("fax-machine-popup-name-exist"), uid, Filter.Pvs(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("fax-machine-popup-name-exist"), uid);
|
||||
return;
|
||||
}
|
||||
|
||||
_adminLogger.Add(LogType.Action, LogImpact.Low,
|
||||
$"{ToPrettyString(args.User):user} renamed {ToPrettyString(uid)} from \"{component.FaxName}\" to \"{newName}\"");
|
||||
component.FaxName = newName;
|
||||
_popupSystem.PopupEntity(Loc.GetString("fax-machine-popup-name-set"), uid, Filter.Pvs(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("fax-machine-popup-name-set"), uid);
|
||||
UpdateUserInterface(uid, component);
|
||||
});
|
||||
|
||||
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
|
||||
private void OnEmagged(EntityUid uid, FaxMachineComponent component, GotEmaggedEvent args)
|
||||
{
|
||||
if (component.Emagged)
|
||||
@@ -280,22 +280,22 @@ public sealed class FaxSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnToggleInterface(EntityUid uid, FaxMachineComponent component, AfterActivatableUIOpenEvent args)
|
||||
{
|
||||
UpdateUserInterface(uid, component);
|
||||
}
|
||||
|
||||
|
||||
private void OnSendButtonPressed(EntityUid uid, FaxMachineComponent component, FaxSendMessage args)
|
||||
{
|
||||
Send(uid, component, args.Session.AttachedEntity);
|
||||
}
|
||||
|
||||
|
||||
private void OnRefreshButtonPressed(EntityUid uid, FaxMachineComponent component, FaxRefreshMessage args)
|
||||
{
|
||||
Refresh(uid, component);
|
||||
}
|
||||
|
||||
|
||||
private void OnDestinationSelected(EntityUid uid, FaxMachineComponent component, FaxDestinationMessage args)
|
||||
{
|
||||
SetDestination(uid, args.Address, component);
|
||||
@@ -352,7 +352,7 @@ public sealed class FaxSystem : EntitySystem
|
||||
|
||||
component.DestinationFaxAddress = null;
|
||||
component.KnownFaxes.Clear();
|
||||
|
||||
|
||||
var payload = new NetworkPayload()
|
||||
{
|
||||
{ DeviceNetworkConstants.Command, FaxConstants.FaxPingCommand }
|
||||
@@ -379,7 +379,7 @@ public sealed class FaxSystem : EntitySystem
|
||||
|
||||
if (component.DestinationFaxAddress == null)
|
||||
return;
|
||||
|
||||
|
||||
if (!component.KnownFaxes.TryGetValue(component.DestinationFaxAddress, out var faxName))
|
||||
return;
|
||||
|
||||
@@ -398,9 +398,9 @@ public sealed class FaxSystem : EntitySystem
|
||||
_adminLogger.Add(LogType.Action, LogImpact.Low, $"{(sender != null ? ToPrettyString(sender.Value) : "Unknown"):user} sent fax from \"{component.FaxName}\" {ToPrettyString(uid)} to {faxName} ({component.DestinationFaxAddress}): {paper.Content}");
|
||||
|
||||
component.SendTimeoutRemaining += component.SendTimeout;
|
||||
|
||||
|
||||
_audioSystem.PlayPvs(component.SendSound, uid);
|
||||
|
||||
|
||||
UpdateUserInterface(uid, component);
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ public sealed class FaxSystem : EntitySystem
|
||||
if (fromAddress != null && component.KnownFaxes.ContainsKey(fromAddress)) // If message received from unknown for fax address
|
||||
faxName = component.KnownFaxes[fromAddress];
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("fax-machine-popup-received", ("from", faxName)), uid, Filter.Pvs(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("fax-machine-popup-received", ("from", faxName)), uid);
|
||||
_appearanceSystem.SetData(uid, FaxMachineVisuals.VisualState, FaxMachineVisualState.Printing);
|
||||
|
||||
if (component.NotifyAdmins)
|
||||
|
||||
@@ -53,7 +53,7 @@ public sealed class SpraySystem : EntitySystem
|
||||
if (solution.CurrentVolume <= 0)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("spray-component-is-empty-message"), uid,
|
||||
Filter.Entities(args.User));
|
||||
args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,13 +54,13 @@ namespace Content.Server.Forensics
|
||||
|
||||
if (component.Used)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-pad-already-used"), args.Target.Value, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-pad-already-used"), args.Target.Value, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_inventory.TryGetSlotEntity(args.Target.Value, "gloves", out var gloves))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-pad-gloves", ("target", Identity.Entity(args.Target.Value, EntityManager))), args.Target.Value, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-pad-gloves", ("target", Identity.Entity(args.Target.Value, EntityManager))), args.Target.Value, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -68,8 +68,8 @@ namespace Content.Server.Forensics
|
||||
{
|
||||
if (args.User != args.Target)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-pad-start-scan-user", ("target", Identity.Entity(args.Target.Value, EntityManager))), args.Target.Value, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-pad-start-scan-target", ("user", Identity.Entity(args.User, EntityManager))), args.Target.Value, Filter.Entities(args.Target.Value));
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-pad-start-scan-user", ("target", Identity.Entity(args.Target.Value, EntityManager))), args.Target.Value, args.User);
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-pad-start-scan-target", ("user", Identity.Entity(args.User, EntityManager))), args.Target.Value, args.Target.Value);
|
||||
}
|
||||
StartScan(args.User, args.Target.Value, component, fingerprint.Fingerprint);
|
||||
return;
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace Content.Server.Forensics
|
||||
if (fiber == pad.Sample)
|
||||
{
|
||||
_audioSystem.PlayPvs(component.SoundMatch, uid);
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-scanner-match-fiber"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-scanner-match-fiber"), uid, args.User);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -155,13 +155,13 @@ namespace Content.Server.Forensics
|
||||
if (fingerprint == pad.Sample)
|
||||
{
|
||||
_audioSystem.PlayPvs(component.SoundMatch, uid);
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-scanner-match-fingerprint"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-scanner-match-fingerprint"), uid, args.User);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_audioSystem.PlayPvs(component.SoundNoMatch, uid);
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-scanner-match-none"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-scanner-match-none"), uid, args.User);
|
||||
}
|
||||
|
||||
private void OnBeforeActivatableUIOpen(EntityUid uid, ForensicScannerComponent component, BeforeActivatableUIOpenEvent args)
|
||||
@@ -193,7 +193,7 @@ namespace Content.Server.Forensics
|
||||
{
|
||||
// This shouldn't occur due to the UI guarding against it, but
|
||||
// if it does, tell the user why nothing happened.
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-scanner-printer-not-ready"), uid, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-scanner-printer-not-ready"), uid, user);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem
|
||||
|
||||
var percent = GetInfectedPercentage(out var num);
|
||||
if (num.Count == 1) //only one human left. spooky
|
||||
_popup.PopupEntity(Loc.GetString("zombie-alone"), num[0], Filter.Entities(num[0]));
|
||||
_popup.PopupEntity(Loc.GetString("zombie-alone"), num[0], num[0]);
|
||||
if (percent >= 1) //oops, all zombies
|
||||
_roundEndSystem.EndRound();
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Content.Server.Guardian
|
||||
|
||||
if (!HasComp<GuardianHostComponent>(host)) return;
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-available"), host, Filter.Entities(host));
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-available"), host, host);
|
||||
}
|
||||
|
||||
private void OnHostInit(EntityUid uid, GuardianHostComponent component, ComponentInit args)
|
||||
@@ -102,7 +102,8 @@ namespace Content.Server.Guardian
|
||||
if (args.Cancelled || args.Target != component.Host)
|
||||
return;
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString("guardian-attack-host"), Filter.Entities(uid), PopupType.LargeCaution);
|
||||
// why is this server side code? This should be in shared
|
||||
_popupSystem.PopupCursor(Loc.GetString("guardian-attack-host"), uid, PopupType.LargeCaution);
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
@@ -147,22 +148,21 @@ namespace Content.Server.Guardian
|
||||
{
|
||||
if (component.Used)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-activator-empty-invalid-creation"), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-activator-empty-invalid-creation"), user, user);
|
||||
return;
|
||||
}
|
||||
|
||||
// Can only inject things with the component...
|
||||
if (!HasComp<CanHostGuardianComponent>(target))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-activator-invalid-target"), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-activator-invalid-target"), user, user);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// If user is already a host don't duplicate.
|
||||
if (HasComp<GuardianHostComponent>(target))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-already-present-invalid-creation"), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-already-present-invalid-creation"), user, user);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -204,9 +204,9 @@ namespace Content.Server.Guardian
|
||||
{
|
||||
guardianComponent.Host = ev.Target;
|
||||
|
||||
SoundSystem.Play("/Audio/Effects/guardian_inject.ogg", Filter.Entities(ev.Target), ev.Target);
|
||||
SoundSystem.Play("/Audio/Effects/guardian_inject.ogg", Filter.Pvs(ev.Target), ev.Target);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-created"), ev.Target, Filter.Entities(ev.Target));
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-created"), ev.Target, ev.Target);
|
||||
// Exhaust the activator
|
||||
comp.Used = true;
|
||||
}
|
||||
@@ -226,8 +226,8 @@ namespace Content.Server.Guardian
|
||||
|
||||
if (args.CurrentMobState.IsCritical())
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-critical-warn"), component.HostedGuardian.Value, Filter.Entities(component.HostedGuardian.Value));
|
||||
SoundSystem.Play("/Audio/Effects/guardian_warn.ogg", Filter.Entities(component.HostedGuardian.Value), component.HostedGuardian.Value);
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-critical-warn"), component.HostedGuardian.Value, component.HostedGuardian.Value);
|
||||
SoundSystem.Play("/Audio/Effects/guardian_warn.ogg", Filter.Pvs(component.HostedGuardian.Value), component.HostedGuardian.Value);
|
||||
}
|
||||
else if (args.CurrentMobState.IsDead())
|
||||
{
|
||||
@@ -244,7 +244,7 @@ namespace Content.Server.Guardian
|
||||
if (args.DamageDelta == null) return;
|
||||
|
||||
_damageSystem.TryChangeDamage(component.Host, args.DamageDelta * component.DamageShare, origin: args.Origin);
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-entity-taking-damage"), component.Host, Filter.Entities(component.Host));
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-entity-taking-damage"), component.Host, component.Host);
|
||||
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ namespace Content.Server.Guardian
|
||||
|
||||
if (!CanRelease(hostComponent, guardianComponent))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-no-soul"), hostComponent.Owner, Filter.Entities(hostComponent.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-no-soul"), hostComponent.Owner, hostComponent.Owner);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ namespace Content.Server.Guardian
|
||||
|
||||
hostComponent.GuardianContainer.Insert(guardianComponent.Owner);
|
||||
DebugTools.Assert(hostComponent.GuardianContainer.Contains(guardianComponent.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-entity-recall"), hostComponent.Owner, Filter.Pvs(hostComponent.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("guardian-entity-recall"), hostComponent.Owner);
|
||||
guardianComponent.GuardianLoose = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace Content.Server.Hands.Systems
|
||||
if (!_inventorySystem.TryGetSlotEntity(plyEnt, equipmentSlot, out var slotEntity) ||
|
||||
!TryComp(slotEntity, out ServerStorageComponent? storageComponent))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("hands-system-missing-equipment-slot", ("slotName", equipmentSlot)), plyEnt, Filter.SinglePlayer(session));
|
||||
_popupSystem.PopupEntity(Loc.GetString("hands-system-missing-equipment-slot", ("slotName", equipmentSlot)), plyEnt, session);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ namespace Content.Server.Hands.Systems
|
||||
{
|
||||
if (storageComponent.StoredEntities.Count == 0)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("hands-system-empty-equipment-slot", ("slotName", equipmentSlot)), plyEnt, Filter.SinglePlayer(session));
|
||||
_popupSystem.PopupEntity(Loc.GetString("hands-system-empty-equipment-slot", ("slotName", equipmentSlot)), plyEnt, session);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -81,8 +81,7 @@ public sealed class ImmovableRodSystem : EntitySystem
|
||||
{
|
||||
// oh god.
|
||||
var coords = Transform(uid).Coordinates;
|
||||
_popup.PopupCoordinates(Loc.GetString("immovable-rod-collided-rod-not-good"), coords,
|
||||
Filter.Pvs(uid), PopupType.LargeCaution);
|
||||
_popup.PopupCoordinates(Loc.GetString("immovable-rod-collided-rod-not-good"), coords, PopupType.LargeCaution);
|
||||
|
||||
Del(uid);
|
||||
Del(ent);
|
||||
@@ -96,8 +95,7 @@ public sealed class ImmovableRodSystem : EntitySystem
|
||||
{
|
||||
component.MobCount++;
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("immovable-rod-penetrated-mob", ("rod", uid), ("mob", ent)), uid,
|
||||
Filter.Pvs(uid), PopupType.LargeCaution);
|
||||
_popup.PopupEntity(Loc.GetString("immovable-rod-penetrated-mob", ("rod", uid), ("mob", ent)), uid, PopupType.LargeCaution);
|
||||
_bodySystem.GibBody(ent, body: body);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Threading;
|
||||
using System.Threading;
|
||||
using Content.Server.DoAfter;
|
||||
using Content.Server.Guardian;
|
||||
using Content.Server.Popups;
|
||||
@@ -84,10 +84,10 @@ public sealed partial class ImplanterSystem : SharedImplanterSystem
|
||||
/// <param name="implanter">The implanter being used</param>
|
||||
public void TryImplant(ImplanterComponent component, EntityUid user, EntityUid target, EntityUid implanter)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-injecting-user"), target, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-injecting-user"), target, user);
|
||||
|
||||
var userName = Identity.Entity(user, EntityManager);
|
||||
_popup.PopupEntity(Loc.GetString("implanter-component-implanting-target", ("user", userName)), user, Filter.Entities(target), PopupType.LargeCaution);
|
||||
_popup.PopupEntity(Loc.GetString("implanter-component-implanting-target", ("user", userName)), user, target, PopupType.LargeCaution);
|
||||
|
||||
component.CancelToken?.Cancel();
|
||||
component.CancelToken = new CancellationTokenSource();
|
||||
@@ -113,7 +113,7 @@ public sealed partial class ImplanterSystem : SharedImplanterSystem
|
||||
//TODO: Remove when surgery is in
|
||||
public void TryDraw(ImplanterComponent component, EntityUid user, EntityUid target, EntityUid implanter)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-injecting-user"), target, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString("injector-component-injecting-user"), target, user);
|
||||
|
||||
component.CancelToken?.Cancel();
|
||||
component.CancelToken = new CancellationTokenSource();
|
||||
|
||||
@@ -37,7 +37,7 @@ public sealed class SwappableInstrumentSystem : EntitySystem
|
||||
{
|
||||
_sharedInstrument.SetInstrumentProgram(instrument, entry.Value.Item1, entry.Value.Item2);
|
||||
_popup.PopupEntity(Loc.GetString("swappable-instrument-component-style-set", ("style", entry.Key)),
|
||||
args.User, Filter.Entities(args.User));
|
||||
args.User, args.User);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -68,11 +68,11 @@ public sealed class InteractionPopupSystem : EntitySystem
|
||||
{
|
||||
string msgOthers = Loc.GetString(component.MessagePerceivedByOthers,
|
||||
("user", Identity.Entity(args.User, EntityManager)), ("target", Identity.Entity(uid, EntityManager)));
|
||||
_popupSystem.PopupEntity(msg, uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(msgOthers, uid, Filter.Pvs(uid, 2F, EntityManager).RemoveWhereAttachedEntity(puid => puid == args.User));
|
||||
_popupSystem.PopupEntity(msg, uid, args.User);
|
||||
_popupSystem.PopupEntity(msgOthers, uid, Filter.PvsExcept(args.User, entityManager: EntityManager), true);
|
||||
}
|
||||
else
|
||||
_popupSystem.PopupEntity(msg, uid, Filter.Entities(args.User)); //play only for the initiating entity.
|
||||
_popupSystem.PopupEntity(msg, uid, args.User); //play only for the initiating entity.
|
||||
|
||||
if (sfx is not null) //not all cases will have sound.
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
return;
|
||||
|
||||
if (component.PrototypesToSpawn?.Count > 0) {
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-knife-needed"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-knife-needed"), uid, args.User);
|
||||
args.Handled = true;
|
||||
}
|
||||
}
|
||||
@@ -124,8 +124,7 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
|
||||
UpdateAppearance(uid, null, component);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-kill", ("user", Identity.Entity(userUid, EntityManager)), ("victim", victimUid)), uid,
|
||||
Filter.Pvs(userUid), PopupType.LargeCaution);
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-kill", ("user", Identity.Entity(userUid, EntityManager)), ("victim", victimUid)), uid, PopupType.LargeCaution);
|
||||
|
||||
// THE WHAT?
|
||||
// TODO: Need to be able to leave them on the spike to do DoT, see ss13.
|
||||
@@ -154,12 +153,12 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
|
||||
if (component.PrototypesToSpawn.Count != 0)
|
||||
{
|
||||
_popupSystem.PopupEntity(component.MeatSource1p, uid, Filter.Entities(user), PopupType.MediumCaution);
|
||||
_popupSystem.PopupEntity(component.MeatSource1p, uid, user, PopupType.MediumCaution);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateAppearance(uid, null, component);
|
||||
_popupSystem.PopupEntity(component.MeatSource0, uid, Filter.Entities(user), PopupType.MediumCaution);
|
||||
_popupSystem.PopupEntity(component.MeatSource0, uid, user, PopupType.MediumCaution);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -181,13 +180,13 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
|
||||
if (component.PrototypesToSpawn?.Count > 0)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-collect", ("this", uid)), uid, Filter.Entities(userUid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-collect", ("this", uid)), uid, userUid);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Resolve(victimUid, ref butcherable, false))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, Filter.Entities(userUid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, userUid);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -196,10 +195,10 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
case ButcheringType.Spike:
|
||||
return true;
|
||||
case ButcheringType.Knife:
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher-knife", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, Filter.Entities(userUid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher-knife", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, userUid);
|
||||
return false;
|
||||
default:
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, Filter.Entities(userUid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, userUid);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -217,14 +216,13 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
!mobState.IsDead())
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-not-dead", ("victim", Identity.Entity(victimUid, EntityManager))),
|
||||
victimUid, Filter.Entities(userUid));
|
||||
victimUid, userUid);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (userUid != victimUid)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-begin-hook-victim", ("user", Identity.Entity(userUid, EntityManager)), ("this", uid)), victimUid,
|
||||
Filter.Entities(victimUid), PopupType.LargeCaution);
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-begin-hook-victim", ("user", Identity.Entity(userUid, EntityManager)), ("this", uid)), victimUid, victimUid, PopupType.LargeCaution);
|
||||
}
|
||||
// TODO: make it work when SuicideEvent is implemented
|
||||
// else
|
||||
|
||||
@@ -210,8 +210,8 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
? Loc.GetString("microwave-component-suicide-multi-head-message")
|
||||
: Loc.GetString("microwave-component-suicide-message");
|
||||
|
||||
_popupSystem.PopupEntity(othersMessage, victim, Filter.PvsExcept(victim));
|
||||
_popupSystem.PopupEntity(selfMessage, victim, Filter.Entities(victim));
|
||||
_popupSystem.PopupEntity(othersMessage, victim, Filter.PvsExcept(victim), true);
|
||||
_popupSystem.PopupEntity(selfMessage, victim, victim);
|
||||
|
||||
_audio.PlayPvs(component.ClickSound, uid, AudioParams.Default.WithVolume(-2));
|
||||
component.CurrentCookTimerTime = 10;
|
||||
@@ -230,19 +230,19 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
return;
|
||||
if (!(TryComp<ApcPowerReceiverComponent>(uid, out var apc) && apc.Powered))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("microwave-component-interact-using-no-power"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("microwave-component-interact-using-no-power"), uid, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.Broken)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("microwave-component-interact-using-broken"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("microwave-component-interact-using-broken"), uid, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!HasComp<ItemComponent>(args.Used))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("microwave-component-interact-using-transfer-fail"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("microwave-component-interact-using-transfer-fail"), uid, args.User);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
if (!HasComp<FitsInDispenserComponent>(heldEnt))
|
||||
{
|
||||
// This is ugly but we can't use whitelistFailPopup because there are 2 containers with different whitelists.
|
||||
_popupSystem.PopupEntity(Loc.GetString("reagent-grinder-component-cannot-put-entity-message"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("reagent-grinder-component-cannot-put-entity-message"), uid, args.User);
|
||||
}
|
||||
|
||||
// Entity did NOT pass the whitelist for grind/juice.
|
||||
|
||||
@@ -107,7 +107,7 @@ public sealed class SharpSystem : EntitySystem
|
||||
popupType = PopupType.LargeCaution;
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("butcherable-knife-butchered-success", ("target", ev.Entity), ("knife", ev.Sharp)),
|
||||
popupEnt, Filter.Entities(ev.User), popupType);
|
||||
popupEnt, ev.User, popupType);
|
||||
|
||||
if (hasBody)
|
||||
_bodySystem.GibBody(body!.Owner, body: body);
|
||||
|
||||
@@ -45,9 +45,9 @@ namespace Content.Server.Labels
|
||||
{
|
||||
Act = () =>
|
||||
{
|
||||
AddLabelTo(uid, handLabeler, target, out string? result);
|
||||
AddLabelTo(uid, handLabeler, target, out var result);
|
||||
if (result != null)
|
||||
_popupSystem.PopupEntity(result, args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(result, args.User, args.User);
|
||||
},
|
||||
Text = labelerText
|
||||
};
|
||||
@@ -62,7 +62,7 @@ namespace Content.Server.Labels
|
||||
AddLabelTo(uid, handLabeler, target, out string? result);
|
||||
if (result == null)
|
||||
return;
|
||||
_popupSystem.PopupEntity(result, args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(result, args.User, args.User);
|
||||
|
||||
// Log labeling
|
||||
_adminLogger.Add(LogType.Action, LogImpact.Low,
|
||||
|
||||
@@ -35,7 +35,7 @@ public sealed class LandMineSystem : EntitySystem
|
||||
_popupSystem.PopupCoordinates(
|
||||
Loc.GetString("land-mine-triggered", ("mine", uid)),
|
||||
Transform(uid).Coordinates,
|
||||
Filter.Entities(args.Tripper),
|
||||
args.Tripper,
|
||||
PopupType.LargeCaution);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
!TryComp(component.Owner, out battery))
|
||||
{
|
||||
SoundSystem.Play(component.TurnOnFailSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner);
|
||||
_popup.PopupEntity(Loc.GetString("handheld-light-component-cell-missing-message"), component.Owner, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString("handheld-light-component-cell-missing-message"), component.Owner, user);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
if (component.Wattage > battery.CurrentCharge)
|
||||
{
|
||||
SoundSystem.Play(component.TurnOnFailSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner);
|
||||
_popup.PopupEntity(Loc.GetString("handheld-light-component-cell-dead-message"), component.Owner, Filter.Entities(user));
|
||||
_popup.PopupEntity(Loc.GetString("handheld-light-component-cell-dead-message"), component.Owner, user);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
{
|
||||
var msg = Loc.GetString("comp-light-replacer-missing-light",
|
||||
("light-replacer", replacer.Owner));
|
||||
_popupSystem.PopupEntity(msg, replacerUid, Filter.Entities(userUid.Value));
|
||||
_popupSystem.PopupEntity(msg, replacerUid, userUid.Value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -157,7 +157,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
if (showTooltip && userUid != null)
|
||||
{
|
||||
var msg = Loc.GetString("comp-light-replacer-insert-broken-light");
|
||||
_popupSystem.PopupEntity(msg, replacerUid, Filter.Entities(userUid.Value));
|
||||
_popupSystem.PopupEntity(msg, replacerUid, userUid.Value);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -169,7 +169,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
{
|
||||
var msg = Loc.GetString("comp-light-replacer-insert-light",
|
||||
("light-replacer", replacer.Owner), ("bulb", bulb.Owner));
|
||||
_popupSystem.PopupEntity(msg, replacerUid, Filter.Entities(userUid.Value), PopupType.Medium);
|
||||
_popupSystem.PopupEntity(msg, replacerUid, userUid.Value, PopupType.Medium);
|
||||
}
|
||||
|
||||
return hasInsert;
|
||||
@@ -208,7 +208,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
if (insertedBulbs > 0 && userUid != null)
|
||||
{
|
||||
var msg = Loc.GetString("comp-light-replacer-refill-from-storage", ("light-replacer", storage.Owner));
|
||||
_popupSystem.PopupEntity(msg, replacerUid, Filter.Entities(userUid.Value), PopupType.Medium);
|
||||
_popupSystem.PopupEntity(msg, replacerUid, userUid.Value, PopupType.Medium);
|
||||
}
|
||||
|
||||
return insertedBulbs > 0;
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
{
|
||||
// apply damage to users hands and show message with sound
|
||||
var burnMsg = Loc.GetString("powered-light-component-burn-hand");
|
||||
_popupSystem.PopupEntity(burnMsg, uid, Filter.Entities(userUid));
|
||||
_popupSystem.PopupEntity(burnMsg, uid, userUid);
|
||||
|
||||
var damage = _damageableSystem.TryChangeDamage(userUid, light.Damage, origin: userUid);
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Content.Server.Lock
|
||||
if (component.Locked)
|
||||
{
|
||||
if (!args.Silent)
|
||||
_sharedPopupSystem.PopupEntity(Loc.GetString("entity-storage-component-locked-message"), uid, Filter.Pvs(uid));
|
||||
_sharedPopupSystem.PopupEntity(Loc.GetString("entity-storage-component-locked-message"), uid);
|
||||
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ using Robust.Shared.Player;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Content.Shared.MachineLinking.Events;
|
||||
using Content.Server.Database;
|
||||
|
||||
namespace Content.Server.MachineLinking.System
|
||||
{
|
||||
@@ -89,7 +90,7 @@ namespace Content.Server.MachineLinking.System
|
||||
var msg = TryLinkDefaults(uid, linker.SavedTransmitter.Value, args.User, component)
|
||||
? Loc.GetString("signal-linking-verb-success", ("machine", linker.SavedTransmitter.Value))
|
||||
: Loc.GetString("signal-linking-verb-fail", ("machine", linker.SavedTransmitter.Value));
|
||||
_popupSystem.PopupEntity(msg, uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(msg, uid, args.User);
|
||||
};
|
||||
return;
|
||||
}
|
||||
@@ -121,7 +122,7 @@ namespace Content.Server.MachineLinking.System
|
||||
var msg = TryLinkDefaults(linker.SavedReceiver.Value, uid, args.User, null, component)
|
||||
? Loc.GetString("signal-linking-verb-success", ("machine", linker.SavedReceiver.Value))
|
||||
: Loc.GetString("signal-linking-verb-fail", ("machine", linker.SavedReceiver.Value));
|
||||
_popupSystem.PopupEntity(msg, uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(msg, uid, args.User);
|
||||
};
|
||||
return;
|
||||
}
|
||||
@@ -213,7 +214,7 @@ namespace Content.Server.MachineLinking.System
|
||||
if (!TryComp(linker.SavedReceiver, out SignalReceiverComponent? receiver))
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("signal-linker-component-saved", ("machine", uid)),
|
||||
Filter.Entities(args.User), PopupType.Medium);
|
||||
args.User, PopupType.Medium);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
@@ -239,7 +240,7 @@ namespace Content.Server.MachineLinking.System
|
||||
if (!TryComp(linker.SavedTransmitter, out SignalTransmitterComponent? transmitter))
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("signal-linker-component-saved", ("machine", uid)),
|
||||
Filter.Entities(args.User), PopupType.Medium);
|
||||
args.User, PopupType.Medium);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
@@ -287,8 +288,7 @@ namespace Content.Server.MachineLinking.System
|
||||
!receiver.Inputs.TryGetValue(args.ReceiverPort, out var linkedTransmitters))
|
||||
return false;
|
||||
|
||||
// Accounts for possibly missing user & the quiet option.
|
||||
var alertFilter = (!quiet && user != null) ? Filter.Entities(user.Value) : null;
|
||||
quiet |= !user.HasValue;
|
||||
|
||||
// Does the link already exist? Under the assumption that nothing has broken, lets only check the
|
||||
// transmitter ports.
|
||||
@@ -300,9 +300,8 @@ namespace Content.Server.MachineLinking.System
|
||||
|
||||
if (checkRange && !IsInRange(transmitter, receiver))
|
||||
{
|
||||
if (alertFilter != null)
|
||||
_popupSystem.PopupCursor(Loc.GetString("signal-linker-component-out-of-range"),
|
||||
alertFilter);
|
||||
if (!quiet)
|
||||
_popupSystem.PopupCursor(Loc.GetString("signal-linker-component-out-of-range"), user!.Value);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -311,27 +310,25 @@ namespace Content.Server.MachineLinking.System
|
||||
RaiseLocalEvent(transmitter.Owner, linkAttempt, true);
|
||||
if (linkAttempt.Cancelled)
|
||||
{
|
||||
if (alertFilter != null)
|
||||
_popupSystem.PopupCursor(Loc.GetString("signal-linker-component-connection-refused", ("machine", transmitter.Owner)),
|
||||
alertFilter);
|
||||
if (!quiet)
|
||||
_popupSystem.PopupCursor(Loc.GetString("signal-linker-component-connection-refused", ("machine", transmitter.Owner)), user!.Value);
|
||||
return false;
|
||||
}
|
||||
RaiseLocalEvent(receiver.Owner, linkAttempt, true);
|
||||
if (linkAttempt.Cancelled)
|
||||
{
|
||||
if (alertFilter != null)
|
||||
_popupSystem.PopupCursor(Loc.GetString("signal-linker-component-connection-refused", ("machine", receiver.Owner)),
|
||||
alertFilter);
|
||||
if (!quiet)
|
||||
_popupSystem.PopupCursor(Loc.GetString("signal-linker-component-connection-refused", ("machine", receiver.Owner)), user!.Value);
|
||||
return false;
|
||||
}
|
||||
|
||||
linkedReceivers.Add(new(receiver.Owner, args.ReceiverPort));
|
||||
linkedTransmitters.Add(new(transmitter.Owner, args.TransmitterPort));
|
||||
if (alertFilter != null)
|
||||
if (!quiet)
|
||||
_popupSystem.PopupCursor(Loc.GetString("signal-linker-component-linked-port",
|
||||
("machine1", transmitter.Owner), ("port1", PortName<TransmitterPortPrototype>(args.TransmitterPort)),
|
||||
("machine2", receiver.Owner), ("port2", PortName<ReceiverPortPrototype>(args.ReceiverPort))),
|
||||
alertFilter, PopupType.Medium);
|
||||
user!.Value, PopupType.Medium);
|
||||
|
||||
var newLink = new NewLinkEvent(user, transmitter.Owner, args.TransmitterPort, receiver.Owner, args.ReceiverPort);
|
||||
RaiseLocalEvent(receiver.Owner, newLink);
|
||||
@@ -362,7 +359,7 @@ namespace Content.Server.MachineLinking.System
|
||||
_popupSystem.PopupCursor(Loc.GetString("signal-linker-component-unlinked-port",
|
||||
("machine1", transmitter.Owner), ("port1", PortName<TransmitterPortPrototype>(args.TransmitterPort)),
|
||||
("machine2", receiver.Owner), ("port2", PortName<ReceiverPortPrototype>(args.ReceiverPort))),
|
||||
Filter.Entities(attached), PopupType.Medium);
|
||||
attached, PopupType.Medium);
|
||||
}
|
||||
else
|
||||
{ // something weird happened
|
||||
|
||||
@@ -23,7 +23,7 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
|
||||
return false;
|
||||
_audio.PlayPvs(component.InsertingSound, component.Owner);
|
||||
_popup.PopupEntity(Loc.GetString("machine-insert-item", ("user", user), ("machine", component.Owner),
|
||||
("item", toInsert)), component.Owner, Filter.Pvs(component.Owner));
|
||||
("item", toInsert)), component.Owner);
|
||||
QueueDel(toInsert);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public sealed class MechEquipmentSystem : EntitySystem
|
||||
if (mechComp.EquipmentWhitelist != null && !mechComp.EquipmentWhitelist.IsValid(uid))
|
||||
return;
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("mech-equipment-begin-install", ("item", uid)), mech, Filter.Pvs(mech));
|
||||
_popup.PopupEntity(Loc.GetString("mech-equipment-begin-install", ("item", uid)), mech);
|
||||
|
||||
component.TokenSource = new();
|
||||
_doAfter.DoAfter(new DoAfterEventArgs(args.User, component.InstallDuration, component.TokenSource.Token, mech, uid)
|
||||
@@ -64,7 +64,7 @@ public sealed class MechEquipmentSystem : EntitySystem
|
||||
private void OnFinished(EntityUid uid, MechEquipmentComponent component, MechEquipmentInstallFinished args)
|
||||
{
|
||||
component.TokenSource = null;
|
||||
_popup.PopupEntity(Loc.GetString("mech-equipment-finish-install", ("item", uid)), args.Mech, Filter.Pvs(args.Mech));
|
||||
_popup.PopupEntity(Loc.GetString("mech-equipment-finish-install", ("item", uid)), args.Mech);
|
||||
_mech.InsertEquipment(args.Mech, uid);
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace Content.Server.Medical.BiomassReclaimer
|
||||
if (TryComp<ApcPowerReceiverComponent>(uid, out var power) && !power.Powered)
|
||||
return;
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("biomass-reclaimer-suicide-others", ("victim", args.Victim)), uid, Filter.Pvs(uid), PopupType.LargeCaution);
|
||||
_popup.PopupEntity(Loc.GetString("biomass-reclaimer-suicide-others", ("victim", args.Victim)), uid, PopupType.LargeCaution);
|
||||
StartProcessing(args.Victim, component);
|
||||
args.SetHandled(SuicideKind.Blunt);
|
||||
}
|
||||
|
||||
@@ -81,11 +81,11 @@ namespace Content.Server.Medical
|
||||
if (args.User == args.Target)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("disease-scanner-gave-self", ("disease", args.Component.Disease)),
|
||||
args.User, Filter.Entities(args.User));
|
||||
args.User, args.User);
|
||||
return;
|
||||
}
|
||||
_popupSystem.PopupEntity(Loc.GetString("disease-scanner-gave-other", ("target", Identity.Entity(args.Target.Value, EntityManager)), ("disease", args.Component.Disease)),
|
||||
args.User, Filter.Entities(args.User));
|
||||
args.User, args.User);
|
||||
}
|
||||
|
||||
private void OpenUserInterface(EntityUid user, HealthAnalyzerComponent healthAnalyzer)
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace Content.Server.Medical
|
||||
/// The mob check seems a bit redundant but (1) they could conceivably have lost it since when the doafter started and (2) I need it for .IsDead()
|
||||
if (!HasComp<RespiratorComponent>(target) || !TryComp<MobStateComponent>(target, out var mobState) || mobState.IsDead())
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("stethoscope-dead"), target, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("stethoscope-dead"), target, user);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace Content.Server.Medical
|
||||
|
||||
var message = GetDamageMessage(value);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString(message), target, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString(message), target, user);
|
||||
}
|
||||
|
||||
private string GetDamageMessage(FixedPoint2 totalOxyloss)
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace Content.Server.Medical.SuitSensors
|
||||
if (userUid != null)
|
||||
{
|
||||
var msg = Loc.GetString("suit-sensor-mode-state", ("mode", GetModeName(mode)));
|
||||
_popupSystem.PopupEntity(msg, uid, Filter.Entities(userUid.Value));
|
||||
_popupSystem.PopupEntity(msg, uid, userUid.Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Content.Server.Medical
|
||||
|
||||
SoundSystem.Play("/Audio/Effects/Fluids/splat.ogg", Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.2f).WithVolume(-4f));
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("disease-vomit", ("person", Identity.Entity(uid, EntityManager))), uid, Filter.Pvs(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("disease-vomit", ("person", Identity.Entity(uid, EntityManager))), uid);
|
||||
// Get the solution of the puddle we spawned
|
||||
if (!_solutionSystem.TryGetSolution(puddle, puddleComp.SolutionName, out var puddleSolution))
|
||||
return;
|
||||
|
||||
@@ -140,13 +140,13 @@ public sealed class CrematoriumSystem : EntitySystem
|
||||
|
||||
if (mind.OwnedEntity is { Valid: true } entity)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("crematorium-entity-storage-component-suicide-message"), entity, Filter.Pvs(entity));
|
||||
_popup.PopupEntity(Loc.GetString("crematorium-entity-storage-component-suicide-message"), entity);
|
||||
}
|
||||
}
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("crematorium-entity-storage-component-suicide-message-others",
|
||||
("victim", Identity.Entity(victim, EntityManager))),
|
||||
victim, Filter.PvsExcept(victim), PopupType.LargeCaution);
|
||||
victim, Filter.PvsExcept(victim), true, PopupType.LargeCaution);
|
||||
|
||||
if (_entityStorage.CanInsert(uid))
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ public sealed class MousetrapSystem : EntitySystem
|
||||
? Loc.GetString("mousetrap-on-activate")
|
||||
: Loc.GetString("mousetrap-on-deactivate"),
|
||||
uid,
|
||||
Filter.Entities(args.User));
|
||||
args.User);
|
||||
|
||||
UpdateVisuals(uid);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public sealed class MedibotInjectOperator : HTNOperator
|
||||
if (damage.TotalDamage >= MedibotComponent.EmergencyMedDamageThreshold)
|
||||
{
|
||||
_solutionSystem.TryAddReagent(target, injectable, botComp.EmergencyMed, botComp.EmergencyMedInjectAmount, out var accepted);
|
||||
_popupSystem.PopupEntity(Loc.GetString("hypospray-component-feel-prick-message"), target, Filter.Entities(target));
|
||||
_popupSystem.PopupEntity(Loc.GetString("hypospray-component-feel-prick-message"), target, target);
|
||||
SoundSystem.Play("/Audio/Items/hypospray.ogg", Filter.Pvs(target), target);
|
||||
_chat.TrySendInGameICMessage(owner, Loc.GetString("medibot-finish-inject"), InGameICChatType.Speak, hideChat: false, hideGlobalGhostChat: true);
|
||||
return HTNOperatorStatus.Finished;
|
||||
@@ -77,7 +77,7 @@ public sealed class MedibotInjectOperator : HTNOperator
|
||||
if (damage.TotalDamage >= MedibotComponent.StandardMedDamageThreshold)
|
||||
{
|
||||
_solutionSystem.TryAddReagent(target, injectable, botComp.StandardMed, botComp.StandardMedInjectAmount, out var accepted);
|
||||
_popupSystem.PopupEntity(Loc.GetString("hypospray-component-feel-prick-message"), target, Filter.Entities(target));
|
||||
_popupSystem.PopupEntity(Loc.GetString("hypospray-component-feel-prick-message"), target, target);
|
||||
SoundSystem.Play("/Audio/Items/hypospray.ogg", Filter.Pvs(target), target);
|
||||
_chat.TrySendInGameICMessage(owner, Loc.GetString("medibot-finish-inject"), InGameICChatType.Speak, hideChat: false, hideGlobalGhostChat: true);
|
||||
return HTNOperatorStatus.Finished;
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace Content.Server.Nuke
|
||||
if (component.Status == NukeStatus.ARMED)
|
||||
{
|
||||
var msg = Loc.GetString("nuke-component-cant-anchor");
|
||||
_popups.PopupEntity(msg, uid, Filter.Entities(args.User));
|
||||
_popups.PopupEntity(msg, uid, args.User);
|
||||
|
||||
args.Cancel();
|
||||
}
|
||||
@@ -591,7 +591,7 @@ namespace Content.Server.Nuke
|
||||
|
||||
_doAfterSystem.DoAfter(doafter);
|
||||
_popups.PopupEntity(Loc.GetString("nuke-component-doafter-warning"), user,
|
||||
Filter.Entities(user), PopupType.LargeCaution);
|
||||
user, PopupType.LargeCaution);
|
||||
}
|
||||
|
||||
private void NukeArmedAudio(NukeComponent component)
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
if (!drink.Opened)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("drink-component-try-use-drink-not-open",
|
||||
("owner", EntityManager.GetComponent<MetaDataComponent>(drink.Owner).EntityName)), drink.Owner, Filter.Entities(user));
|
||||
("owner", EntityManager.GetComponent<MetaDataComponent>(drink.Owner).EntityName)), drink.Owner, user);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
drinkSolution.DrainAvailable <= 0)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("drink-component-try-use-drink-is-empty",
|
||||
("entity", EntityManager.GetComponent<MetaDataComponent>(drink.Owner).EntityName)), drink.Owner, Filter.Entities(user));
|
||||
("entity", EntityManager.GetComponent<MetaDataComponent>(drink.Owner).EntityName)), drink.Owner, user);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
var userName = Identity.Entity(user, EntityManager);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("drink-component-force-feed", ("user", userName)),
|
||||
user, Filter.Entities(target));
|
||||
user, target);
|
||||
|
||||
// logging
|
||||
_adminLogger.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(user):user} is forcing {ToPrettyString(target):target} to drink {ToPrettyString(drink.Owner):drink} {SolutionContainerSystem.ToPrettyString(drinkSolution)}");
|
||||
@@ -308,7 +308,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
forceDrink ?
|
||||
Loc.GetString("drink-component-try-use-drink-cannot-drink-other") :
|
||||
Loc.GetString("drink-component-try-use-drink-had-enough"),
|
||||
uid, Filter.Entities(args.User));
|
||||
uid, args.User);
|
||||
|
||||
if (EntityManager.HasComponent<RefillableSolutionComponent>(uid))
|
||||
{
|
||||
@@ -327,12 +327,12 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
if (firstStomach == null)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("drink-component-try-use-drink-had-enough"),
|
||||
uid, Filter.Entities(uid));
|
||||
uid, uid);
|
||||
|
||||
if (forceDrink)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("drink-component-try-use-drink-had-enough-other"),
|
||||
uid, Filter.Entities(args.User));
|
||||
uid, args.User);
|
||||
_spillableSystem.SpillAt(uid, drained, "PuddleSmear");
|
||||
}
|
||||
else
|
||||
@@ -351,11 +351,11 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
var userName = Identity.Entity(args.User, EntityManager);
|
||||
|
||||
_popupSystem.PopupEntity(
|
||||
Loc.GetString("drink-component-force-feed-success", ("user", userName), ("flavors", flavors)), uid, Filter.Entities(uid));
|
||||
Loc.GetString("drink-component-force-feed-success", ("user", userName), ("flavors", flavors)), uid, uid);
|
||||
|
||||
_popupSystem.PopupEntity(
|
||||
Loc.GetString("drink-component-force-feed-success-user", ("target", targetName)),
|
||||
args.User, Filter.Entities(args.User));
|
||||
args.User, args.User);
|
||||
|
||||
// log successful forced drinking
|
||||
_adminLogger.Add(LogType.ForceFeed, LogImpact.Medium, $"{ToPrettyString(uid):user} forced {ToPrettyString(args.User):target} to drink {ToPrettyString(args.Drink.Owner):drink}");
|
||||
@@ -364,9 +364,9 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
{
|
||||
_popupSystem.PopupEntity(
|
||||
Loc.GetString("drink-component-try-use-drink-success-slurp-taste", ("flavors", flavors)), args.User,
|
||||
Filter.Entities(args.User));
|
||||
args.User);
|
||||
_popupSystem.PopupEntity(
|
||||
Loc.GetString("drink-component-try-use-drink-success-slurp"), args.User, Filter.PvsExcept(args.User));
|
||||
Loc.GetString("drink-component-try-use-drink-success-slurp"), args.User, Filter.PvsExcept(args.User), true);
|
||||
|
||||
// log successful voluntary drinking
|
||||
_adminLogger.Add(LogType.Ingestion, LogImpact.Low, $"{ToPrettyString(args.User):target} drank {ToPrettyString(args.Drink.Owner):drink}");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user