Пример #1
0
 private void OnBeforeDoorOpened(EntityUid uid, FirelockComponent component, BeforeDoorOpenedEvent args)
 {
     if (component.IsHoldingFire() || component.IsHoldingPressure())
     {
         args.Cancel();
     }
 }
Пример #2
0
 private void OnDoorGetPryTimeModifier(EntityUid uid, FirelockComponent component, DoorGetPryTimeModifierEvent args)
 {
     if (component.IsHoldingFire() || component.IsHoldingPressure())
     {
         args.PryTimeModifier *= component.LockedPryTimeModifier;
     }
 }
Пример #3
0
        private void OnBeforeDoorPry(EntityUid uid, FirelockComponent component, BeforeDoorPryEvent args)
        {
            if (!TryComp <DoorComponent>(uid, out var door) || door.State != DoorState.Closed)
            {
                return;
            }

            if (component.IsHoldingPressure())
            {
                component.Owner.PopupMessage(args.User, Loc.GetString("firelock-component-is-holding-pressure-message"));
            }
            else if (component.IsHoldingFire())
            {
                component.Owner.PopupMessage(args.User, Loc.GetString("firelock-component-is-holding-fire-message"));
            }
        }
Пример #4
0
        private void OnBeforeDoorPry(EntityUid uid, FirelockComponent component, BeforeDoorPryEvent args)
        {
            if (component.DoorComponent == null || component.DoorComponent.State != SharedDoorComponent.DoorState.Closed)
            {
                return;
            }

            if (component.IsHoldingPressure())
            {
                component.Owner.PopupMessage(args.Args.User, Loc.GetString("firelock-component-is-holding-pressure-message"));
            }
            else if (component.IsHoldingFire())
            {
                component.Owner.PopupMessage(args.Args.User, Loc.GetString("firelock-component-is-holding-fire-message"));
            }
        }