Skip to content

Commit

Permalink
fix damageeeee
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinary1 committed Nov 4, 2024
1 parent affa9c3 commit 9314da4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public void InitializeSteps()

private void OnStepBleedComplete(Entity<SurgeryStepBleedEffectComponent> ent, ref SurgeryStepEvent args)
{
if(ent.Comp.Damage is not null && TryComp<DamageableComponent>(args.Body, out var comp))
_damageableSystem.SetDamage(args.Body, comp, ent.Comp.Damage);
//todo add wound
}

Expand Down
7 changes: 6 additions & 1 deletion Content.Shared/_Sunrise/Medical/Surgery/Components/_Steps.cs
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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;
Expand Down
16 changes: 12 additions & 4 deletions Resources/Prototypes/_Sunrise/Surgery/organs_steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9314da4

Please sign in to comment.