Fix SCRAM implant not working while cuffed. Incidentally fix freedom implant working while dead/crit (#25978)
* Fix SCRAM implant not being usable while in cuffs. Also fix freedom implant from working while dead/crit as a side effect * Move check up to apply to all actions and do thing I forgor to do before * Change check into an ActionBlocker check that also checks whether the user is sleeping. * Make checking for Consciousness the default for actions Went through and chose what I believe to be sensible defaults for actions that had CheckCanInteract. * Fix typos my beloved I had an unbelievable skill issue * Fix major skill issue
This commit is contained in:
@@ -7,6 +7,7 @@ using Content.Shared.Damage;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Mobs;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Slippery;
|
||||
@@ -45,6 +46,7 @@ namespace Content.Server.Bed.Sleep
|
||||
SubscribeLocalEvent<SleepingComponent, InteractHandEvent>(OnInteractHand);
|
||||
SubscribeLocalEvent<SleepingComponent, ExaminedEvent>(OnExamined);
|
||||
SubscribeLocalEvent<SleepingComponent, SlipAttemptEvent>(OnSlip);
|
||||
SubscribeLocalEvent<SleepingComponent, ConsciousAttemptEvent>(OnConsciousAttempt);
|
||||
SubscribeLocalEvent<ForcedSleepingComponent, ComponentInit>(OnInit);
|
||||
}
|
||||
|
||||
@@ -173,6 +175,12 @@ namespace Content.Server.Bed.Sleep
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
private void OnConsciousAttempt(EntityUid uid, SleepingComponent component, ConsciousAttemptEvent args)
|
||||
{
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
|
||||
private void OnInit(EntityUid uid, ForcedSleepingComponent component, ComponentInit args)
|
||||
{
|
||||
TrySleeping(uid);
|
||||
|
||||
Reference in New Issue
Block a user