PopupSystem public methods rejig (#12830)

This commit is contained in:
Leon Friedrich
2022-12-19 10:41:47 +13:00
committed by GitHub
parent e459452333
commit 881a2b2ece
164 changed files with 721 additions and 631 deletions

View File

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

View File

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

View File

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

View File

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

View File

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