Skip to content

Commit

Permalink
Replace ForcedSleeping with Anesthesia for surgery checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sowelipililimute committed Jan 10, 2025
1 parent 2ff232e commit 9dea48c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Content.Server/_Shitmed/Medical/Surgery/SurgerySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Content.Shared.Eye.Blinding.Systems;
using Content.Shared.Interaction;
using Content.Shared.Inventory;
using Content.Shared._DV.Surgery; // DeltaV: expanded anesthesia
using Content.Shared._Shitmed.Medical.Surgery;
using Content.Shared._Shitmed.Medical.Surgery.Conditions;
using Content.Shared._Shitmed.Medical.Surgery.Effects.Step;
Expand Down Expand Up @@ -143,7 +144,7 @@ private void OnSurgeryStepDamage(Entity<SurgeryTargetComponent> ent, ref Surgery
private void OnSurgeryDamageChange(Entity<SurgeryDamageChangeEffectComponent> ent, ref SurgeryStepEvent args) // DeltaV
{
var damageChange = ent.Comp.Damage;
if (HasComp<ForcedSleepingComponent>(args.Body))
if (HasComp<AnesthesiaComponent>(args.Body)) // DeltaV: anesthesia
damageChange = damageChange * ent.Comp.SleepModifier;

SetDamage(args.Body, damageChange, 0.5f, args.User, args.Part);
Expand All @@ -162,7 +163,7 @@ private void OnSurgerySpecialDamageChange(Entity<SurgerySpecialDamageChangeEffec

private void OnStepScreamComplete(Entity<SurgeryStepEmoteEffectComponent> ent, ref SurgeryStepEvent args)
{
if (HasComp<ForcedSleepingComponent>(args.Body))
if (HasComp<AnesthesiaComponent>(args.Body)) // DeltaV: anesthesia
return;

_chat.TryEmoteWithChat(args.Body, ent.Comp.Emote);
Expand Down
12 changes: 12 additions & 0 deletions Content.Shared/_DV/Surgery/AnesthesiaComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;

namespace Content.Shared._DV.Surgery;

/// <summary>
/// Exists for use as a status effect. Allows surgical operations to not cause immense pain.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentPause]
public sealed partial class AnesthesiaComponent : Component
{
}

0 comments on commit 9dea48c

Please sign in to comment.