using Content.Server.Kitchen.Components; using Content.Shared._Shitmed.Medical.Surgery.Tools; namespace Content.Server._Shitmed.Medical.Surgery; /// /// Makes all sharp things usable for incisions and sawing through bones, though worse than any other kind of ghetto analogue. /// public sealed partial class GhettoSurgerySystem : EntitySystem { public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnSharpInit); SubscribeLocalEvent(OnSharpShutdown); } private void OnSharpInit(Entity ent, ref MapInitEvent args) { if (EnsureComp(ent, out var scalpel)) { ent.Comp.HadScalpel = true; } else { scalpel.Speed = 0.3f; Dirty(ent.Owner, scalpel); } if (EnsureComp(ent, out var saw)) { ent.Comp.HadBoneSaw = true; } else { saw.Speed = 0.2f; Dirty(ent.Owner, saw); } } private void OnSharpShutdown(Entity ent, ref ComponentShutdown args) { if (ent.Comp.HadScalpel) RemComp(ent); if (ent.Comp.HadBoneSaw) RemComp(ent); } }