From 9314da4af260527ed39cd8086757abcdd6c76ff5 Mon Sep 17 00:00:00 2001 From: Rinary Date: Mon, 4 Nov 2024 12:17:51 +0200 Subject: [PATCH] fix damageeeee --- .../Medical/Surgery/SurgerySystem.Steps.cs | 2 ++ .../Medical/Surgery/Components/_Steps.cs | 7 ++++++- .../Prototypes/_Sunrise/Surgery/organs_steps.yml | 16 ++++++++++++---- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Content.Server/_Sunrise/Medical/Surgery/SurgerySystem.Steps.cs b/Content.Server/_Sunrise/Medical/Surgery/SurgerySystem.Steps.cs index 233b070db72..1778ccfaa25 100644 --- a/Content.Server/_Sunrise/Medical/Surgery/SurgerySystem.Steps.cs +++ b/Content.Server/_Sunrise/Medical/Surgery/SurgerySystem.Steps.cs @@ -41,6 +41,8 @@ public void InitializeSteps() private void OnStepBleedComplete(Entity ent, ref SurgeryStepEvent args) { + if(ent.Comp.Damage is not null && TryComp(args.Body, out var comp)) + _damageableSystem.SetDamage(args.Body, comp, ent.Comp.Damage); //todo add wound } diff --git a/Content.Shared/_Sunrise/Medical/Surgery/Components/_Steps.cs b/Content.Shared/_Sunrise/Medical/Surgery/Components/_Steps.cs index 8648b062e48..5bc50e3ee69 100644 --- a/Content.Shared/_Sunrise/Medical/Surgery/Components/_Steps.cs +++ b/Content.Shared/_Sunrise/Medical/Surgery/Components/_Steps.cs @@ -1,4 +1,5 @@ using Content.Shared.Chat.Prototypes; +using Content.Shared.Damage; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; // Based on the RMC14. @@ -7,7 +8,11 @@ namespace Content.Shared._Sunrise.Medical.Surgery.Effects.Step; [RegisterComponent, NetworkedComponent, Access(typeof(SharedSurgerySystem))] public sealed partial class SurgeryClampBleedEffectComponent : Component; [RegisterComponent, NetworkedComponent, Access(typeof(SharedSurgerySystem))] public sealed partial class SurgeryStepAttachLimbEffectComponent : Component; -[RegisterComponent, NetworkedComponent, Access(typeof(SharedSurgerySystem))] public sealed partial class SurgeryStepBleedEffectComponent : Component; +[RegisterComponent, NetworkedComponent, Access(typeof(SharedSurgerySystem))] public sealed partial class SurgeryStepBleedEffectComponent : Component +{ + [DataField] + public DamageSpecifier? Damage; +}; [RegisterComponent, NetworkedComponent, Access(typeof(SharedSurgerySystem))] public sealed partial class SurgeryStepAmputationEffectComponent : Component; [RegisterComponent, NetworkedComponent, Access(typeof(SharedSurgerySystem))] public sealed partial class SurgeryRemoveAccentComponent : Component; [RegisterComponent, NetworkedComponent, Access(typeof(SharedSurgerySystem))] public sealed partial class SurgeryClearProgressComponent : Component; diff --git a/Resources/Prototypes/_Sunrise/Surgery/organs_steps.yml b/Resources/Prototypes/_Sunrise/Surgery/organs_steps.yml index 3156ad5a9d2..ee2ac1dc8bf 100644 --- a/Resources/Prototypes/_Sunrise/Surgery/organs_steps.yml +++ b/Resources/Prototypes/_Sunrise/Surgery/organs_steps.yml @@ -380,7 +380,9 @@ tools: - type: Scalpel - type: SurgeryStepBleedEffect - damage: 5 + damage: + types: + Slash: 10 - type: Sprite sprite: Objects/Specific/Medical/Surgery/scalpel.rsi state: scalpel @@ -424,7 +426,9 @@ tools: - type: BoneSaw - type: SurgeryStepBleedEffect - damage: 10 + damage: + types: + Slash: 10 - type: Sprite sprite: Objects/Specific/Medical/Surgery/saw.rsi state: saw @@ -468,7 +472,9 @@ tools: - type: Scalpel - type: SurgeryStepBleedEffect - damage: 8 + damage: + types: + Slash: 10 - type: Sprite sprite: Objects/Specific/Medical/Surgery/scalpel.rsi state: scalpel @@ -498,7 +504,9 @@ tools: - type: Scalpel - type: SurgeryStepBleedEffect - damage: 12 + damage: + types: + Slash: 10 - type: Sprite sprite: Objects/Specific/Medical/Surgery/scalpel.rsi state: scalpel