Zombies keep their anomalies on zombification (#33867)

* Zombies keep their anomalies on zombification

* Refactor anombies to isolate anomalies and zombies

InnerBodyAnomalies now send an event when the host dies.
Zombies cancels this event if the host is turning into a zombie.

* Anomazombies: deprecate CancellableEntityEventArgs

CancellableEntityEventArgs is deprecated. Use structs
with bool Cancelled instead.
This commit is contained in:
Patrik Caes-Sayrs
2024-12-17 04:56:47 -07:00
committed by GitHub
parent 67e5cc2104
commit 8f2d16aabf
3 changed files with 23 additions and 0 deletions

View File

@@ -70,3 +70,11 @@ public sealed partial class InnerBodyAnomalyComponent : Component
[DataField]
public string LayerMap = "inner_anomaly_layer";
}
/// <summary>
/// Event broadcast when an anomaly is being removed because the host is dying.
/// Raised directed at the host entity with the anomaly.
/// Cancel this if you want to prevent the host from losing their anomaly on death.
/// </summary>
[ByRefEvent]
public record struct BeforeRemoveAnomalyOnDeathEvent(bool Cancelled = false);