{
base.Initialize();
-
- SubscribeLocalEvent<DoorComponent, BeforePryEvent>(OnBeforeDoorPry);
SubscribeLocalEvent<DoorComponent, WeldableAttemptEvent>(OnWeldAttempt);
SubscribeLocalEvent<DoorComponent, WeldableChangedEvent>(OnWeldChanged);
SubscribeLocalEvent<DoorComponent, GotEmaggedEvent>(OnEmagged);
else if (component.State == DoorState.Welded)
SetState(uid, DoorState.Closed, component);
}
-
- private void OnBeforeDoorPry(EntityUid id, DoorComponent door, ref BeforePryEvent args)
- {
- if (door.State == DoorState.Welded || !door.CanPry)
- args.Cancelled = true;
- }
#endregion
SubscribeLocalEvent<DoorComponent, StartCollideEvent>(HandleCollide);
SubscribeLocalEvent<DoorComponent, PreventCollideEvent>(PreventCollision);
+ SubscribeLocalEvent<DoorComponent, BeforePryEvent>(OnBeforePry);
SubscribeLocalEvent<DoorComponent, GetPryTimeModifierEvent>(OnPryTimeModifier);
}
args.BaseTime = door.PryTime;
}
+ private void OnBeforePry(EntityUid uid, DoorComponent door, ref BeforePryEvent args)
+ {
+ if (door.State == DoorState.Welded || !door.CanPry)
+ args.Cancelled = true;
+ }
+
/// <summary>
/// Update the door state/visuals and play an access denied sound when a user without access interacts with the
/// door.
//If the colliding entity is a slippable item ignore it by the airlock
if (otherPhysics.CollisionLayer == (int)CollisionGroup.SlipLayer && otherPhysics.CollisionMask == (int)CollisionGroup.ItemMask)
continue;
-
+
//For when doors need to close over conveyor belts
if (otherPhysics.CollisionLayer == (int) CollisionGroup.ConveyorMask)
continue;