New Feature: Symptoms of radiation poisoning (#39805)

* New Feature

* Cleanup

* Bump threshold

* Update

* Update

* Single change

* Me when I forgor the yaml

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
Winkarst-cpu
2025-08-28 00:56:09 +03:00
committed by GitHub
parent 1ecf62e72a
commit 5028161c7b
4 changed files with 39 additions and 1 deletions

View File

@@ -20,11 +20,21 @@ public sealed partial class PopupBehavior : IThresholdBehavior
[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;
if (TargetOnly)
popup.PopupCoordinates(Loc.GetString(Popup), coords, uid, PopupType);
else
popup.PopupCoordinates(Loc.GetString(Popup), coords, PopupType);
}
}

View File

@@ -0,0 +1,12 @@
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);
}
}

View File

@@ -0,0 +1 @@
mouth-taste-metal = You taste something metallic in your mouth!

View File

@@ -85,6 +85,21 @@
- !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