diff --git a/Content.Client/Popups/PopupSystem.cs b/Content.Client/Popups/PopupSystem.cs index b2fd764809..aea17fec80 100644 --- a/Content.Client/Popups/PopupSystem.cs +++ b/Content.Client/Popups/PopupSystem.cs @@ -147,9 +147,11 @@ namespace Content.Client.Popups type switch { PopupType.Small => StyleNano.StyleClassPopupMessageSmall, + PopupType.SmallCaution => StyleNano.StyleClassPopupMessageSmallCaution, PopupType.Medium => StyleNano.StyleClassPopupMessageMedium, + PopupType.MediumCaution => StyleNano.StyleClassPopupMessageMediumCaution, PopupType.Large => StyleNano.StyleClassPopupMessageLarge, - PopupType.Critical => StyleNano.StyleClassPopupMessageCritical, + PopupType.LargeCaution => StyleNano.StyleClassPopupMessageLargeCaution, _ => StyleNano.StyleClassPopupMessageSmall }; diff --git a/Content.Client/Stylesheets/StyleNano.cs b/Content.Client/Stylesheets/StyleNano.cs index 53e973d255..ee05023023 100644 --- a/Content.Client/Stylesheets/StyleNano.cs +++ b/Content.Client/Stylesheets/StyleNano.cs @@ -76,9 +76,11 @@ namespace Content.Client.Stylesheets public const string StyleClassButtonBig = "ButtonBig"; public const string StyleClassPopupMessageSmall = "PopupMessageSmall"; + public const string StyleClassPopupMessageSmallCaution = "PopupMessageSmallCaution"; public const string StyleClassPopupMessageMedium = "PopupMessageMedium"; + public const string StyleClassPopupMessageMediumCaution = "PopupMessageMediumCaution"; public const string StyleClassPopupMessageLarge = "PopupMessageLarge"; - public const string StyleClassPopupMessageCritical = "PopupMessageCritical"; + public const string StyleClassPopupMessageLargeCaution = "PopupMessageLargeCaution"; public static readonly Color NanoGold = Color.FromHex("#A88B5E"); public static readonly Color GoodGreenFore = Color.FromHex("#31843E"); @@ -1046,6 +1048,13 @@ namespace Content.Client.Stylesheets new StyleProperty("font-color", Color.White), }), + new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassPopupMessageSmallCaution}, null, null), + new[] + { + new StyleProperty("font", notoSansItalic10), + new StyleProperty("font-color", Color.Red), + }), + new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassPopupMessageMedium}, null, null), new[] { @@ -1053,6 +1062,13 @@ namespace Content.Client.Stylesheets new StyleProperty("font-color", Color.LightGray), }), + new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassPopupMessageMediumCaution}, null, null), + new[] + { + new StyleProperty("font", notoSansItalic12), + new StyleProperty("font-color", Color.Red), + }), + new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassPopupMessageLarge}, null, null), new[] { @@ -1060,10 +1076,10 @@ namespace Content.Client.Stylesheets new StyleProperty("font-color", Color.LightGray), }), - new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassPopupMessageCritical}, null, null), + new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassPopupMessageLargeCaution}, null, null), new[] { - new StyleProperty("font", notoSansBoldItalic16), + new StyleProperty("font", notoSansBoldItalic14), new StyleProperty("font-color", Color.Red), }), diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs index 1af8d22d8f..2a44779a6b 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs @@ -111,10 +111,10 @@ public sealed partial class AdminVerbSystem RemComp(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.Critical); + Filter.Entities(args.Target), PopupType.LargeCaution); _popupSystem.PopupCoordinates( Loc.GetString("admin-smite-chess-others", ("name", args.Target)), xform.Coordinates, - Filter.PvsExcept(args.Target), PopupType.Critical); + Filter.PvsExcept(args.Target), PopupType.MediumCaution); var board = Spawn("ChessBoard", xform.Coordinates); var session = _tabletopSystem.EnsureSession(Comp(board)); xform.Coordinates = EntityCoordinates.FromMap(_mapManager, session.Position); @@ -139,9 +139,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.Critical); + Filter.Entities(args.Target), PopupType.LargeCaution); _popupSystem.PopupCoordinates(Loc.GetString("admin-smite-set-alight-others", ("name", args.Target)), xform.Coordinates, - Filter.PvsExcept(args.Target), PopupType.Critical); + Filter.PvsExcept(args.Target), PopupType.MediumCaution); }, Impact = LogImpact.Extreme, Message = "Makes them burn.", @@ -259,9 +259,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.Critical); + Filter.Entities(args.Target), PopupType.LargeCaution); _popupSystem.PopupCoordinates(Loc.GetString("admin-smite-remove-blood-others", ("name", args.Target)), xform.Coordinates, - Filter.PvsExcept(args.Target), PopupType.Critical); + Filter.PvsExcept(args.Target), PopupType.MediumCaution); }, Impact = LogImpact.Extreme, Message = "Removes their blood. All of it.", @@ -292,9 +292,9 @@ public sealed partial class AdminVerbSystem } _popupSystem.PopupEntity(Loc.GetString("admin-smite-vomit-organs-self"), args.Target, - Filter.Entities(args.Target), PopupType.Critical); + Filter.Entities(args.Target), PopupType.LargeCaution); _popupSystem.PopupCoordinates(Loc.GetString("admin-smite-vomit-organs-others", ("name", args.Target)), baseXform.Coordinates, - Filter.PvsExcept(args.Target), PopupType.Critical); + Filter.PvsExcept(args.Target), PopupType.MediumCaution); }, Impact = LogImpact.Extreme, Message = "Causes them to vomit, including their internal organs.", @@ -315,7 +315,7 @@ public sealed partial class AdminVerbSystem Transform(part.Owner).Coordinates = baseXform.Coordinates; } _popupSystem.PopupEntity(Loc.GetString("admin-smite-remove-hands-self"), args.Target, - Filter.Entities(args.Target), PopupType.Critical); + Filter.Entities(args.Target), PopupType.LargeCaution); _popupSystem.PopupCoordinates(Loc.GetString("admin-smite-remove-hands-others", ("name", args.Target)), baseXform.Coordinates, Filter.PvsExcept(args.Target), PopupType.Medium); }, @@ -495,7 +495,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.Critical); + Filter.Pvs(args.Target), PopupType.LargeCaution); }, Impact = LogImpact.Extreme, Message = "Reduces the target to a small pile of ash.", diff --git a/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs b/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs index 49447f43ee..5496771423 100644 --- a/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs +++ b/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs @@ -39,7 +39,7 @@ namespace Content.Server.Atmos.Piping.EntitySystems { args.Delay += 1.5f; _popupSystem.PopupCursor(Loc.GetString("comp-atmos-unsafe-unanchor-warning"), - Filter.Entities(args.User), PopupType.Large); + Filter.Entities(args.User), PopupType.MediumCaution); return; // Show the warning only once. } } diff --git a/Content.Server/Bible/BibleSystem.cs b/Content.Server/Bible/BibleSystem.cs index 5082c98dcf..2db56b7c32 100644 --- a/Content.Server/Bible/BibleSystem.cs +++ b/Content.Server/Bible/BibleSystem.cs @@ -122,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.PvsExcept(args.User)); + _popupSystem.PopupEntity(othersFailMessage, args.User, Filter.PvsExcept(args.User), PopupType.SmallCaution); var selfFailMessage = Loc.GetString(component.LocPrefix + "-heal-fail-self", ("target", args.Target),("bible", uid)); - _popupSystem.PopupEntity(selfFailMessage, args.User, Filter.Entities(args.User), PopupType.Medium); + _popupSystem.PopupEntity(selfFailMessage, args.User, Filter.Entities(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); diff --git a/Content.Server/Guardian/GuardianSystem.cs b/Content.Server/Guardian/GuardianSystem.cs index 8f9a4bcb8f..45a521fe6f 100644 --- a/Content.Server/Guardian/GuardianSystem.cs +++ b/Content.Server/Guardian/GuardianSystem.cs @@ -99,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), PopupType.Large); + _popupSystem.PopupCursor(Loc.GetString("guardian-attack-host"), Filter.Entities(uid), PopupType.LargeCaution); args.Cancel(); } diff --git a/Content.Server/ImmovableRod/ImmovableRodSystem.cs b/Content.Server/ImmovableRod/ImmovableRodSystem.cs index 149a7f977e..d683794671 100644 --- a/Content.Server/ImmovableRod/ImmovableRodSystem.cs +++ b/Content.Server/ImmovableRod/ImmovableRodSystem.cs @@ -86,7 +86,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.Critical); + Filter.Pvs(uid), PopupType.LargeCaution); Del(uid); Del(ent); @@ -101,7 +101,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.Critical); + Filter.Pvs(uid), PopupType.LargeCaution); body.Gib(); } diff --git a/Content.Server/Kitchen/EntitySystems/KitchenSpikeSystem.cs b/Content.Server/Kitchen/EntitySystems/KitchenSpikeSystem.cs index af76a9260a..cf708044b4 100644 --- a/Content.Server/Kitchen/EntitySystems/KitchenSpikeSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/KitchenSpikeSystem.cs @@ -124,7 +124,7 @@ 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), PopupType.Critical); + Filter.Pvs(userUid), PopupType.LargeCaution); // THE WHAT? // TODO: Need to be able to leave them on the spike to do DoT, see ss13. @@ -153,12 +153,12 @@ namespace Content.Server.Kitchen.EntitySystems if (component.PrototypesToSpawn.Count != 0) { - _popupSystem.PopupEntity(component.MeatSource1p, uid, Filter.Entities(user), PopupType.Medium); + _popupSystem.PopupEntity(component.MeatSource1p, uid, Filter.Entities(user), PopupType.MediumCaution); } else { UpdateAppearance(uid, null, component); - _popupSystem.PopupEntity(component.MeatSource0, uid, Filter.Entities(user), PopupType.Medium); + _popupSystem.PopupEntity(component.MeatSource0, uid, Filter.Entities(user), PopupType.MediumCaution); } return true; @@ -223,7 +223,7 @@ 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), PopupType.Large); + Filter.Entities(victimUid), PopupType.LargeCaution); } // TODO: make it work when SuicideEvent is implemented // else diff --git a/Content.Server/Kitchen/EntitySystems/SharpSystem.cs b/Content.Server/Kitchen/EntitySystems/SharpSystem.cs index 4b01377210..952b18a2fd 100644 --- a/Content.Server/Kitchen/EntitySystems/SharpSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/SharpSystem.cs @@ -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), PopupType.Large); + popupEnt, Filter.Entities(ev.User), PopupType.LargeCaution); if (TryComp(ev.Entity, out var body)) { diff --git a/Content.Server/LandMines/LandMineSystem.cs b/Content.Server/LandMines/LandMineSystem.cs index a151b217e7..a526e493d9 100644 --- a/Content.Server/LandMines/LandMineSystem.cs +++ b/Content.Server/LandMines/LandMineSystem.cs @@ -33,7 +33,7 @@ public sealed class LandMineSystem : EntitySystem Loc.GetString("land-mine-triggered", ("mine", uid)), Transform(uid).Coordinates, Filter.Entities(args.Tripper), - PopupType.Critical); + PopupType.LargeCaution); } if (component.DeleteOnActivate) diff --git a/Content.Server/Morgue/MorgueSystem.cs b/Content.Server/Morgue/MorgueSystem.cs index 03b739f87d..0a59fafa8e 100644 --- a/Content.Server/Morgue/MorgueSystem.cs +++ b/Content.Server/Morgue/MorgueSystem.cs @@ -46,7 +46,7 @@ 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), PopupType.Critical); + Filter.Pvs(entity, entityManager: EntityManager), PopupType.MediumCaution); } } diff --git a/Content.Server/Nuke/NukeSystem.cs b/Content.Server/Nuke/NukeSystem.cs index c78489bf32..967a7bfc1d 100644 --- a/Content.Server/Nuke/NukeSystem.cs +++ b/Content.Server/Nuke/NukeSystem.cs @@ -542,7 +542,7 @@ namespace Content.Server.Nuke _doAfterSystem.DoAfter(doafter); _popups.PopupEntity(Loc.GetString("nuke-component-doafter-warning"), user, - Filter.Entities(user), PopupType.Large); + Filter.Entities(user), PopupType.LargeCaution); } private void NukeArmedAudio(NukeComponent component) diff --git a/Content.Server/Toilet/ToiletSystem.cs b/Content.Server/Toilet/ToiletSystem.cs index 982715c2b2..93576a4764 100644 --- a/Content.Server/Toilet/ToiletSystem.cs +++ b/Content.Server/Toilet/ToiletSystem.cs @@ -48,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.PvsExcept(args.Victim), PopupType.Critical); + _popupSystem.PopupEntity(othersMessage, uid, Filter.PvsExcept(args.Victim), PopupType.MediumCaution); var selfMessage = Loc.GetString("toilet-component-suicide-head-message", ("owner", uid)); - _popupSystem.PopupEntity(selfMessage, uid, Filter.Entities(args.Victim), PopupType.Critical); + _popupSystem.PopupEntity(selfMessage, uid, Filter.Entities(args.Victim), PopupType.LargeCaution); args.SetHandled(SuicideKind.Asphyxiation); } @@ -60,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.PvsExcept(uid), PopupType.Critical); + _popupSystem.PopupEntity(othersMessage, uid, Filter.PvsExcept(uid), PopupType.MediumCaution); var selfMessage = Loc.GetString("toilet-component-suicide-message", ("owner", uid)); - _popupSystem.PopupEntity(selfMessage, uid, Filter.Entities(args.Victim), PopupType.Critical); + _popupSystem.PopupEntity(selfMessage, uid, Filter.Entities(args.Victim), PopupType.LargeCaution); args.SetHandled(SuicideKind.Blunt); } diff --git a/Content.Shared/Popups/SharedPopupSystem.cs b/Content.Shared/Popups/SharedPopupSystem.cs index 1247a36fb3..a2492d289d 100644 --- a/Content.Shared/Popups/SharedPopupSystem.cs +++ b/Content.Shared/Popups/SharedPopupSystem.cs @@ -93,12 +93,12 @@ namespace Content.Shared.Popups } /// - /// Used to determine how a popup should appear visually to the client. + /// Used to determine how a popup should appear visually to the client. Caution variants simply have a red color. /// /// /// Actions which can fail or succeed should use a smaller popup for failure and a larger popup for success. /// Actions which have different popups for the user vs. others should use a larger popup for the user and a smaller popup for others. - /// Actions which result in immediate death for a user should almost always show as critical to all parties, such as suicides or smites. + /// Actions which result in harm or are otherwise dangerous should always show as the caution variant. /// [Serializable, NetSerializable] public enum PopupType : byte @@ -107,20 +107,17 @@ namespace Content.Shared.Popups /// Small popups are the default, and denote actions that may be spammable or are otherwise unimportant. /// Small, + SmallCaution, /// /// Medium popups should be used for actions which are not spammable but may not be particularly important. /// Medium, + MediumCaution, /// /// Large popups should be used for actions which may be important or very important to one or more users, /// but is not life-threatening. /// Large, - /// - /// Critical popups should be used very sparingly, should not be used on anything that is spammable, - /// and should primarily be used when showing popups to one user. Critical popups denote actions which - /// may be directly life-threatening. - /// - Critical + LargeCaution } } diff --git a/Resources/Prototypes/Reagents/cleaning.yml b/Resources/Prototypes/Reagents/cleaning.yml index 749e647eb2..f08f2b2c9b 100644 --- a/Resources/Prototypes/Reagents/cleaning.yml +++ b/Resources/Prototypes/Reagents/cleaning.yml @@ -15,7 +15,7 @@ Poison: 3 - !type:PopupMessage type: Local - visualType: Critical + visualType: MediumCaution messages: [ "generic-reagent-effect-burning-insides" ] probability: 0.33 diff --git a/Resources/Prototypes/Reagents/fun.yml b/Resources/Prototypes/Reagents/fun.yml index 5e8dbe82c8..39cb81bc9e 100644 --- a/Resources/Prototypes/Reagents/fun.yml +++ b/Resources/Prototypes/Reagents/fun.yml @@ -55,7 +55,7 @@ effects: - !type:PopupMessage type: Local - visualType: Critical + visualType: MediumCaution messages: - "buzzochloricbees-effect-oh-god-bees" - "buzzochloricbees-effect-its-the-bees" diff --git a/Resources/Prototypes/Reagents/pyrotechnic.yml b/Resources/Prototypes/Reagents/pyrotechnic.yml index c8ca9f5b86..7ed1910afd 100644 --- a/Resources/Prototypes/Reagents/pyrotechnic.yml +++ b/Resources/Prototypes/Reagents/pyrotechnic.yml @@ -116,7 +116,7 @@ probability: 0.2 - !type:PopupMessage messages: [ "clf3-it-burns", "clf3-get-away" ] - visualType: Critical + visualType: MediumCaution probability: 0.3 type: Local diff --git a/Resources/Prototypes/Reagents/toxins.yml b/Resources/Prototypes/Reagents/toxins.yml index b675b59b0a..9f0004e514 100644 --- a/Resources/Prototypes/Reagents/toxins.yml +++ b/Resources/Prototypes/Reagents/toxins.yml @@ -39,7 +39,7 @@ Poison: 4 - !type:PopupMessage type: Local - visualType: Critical + visualType: MediumCaution messages: [ "generic-reagent-effect-burning-insides" ] probability: 0.33 diff --git a/Resources/Prototypes/Recipes/Reactions/pyrotechnic.yml b/Resources/Prototypes/Recipes/Reactions/pyrotechnic.yml index 392ba6c91a..bc793660e0 100644 --- a/Resources/Prototypes/Recipes/Reactions/pyrotechnic.yml +++ b/Resources/Prototypes/Recipes/Reactions/pyrotechnic.yml @@ -23,7 +23,7 @@ - !type:CreateGas gas: Plasma - !type:PopupMessage - visualType: Critical + visualType: LargeCaution messages: [ "phlogiston-plasma-created" ] type: Pvs products: @@ -48,6 +48,6 @@ - !type:PopupMessage messages: [ "clf3-explosion" ] type: Pvs - visualType: Critical + visualType: LargeCaution products: ChlorineTrifluoride: 4