SendMessage(new ItemSlotButtonPressedEvent(PdaComponent.PdaPenSlotId));
};
+ _menu.EjectPaiButton.OnPressed += _ =>
+ {
+ SendMessage(new ItemSlotButtonPressedEvent(PdaComponent.PdaPaiSlotId));
+ };
+
_menu.ActivateMusicButton.OnPressed += _ =>
{
SendMessage(new PdaShowMusicMessage());
<pda:PdaNavigationButton Name="FlashLightToggleButton" Access="Public" ToggleMode="True" ActiveFgColor="#EAEFBB" SetWidth="32"/>
<pda:PdaNavigationButton Name="EjectPenButton" Access="Public" SetWidth="32"/>
<pda:PdaNavigationButton Name="EjectIdButton" Access="Public" SetWidth="32"/>
+ <pda:PdaNavigationButton Name="EjectPaiButton" Access="Public" SetWidth="32"/>
</BoxContainer>
<BoxContainer Name="ViewContainer" HorizontalExpand="True" VerticalExpand="True" Access="Public">
<BoxContainer Orientation="Vertical"
-using Content.Client.GameTicking.Managers;
+using Content.Client.GameTicking.Managers;
using Content.Shared.PDA;
using Robust.Shared.Utility;
using Content.Shared.CartridgeLoader;
FlashLightToggleButton.IconTexture = new SpriteSpecifier.Texture(new("/Textures/Interface/light.png"));
EjectPenButton.IconTexture = new SpriteSpecifier.Texture(new("/Textures/Interface/pencil.png"));
EjectIdButton.IconTexture = new SpriteSpecifier.Texture(new("/Textures/Interface/eject.png"));
+ EjectPaiButton.IconTexture = new SpriteSpecifier.Texture(new("/Textures/Interface/PAI.png"));
ProgramCloseButton.IconTexture = new SpriteSpecifier.Texture(new("/Textures/Interface/Nano/cross.svg.png"));
EjectIdButton.IsActive = state.PdaOwnerInfo.IdOwner != null || state.PdaOwnerInfo.JobTitle != null;
EjectPenButton.IsActive = state.HasPen;
+ EjectPaiButton.IsActive = state.HasPai;
ActivateMusicButton.Visible = state.CanPlayMusic;
ShowUplinkButton.Visible = state.HasUplink;
LockUplinkButton.Visible = state.HasUplink;
protected override void OnItemRemoved(EntityUid uid, PdaComponent pda, EntRemovedFromContainerMessage args)
{
- if (args.Container.ID != pda.IdSlot.ID && args.Container.ID != pda.PenSlot.ID)
+ if (args.Container.ID != pda.IdSlot.ID && args.Container.ID != pda.PenSlot.ID && args.Container.ID != pda.PaiSlot.ID)
return;
// TODO: This is super cursed just use compstates please.
GetNetEntity(loader.ActiveProgram),
pda.FlashlightOn,
pda.PenSlot.HasItem,
+ pda.PaiSlot.HasItem,
new PdaIdInfoText
{
ActualOwnerName = pda.OwnerName,
{
public const string PdaIdSlotId = "PDA-id";
public const string PdaPenSlotId = "PDA-pen";
+ public const string PdaPaiSlotId = "PDA-pai";
/// <summary>
/// The base PDA sprite state, eg. "pda", "pda-clown"
[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
{
public bool FlashlightEnabled;
public bool HasPen;
+ public bool HasPai;
public PdaIdInfoText PdaOwnerInfo;
public string? StationName;
public bool HasUplink;
NetEntity? activeUI,
bool flashlightEnabled,
bool hasPen,
+ bool hasPai,
PdaIdInfoText pdaOwnerInfo,
string? stationName,
bool hasUplink = false,
{
FlashlightEnabled = flashlightEnabled;
HasPen = hasPen;
+ HasPai = hasPai;
PdaOwnerInfo = pdaOwnerInfo;
HasUplink = hasUplink;
CanPlayMusic = canPlayMusic;
ItemSlotsSystem.AddItemSlot(uid, PdaComponent.PdaIdSlotId, pda.IdSlot);
ItemSlotsSystem.AddItemSlot(uid, PdaComponent.PdaPenSlotId, pda.PenSlot);
+ ItemSlotsSystem.AddItemSlot(uid, PdaComponent.PdaPaiSlotId, pda.PaiSlot);
UpdatePdaAppearance(uid, 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)
state: pda
- type: Pda
state: pda
+ paiSlot:
+ priority: -2
+ whitelist:
+ components:
+ - PAI
penSlot:
startingItem: Pen
priority: -1
containers:
PDA-id: !type:ContainerSlot {}
PDA-pen: !type:ContainerSlot {}
+ PDA-pai: !type:ContainerSlot {}
Cartridge-Slot: !type:ContainerSlot {}
program-container: !type:Container
- type: ItemSlots