Identity popup fixes (#9743)
This commit is contained in:
@@ -19,6 +19,7 @@ using Robust.Shared.Serialization.Manager;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Server.Nutrition.EntitySystems;
|
||||
using Robust.Shared.Utility;
|
||||
using Content.Shared.IdentityManagement;
|
||||
|
||||
namespace Content.Server.Disease
|
||||
{
|
||||
@@ -441,7 +442,7 @@ namespace Content.Server.Disease
|
||||
if (!Resolve(uid, ref xform)) return;
|
||||
|
||||
if (!string.IsNullOrEmpty(snoughMessage))
|
||||
_popupSystem.PopupEntity(Loc.GetString(snoughMessage, ("person", uid)), uid, Filter.Pvs(uid));
|
||||
_popupSystem.PopupEntity(Loc.GetString(snoughMessage, ("person", Identity.Entity(uid, EntityManager))), uid, Filter.Pvs(uid));
|
||||
|
||||
if (disease is not { Infectious: true } || !airTransmit)
|
||||
return;
|
||||
|
||||
@@ -2,6 +2,7 @@ using Content.Shared.Disease;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.Player;
|
||||
using JetBrains.Annotations;
|
||||
using Content.Shared.IdentityManagement;
|
||||
|
||||
namespace Content.Server.Disease.Effects
|
||||
{
|
||||
@@ -24,12 +25,12 @@ namespace Content.Server.Disease.Effects
|
||||
|
||||
public override void Effect(DiseaseEffectArgs args)
|
||||
{
|
||||
var popupSys = EntitySystem.Get<SharedPopupSystem>();
|
||||
var popupSys = args.EntityManager.EntitySysManager.GetEntitySystem<SharedPopupSystem>();
|
||||
|
||||
if (Type == PopupRecipients.Local)
|
||||
popupSys.PopupEntity(Loc.GetString(Message), args.DiseasedEntity, Filter.Entities(args.DiseasedEntity), VisualType);
|
||||
else if (Type == PopupRecipients.Pvs)
|
||||
popupSys.PopupEntity(Loc.GetString(Message, ("person", args.DiseasedEntity)), args.DiseasedEntity, Filter.Pvs(args.DiseasedEntity), VisualType);
|
||||
popupSys.PopupEntity(Loc.GetString(Message, ("person", Identity.Entity(args.DiseasedEntity, args.EntityManager))), args.DiseasedEntity, Filter.Pvs(args.DiseasedEntity), VisualType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user