Predict DestructibleSystem Part 2: First batch of entity effects (#41039)
* first batch * fix name * fix
This commit is contained in:
27
Content.Shared/EntityEffects/EntityEffectEvent.cs
Normal file
27
Content.Shared/EntityEffects/EntityEffectEvent.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace Content.Shared.EntityEffects;
|
||||
|
||||
/// <summary>
|
||||
/// An Event carrying an entity effect.
|
||||
/// </summary>
|
||||
/// <param name="Effect">The Effect</param>
|
||||
/// <param name="Scale">A strength scalar for the effect, defaults to 1 and typically only goes under for incomplete reactions.</param>
|
||||
/// <param name="User">The entity causing the effect.</param>
|
||||
[ByRefEvent, Access(typeof(SharedEntityEffectsSystem))]
|
||||
public readonly record struct EntityEffectEvent<T>(T Effect, float Scale, EntityUid? User) where T : EntityEffectBase<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// The Condition being raised in this event
|
||||
/// </summary>
|
||||
public readonly T Effect = Effect;
|
||||
|
||||
/// <summary>
|
||||
/// The Scale modifier of this Effect.
|
||||
/// </summary>
|
||||
public readonly float Scale = Scale;
|
||||
|
||||
/// <summary>
|
||||
/// The entity that caused this effect.
|
||||
/// Used for admin logs and prediction purposes.
|
||||
/// </summary>
|
||||
public readonly EntityUid? User = User;
|
||||
}
|
||||
Reference in New Issue
Block a user