]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix Punpun crew monitor sensor (#20484)
authorRepo <47093363+Titian3@users.noreply.github.com>
Thu, 28 Sep 2023 10:53:53 +0000 (23:53 +1300)
committerGitHub <noreply@github.com>
Thu, 28 Sep 2023 10:53:53 +0000 (20:53 +1000)
Content.Server/Access/Components/PresetIdCardComponent.cs
Content.Server/Access/Systems/PresetIdCardSystem.cs
Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml
Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml
Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml

index 89850866d651ae9e291561d7c91f8bde99459371..a2842d7815f1572dde131092433605109b2b72eb 100644 (file)
@@ -5,5 +5,8 @@ namespace Content.Server.Access.Components
     {
         [DataField("job")]
         public string? JobName;
+
+        [DataField("name")]
+        public string? IdName;
     }
 }
index 271e16cbf9309e0e13a2f6e390c5064b2f4345a9..96a38278b5babf83779b08e4b1ce23c6109fc163 100644 (file)
@@ -37,6 +37,7 @@ namespace Content.Server.Access.Systems
                     return;
 
                 SetupIdAccess(uid, card, true);
+                SetupIdName(uid, card);
             }
         }
 
@@ -53,6 +54,14 @@ namespace Content.Server.Access.Systems
                 extended = Comp<StationJobsComponent>(station.Value).ExtendedAccess;
 
             SetupIdAccess(uid, id, extended);
+            SetupIdName(uid, id);
+        }
+
+        private void SetupIdName(EntityUid uid, PresetIdCardComponent id)
+        {
+            if (id.IdName == null)
+                return;
+            _cardSystem.TryChangeFullName(uid, id.IdName);
         }
 
         private void SetupIdAccess(EntityUid uid, PresetIdCardComponent id, bool extended)
index 4f1917fe182a8b7df4ca86a0ba1781e199ea7eb2..c9f19e010c90c608631a62c0cfab2dd989dec377 100644 (file)
     sprite: Clothing/Uniforms/Jumpsuit/punpun.rsi
   - type: Clothing
     sprite: Clothing/Uniforms/Jumpsuit/punpun.rsi
+  - type: SuitSensor
+    controlsLocked: false
+    randomMode: false
+    mode: SensorCords
 
 - type: entity
   parent: ClothingUniformBase
index cca026f7d8aee196dc98855c8fd859aecc713adb..24462d511365290a9f930682a6b565ad3080a265 100644 (file)
   - type: PresetIdCard
     job: Bartender
 
+- type: entity
+  parent: IDCardStandard
+  id: PunPunIDCard
+  name: pun pun ID card
+  components:
+    - type: Sprite
+      layers:
+        - state: default
+        - state: idbartender
+    - type: PresetIdCard
+      job: Bartender
+      name: Pun Pun
+
 - type: entity
   parent: IDCardStandard
   id: ChefIDCard
index 066ed49adcb4610cac648e1dd5ac23974f11a496..b28546a0c414bf38f7293a0e7983b03cb3d84781 100644 (file)
     head: ClothingHeadHatTophat
     ears: ClothingHeadsetService
     jumpsuit: ClothingUniformJumpsuitJacketMonkey
-    id: BartenderIDCard
+    id: PunPunIDCard
 
 # Passenger but without the ID, bag, or headset