Files
wwdpublic/Content.Shared/Projectiles/EmbedPassiveDamageComponent.cs
gluesniffler 2a33691a1c Ports Shitmed Updates From Goob (#1387)
Lots of stuff. Also moved everything I could to the _Shitmed namespace
as I do in Goob. Will make future ports way faster

# Changelog
🆑 Mocho
- add: Added some fun organs and other thingies, check out the Goob PRs
if you want more details.
- fix: Fixed tons of issues with shitmed. Too many for the changelog in
fact.

(cherry picked from commit 3c9db94102cb25b28a83d51ac8d659fa31fe7d12)
2025-01-13 23:01:51 +03:00

58 lines
1.9 KiB
C#

using Content.Shared.Damage;
using Content.Shared.Damage.Components;
using Content.Shared.FixedPoint;
using Content.Shared.Mobs.Components;
using Content.Shared._Shitmed.Targeting;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.GameStates;
namespace Content.Shared.Projectiles;
/// <summary>
/// Passively damages the mob this embeddable is attached to.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class EmbedPassiveDamageComponent : Component
{
/// <summary>
/// The entity this embeddable is attached to.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public EntityUid? Embedded = null;
/// <summary>
/// The damage component to deal damage to.
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
public DamageableComponent? EmbeddedDamageable = null;
/// <summary>
/// The MobState component to check if the target is still alive.
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
public MobStateComponent? EmbeddedMobState = null;
/// <summary>
/// The body part to apply damage to.
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
public TargetBodyPart? EmbeddedBodyPart = null;
/// <summary>
/// Damage per interval dealt to the entity every interval.
/// If this is set manually, DamageMultiplier will be ignored.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public DamageSpecifier Damage = new();
/// <summary>
/// Multiplier to be applied to the damage of DamageOtherOnHit to
/// calculate the damage per second.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float ThrowingDamageMultiplier = 0.05f;
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan NextDamage = TimeSpan.Zero;
}