mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-23 08:37:48 +03:00
Lots of stuff. Also moved everything I could to the _Shitmed namespace
as I do in Goob. Will make future ports way faster
# Changelog
🆑 Mocho
- add: Added some fun organs and other thingies, check out the Goob PRs
if you want more details.
- fix: Fixed tons of issues with shitmed. Too many for the changelog in
fact.
(cherry picked from commit 3c9db94102cb25b28a83d51ac8d659fa31fe7d12)
51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
using Content.Server.Kitchen.Components;
|
|
using Content.Shared._Shitmed.Medical.Surgery.Tools;
|
|
|
|
namespace Content.Server._Shitmed.Medical.Surgery;
|
|
|
|
/// <summary>
|
|
/// Makes all sharp things usable for incisions and sawing through bones, though worse than any other kind of ghetto analogue.
|
|
/// </summary>
|
|
public sealed partial class GhettoSurgerySystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<SharpComponent, MapInitEvent>(OnSharpInit);
|
|
SubscribeLocalEvent<SharpComponent, ComponentShutdown>(OnSharpShutdown);
|
|
}
|
|
|
|
private void OnSharpInit(Entity<SharpComponent> ent, ref MapInitEvent args)
|
|
{
|
|
if (EnsureComp<ScalpelComponent>(ent, out var scalpel))
|
|
{
|
|
ent.Comp.HadScalpel = true;
|
|
}
|
|
else
|
|
{
|
|
scalpel.Speed = 0.3f;
|
|
Dirty(ent.Owner, scalpel);
|
|
}
|
|
|
|
if (EnsureComp<BoneSawComponent>(ent, out var saw))
|
|
{
|
|
ent.Comp.HadBoneSaw = true;
|
|
}
|
|
else
|
|
{
|
|
saw.Speed = 0.2f;
|
|
Dirty(ent.Owner, saw);
|
|
}
|
|
}
|
|
|
|
private void OnSharpShutdown(Entity<SharpComponent> ent, ref ComponentShutdown args)
|
|
{
|
|
if (ent.Comp.HadScalpel)
|
|
RemComp<ScalpelComponent>(ent);
|
|
|
|
if (ent.Comp.HadBoneSaw)
|
|
RemComp<BoneSawComponent>(ent);
|
|
}
|
|
}
|