|
@@ -25,6 +25,7 @@
|
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Prototypes;
|
|
|
using Robust.Shared.Timing;
|
|
using Robust.Shared.Timing;
|
|
|
using Content.Shared.Civ14.SleepZone;
|
|
using Content.Shared.Civ14.SleepZone;
|
|
|
|
|
+using Content.Shared.Standing;
|
|
|
|
|
|
|
|
namespace Content.Shared.Bed.Sleep;
|
|
namespace Content.Shared.Bed.Sleep;
|
|
|
|
|
|
|
@@ -270,6 +271,7 @@ public bool TrySleeping(Entity<MobStateComponent?> ent)
|
|
|
RaiseLocalEvent(ent.Owner, ref tryingToSleepEvent); // Use EntityUid (ent.Owner)
|
|
RaiseLocalEvent(ent.Owner, ref tryingToSleepEvent); // Use EntityUid (ent.Owner)
|
|
|
if (tryingToSleepEvent.Cancelled)
|
|
if (tryingToSleepEvent.Cancelled)
|
|
|
return false;
|
|
return false;
|
|
|
|
|
+ RaiseLocalEvent(ent.Owner, new DropHandItemsEvent(), false);
|
|
|
// Specific logic if the entity also has a SleepZoneComponent.
|
|
// Specific logic if the entity also has a SleepZoneComponent.
|
|
|
// Use TryComp with the original Entity<T> struct 'ent'.
|
|
// Use TryComp with the original Entity<T> struct 'ent'.
|
|
|
if (TryComp<SleepZoneComponent>(ent, out var sleepZone))
|
|
if (TryComp<SleepZoneComponent>(ent, out var sleepZone))
|