Disease Tweaks & Fixes (#7121)

This commit is contained in:
Rane
2022-03-14 02:05:01 -04:00
committed by GitHub
parent 6c5f22d4f2
commit c2711259a9
5 changed files with 19 additions and 9 deletions

View File

@@ -139,7 +139,7 @@ namespace Content.Server.Disease
if (args.Handled || !args.CanReach)
return;
if (TryComp<ApcPowerReceiverComponent>(uid, out var power) && !power.Powered)
if (HasComp<DiseaseMachineRunningComponent>(uid) || TryComp<ApcPowerReceiverComponent>(uid, out var power) && !power.Powered)
return;
if (!HasComp<HandsComponent>(args.User) || HasComp<ToolComponent>(args.Used)) // Don't want to accidentally breach wrenching or whatever
@@ -171,7 +171,7 @@ namespace Content.Server.Disease
if (args.Handled || !args.CanReach)
return;
if (TryComp<ApcPowerReceiverComponent>(uid, out var power) && !power.Powered)
if (HasComp<DiseaseMachineRunningComponent>(uid) || TryComp<ApcPowerReceiverComponent>(uid, out var power) && !power.Powered)
return;
if (!HasComp<HandsComponent>(args.User) || HasComp<ToolComponent>(args.Used)) //This check ensures tools don't break without yaml ordering jank