fish-station/Content.Shared/Damage/Components/DamageOnHighSpeedImpactComponent.cs
ReWAFFlution 72b8bcc136
Upstream
* 1

* фикс шаттла утилей

* фиксы

* FTL иплакт. Задержка на отсегивание других

* Mechlocker construction fix (#2703)

* Фикс корпАрации на корпОрацию (#2701)

* ебучие артефакты (#2698)

* улучшения эффектов волос (#2699)

* Крафт петарды (#2696)

* фикс крафта петард (#2704)

* 2

* упс

* Игроки теперь ничего не видят, будучи в трубе (#2712)

* Energy shield sprite fix (#2711)

* Новые декали и диван (#2707)

* Сортировка иконок состояний по алфавиту (#2706)

* Automatic changelog update

* Снова абдукторы (#2705)

* Automatic changelog update

* да блядь

* увы

---------

Co-authored-by: Vigers Ray <vigersray@gmail.com>
Co-authored-by: Hero010h <163765999+Hero010h@users.noreply.github.com>
Co-authored-by: Ligyb <65973111+Lgibb18@users.noreply.github.com>
Co-authored-by: temm1ie <63717386+temm1ie@users.noreply.github.com>
Co-authored-by: ThereDrD <88589686+ThereDrD0@users.noreply.github.com>
Co-authored-by: DeasTrouGht <154323704+DeasTrouGht@users.noreply.github.com>
Co-authored-by: Inowe <107273594+InoweD@users.noreply.github.com>
Co-authored-by: Sunrise-Bot <sunrise.project.top@gmail.com>
Co-authored-by: iertis <kanopus952@gmail.com>
2025-08-05 04:05:06 +03:00

40 lines
1.5 KiB
C#

using Content.Shared.Damage.Systems;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Damage.Components;
/// <summary>
/// Should the entity take damage / be stunned if colliding at a speed above MinimumSpeed?
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(DamageOnHighSpeedImpactSystem))]
public sealed partial class DamageOnHighSpeedImpactComponent : Component
{
[DataField("minimumSpeed"), ViewVariables(VVAccess.ReadWrite)]
public float MinimumSpeed = 10f; // Sunrise-Edit
[DataField("speedDamageFactor"), ViewVariables(VVAccess.ReadWrite)]
public float SpeedDamageFactor = 0.5f;
[DataField("soundHit", required: true), ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier SoundHit = default!;
[DataField("stunChance"), ViewVariables(VVAccess.ReadWrite)]
public float StunChance = 0.25f;
[DataField("stunMinimumDamage"), ViewVariables(VVAccess.ReadWrite)]
public int StunMinimumDamage = 10;
[DataField("stunSeconds"), ViewVariables(VVAccess.ReadWrite)]
public float StunSeconds = 1f;
[DataField("damageCooldown"), ViewVariables(VVAccess.ReadWrite)]
public float DamageCooldown = 2f;
[DataField("lastHit", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan? LastHit;
[DataField("damage", required: true), ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier Damage = default!;
}