diff --git a/Content.Client/PDA/PdaBoundUserInterface.cs b/Content.Client/PDA/PdaBoundUserInterface.cs index 059d3c0aef..ef9d6e8b9b 100644 --- a/Content.Client/PDA/PdaBoundUserInterface.cs +++ b/Content.Client/PDA/PdaBoundUserInterface.cs @@ -40,6 +40,11 @@ namespace Content.Client.PDA SendMessage(new ItemSlotButtonPressedEvent(PdaComponent.PdaPenSlotId)); }; + _menu.EjectPaiButton.OnPressed += _ => + { + SendMessage(new ItemSlotButtonPressedEvent(PdaComponent.PdaPaiSlotId)); + }; + _menu.ActivateMusicButton.OnPressed += _ => { SendMessage(new PdaShowMusicMessage()); diff --git a/Content.Client/PDA/PdaMenu.xaml b/Content.Client/PDA/PdaMenu.xaml index 9f9dad6640..7ba72ea7f1 100644 --- a/Content.Client/PDA/PdaMenu.xaml +++ b/Content.Client/PDA/PdaMenu.xaml @@ -20,6 +20,7 @@ + /// The base PDA sprite state, eg. "pda", "pda-clown" @@ -23,6 +24,8 @@ namespace Content.Shared.PDA [DataField("penSlot")] public ItemSlot PenSlot = new(); + [DataField("paiSlot")] + public ItemSlot PaiSlot = new(); // 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 diff --git a/Content.Shared/PDA/PdaUpdateState.cs b/Content.Shared/PDA/PdaUpdateState.cs index c11b8e09f2..cf217ed9b2 100644 --- a/Content.Shared/PDA/PdaUpdateState.cs +++ b/Content.Shared/PDA/PdaUpdateState.cs @@ -10,6 +10,7 @@ namespace Content.Shared.PDA { public bool FlashlightEnabled; public bool HasPen; + public bool HasPai; public PdaIdInfoText PdaOwnerInfo; public string? StationName; public bool HasUplink; @@ -21,6 +22,7 @@ namespace Content.Shared.PDA NetEntity? activeUI, bool flashlightEnabled, bool hasPen, + bool hasPai, PdaIdInfoText pdaOwnerInfo, string? stationName, bool hasUplink = false, @@ -30,6 +32,7 @@ namespace Content.Shared.PDA { FlashlightEnabled = flashlightEnabled; HasPen = hasPen; + HasPai = hasPai; PdaOwnerInfo = pdaOwnerInfo; HasUplink = hasUplink; CanPlayMusic = canPlayMusic; diff --git a/Content.Shared/PDA/SharedPdaSystem.cs b/Content.Shared/PDA/SharedPdaSystem.cs index c9cb528f53..bd291a3843 100644 --- a/Content.Shared/PDA/SharedPdaSystem.cs +++ b/Content.Shared/PDA/SharedPdaSystem.cs @@ -28,6 +28,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); UpdatePdaAppearance(uid, pda); } @@ -36,6 +37,7 @@ namespace Content.Shared.PDA { ItemSlotsSystem.RemoveItemSlot(uid, pda.IdSlot); ItemSlotsSystem.RemoveItemSlot(uid, pda.PenSlot); + ItemSlotsSystem.RemoveItemSlot(uid, pda.PaiSlot); } protected virtual void OnItemInserted(EntityUid uid, PdaComponent pda, EntInsertedIntoContainerMessage args) diff --git a/Resources/Prototypes/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/Entities/Objects/Devices/pda.yml index 54a2563c02..45832d9b74 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/pda.yml @@ -23,6 +23,11 @@ state: pda - type: Pda state: pda + paiSlot: + priority: -2 + whitelist: + components: + - PAI penSlot: startingItem: Pen priority: -1 @@ -42,6 +47,7 @@ containers: PDA-id: !type:ContainerSlot {} PDA-pen: !type:ContainerSlot {} + PDA-pai: !type:ContainerSlot {} Cartridge-Slot: !type:ContainerSlot {} program-container: !type:Container - type: ItemSlots diff --git a/Resources/Textures/Interface/pai.png b/Resources/Textures/Interface/pai.png new file mode 100644 index 0000000000..aaa8c33243 Binary files /dev/null and b/Resources/Textures/Interface/pai.png differ