]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make universal access config better (#37079)
authorSamuka-C <47865393+Samuka-C@users.noreply.github.com>
Thu, 1 May 2025 05:20:56 +0000 (02:20 -0300)
committerGitHub <noreply@github.com>
Thu, 1 May 2025 05:20:56 +0000 (01:20 -0400)
* add a universal ID card to the universal access config

* make the admin access config have infinite range

* now checks for the BypassInteractionRange Tag instead

* Add suggested fix to the AccessOverrider system

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* remove other stuff I added

* another suggested change to avoid weird behaviour where you can use it from a distance

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Content.Server/Access/Systems/AccessOverriderSystem.cs
Resources/Prototypes/Entities/Objects/Tools/access_configurator.yml

index 4bb42a30a31531bd9525675f634eed109a0ebaaf..4062909d7554762d0c6a05a20422af9918105857 100644 (file)
@@ -197,7 +197,7 @@ public sealed class AccessOverriderSystem : SharedAccessOverriderSystem
         if (!PrivilegedIdIsAuthorized(uid, component))
             return;
 
-        if (!_interactionSystem.InRangeUnobstructed(uid, component.TargetAccessReaderId))
+        if (!_interactionSystem.InRangeUnobstructed(player, component.TargetAccessReaderId))
         {
             _popupSystem.PopupEntity(Loc.GetString("access-overrider-out-of-range"), player, player);
 
index 188cbfc51b1fb7cd25e6301f384501148a7e9783..03b49e506b2c539f7e26cedfa307e424f0e253dd 100644 (file)
@@ -69,6 +69,7 @@
       requiresComplex: true
       requireActiveHand: false
       singleUser: true
+      inHandsOnly: true
     - type: ItemSlots
     - type: ContainerContainer
       containers:
     - GenpopLeave
     privilegedIdSlot:
       name: id-card-console-privileged-id
+      startingItem: UniversalIDCard
       ejectSound: /Audio/Machines/id_swipe.ogg
       insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
       ejectOnBreak: true