- fix: Fixed taking damage while in the host's body (#40)

- add: Injection reagent added: Ephedrine
This commit is contained in:
Martell
2024-02-10 02:46:57 +03:00
committed by GitHub
parent e9a7a4d62a
commit 4be8c07182
2 changed files with 12 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Server.Chat.Managers;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Server.Damage.Systems;
using Content.Server.Medical;
using Content.Server.Popups;
using Content.Server.Stunnable;
@@ -13,6 +14,7 @@ using Content.Shared.Chat;
using Content.Shared.Chemistry;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Damage;
using Content.Shared.DoAfter;
using Content.Shared.FixedPoint;
using Content.Shared.Humanoid;
@@ -55,6 +57,10 @@ public sealed class ServerBorerSystem : EntitySystem
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
[Dependency] private readonly GodmodeSystem _godmodeSystem = default!;
public override void Initialize()
{
@@ -79,6 +85,7 @@ public sealed class ServerBorerSystem : EntitySystem
SubscribeLocalEvent<BorerHostComponent, BorerReproduceEvent>(OnReproduce);
SubscribeLocalEvent<BorerHostComponent, BorerReproduceAfterEvent>(OnReproduceAfter);
SubscribeLocalEvent<InfestedBorerComponent, BorerBrainResistAfterEvent>(OnResistAfterControl);
}
private void OnReproduceAfter(EntityUid uid, BorerHostComponent component, BorerReproduceAfterEvent args)
@@ -336,6 +343,8 @@ public sealed class ServerBorerSystem : EntitySystem
infestedComponent.Points = component.Points;
Dirty(uid, infestedComponent);
_godmodeSystem.EnableGodmode(uid);
RemComp<BorerComponent>(uid);
}
@@ -501,6 +510,8 @@ public sealed class ServerBorerSystem : EntitySystem
borerComponent.Points = component.Points;
Dirty(uid, borerComponent);
_godmodeSystem.DisableGodmode(uid);
RemComp<InfestedBorerComponent>(uid);
_action.SetCooldown(borerComponent.ActionStunEntity, _timing.CurTime, _timing.CurTime+TimeSpan.FromSeconds(20));
_action.SetCooldown(borerComponent.ActionInfestEntity, _timing.CurTime, _timing.CurTime+TimeSpan.FromSeconds(20));

View File

@@ -73,6 +73,7 @@ public sealed partial class InfestedBorerComponent : Component
{ "Kelotane", 30 },
{ "Dylovene", 30 },
{ "Dexalin", 30 },
{ "Ephedrine", 50 },
{ "SpaceDrugs", 75 },
{ "Leporazine", 75 }
};