Visual popup types (#9523)
* Visual popup types * Pass over `PopupCoordinates` and `PopupCursor` * `PopupEntity` pass * Disease and reagent popup pass * COLOUR
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Server.Hands.Components;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Tools;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Audio;
|
||||
@@ -69,7 +70,8 @@ namespace Content.Server.AME
|
||||
else
|
||||
{
|
||||
component.JarSlot.Insert(args.Used);
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-controller-component-interact-using-success"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("ame-controller-component-interact-using-success"), uid,
|
||||
Filter.Entities(args.User), PopupType.Medium);
|
||||
component.UpdateUserInterface();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ using Content.Shared.Access;
|
||||
using Content.Shared.Access.Components;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.PDA;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
@@ -46,7 +47,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));
|
||||
transformComponent.Coordinates, Filter.Pvs(uid), PopupType.Medium);
|
||||
EntityManager.SpawnEntity("FoodBadRecipe",
|
||||
transformComponent.Coordinates);
|
||||
}
|
||||
@@ -63,7 +64,7 @@ namespace Content.Server.Access.Systems
|
||||
else
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("id-card-component-microwave-safe", ("id", uid)),
|
||||
uid, Filter.Pvs(uid));
|
||||
uid, Filter.Pvs(uid), PopupType.Medium);
|
||||
}
|
||||
|
||||
// Give them a wonderful new access to compensate for everything
|
||||
|
||||
@@ -34,6 +34,7 @@ using Content.Shared.MobState;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Movement.Components;
|
||||
using Content.Shared.Nutrition.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Tabletop.Components;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Server.GameObjects;
|
||||
@@ -109,8 +110,11 @@ public sealed partial class AdminVerbSystem
|
||||
EnsureComp<TabletopDraggableComponent>(args.Target);
|
||||
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));
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-chess-others", ("name", args.Target)), xform.Coordinates, Filter.Pvs(args.Target).RemoveWhereAttachedEntity(x => x == args.Target));
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-chess-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.Critical);
|
||||
_popupSystem.PopupCoordinates(
|
||||
Loc.GetString("admin-smite-chess-others", ("name", args.Target)), xform.Coordinates,
|
||||
Filter.PvsExcept(args.Target), PopupType.Critical);
|
||||
var board = Spawn("ChessBoard", xform.Coordinates);
|
||||
var session = _tabletopSystem.EnsureSession(Comp<TabletopGameComponent>(board));
|
||||
xform.Coordinates = EntityCoordinates.FromMap(_mapManager, session.Position);
|
||||
@@ -134,8 +138,10 @@ public sealed partial class AdminVerbSystem
|
||||
flammable.FireStacks = 99999.9f;
|
||||
_flammableSystem.Ignite(args.Target);
|
||||
var xform = Transform(args.Target);
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-set-alight-self"), args.Target, Filter.Entities(args.Target));
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-set-alight-others", ("name", args.Target)), xform.Coordinates, Filter.Pvs(args.Target).RemoveWhereAttachedEntity(x => x == args.Target));
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-set-alight-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.Critical);
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-set-alight-others", ("name", args.Target)), xform.Coordinates,
|
||||
Filter.PvsExcept(args.Target), PopupType.Critical);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = "Makes them burn.",
|
||||
@@ -252,8 +258,10 @@ 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));
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-remove-blood-others", ("name", args.Target)), xform.Coordinates, Filter.Pvs(args.Target).RemoveWhereAttachedEntity(x => x == args.Target));
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-remove-blood-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.Critical);
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-remove-blood-others", ("name", args.Target)), xform.Coordinates,
|
||||
Filter.PvsExcept(args.Target), PopupType.Critical);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = "Removes their blood. All of it.",
|
||||
@@ -283,8 +291,10 @@ public sealed partial class AdminVerbSystem
|
||||
xform.Coordinates = baseXform.Coordinates.Offset(_random.NextVector2(0.5f,0.75f));
|
||||
}
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-vomit-organs-self"), args.Target, Filter.Entities(args.Target));
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-vomit-organs-others", ("name", args.Target)), baseXform.Coordinates, Filter.Pvs(args.Target).RemoveWhereAttachedEntity(x => x == args.Target));
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-vomit-organs-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.Critical);
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-vomit-organs-others", ("name", args.Target)), baseXform.Coordinates,
|
||||
Filter.PvsExcept(args.Target), PopupType.Critical);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = "Causes them to vomit, including their internal organs.",
|
||||
@@ -304,8 +314,10 @@ public sealed partial class AdminVerbSystem
|
||||
body.RemovePart(part);
|
||||
Transform(part.Owner).Coordinates = baseXform.Coordinates;
|
||||
}
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-remove-hands-self"), args.Target, Filter.Entities(args.Target));
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-remove-hands-others", ("name", args.Target)), baseXform.Coordinates, Filter.Pvs(args.Target).RemoveWhereAttachedEntity(x => x == args.Target));
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-remove-hands-self"), args.Target,
|
||||
Filter.Entities(args.Target), PopupType.Critical);
|
||||
_popupSystem.PopupCoordinates(Loc.GetString("admin-smite-remove-hands-others", ("name", args.Target)), baseXform.Coordinates,
|
||||
Filter.PvsExcept(args.Target), PopupType.Medium);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = "Removes the target's hands.",
|
||||
@@ -482,7 +494,8 @@ 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));
|
||||
_popupSystem.PopupEntity(Loc.GetString("admin-smite-turned-ash-other", ("name", args.Target)), args.Target,
|
||||
Filter.Pvs(args.Target), PopupType.Critical);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = "Reduces the target to a small pile of ash.",
|
||||
|
||||
@@ -5,6 +5,7 @@ using Content.Server.DoAfter;
|
||||
using Content.Server.Nutrition.Components;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Nutrition.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
@@ -109,7 +110,8 @@ namespace Content.Server.Animals.Systems
|
||||
var split = _solutionContainerSystem.SplitSolution(uid, solution, quantity);
|
||||
_solutionContainerSystem.TryAddSolution(ev.ContainerUid, targetSolution, split);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("udder-system-success", ("amount", quantity), ("target", ev.ContainerUid)), uid, Filter.Entities(ev.UserUid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("udder-system-success", ("amount", quantity), ("target", ev.ContainerUid)), uid,
|
||||
Filter.Entities(ev.UserUid), PopupType.Medium);
|
||||
}
|
||||
|
||||
private void OnMilkingFailed(EntityUid uid, UdderComponent component, MilkingFailEvent ev)
|
||||
|
||||
@@ -5,6 +5,7 @@ using Content.Server.NodeContainer.Nodes;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Construction.Components;
|
||||
using Content.Shared.Popups;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
@@ -37,7 +38,8 @@ namespace Content.Server.Atmos.Piping.EntitySystems
|
||||
if ((pipe.Air.Pressure - environment.Pressure) > 2 * Atmospherics.OneAtmosphere)
|
||||
{
|
||||
args.Delay += 1.5f;
|
||||
_popupSystem.PopupCursor(Loc.GetString("comp-atmos-unsafe-unanchor-warning"), Filter.Entities(args.User));
|
||||
_popupSystem.PopupCursor(Loc.GetString("comp-atmos-unsafe-unanchor-warning"),
|
||||
Filter.Entities(args.User), PopupType.Large);
|
||||
return; // Show the warning only once.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ using Content.Server.Cooldown;
|
||||
using Content.Server.Bible.Components;
|
||||
using Content.Server.MobState;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Player;
|
||||
@@ -75,7 +76,8 @@ 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));
|
||||
_popupSystem.PopupEntity(Loc.GetString("bible-summon-respawn-ready", ("book", summonableComp.Owner)), summonableComp.Owner,
|
||||
Filter.Pvs(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;
|
||||
@@ -120,10 +122,10 @@ namespace Content.Server.Bible
|
||||
if (_random.Prob(component.FailChance))
|
||||
{
|
||||
var othersFailMessage = Loc.GetString(component.LocPrefix + "-heal-fail-others", ("user", args.User),("target", args.Target),("bible", uid));
|
||||
_popupSystem.PopupEntity(othersFailMessage, args.User, Filter.Pvs(args.User).RemoveWhereAttachedEntity(puid => puid == args.User));
|
||||
_popupSystem.PopupEntity(othersFailMessage, args.User, Filter.PvsExcept(args.User));
|
||||
|
||||
var selfFailMessage = Loc.GetString(component.LocPrefix + "-heal-fail-self", ("target", args.Target),("bible", uid));
|
||||
_popupSystem.PopupEntity(selfFailMessage, args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(selfFailMessage, args.User, Filter.Entities(args.User), PopupType.Medium);
|
||||
|
||||
SoundSystem.Play("/Audio/Effects/hit_kick.ogg", Filter.Pvs(args.Target.Value), args.User);
|
||||
_damageableSystem.TryChangeDamage(args.Target.Value, component.DamageOnFail, true);
|
||||
@@ -132,10 +134,10 @@ namespace Content.Server.Bible
|
||||
}
|
||||
|
||||
var othersMessage = Loc.GetString(component.LocPrefix + "-heal-success-others", ("user", args.User),("target", args.Target),("bible", uid));
|
||||
_popupSystem.PopupEntity(othersMessage, args.User, Filter.Pvs(args.User).RemoveWhereAttachedEntity(puid => puid == args.User));
|
||||
_popupSystem.PopupEntity(othersMessage, args.User, Filter.PvsExcept(args.User), PopupType.Medium);
|
||||
|
||||
var selfMessage = Loc.GetString(component.LocPrefix + "-heal-success-self", ("target", args.Target),("bible", uid));
|
||||
_popupSystem.PopupEntity(selfMessage, args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(selfMessage, args.User, Filter.Entities(args.User), PopupType.Large);
|
||||
|
||||
SoundSystem.Play(component.HealSoundPath.GetSound(), Filter.Pvs(args.Target.Value), args.User);
|
||||
_damageableSystem.TryChangeDamage(args.Target.Value, component.Damage, true);
|
||||
|
||||
@@ -10,6 +10,7 @@ using Content.Shared.Damage;
|
||||
using Content.Shared.Damage.Prototypes;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
@@ -164,7 +165,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));
|
||||
Filter.Entities(uid), PopupType.Medium);
|
||||
; }
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.Botany.Components;
|
||||
using Content.Server.Kitchen.Components;
|
||||
using Content.Shared.Botany;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Random.Helpers;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
@@ -106,12 +107,12 @@ public sealed partial class BotanySystem
|
||||
if (proto.ProductPrototypes.Count == 0 || proto.Yield <= 0)
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("botany-harvest-fail-message"),
|
||||
Filter.Entities(user));
|
||||
Filter.Entities(user), PopupType.Medium);
|
||||
return Enumerable.Empty<EntityUid>();
|
||||
}
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString("botany-harvest-success-message", ("name", proto.DisplayName)),
|
||||
Filter.Entities(user));
|
||||
Filter.Entities(user), PopupType.Medium);
|
||||
return GenerateProduct(proto, Transform(user).Coordinates, yieldMod);
|
||||
}
|
||||
|
||||
@@ -132,7 +133,7 @@ public sealed partial class BotanySystem
|
||||
|
||||
if (totalYield > 1 || proto.HarvestRepeat != HarvestType.NoRepeat)
|
||||
proto.Unique = false;
|
||||
|
||||
|
||||
for (var i = 0; i < totalYield; i++)
|
||||
{
|
||||
var product = _robustRandom.Pick(proto.ProductPrototypes);
|
||||
|
||||
@@ -8,6 +8,7 @@ using Content.Shared.Examine;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Audio;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Random.Helpers;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Timing;
|
||||
@@ -102,7 +103,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));
|
||||
("seedNoun", seed.Noun)), Filter.Entities(args.User), PopupType.Medium);
|
||||
|
||||
component.Seed = seed;
|
||||
component.Dead = false;
|
||||
@@ -119,7 +120,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));
|
||||
("name", Comp<MetaDataComponent>(uid).EntityName)), Filter.Entities(args.User), PopupType.Medium);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -128,9 +129,9 @@ 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));
|
||||
("name", Comp<MetaDataComponent>(uid).EntityName)), Filter.Entities(args.User), PopupType.Medium);
|
||||
_popupSystem.PopupEntity(Loc.GetString("plant-holder-component-remove-weeds-others-message",
|
||||
("otherName", Comp<MetaDataComponent>(args.User).EntityName)), uid, Filter.Pvs(args.User).RemoveWhereAttachedEntity(puid => puid == args.User));
|
||||
("otherName", Comp<MetaDataComponent>(args.User).EntityName)), uid, Filter.PvsExcept(args.User));
|
||||
component.WeedLevel = 0;
|
||||
component.UpdateSprite();
|
||||
}
|
||||
@@ -147,9 +148,9 @@ 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));
|
||||
("name", Comp<MetaDataComponent>(uid).EntityName)), Filter.Entities(args.User), PopupType.Medium);
|
||||
_popupSystem.PopupEntity(Loc.GetString("plant-holder-component-remove-plant-others-message",
|
||||
("name", Comp<MetaDataComponent>(args.User).EntityName)), uid, Filter.Pvs(args.User).RemoveWhereAttachedEntity(puid => puid == args.User));
|
||||
("name", Comp<MetaDataComponent>(args.User).EntityName)), uid, Filter.PvsExcept(args.User));
|
||||
component.RemovePlant();
|
||||
}
|
||||
else
|
||||
@@ -185,7 +186,7 @@ namespace Content.Server.Botany.Systems
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-spray-message",
|
||||
("owner", uid),
|
||||
("amount", split.TotalVolume)), Filter.Entities(args.User));
|
||||
("amount", split.TotalVolume)), Filter.Entities(args.User), PopupType.Medium);
|
||||
|
||||
_solutionSystem.TryAddSolution(targetEntity, targetSolution, split);
|
||||
|
||||
@@ -238,11 +239,11 @@ namespace Content.Server.Botany.Systems
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("plant-holder-component-compost-message",
|
||||
("owner", uid),
|
||||
("usingItem", args.Used)), Filter.Entities(args.User));
|
||||
("usingItem", args.Used)), Filter.Entities(args.User), PopupType.Medium);
|
||||
_popupSystem.PopupEntity(Loc.GetString("plant-holder-component-compost-others-message",
|
||||
("user", args.User),
|
||||
("usingItem", args.Used),
|
||||
("owner", uid)), uid, Filter.Pvs(args.User).RemoveWhereAttachedEntity(puid => puid == args.User));
|
||||
("owner", uid)), uid, Filter.PvsExcept(args.User));
|
||||
|
||||
if (_solutionSystem.TryGetSolution(args.Used, produce.SolutionName, out var solution2))
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Server.Popups;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
@@ -31,7 +32,7 @@ public sealed class SeedExtractorSystem : EntitySystem
|
||||
return;
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString("seed-extractor-component-interact-message",("name", args.Used)),
|
||||
Filter.Entities(args.User));
|
||||
Filter.Entities(args.User), PopupType.Medium);
|
||||
|
||||
QueueDel(args.Used);
|
||||
|
||||
|
||||
@@ -11,7 +11,10 @@ namespace Content.Server.Chemistry.ReagentEffects
|
||||
public string[] Messages = default!;
|
||||
|
||||
[DataField("type")]
|
||||
public PopupType Type = PopupType.Local;
|
||||
public PopupRecipients Type = PopupRecipients.Local;
|
||||
|
||||
[DataField("visualType")]
|
||||
public PopupType VisualType = PopupType.Small;
|
||||
|
||||
public override void Effect(ReagentEffectArgs args)
|
||||
{
|
||||
@@ -19,14 +22,14 @@ namespace Content.Server.Chemistry.ReagentEffects
|
||||
var random = IoCManager.Resolve<IRobustRandom>();
|
||||
|
||||
var msg = random.Pick(Messages);
|
||||
if (Type == PopupType.Local)
|
||||
popupSys.PopupEntity(Loc.GetString(msg), args.SolutionEntity, Filter.Entities(args.SolutionEntity));
|
||||
else if (Type == PopupType.Pvs)
|
||||
popupSys.PopupEntity(Loc.GetString(msg), args.SolutionEntity, Filter.Pvs(args.SolutionEntity));
|
||||
if (Type == PopupRecipients.Local)
|
||||
popupSys.PopupEntity(Loc.GetString(msg), args.SolutionEntity, Filter.Entities(args.SolutionEntity), VisualType);
|
||||
else if (Type == PopupRecipients.Pvs)
|
||||
popupSys.PopupEntity(Loc.GetString(msg), args.SolutionEntity, Filter.Pvs(args.SolutionEntity), VisualType);
|
||||
}
|
||||
}
|
||||
|
||||
public enum PopupType
|
||||
public enum PopupRecipients
|
||||
{
|
||||
Pvs,
|
||||
Local
|
||||
|
||||
@@ -14,6 +14,7 @@ using Content.Shared.Access.Systems;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Communications;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Player;
|
||||
@@ -204,7 +205,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));
|
||||
_popupSystem.PopupCursor(Loc.GetString("comms-console-permission-denied"), Filter.Entities(mob), PopupType.Medium);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public sealed class NetworkConfiguratorSystem : EntitySystem
|
||||
|
||||
configurator.Devices.Add(device.Address, targetUid.Value);
|
||||
_popupSystem.PopupCursor(Loc.GetString("network-configurator-device-saved", ("address", device.Address), ("device", targetUid)),
|
||||
Filter.Entities(userUid));
|
||||
Filter.Entities(userUid), PopupType.Medium);
|
||||
|
||||
UpdateUiState(configurator.Owner, configurator);
|
||||
}
|
||||
|
||||
@@ -17,20 +17,24 @@ namespace Content.Server.Disease.Effects
|
||||
public string Message = "disease-sick-generic";
|
||||
|
||||
[DataField("type")]
|
||||
public PopupType Type = PopupType.Local;
|
||||
public PopupRecipients Type = PopupRecipients.Local;
|
||||
|
||||
[DataField("visualType")]
|
||||
public PopupType VisualType = PopupType.Small;
|
||||
|
||||
public override void Effect(DiseaseEffectArgs args)
|
||||
{
|
||||
var popupSys = EntitySystem.Get<SharedPopupSystem>();
|
||||
|
||||
if (Type == PopupType.Local)
|
||||
popupSys.PopupEntity(Loc.GetString(Message), args.DiseasedEntity, Filter.Entities(args.DiseasedEntity));
|
||||
else if (Type == PopupType.Pvs)
|
||||
popupSys.PopupEntity(Loc.GetString(Message, ("person", args.DiseasedEntity)), args.DiseasedEntity, Filter.Pvs(args.DiseasedEntity));
|
||||
if (Type == PopupRecipients.Local)
|
||||
popupSys.PopupEntity(Loc.GetString(Message), args.DiseasedEntity, Filter.Entities(args.DiseasedEntity), VisualType);
|
||||
else if (Type == PopupRecipients.Pvs)
|
||||
popupSys.PopupEntity(Loc.GetString(Message, ("person", args.DiseasedEntity)), args.DiseasedEntity, Filter.Pvs(args.DiseasedEntity), VisualType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum PopupType
|
||||
public enum PopupRecipients
|
||||
{
|
||||
Pvs,
|
||||
Local
|
||||
|
||||
@@ -20,6 +20,7 @@ using Content.Server.Hands.Components;
|
||||
using Content.Server.UserInterface;
|
||||
using Robust.Shared.Player;
|
||||
using Content.Shared.Hands.EntitySystems;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Storage;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
@@ -111,7 +112,8 @@ 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));
|
||||
_popupSystem.PopupEntity(Loc.GetString("drone-activated"), uid,
|
||||
Filter.Pvs(uid), PopupType.Large);
|
||||
|
||||
if (drone.AlreadyAwoken == false)
|
||||
{
|
||||
|
||||
@@ -65,7 +65,8 @@ namespace Content.Server.Emag
|
||||
RaiseLocalEvent(args.Target.Value, emaggedEvent, false);
|
||||
if (emaggedEvent.Handled)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("emag-success", ("target", args.Target)), args.User, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("emag-success", ("target", args.Target)), args.User,
|
||||
Filter.Entities(args.User), PopupType.Medium);
|
||||
_adminLogger.Add(LogType.Emag, LogImpact.High, $"{ToPrettyString(args.User):player} emagged {ToPrettyString(args.Target.Value):target}");
|
||||
component.Charges--;
|
||||
return;
|
||||
|
||||
@@ -8,6 +8,7 @@ using Content.Shared.Hands.EntitySystems;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -98,7 +99,7 @@ namespace Content.Server.Guardian
|
||||
if (args.Cancelled || args.Target != component.Host)
|
||||
return;
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString("guardian-attack-host"), Filter.Entities(uid));
|
||||
_popupSystem.PopupCursor(Loc.GetString("guardian-attack-host"), Filter.Entities(uid), PopupType.Large);
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Content.Server.Body.Components;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
@@ -84,7 +85,8 @@ 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));
|
||||
_popup.PopupCoordinates(Loc.GetString("immovable-rod-collided-rod-not-good"), coords,
|
||||
Filter.Pvs(uid), PopupType.Critical);
|
||||
|
||||
Del(uid);
|
||||
Del(ent);
|
||||
@@ -98,7 +100,8 @@ public sealed class ImmovableRodSystem : EntitySystem
|
||||
{
|
||||
component.MobCount++;
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("immovable-rod-penetrated-mob", ("rod", uid), ("mob", ent)), uid, Filter.Pvs(uid));
|
||||
_popup.PopupEntity(Loc.GetString("immovable-rod-penetrated-mob", ("rod", uid), ("mob", ent)), uid,
|
||||
Filter.Pvs(uid), PopupType.Critical);
|
||||
body.Gib();
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,8 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
|
||||
UpdateAppearance(uid, null, component);
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-kill", ("user", userUid), ("victim", victimUid)), uid, Filter.Pvs(userUid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-kill", ("user", userUid), ("victim", victimUid)), uid,
|
||||
Filter.Pvs(userUid), PopupType.Critical);
|
||||
|
||||
// THE WHAT?
|
||||
// TODO: Need to be able to leave them on the spike to do DoT, see ss13.
|
||||
@@ -152,12 +153,12 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
|
||||
if (component.PrototypesToSpawn.Count != 0)
|
||||
{
|
||||
_popupSystem.PopupEntity(component.MeatSource1p, uid, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(component.MeatSource1p, uid, Filter.Entities(user), PopupType.Medium);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateAppearance(uid, null, component);
|
||||
_popupSystem.PopupEntity(component.MeatSource0, uid, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(component.MeatSource0, uid, Filter.Entities(user), PopupType.Medium);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -221,7 +222,8 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
|
||||
if (userUid != victimUid)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-begin-hook-victim", ("user", userUid), ("this", uid)), victimUid, Filter.Entities(victimUid));
|
||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-begin-hook-victim", ("user", userUid), ("this", uid)), victimUid,
|
||||
Filter.Entities(victimUid), PopupType.Large);
|
||||
}
|
||||
// TODO: make it work when SuicideEvent is implemented
|
||||
// else
|
||||
|
||||
@@ -88,7 +88,7 @@ public sealed class SharpSystem : EntitySystem
|
||||
}
|
||||
|
||||
_popupSystem.PopupEntity(Loc.GetString("butcherable-knife-butchered-success", ("target", ev.Entity), ("knife", ev.Sharp)),
|
||||
popupEnt, Filter.Entities(ev.User));
|
||||
popupEnt, Filter.Entities(ev.User), PopupType.Large);
|
||||
|
||||
if (TryComp<SharedBodyComponent>(ev.Entity, out var body))
|
||||
{
|
||||
|
||||
@@ -32,7 +32,8 @@ public sealed class LandMineSystem : EntitySystem
|
||||
_popupSystem.PopupCoordinates(
|
||||
Loc.GetString("land-mine-triggered", ("mine", uid)),
|
||||
Transform(uid).Coordinates,
|
||||
Filter.Entities(args.Tripper));
|
||||
Filter.Entities(args.Tripper),
|
||||
PopupType.Critical);
|
||||
}
|
||||
|
||||
if (component.DeleteOnActivate)
|
||||
|
||||
@@ -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));
|
||||
_popupSystem.PopupEntity(msg, replacerUid, Filter.Entities(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));
|
||||
_popupSystem.PopupEntity(msg, replacerUid, Filter.Entities(userUid.Value), PopupType.Medium);
|
||||
}
|
||||
|
||||
return insertedBulbs > 0;
|
||||
|
||||
@@ -209,7 +209,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));
|
||||
Filter.Entities(args.User), PopupType.Medium);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
@@ -235,7 +235,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));
|
||||
Filter.Entities(args.User), PopupType.Medium);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
@@ -324,7 +324,7 @@ namespace Content.Server.MachineLinking.System
|
||||
_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))),
|
||||
Filter.Entities(user));
|
||||
Filter.Entities(user), PopupType.Medium);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -351,7 +351,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));
|
||||
Filter.Entities(attached), PopupType.Medium);
|
||||
}
|
||||
else
|
||||
{ // something weird happened
|
||||
|
||||
@@ -9,6 +9,7 @@ using Robust.Server.GameObjects;
|
||||
using Content.Server.Players;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Standing;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
@@ -44,7 +45,8 @@ namespace Content.Server.Morgue
|
||||
|
||||
if (mind.OwnedEntity is { Valid: true } entity)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("crematorium-entity-storage-component-suicide-message"), entity, Filter.Pvs(entity, entityManager: EntityManager));
|
||||
_popup.PopupEntity(Loc.GetString("crematorium-entity-storage-component-suicide-message"), entity,
|
||||
Filter.Pvs(entity, entityManager: EntityManager), PopupType.Critical);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ using Content.Shared.Audio;
|
||||
using Content.Shared.Construction.Components;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.Nuke;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Sound;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -540,7 +541,8 @@ namespace Content.Server.Nuke
|
||||
};
|
||||
|
||||
_doAfterSystem.DoAfter(doafter);
|
||||
_popups.PopupEntity(Loc.GetString("nuke-component-doafter-warning"), user, Filter.Entities(user));
|
||||
_popups.PopupEntity(Loc.GetString("nuke-component-doafter-warning"), user,
|
||||
Filter.Entities(user), PopupType.Large);
|
||||
}
|
||||
|
||||
private void NukeArmedAudio(NukeComponent component)
|
||||
|
||||
@@ -8,6 +8,7 @@ using Content.Server.Mind.Components;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Player;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Popups;
|
||||
|
||||
namespace Content.Server.PAI
|
||||
{
|
||||
@@ -58,7 +59,7 @@ namespace Content.Server.PAI
|
||||
// Check for pAI activation
|
||||
if (EntityManager.TryGetComponent<MindComponent>(uid, out var mind) && mind.HasMind)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("pai-system-pai-installed"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("pai-system-pai-installed"), uid, Filter.Entities(args.User), PopupType.Large);
|
||||
return;
|
||||
}
|
||||
else if (EntityManager.HasComponent<GhostTakeoverAvailableComponent>(uid))
|
||||
@@ -141,7 +142,7 @@ namespace Content.Server.PAI
|
||||
if (EntityManager.HasComponent<MindComponent>(uid))
|
||||
{
|
||||
EntityManager.RemoveComponent<MindComponent>(uid);
|
||||
_popupSystem.PopupEntity(Loc.GetString("pai-system-wiped-device"), uid, Filter.Entities(args.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("pai-system-wiped-device"), uid, Filter.Entities(args.User), PopupType.Large);
|
||||
PAITurningOff(uid);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6,19 +6,19 @@ namespace Content.Server.Popups
|
||||
{
|
||||
public sealed class PopupSystem : SharedPopupSystem
|
||||
{
|
||||
public override void PopupCursor(string message, Filter filter)
|
||||
public override void PopupCursor(string message, Filter filter, PopupType type=PopupType.Small)
|
||||
{
|
||||
RaiseNetworkEvent(new PopupCursorEvent(message), filter);
|
||||
RaiseNetworkEvent(new PopupCursorEvent(message, type), filter);
|
||||
}
|
||||
|
||||
public override void PopupCoordinates(string message, EntityCoordinates coordinates, Filter filter)
|
||||
public override void PopupCoordinates(string message, EntityCoordinates coordinates, Filter filter, PopupType type=PopupType.Small)
|
||||
{
|
||||
RaiseNetworkEvent(new PopupCoordinatesEvent(message, coordinates), filter);
|
||||
RaiseNetworkEvent(new PopupCoordinatesEvent(message, type, coordinates), filter);
|
||||
}
|
||||
|
||||
public override void PopupEntity(string message, EntityUid uid, Filter filter)
|
||||
public override void PopupEntity(string message, EntityUid uid, Filter filter, PopupType type=PopupType.Small)
|
||||
{
|
||||
RaiseNetworkEvent(new PopupEntityEvent(message, uid), filter);
|
||||
RaiseNetworkEvent(new PopupEntityEvent(message, type, uid), filter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Access.Components;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.APC;
|
||||
using Content.Shared.Emag.Systems;
|
||||
using Content.Shared.Popups;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
@@ -55,7 +56,7 @@ namespace Content.Server.Power.EntitySystems
|
||||
else
|
||||
{
|
||||
_popupSystem.PopupCursor(Loc.GetString("apc-component-insufficient-access"),
|
||||
Filter.Entities(args.Session.AttachedEntity.Value));
|
||||
Filter.Entities(args.Session.AttachedEntity.Value), PopupType.Medium);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using Robust.Shared.Player;
|
||||
using Robust.Shared.Containers;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Movement.Events;
|
||||
using Content.Shared.Popups;
|
||||
|
||||
namespace Content.Server.Resist;
|
||||
|
||||
@@ -56,7 +57,7 @@ public sealed class ResistLockerSystem : EntitySystem
|
||||
};
|
||||
|
||||
resistLockerComponent.IsResisting = true;
|
||||
_popupSystem.PopupEntity(Loc.GetString("resist-locker-component-start-resisting"), user, Filter.Entities(user));
|
||||
_popupSystem.PopupEntity(Loc.GetString("resist-locker-component-start-resisting"), user, Filter.Entities(user), PopupType.Large);
|
||||
_doAfterSystem.DoAfter(doAfterEventArgs);
|
||||
}
|
||||
|
||||
@@ -81,7 +82,7 @@ public sealed class ResistLockerSystem : EntitySystem
|
||||
{
|
||||
component.IsResisting = false;
|
||||
component.CancelToken = null;
|
||||
_popupSystem.PopupEntity(Loc.GetString("resist-locker-component-resist-interrupted"), ev.User, Filter.Entities(ev.User));
|
||||
_popupSystem.PopupEntity(Loc.GetString("resist-locker-component-resist-interrupted"), ev.User, Filter.Entities(ev.User), PopupType.Medium);
|
||||
}
|
||||
|
||||
private void OnRemovedFromContainer(EntityUid uid, ResistLockerComponent component, EntRemovedFromContainerMessage message)
|
||||
|
||||
@@ -8,6 +8,7 @@ using Content.Server.Station.Components;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Shuttles.BUIStates;
|
||||
using Content.Shared.Shuttles.Events;
|
||||
using Content.Shared.Shuttles.Systems;
|
||||
@@ -149,7 +150,7 @@ public sealed partial class ShuttleSystem
|
||||
|
||||
if (!_reader.FindAccessTags(player.Value).Contains(EmergencyRepealAllAccess))
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("emergency-shuttle-console-denied"), Filter.Entities(player.Value));
|
||||
_popup.PopupCursor(Loc.GetString("emergency-shuttle-console-denied"), Filter.Entities(player.Value), PopupType.Medium);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -168,7 +169,7 @@ public sealed partial class ShuttleSystem
|
||||
|
||||
if (!_idSystem.TryFindIdCard(player.Value, out var idCard) || !_reader.IsAllowed(idCard.Owner, uid))
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("emergency-shuttle-console-denied"), Filter.Entities(player.Value));
|
||||
_popup.PopupCursor(Loc.GetString("emergency-shuttle-console-denied"), Filter.Entities(player.Value), PopupType.Medium);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -189,7 +190,7 @@ public sealed partial class ShuttleSystem
|
||||
|
||||
if (!_idSystem.TryFindIdCard(player.Value, out var idCard) || !_reader.IsAllowed(idCard.Owner, uid))
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("emergency-shuttle-console-denied"), Filter.Entities(player.Value));
|
||||
_popup.PopupCursor(Loc.GetString("emergency-shuttle-console-denied"), Filter.Entities(player.Value), PopupType.Medium);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Stacks;
|
||||
using Content.Shared.Verbs;
|
||||
using JetBrains.Annotations;
|
||||
@@ -129,7 +130,7 @@ namespace Content.Server.Stack
|
||||
|
||||
if (amount <= 0)
|
||||
{
|
||||
PopupSystem.PopupCursor(Loc.GetString("comp-stack-split-too-small"), Filter.Entities(userUid));
|
||||
PopupSystem.PopupCursor(Loc.GetString("comp-stack-split-too-small"), Filter.Entities(userUid), PopupType.Medium);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -306,7 +306,8 @@ namespace Content.Server.Strip
|
||||
{
|
||||
if (userHands.ActiveHandEntity != null)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-insert", ("user", user), ("item", userHands.ActiveHandEntity)), component.Owner, Filter.Entities(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-insert", ("user", user), ("item", userHands.ActiveHandEntity)), component.Owner,
|
||||
Filter.Entities(component.Owner), PopupType.Large);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,7 +369,8 @@ namespace Content.Server.Strip
|
||||
{
|
||||
if (handSlot.HeldEntity != null)
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-insert", ("user", user), ("item", handSlot.HeldEntity)), component.Owner, Filter.Entities(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-insert", ("user", user), ("item", handSlot.HeldEntity)), component.Owner,
|
||||
Filter.Entities(component.Owner), PopupType.Large);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,11 +432,13 @@ namespace Content.Server.Strip
|
||||
if (Check())
|
||||
{
|
||||
if (slotDef.StripHidden && !ev.Stealth)
|
||||
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-hidden", ("slot", slot)), component.Owner, Filter.Entities(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner-hidden", ("slot", slot)), component.Owner,
|
||||
Filter.Entities(component.Owner), PopupType.Large);
|
||||
else
|
||||
{
|
||||
if (_inventorySystem.TryGetSlotEntity(component.Owner, slot, out var slotItem))
|
||||
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner", ("user", user), ("item", slotItem)), component.Owner, Filter.Entities(component.Owner));
|
||||
_popupSystem.PopupEntity(Loc.GetString("strippable-component-alert-owner", ("user", user), ("item", slotItem)), component.Owner,
|
||||
Filter.Entities(component.Owner), PopupType.Large);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ using Content.Shared.Body.Part;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Toilet;
|
||||
using Content.Shared.Tools.Components;
|
||||
using Robust.Shared.Audio;
|
||||
@@ -47,11 +48,11 @@ namespace Content.Server.Toilet
|
||||
{
|
||||
var othersMessage = Loc.GetString("toilet-component-suicide-head-message-others",
|
||||
("victim", args.Victim), ("owner", uid));
|
||||
_popupSystem.PopupEntity(othersMessage, uid, Filter.Pvs(args.Victim).RemoveWhereAttachedEntity(puid => puid == args.Victim));
|
||||
_popupSystem.PopupEntity(othersMessage, uid, Filter.PvsExcept(args.Victim), PopupType.Critical);
|
||||
|
||||
var selfMessage = Loc.GetString("toilet-component-suicide-head-message",
|
||||
("owner", uid));
|
||||
_popupSystem.PopupEntity(selfMessage, uid, Filter.Entities(args.Victim));
|
||||
_popupSystem.PopupEntity(selfMessage, uid, Filter.Entities(args.Victim), PopupType.Critical);
|
||||
|
||||
args.SetHandled(SuicideKind.Asphyxiation);
|
||||
}
|
||||
@@ -59,11 +60,11 @@ namespace Content.Server.Toilet
|
||||
{
|
||||
var othersMessage = Loc.GetString("toilet-component-suicide-message-others",
|
||||
("victim", args.Victim), ("owner", uid));
|
||||
_popupSystem.PopupEntity(othersMessage, uid, Filter.Pvs(uid).RemoveWhereAttachedEntity(puid => puid == args.Victim));
|
||||
_popupSystem.PopupEntity(othersMessage, uid, Filter.PvsExcept(uid), PopupType.Critical);
|
||||
|
||||
var selfMessage = Loc.GetString("toilet-component-suicide-message",
|
||||
("owner", uid));
|
||||
_popupSystem.PopupEntity(selfMessage, uid, Filter.Entities(args.Victim));
|
||||
_popupSystem.PopupEntity(selfMessage, uid, Filter.Entities(args.Victim), PopupType.Critical);
|
||||
|
||||
args.SetHandled(SuicideKind.Blunt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user