diff --git a/Content.Server/ADT/Hemophilia/HemophiliaSystem.cs b/Content.Server/ADT/Hemophilia/HemophiliaSystem.cs new file mode 100644 index 00000000000..9092cc66a14 --- /dev/null +++ b/Content.Server/ADT/Hemophilia/HemophiliaSystem.cs @@ -0,0 +1,31 @@ +using Content.Server.Body.Components; +using Content.Shared.ADT.Traits; + +namespace Content.Server.ADT.Hemophilia; + +public sealed partial class HemophiliaSystem : EntitySystem +{ + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnInitHemophilia); + SubscribeLocalEvent(OnShutdown); + + } + + private void OnInitHemophilia(EntityUid uid, HemophiliaComponent component, MapInitEvent args) + { + if (TryComp(uid, out var bldcomp)) + { + bldcomp.BleedReductionAmount *= component.Modifier; + } + } + private void OnShutdown(EntityUid uid, HemophiliaComponent component, ComponentShutdown args) + { + if (TryComp(uid, out var bldcomp)) + { + bldcomp.BleedReductionAmount /= component.Modifier; + } + } +} diff --git a/Content.Server/Body/Components/BloodstreamComponent.cs b/Content.Server/Body/Components/BloodstreamComponent.cs index a6d2afab219..2eb356dc0e9 100644 --- a/Content.Server/Body/Components/BloodstreamComponent.cs +++ b/Content.Server/Body/Components/BloodstreamComponent.cs @@ -9,10 +9,11 @@ using Robust.Shared.Audio; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; +using Content.Server.ADT.Hemophilia; namespace Content.Server.Body.Components { - [RegisterComponent, Access(typeof(BloodstreamSystem), typeof(ReactionMixerSystem))] + [RegisterComponent, Access(typeof(BloodstreamSystem), typeof(ReactionMixerSystem), (typeof(HemophiliaSystem)))] // ADT Hemophilia public sealed partial class BloodstreamComponent : Component { public static string DefaultChemicalsSolutionName = "chemicals"; diff --git a/Content.Shared/ADT/hemophilia/HemophiliaComponent.cs b/Content.Shared/ADT/hemophilia/HemophiliaComponent.cs new file mode 100644 index 00000000000..30ed792e1b1 --- /dev/null +++ b/Content.Shared/ADT/hemophilia/HemophiliaComponent.cs @@ -0,0 +1,10 @@ +namespace Content.Shared.ADT.Traits; + +[RegisterComponent] +public sealed partial class HemophiliaComponent : Component +{ + [DataField] + public float Modifier = 0.3f; + + +} diff --git a/Resources/Locale/en-US/ADT/traits/disabilities.ftl b/Resources/Locale/en-US/ADT/traits/disabilities.ftl new file mode 100644 index 00000000000..92289cb406e --- /dev/null +++ b/Resources/Locale/en-US/ADT/traits/disabilities.ftl @@ -0,0 +1,2 @@ +trait-hemophilia-name = Hemophilia +trait-hemophilia-desc = Your blood is clotting extremely badly. diff --git a/Resources/Locale/ru-RU/ADT/traits/disabilities.ftl b/Resources/Locale/ru-RU/ADT/traits/disabilities.ftl index e97793fe922..79eeed1909c 100644 --- a/Resources/Locale/ru-RU/ADT/traits/disabilities.ftl +++ b/Resources/Locale/ru-RU/ADT/traits/disabilities.ftl @@ -1,2 +1,5 @@ +trait-hemophilia-name = Гемофилия +trait-hemophilia-desc = Ваша кровь сворачивается крайне плохо. + trait-monochromacy-name = Цветовая слепота -trait-monochromacy-description = Ваши глаза получили необратимые повреждения, из-за чего вы видите только в оттенках серого. +trait-monochromacy-description = Ваши глаза получили необратимые повреждения, из-за чего вы видите только в оттенках серого. \ No newline at end of file diff --git a/Resources/Prototypes/ADT/Traits/disabilities.yml b/Resources/Prototypes/ADT/Traits/disabilities.yml index 817dd20cb58..fc43fc11af1 100644 --- a/Resources/Prototypes/ADT/Traits/disabilities.yml +++ b/Resources/Prototypes/ADT/Traits/disabilities.yml @@ -1,3 +1,12 @@ +- type: trait + id: ADTHemophilia + name: trait-hemophilia-name + description: trait-hemophilia-desc + category: Disabilities + components: + - type: Hemophilia + modifier: 0.01 + # Simple Station - type: trait diff --git a/Resources/Prototypes/ADT/Traits/speech.yml b/Resources/Prototypes/ADT/Traits/speech.yml index 28d63e224f3..ec03739e0d4 100644 --- a/Resources/Prototypes/ADT/Traits/speech.yml +++ b/Resources/Prototypes/ADT/Traits/speech.yml @@ -15,3 +15,4 @@ cost: 1 components: - type: DeutschAccent +