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

@@ -92,7 +92,7 @@ namespace Content.Server.Kitchen.EntitySystems
return;
if (component.PrototypesToSpawn?.Count > 0) {
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-knife-needed"), uid, Filter.Entities(args.User));
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-knife-needed"), uid, args.User);
args.Handled = true;
}
}
@@ -124,8 +124,7 @@ namespace Content.Server.Kitchen.EntitySystems
UpdateAppearance(uid, null, component);
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-kill", ("user", Identity.Entity(userUid, EntityManager)), ("victim", victimUid)), uid,
Filter.Pvs(userUid), PopupType.LargeCaution);
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-kill", ("user", Identity.Entity(userUid, EntityManager)), ("victim", victimUid)), uid, PopupType.LargeCaution);
// THE WHAT?
// TODO: Need to be able to leave them on the spike to do DoT, see ss13.
@@ -154,12 +153,12 @@ namespace Content.Server.Kitchen.EntitySystems
if (component.PrototypesToSpawn.Count != 0)
{
_popupSystem.PopupEntity(component.MeatSource1p, uid, Filter.Entities(user), PopupType.MediumCaution);
_popupSystem.PopupEntity(component.MeatSource1p, uid, user, PopupType.MediumCaution);
}
else
{
UpdateAppearance(uid, null, component);
_popupSystem.PopupEntity(component.MeatSource0, uid, Filter.Entities(user), PopupType.MediumCaution);
_popupSystem.PopupEntity(component.MeatSource0, uid, user, PopupType.MediumCaution);
}
return true;
@@ -181,13 +180,13 @@ namespace Content.Server.Kitchen.EntitySystems
if (component.PrototypesToSpawn?.Count > 0)
{
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-collect", ("this", uid)), uid, Filter.Entities(userUid));
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-collect", ("this", uid)), uid, userUid);
return false;
}
if (!Resolve(victimUid, ref butcherable, false))
{
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, Filter.Entities(userUid));
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, userUid);
return false;
}
@@ -196,10 +195,10 @@ namespace Content.Server.Kitchen.EntitySystems
case ButcheringType.Spike:
return true;
case ButcheringType.Knife:
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher-knife", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, Filter.Entities(userUid));
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher-knife", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, userUid);
return false;
default:
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, Filter.Entities(userUid));
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-butcher", ("victim", Identity.Entity(victimUid, EntityManager)), ("this", uid)), victimUid, userUid);
return false;
}
}
@@ -217,14 +216,13 @@ namespace Content.Server.Kitchen.EntitySystems
!mobState.IsDead())
{
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-deny-not-dead", ("victim", Identity.Entity(victimUid, EntityManager))),
victimUid, Filter.Entities(userUid));
victimUid, userUid);
return true;
}
if (userUid != victimUid)
{
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-begin-hook-victim", ("user", Identity.Entity(userUid, EntityManager)), ("this", uid)), victimUid,
Filter.Entities(victimUid), PopupType.LargeCaution);
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-begin-hook-victim", ("user", Identity.Entity(userUid, EntityManager)), ("this", uid)), victimUid, victimUid, PopupType.LargeCaution);
}
// TODO: make it work when SuicideEvent is implemented
// else