diff --git a/Content.Client/PDA/PdaBoundUserInterface.cs b/Content.Client/PDA/PdaBoundUserInterface.cs index 234a1180fc..34ddb09bbb 100644 --- a/Content.Client/PDA/PdaBoundUserInterface.cs +++ b/Content.Client/PDA/PdaBoundUserInterface.cs @@ -50,6 +50,12 @@ namespace Content.Client.PDA SendPredictedMessage(new ItemSlotButtonPressedEvent(PdaComponent.PdaPaiSlotId)); }; + // WD EDIT START + _menu.EjectPassportButton.OnPressed += _ => + { + SendPredictedMessage(new ItemSlotButtonPressedEvent(PdaComponent.PdaPassportSlotId)); + }; + // WD EDIT END _menu.ActivateMusicButton.OnPressed += _ => { SendMessage(new PdaShowMusicMessage()); diff --git a/Content.Client/PDA/PdaMenu.xaml b/Content.Client/PDA/PdaMenu.xaml index 8b26860332..142013bba0 100644 --- a/Content.Client/PDA/PdaMenu.xaml +++ b/Content.Client/PDA/PdaMenu.xaml @@ -21,6 +21,7 @@ + /// The base PDA sprite state, eg. "pda", "pda-clown" @@ -24,9 +25,15 @@ namespace Content.Shared.PDA [DataField("penSlot")] public ItemSlot PenSlot = new(); + [DataField("paiSlot")] public ItemSlot PaiSlot = new(); + // WD EDIT START + [DataField("passportSlot")] + public ItemSlot PassportSlot = new(); + // WD EDIT END + // Really this should just be using ItemSlot.StartingItem. However, seeing as we have so many different starting // PDA's and no nice way to inherit the other fields from the ItemSlot data definition, this makes the yaml much // nicer to read. diff --git a/Content.Shared/PDA/PdaUpdateState.cs b/Content.Shared/PDA/PdaUpdateState.cs index cf217ed9b2..64b711f1f2 100644 --- a/Content.Shared/PDA/PdaUpdateState.cs +++ b/Content.Shared/PDA/PdaUpdateState.cs @@ -11,6 +11,7 @@ namespace Content.Shared.PDA public bool FlashlightEnabled; public bool HasPen; public bool HasPai; + public bool HasPassport; // WD EDIT public PdaIdInfoText PdaOwnerInfo; public string? StationName; public bool HasUplink; @@ -23,6 +24,7 @@ namespace Content.Shared.PDA bool flashlightEnabled, bool hasPen, bool hasPai, + bool hasPassport, // WD EDIT PdaIdInfoText pdaOwnerInfo, string? stationName, bool hasUplink = false, @@ -33,6 +35,7 @@ namespace Content.Shared.PDA FlashlightEnabled = flashlightEnabled; HasPen = hasPen; HasPai = hasPai; + HasPassport = hasPassport; // WD EDIT PdaOwnerInfo = pdaOwnerInfo; HasUplink = hasUplink; CanPlayMusic = canPlayMusic; diff --git a/Content.Shared/PDA/SharedPdaSystem.cs b/Content.Shared/PDA/SharedPdaSystem.cs index bd291a3843..63f8b5c64d 100644 --- a/Content.Shared/PDA/SharedPdaSystem.cs +++ b/Content.Shared/PDA/SharedPdaSystem.cs @@ -29,6 +29,7 @@ namespace Content.Shared.PDA ItemSlotsSystem.AddItemSlot(uid, PdaComponent.PdaIdSlotId, pda.IdSlot); ItemSlotsSystem.AddItemSlot(uid, PdaComponent.PdaPenSlotId, pda.PenSlot); ItemSlotsSystem.AddItemSlot(uid, PdaComponent.PdaPaiSlotId, pda.PaiSlot); + ItemSlotsSystem.AddItemSlot(uid, PdaComponent.PdaPassportSlotId, pda.PassportSlot); // WD EDIT UpdatePdaAppearance(uid, pda); } @@ -38,6 +39,7 @@ namespace Content.Shared.PDA ItemSlotsSystem.RemoveItemSlot(uid, pda.IdSlot); ItemSlotsSystem.RemoveItemSlot(uid, pda.PenSlot); ItemSlotsSystem.RemoveItemSlot(uid, pda.PaiSlot); + ItemSlotsSystem.RemoveItemSlot(uid, pda.PassportSlot); // WD EDIT } protected virtual void OnItemInserted(EntityUid uid, PdaComponent pda, EntInsertedIntoContainerMessage args) diff --git a/Resources/Locale/en-US/_white/pda/pda-component.ftl b/Resources/Locale/en-US/_white/pda/pda-component.ftl new file mode 100644 index 0000000000..7775ce9b50 --- /dev/null +++ b/Resources/Locale/en-US/_white/pda/pda-component.ftl @@ -0,0 +1 @@ +comp-pda-ui-eject-passport-button = Eject Passport diff --git a/Resources/Locale/ru-RU/_white/pda/pda-component.ftl b/Resources/Locale/ru-RU/_white/pda/pda-component.ftl new file mode 100644 index 0000000000..d90e72d95c --- /dev/null +++ b/Resources/Locale/ru-RU/_white/pda/pda-component.ftl @@ -0,0 +1 @@ +comp-pda-ui-eject-passport-button = Извлечь паспорт diff --git a/Resources/Prototypes/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/Entities/Objects/Devices/pda.yml index 8429644feb..3fe3b10edc 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/pda.yml @@ -41,6 +41,15 @@ whitelist: components: - IdCard + # WD EDIT START + passportSlot: + priority: -1 + ejectSound: /Audio/Machines/id_swipe.ogg + insertSound: /Audio/Machines/id_insert.ogg + whitelist: + components: + - Passport + # WD EDIT END - type: Item size: Small - type: ContainerContainer @@ -48,6 +57,7 @@ PDA-id: !type:ContainerSlot {} PDA-pen: !type:ContainerSlot {} PDA-pai: !type:ContainerSlot {} + PDA-passport: !type:ContainerSlot {} # WD EDIT Cartridge-Slot: !type:ContainerSlot {} program-container: !type:Container - type: ItemSlots