[DataField("popupType")]
public PopupType PopupType;
+ /// <summary>
+ /// Only the affected entity will see the popup.
+ /// </summary>
+ [DataField]
+ public bool TargetOnly;
+
public void Execute(EntityUid uid, DestructibleSystem system, EntityUid? cause = null)
{
var popup = system.EntityManager.System<SharedPopupSystem>();
// popup is placed at coords since the entity could be deleted after, no more popup then
var coords = system.EntityManager.GetComponent<TransformComponent>(uid).Coordinates;
- popup.PopupCoordinates(Loc.GetString(Popup), coords, PopupType);
+
+ if (TargetOnly)
+ popup.PopupCoordinates(Loc.GetString(Popup), coords, uid, PopupType);
+ else
+ popup.PopupCoordinates(Loc.GetString(Popup), coords, PopupType);
}
}
--- /dev/null
+using Content.Server.Medical;
+
+namespace Content.Server.Destructible.Thresholds.Behaviors;
+
+[DataDefinition]
+public sealed partial class VomitBehavior : IThresholdBehavior
+{
+ public void Execute(EntityUid uid, DestructibleSystem system, EntityUid? cause = null)
+ {
+ system.EntityManager.System<VomitSystem>().Vomit(uid);
+ }
+}
- !type:PlaySoundBehavior
sound:
collection: MeatLaserImpact
+ - trigger:
+ !type:DamageTypeTrigger
+ damageType: Radiation
+ damage: 15
+ behaviors:
+ - !type:PopupBehavior
+ popup: mouth-taste-metal
+ popupType: LargeCaution
+ targetOnly: true
+ - trigger:
+ !type:DamageTypeTrigger
+ damageType: Radiation
+ damage: 40
+ behaviors:
+ - !type:VomitBehavior
- type: RadiationReceiver
- type: Stamina
- type: MobState