namespace Content.Shared.Silicons.StationAi;
+// Handles airlock radial
public abstract partial class SharedStationAiSystem
{
- // Handles airlock radial
-
private void InitializeAirlock()
{
SubscribeLocalEvent<DoorBoltComponent, StationAiBoltEvent>(OnAirlockBolt);
/// </summary>
private void OnAirlockBolt(EntityUid ent, DoorBoltComponent component, StationAiBoltEvent args)
{
- if (component.BoltWireCut)
+ if (component.BoltWireCut || !PowerReceiver.IsPowered(ent))
{
ShowDeviceNotRespondingPopup(args.User);
return;
}
+ if (!_access.IsAllowed(args.User, ent))
+ {
+ ShowDeviceNoAccessPopup(args.User);
+ return;
+ }
+
var setResult = _doors.TrySetBoltDown((ent, component), args.Bolted, args.User, predicted: true);
if (!setResult)
{
return;
}
+ if (!_access.IsAllowed(args.User, ent))
+ {
+ ShowDeviceNoAccessPopup(args.User);
+ return;
+ }
+
_airlocks.SetEmergencyAccess((ent, component), args.EmergencyAccess, args.User, predicted: true);
}
/// </summary>
private void OnElectrified(EntityUid ent, ElectrifiedComponent component, StationAiElectrifiedEvent args)
{
- if (
- component.IsWireCut
- || !PowerReceiver.IsPowered(ent)
- )
+ if (component.IsWireCut || !PowerReceiver.IsPowered(ent))
{
ShowDeviceNotRespondingPopup(args.User);
return;
}
+ if (!_access.IsAllowed(args.User, ent))
+ {
+ ShowDeviceNoAccessPopup(args.User);
+ return;
+ }
+
_electrify.SetElectrified((ent, component), args.Electrified);
var soundToPlay = component.Enabled
? component.AirlockElectrifyDisabled
+using Content.Shared.Access.Systems;
using Content.Shared.ActionBlocker;
using Content.Shared.Actions;
using Content.Shared.Administration.Managers;
[Dependency] private readonly INetManager _net = default!;
[Dependency] private readonly ItemSlotsSystem _slots = default!;
[Dependency] private readonly ItemToggleSystem _toggles = default!;
+ [Dependency] private readonly AccessReaderSystem _access = default!;
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
[Dependency] private readonly MetaDataSystem _metadata = default!;
[Dependency] private readonly SharedAirlockSystem _airlocks = default!;
toggle-light = Toggle light
ai-device-not-responding = Device is not responding
+ai-device-no-access = You have no access to this device
ai-consciousness-download-warning = Your consciousness is being downloaded.
station-ai-hologram-male = Male appearance
station-ai-hologram-face = Disembodied head
station-ai-hologram-cat = Cat form
-station-ai-hologram-dog = Corgi form
\ No newline at end of file
+station-ai-hologram-dog = Corgi form