Visual popup addendum (#9570)

This commit is contained in:
Kara
2022-07-09 02:32:06 -07:00
committed by GitHub
parent 860db2bd14
commit 50fc190f7f
19 changed files with 61 additions and 46 deletions

View File

@@ -111,10 +111,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.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<TabletopGameComponent>(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.",

View File

@@ -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.
}
}

View File

@@ -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);

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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

View File

@@ -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<SharedBodyComponent>(ev.Entity, out var body))
{

View File

@@ -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)

View File

@@ -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);
}
}

View File

@@ -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)

View File

@@ -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);
}