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

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

View File

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

View File

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