Permit ReagentEffect PopupMessage to access the solutionEntity it occurs in. (#11537)
This commit is contained in:
@@ -22,10 +22,14 @@ namespace Content.Server.Chemistry.ReagentEffects
|
||||
var random = IoCManager.Resolve<IRobustRandom>();
|
||||
|
||||
var msg = random.Pick(Messages);
|
||||
var msgArgs = new (string, object)[] {
|
||||
("entity", args.SolutionEntity),
|
||||
("organ", args.OrganEntity.GetValueOrDefault()),
|
||||
};
|
||||
if (Type == PopupRecipients.Local)
|
||||
popupSys.PopupEntity(Loc.GetString(msg), args.SolutionEntity, Filter.Entities(args.SolutionEntity), VisualType);
|
||||
popupSys.PopupEntity(Loc.GetString(msg, msgArgs), args.SolutionEntity, Filter.Entities(args.SolutionEntity), VisualType);
|
||||
else if (Type == PopupRecipients.Pvs)
|
||||
popupSys.PopupEntity(Loc.GetString(msg), args.SolutionEntity, Filter.Pvs(args.SolutionEntity), VisualType);
|
||||
popupSys.PopupEntity(Loc.GetString(msg, msgArgs), args.SolutionEntity, Filter.Pvs(args.SolutionEntity), VisualType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user