Visual popup types (#9523)
* Visual popup types * Pass over `PopupCoordinates` and `PopupCursor` * `PopupEntity` pass * Disease and reagent popup pass * COLOUR
This commit is contained in:
@@ -17,20 +17,24 @@ namespace Content.Server.Disease.Effects
|
||||
public string Message = "disease-sick-generic";
|
||||
|
||||
[DataField("type")]
|
||||
public PopupType Type = PopupType.Local;
|
||||
public PopupRecipients Type = PopupRecipients.Local;
|
||||
|
||||
[DataField("visualType")]
|
||||
public PopupType VisualType = PopupType.Small;
|
||||
|
||||
public override void Effect(DiseaseEffectArgs args)
|
||||
{
|
||||
var popupSys = EntitySystem.Get<SharedPopupSystem>();
|
||||
|
||||
if (Type == PopupType.Local)
|
||||
popupSys.PopupEntity(Loc.GetString(Message), args.DiseasedEntity, Filter.Entities(args.DiseasedEntity));
|
||||
else if (Type == PopupType.Pvs)
|
||||
popupSys.PopupEntity(Loc.GetString(Message, ("person", args.DiseasedEntity)), args.DiseasedEntity, Filter.Pvs(args.DiseasedEntity));
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum PopupType
|
||||
public enum PopupRecipients
|
||||
{
|
||||
Pvs,
|
||||
Local
|
||||
|
||||
Reference in New Issue
Block a user