From 0a8a6f81c51b826a2bc689aa9a8340e859f36102 Mon Sep 17 00:00:00 2001 From: Repo <47093363+Titian3@users.noreply.github.com> Date: Thu, 28 Sep 2023 23:53:53 +1300 Subject: [PATCH] Fix Punpun crew monitor sensor (#20484) --- .../Access/Components/PresetIdCardComponent.cs | 3 +++ Content.Server/Access/Systems/PresetIdCardSystem.cs | 9 +++++++++ .../Entities/Clothing/Uniforms/jumpsuits.yml | 4 ++++ .../Entities/Objects/Misc/identification_cards.yml | 13 +++++++++++++ .../Prototypes/Roles/Jobs/Fun/misc_startinggear.yml | 2 +- 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Content.Server/Access/Components/PresetIdCardComponent.cs b/Content.Server/Access/Components/PresetIdCardComponent.cs index 89850866d6..a2842d7815 100644 --- a/Content.Server/Access/Components/PresetIdCardComponent.cs +++ b/Content.Server/Access/Components/PresetIdCardComponent.cs @@ -5,5 +5,8 @@ namespace Content.Server.Access.Components { [DataField("job")] public string? JobName; + + [DataField("name")] + public string? IdName; } } diff --git a/Content.Server/Access/Systems/PresetIdCardSystem.cs b/Content.Server/Access/Systems/PresetIdCardSystem.cs index 271e16cbf9..96a38278b5 100644 --- a/Content.Server/Access/Systems/PresetIdCardSystem.cs +++ b/Content.Server/Access/Systems/PresetIdCardSystem.cs @@ -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(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) diff --git a/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml b/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml index 4f1917fe18..c9f19e010c 100644 --- a/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml +++ b/Resources/Prototypes/Entities/Clothing/Uniforms/jumpsuits.yml @@ -48,6 +48,10 @@ 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 diff --git a/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml b/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml index cca026f7d8..24462d5113 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml @@ -293,6 +293,19 @@ - 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 diff --git a/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml b/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml index 066ed49adc..b28546a0c4 100644 --- a/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml +++ b/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml @@ -282,7 +282,7 @@ head: ClothingHeadHatTophat ears: ClothingHeadsetService jumpsuit: ClothingUniformJumpsuitJacketMonkey - id: BartenderIDCard + id: PunPunIDCard # Passenger but without the ID, bag, or headset