From 21351df03ab01e6e9c600ba78382950be223570c Mon Sep 17 00:00:00 2001
From: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
Date: Thu, 2 Jan 2025 19:23:28 +0100
Subject: [PATCH] Add Chameleon PDA (#30514)
* V1 commit
* Remove PDA name and unnecessary pda state
* Adds PDA to Chameleon backpack & thief toolbox
* Change to use AppearanceDataInit
* Add basic PDA state to ensure there's always a sprite before AppearanceData can be applied
* Revert PDA name (this will be changed to another way later)
* Update PDA name updating to new system
* Fix yaml, and fix Agent ID chameleon
* Updated based on review
---
.../Systems/ChameleonClothingSystem.cs | 10 +
.../UI/ChameleonBoundUserInterface.cs | 28 +-
Content.Client/PDA/PdaMenu.xaml.cs | 5 +
Content.Client/PDA/PdaSystem.cs | 40 --
Content.Client/PDA/PdaVisualizerSystem.cs | 30 ++
Content.Client/PDA/PdaVisualsComponent.cs | 14 +
.../Systems/ChameleonClothingSystem.cs | 6 +-
Content.Server/PDA/PdaSystem.cs | 21 +-
.../Components/ChameleonClothingComponent.cs | 10 +-
.../SharedChameleonClothingSystem.cs | 16 +-
Content.Shared/PDA/PdaComponent.cs | 6 -
Content.Shared/PDA/PdaVisuals.cs | 3 +-
.../Catalog/Fills/Backpacks/duffelbag.yml | 1 +
.../Prototypes/Catalog/thief_toolbox_sets.yml | 1 +
.../Entities/Objects/Devices/pda.yml | 369 +++++++++++++++---
.../Objects/Misc/identification_cards.yml | 9 +
Resources/Prototypes/tags.yml | 6 +
17 files changed, 458 insertions(+), 117 deletions(-)
create mode 100644 Content.Client/PDA/PdaVisualizerSystem.cs
create mode 100644 Content.Client/PDA/PdaVisualsComponent.cs
diff --git a/Content.Client/Clothing/Systems/ChameleonClothingSystem.cs b/Content.Client/Clothing/Systems/ChameleonClothingSystem.cs
index 0ea9bbac09..330c0dfd44 100644
--- a/Content.Client/Clothing/Systems/ChameleonClothingSystem.cs
+++ b/Content.Client/Clothing/Systems/ChameleonClothingSystem.cs
@@ -1,4 +1,5 @@
using System.Linq;
+using Content.Client.PDA;
using Content.Shared.Clothing.Components;
using Content.Shared.Clothing.EntitySystems;
using Content.Shared.Inventory;
@@ -51,6 +52,15 @@ public sealed class ChameleonClothingSystem : SharedChameleonClothingSystem
{
sprite.CopyFrom(otherSprite);
}
+
+ // Edgecase for PDAs to include visuals when UI is open
+ if (TryComp(uid, out PdaBorderColorComponent? borderColor)
+ && proto.TryGetComponent(out PdaBorderColorComponent? otherBorderColor, _factory))
+ {
+ borderColor.BorderColor = otherBorderColor.BorderColor;
+ borderColor.AccentHColor = otherBorderColor.AccentHColor;
+ borderColor.AccentVColor = otherBorderColor.AccentVColor;
+ }
}
///
diff --git a/Content.Client/Clothing/UI/ChameleonBoundUserInterface.cs b/Content.Client/Clothing/UI/ChameleonBoundUserInterface.cs
index 83f6ba1566..6fafd45a5a 100644
--- a/Content.Client/Clothing/UI/ChameleonBoundUserInterface.cs
+++ b/Content.Client/Clothing/UI/ChameleonBoundUserInterface.cs
@@ -1,15 +1,21 @@
-using Content.Client.Clothing.Systems;
+using Content.Client.Clothing.Systems;
using Content.Shared.Clothing.Components;
+using Content.Shared.Tag;
+using Content.Shared.Prototypes;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
+using Robust.Shared.Prototypes;
namespace Content.Client.Clothing.UI;
[UsedImplicitly]
public sealed class ChameleonBoundUserInterface : BoundUserInterface
{
+ [Dependency] private readonly IComponentFactory _factory = default!;
+ [Dependency] private readonly IPrototypeManager _proto = default!;
private readonly ChameleonClothingSystem _chameleon;
+ private readonly TagSystem _tag;
[ViewVariables]
private ChameleonMenu? _menu;
@@ -17,6 +23,7 @@ public sealed class ChameleonBoundUserInterface : BoundUserInterface
public ChameleonBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
_chameleon = EntMan.System();
+ _tag = EntMan.System();
}
protected override void Open()
@@ -34,7 +41,24 @@ public sealed class ChameleonBoundUserInterface : BoundUserInterface
return;
var targets = _chameleon.GetValidTargets(st.Slot);
- _menu?.UpdateState(targets, st.SelectedId);
+ if (st.RequiredTag != null)
+ {
+ var newTargets = new List();
+ foreach (var target in targets)
+ {
+ if (string.IsNullOrEmpty(target) || !_proto.TryIndex(target, out EntityPrototype? proto))
+ continue;
+
+ if (!proto.TryGetComponent(out TagComponent? tag, _factory) || !_tag.HasTag(tag, st.RequiredTag))
+ continue;
+
+ newTargets.Add(target);
+ }
+ _menu?.UpdateState(newTargets, st.SelectedId);
+ } else
+ {
+ _menu?.UpdateState(targets, st.SelectedId);
+ }
}
private void OnIdSelected(string selectedId)
diff --git a/Content.Client/PDA/PdaMenu.xaml.cs b/Content.Client/PDA/PdaMenu.xaml.cs
index 630861d084..712e0cbb01 100644
--- a/Content.Client/PDA/PdaMenu.xaml.cs
+++ b/Content.Client/PDA/PdaMenu.xaml.cs
@@ -141,6 +141,11 @@ namespace Content.Client.PDA
_pdaOwner = state.PdaOwnerInfo.ActualOwnerName;
PdaOwnerLabel.SetMarkup(Loc.GetString("comp-pda-ui-owner",
("actualOwnerName", _pdaOwner)));
+ PdaOwnerLabel.Visible = true;
+ }
+ else
+ {
+ PdaOwnerLabel.Visible = false;
}
diff --git a/Content.Client/PDA/PdaSystem.cs b/Content.Client/PDA/PdaSystem.cs
index 00a12ae2e6..a5fedce579 100644
--- a/Content.Client/PDA/PdaSystem.cs
+++ b/Content.Client/PDA/PdaSystem.cs
@@ -1,48 +1,8 @@
using Content.Shared.PDA;
-using Content.Shared.Light;
-using Robust.Client.GameObjects;
namespace Content.Client.PDA;
public sealed class PdaSystem : SharedPdaSystem
{
- public override void Initialize()
- {
- base.Initialize();
- SubscribeLocalEvent(OnAppearanceChange);
- }
-
- private void OnAppearanceChange(EntityUid uid, PdaComponent component, ref AppearanceChangeEvent args)
- {
- if (args.Sprite == null)
- return;
-
- if (Appearance.TryGetData(uid, UnpoweredFlashlightVisuals.LightOn, out var isFlashlightOn, args.Component))
- args.Sprite.LayerSetVisible(PdaVisualLayers.Flashlight, isFlashlightOn);
-
- if (Appearance.TryGetData(uid, PdaVisuals.IdCardInserted, out var isCardInserted, args.Component))
- args.Sprite.LayerSetVisible(PdaVisualLayers.IdLight, isCardInserted);
- }
-
- protected override void OnComponentInit(EntityUid uid, PdaComponent component, ComponentInit args)
- {
- base.OnComponentInit(uid, component, args);
-
- if (!TryComp(uid, out var sprite))
- return;
-
- if (component.State != null)
- sprite.LayerSetState(PdaVisualLayers.Base, component.State);
-
- sprite.LayerSetVisible(PdaVisualLayers.Flashlight, component.FlashlightOn);
- sprite.LayerSetVisible(PdaVisualLayers.IdLight, component.IdSlot.StartingItem != null);
- }
-
- public enum PdaVisualLayers : byte
- {
- Base,
- Flashlight,
- IdLight
- }
}
diff --git a/Content.Client/PDA/PdaVisualizerSystem.cs b/Content.Client/PDA/PdaVisualizerSystem.cs
new file mode 100644
index 0000000000..735fcd42eb
--- /dev/null
+++ b/Content.Client/PDA/PdaVisualizerSystem.cs
@@ -0,0 +1,30 @@
+using Content.Shared.Light;
+using Content.Shared.PDA;
+using Robust.Client.GameObjects;
+
+namespace Content.Client.PDA;
+
+public sealed class PdaVisualizerSystem : VisualizerSystem
+{
+ protected override void OnAppearanceChange(EntityUid uid, PdaVisualsComponent comp, ref AppearanceChangeEvent args)
+ {
+ if (args.Sprite == null)
+ return;
+
+ if (AppearanceSystem.TryGetData(uid, PdaVisuals.PdaType, out var pdaType, args.Component))
+ args.Sprite.LayerSetState(PdaVisualLayers.Base, pdaType);
+
+ if (AppearanceSystem.TryGetData(uid, UnpoweredFlashlightVisuals.LightOn, out var isFlashlightOn, args.Component))
+ args.Sprite.LayerSetVisible(PdaVisualLayers.Flashlight, isFlashlightOn);
+
+ if (AppearanceSystem.TryGetData(uid, PdaVisuals.IdCardInserted, out var isCardInserted, args.Component))
+ args.Sprite.LayerSetVisible(PdaVisualLayers.IdLight, isCardInserted);
+ }
+
+ public enum PdaVisualLayers : byte
+ {
+ Base,
+ Flashlight,
+ IdLight
+ }
+}
diff --git a/Content.Client/PDA/PdaVisualsComponent.cs b/Content.Client/PDA/PdaVisualsComponent.cs
new file mode 100644
index 0000000000..893ce5503d
--- /dev/null
+++ b/Content.Client/PDA/PdaVisualsComponent.cs
@@ -0,0 +1,14 @@
+namespace Content.Client.PDA;
+
+///
+/// Used for visualizing PDA visuals.
+///
+[RegisterComponent]
+public sealed partial class PdaVisualsComponent : Component
+{
+ public string? BorderColor;
+
+ public string? AccentHColor;
+
+ public string? AccentVColor;
+}
diff --git a/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs b/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs
index feb3428884..3700aeb549 100644
--- a/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs
+++ b/Content.Server/Clothing/Systems/ChameleonClothingSystem.cs
@@ -1,4 +1,4 @@
-using Content.Server.IdentityManagement;
+using Content.Server.IdentityManagement;
using Content.Shared.Clothing.Components;
using Content.Shared.Clothing.EntitySystems;
using Content.Shared.IdentityManagement.Components;
@@ -63,7 +63,7 @@ public sealed class ChameleonClothingSystem : SharedChameleonClothingSystem
if (!Resolve(uid, ref component))
return;
- var state = new ChameleonBoundUserInterfaceState(component.Slot, component.Default);
+ var state = new ChameleonBoundUserInterfaceState(component.Slot, component.Default, component.RequireTag);
_uiSystem.SetUiState(uid, ChameleonUiKey.Key, state);
}
@@ -84,7 +84,7 @@ public sealed class ChameleonClothingSystem : SharedChameleonClothingSystem
// make sure that it is valid change
if (string.IsNullOrEmpty(protoId) || !_proto.TryIndex(protoId, out EntityPrototype? proto))
return;
- if (!IsValidTarget(proto, component.Slot))
+ if (!IsValidTarget(proto, component.Slot, component.RequireTag))
return;
component.Default = protoId;
diff --git a/Content.Server/PDA/PdaSystem.cs b/Content.Server/PDA/PdaSystem.cs
index 7f17b97d0a..a9527020b0 100644
--- a/Content.Server/PDA/PdaSystem.cs
+++ b/Content.Server/PDA/PdaSystem.cs
@@ -1,3 +1,4 @@
+using Content.Server.Access.Systems;
using Content.Server.AlertLevel;
using Content.Server.CartridgeLoader;
using Content.Server.Chat.Managers;
@@ -36,6 +37,7 @@ namespace Content.Server.PDA
[Dependency] private readonly UserInterfaceSystem _ui = default!;
[Dependency] private readonly UnpoweredFlashlightSystem _unpoweredFlashlight = default!;
[Dependency] private readonly ContainerSystem _containerSystem = default!;
+ [Dependency] private readonly IdCardSystem _idCard = default!;
public override void Initialize()
{
@@ -55,19 +57,25 @@ namespace Content.Server.PDA
SubscribeLocalEvent(OnNotification);
SubscribeLocalEvent(OnStationRenamed);
- SubscribeLocalEvent(OnEntityRenamed);
+ SubscribeLocalEvent(OnEntityRenamed, after: new[] { typeof(IdCardSystem) });
SubscribeLocalEvent(OnAlertLevelChanged);
}
private void OnEntityRenamed(ref EntityRenamedEvent ev)
{
- var query = EntityQueryEnumerator();
+ if (HasComp(ev.Uid))
+ return;
- while (query.MoveNext(out var uid, out var comp))
+ if (_idCard.TryFindIdCard(ev.Uid, out var idCard))
{
- if (comp.PdaOwner == ev.Uid)
+ var query = EntityQueryEnumerator();
+
+ while (query.MoveNext(out var uid, out var comp))
{
- SetOwner(uid, comp, ev.Uid, ev.NewName);
+ if (comp.ContainedId == idCard)
+ {
+ SetOwner(uid, comp, ev.Uid, ev.NewName);
+ }
}
}
}
@@ -86,6 +94,9 @@ namespace Content.Server.PDA
protected override void OnItemInserted(EntityUid uid, PdaComponent pda, EntInsertedIntoContainerMessage args)
{
base.OnItemInserted(uid, pda, args);
+ var id = CompOrNull(pda.ContainedId);
+ if (id != null)
+ pda.OwnerName = id.FullName;
UpdatePdaUi(uid, pda);
}
diff --git a/Content.Shared/Clothing/Components/ChameleonClothingComponent.cs b/Content.Shared/Clothing/Components/ChameleonClothingComponent.cs
index def4254304..8fa2f19fa2 100644
--- a/Content.Shared/Clothing/Components/ChameleonClothingComponent.cs
+++ b/Content.Shared/Clothing/Components/ChameleonClothingComponent.cs
@@ -32,6 +32,12 @@ public sealed partial class ChameleonClothingComponent : Component
///
[ViewVariables]
public EntityUid? User;
+
+ ///
+ /// Filter possible chameleon options by a tag in addition to WhitelistChameleon.
+ ///
+ [DataField]
+ public string? RequireTag;
}
[Serializable, NetSerializable]
@@ -39,11 +45,13 @@ public sealed class ChameleonBoundUserInterfaceState : BoundUserInterfaceState
{
public readonly SlotFlags Slot;
public readonly string? SelectedId;
+ public readonly string? RequiredTag;
- public ChameleonBoundUserInterfaceState(SlotFlags slot, string? selectedId)
+ public ChameleonBoundUserInterfaceState(SlotFlags slot, string? selectedId, string? requiredTag)
{
Slot = slot;
SelectedId = selectedId;
+ RequiredTag = requiredTag;
}
}
diff --git a/Content.Shared/Clothing/EntitySystems/SharedChameleonClothingSystem.cs b/Content.Shared/Clothing/EntitySystems/SharedChameleonClothingSystem.cs
index 2b10b41fee..488b7a5b64 100644
--- a/Content.Shared/Clothing/EntitySystems/SharedChameleonClothingSystem.cs
+++ b/Content.Shared/Clothing/EntitySystems/SharedChameleonClothingSystem.cs
@@ -6,6 +6,7 @@ using Content.Shared.Inventory.Events;
using Content.Shared.Item;
using Content.Shared.Tag;
using Robust.Shared.Prototypes;
+using Robust.Shared.Serialization.Manager;
namespace Content.Shared.Clothing.EntitySystems;
@@ -13,10 +14,12 @@ public abstract class SharedChameleonClothingSystem : EntitySystem
{
[Dependency] private readonly IComponentFactory _factory = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
+ [Dependency] private readonly ISerializationManager _serialization = default!;
[Dependency] private readonly ClothingSystem _clothingSystem = default!;
[Dependency] private readonly ContrabandSystem _contraband = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly SharedItemSystem _itemSystem = default!;
+ [Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly TagSystem _tag = default!;
public override void Initialize()
@@ -71,6 +74,14 @@ public abstract class SharedChameleonClothingSystem : EntitySystem
_clothingSystem.CopyVisuals(uid, otherClothing, clothing);
}
+ // appearance data logic
+ if (TryComp(uid, out AppearanceComponent? appearance) &&
+ proto.TryGetComponent("Appearance", out AppearanceComponent? appearanceOther))
+ {
+ _appearance.AppendData(appearanceOther, uid);
+ Dirty(uid, appearance);
+ }
+
// properly mark contraband
if (proto.TryGetComponent("Contraband", out ContrabandComponent? contra))
{
@@ -88,7 +99,7 @@ public abstract class SharedChameleonClothingSystem : EntitySystem
///
/// Check if this entity prototype is valid target for chameleon item.
///
- public bool IsValidTarget(EntityPrototype proto, SlotFlags chameleonSlot = SlotFlags.NONE)
+ public bool IsValidTarget(EntityPrototype proto, SlotFlags chameleonSlot = SlotFlags.NONE, string? requiredTag = null)
{
// check if entity is valid
if (proto.Abstract || proto.HideSpawnMenu)
@@ -98,6 +109,9 @@ public abstract class SharedChameleonClothingSystem : EntitySystem
if (!proto.TryGetComponent(out TagComponent? tag, _factory) || !_tag.HasTag(tag, "WhitelistChameleon"))
return false;
+ if (requiredTag != null && !_tag.HasTag(tag, requiredTag))
+ return false;
+
// check if it's valid clothing
if (!proto.TryGetComponent("Clothing", out ClothingComponent? clothing))
return false;
diff --git a/Content.Shared/PDA/PdaComponent.cs b/Content.Shared/PDA/PdaComponent.cs
index 6aeb245e27..cdfeffa2c1 100644
--- a/Content.Shared/PDA/PdaComponent.cs
+++ b/Content.Shared/PDA/PdaComponent.cs
@@ -13,12 +13,6 @@ namespace Content.Shared.PDA
public const string PdaPenSlotId = "PDA-pen";
public const string PdaPaiSlotId = "PDA-pai";
- ///
- /// The base PDA sprite state, eg. "pda", "pda-clown"
- ///
- [DataField("state")]
- public string? State;
-
[DataField("idSlot")]
public ItemSlot IdSlot = new();
diff --git a/Content.Shared/PDA/PdaVisuals.cs b/Content.Shared/PDA/PdaVisuals.cs
index 56039cf0d2..e3daa8e575 100644
--- a/Content.Shared/PDA/PdaVisuals.cs
+++ b/Content.Shared/PDA/PdaVisuals.cs
@@ -5,7 +5,8 @@ namespace Content.Shared.PDA
[Serializable, NetSerializable]
public enum PdaVisuals
{
- IdCardInserted
+ IdCardInserted,
+ PdaType
}
[Serializable, NetSerializable]
diff --git a/Resources/Prototypes/Catalog/Fills/Backpacks/duffelbag.yml b/Resources/Prototypes/Catalog/Fills/Backpacks/duffelbag.yml
index bc4b6411d1..0b7025afb8 100644
--- a/Resources/Prototypes/Catalog/Fills/Backpacks/duffelbag.yml
+++ b/Resources/Prototypes/Catalog/Fills/Backpacks/duffelbag.yml
@@ -199,6 +199,7 @@
components:
- type: StorageFill
contents:
+ - id: ChameleonPDA
- id: ClothingUniformJumpsuitChameleon
- id: ClothingOuterChameleon
- id: ClothingNeckChameleon
diff --git a/Resources/Prototypes/Catalog/thief_toolbox_sets.yml b/Resources/Prototypes/Catalog/thief_toolbox_sets.yml
index fe1a4fe75c..f9ea34b389 100644
--- a/Resources/Prototypes/Catalog/thief_toolbox_sets.yml
+++ b/Resources/Prototypes/Catalog/thief_toolbox_sets.yml
@@ -6,6 +6,7 @@
sprite: /Textures/Clothing/OuterClothing/Misc/black_hoodie.rsi
state: icon
content:
+ - ChameleonPDA
- ClothingUniformJumpsuitChameleon
- ClothingOuterChameleon
- ClothingNeckChameleon
diff --git a/Resources/Prototypes/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/Entities/Objects/Devices/pda.yml
index 4febc87b90..dbd589bbe0 100644
--- a/Resources/Prototypes/Entities/Objects/Devices/pda.yml
+++ b/Resources/Prototypes/Entities/Objects/Devices/pda.yml
@@ -6,10 +6,15 @@
description: Personal Data Assistant.
components:
- type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda
- type: Sprite
sprite: Objects/Devices/pda.rsi
layers:
- map: [ "enum.PdaVisualLayers.Base" ]
+ state: "pda"
- state: "light_overlay"
map: [ "enum.PdaVisualLayers.Flashlight" ]
shader: "unshaded"
@@ -22,7 +27,6 @@
sprite: Objects/Devices/pda.rsi
state: pda
- type: Pda
- state: pda
paiSlot:
priority: -2
whitelist:
@@ -41,6 +45,7 @@
whitelist:
components:
- IdCard
+ - type: PdaVisuals
- type: Item
size: Small
- type: ContainerContainer
@@ -102,6 +107,8 @@
- type: Tag
tags:
- DoorBumpOpener
+ - WhitelistChameleon
+ - WhitelistChameleonPDA
- type: Input
context: "human"
- type: SentienceTarget # sentient PDA = pAI lite
@@ -147,7 +154,6 @@
components:
- type: Pda
id: PassengerIDCard
- state: pda
- type: PdaBorderColor
borderColor: "#717059"
@@ -159,7 +165,11 @@
components:
- type: Pda
id: TechnicalAssistantIDCard
- state: pda-interntech
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-interntech
- type: PdaBorderColor
borderColor: "#717059"
accentVColor: "#949137"
@@ -174,7 +184,11 @@
components:
- type: Pda
id: MedicalInternIDCard
- state: pda-internmed
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-internmed
- type: PdaBorderColor
borderColor: "#717059"
accentVColor: "#447987"
@@ -192,7 +206,11 @@
components:
- type: Pda
id: SecurityCadetIDCard
- state: pda-interncadet
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-interncadet
- type: PdaBorderColor
borderColor: "#717059"
accentVColor: "#A32D26"
@@ -207,7 +225,11 @@
components:
- type: Pda
id: ResearchAssistantIDCard
- state: pda-internsci
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-internsci
- type: PdaBorderColor
borderColor: "#717059"
accentVColor: "#8900c9"
@@ -222,7 +244,11 @@
components:
- type: Pda
id: ServiceWorkerIDCard
- state: pda-internservice
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-internservice
- type: PdaBorderColor
borderColor: "#717059"
accentVColor: "#00cc35"
@@ -237,7 +263,11 @@
components:
- type: Pda
id: ChefIDCard
- state: pda-cook
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-cook
- type: PdaBorderColor
borderColor: "#d7d7d0"
- type: Icon
@@ -253,7 +283,11 @@
components:
- type: Pda
id: BotanistIDCard
- state: pda-hydro
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-hydro
- type: PdaBorderColor
borderColor: "#44843c"
accentVColor: "#00cc35"
@@ -268,7 +302,6 @@
components:
- type: Pda
id: ClownIDCard
- state: pda-clown
penSlot:
startingItem: CrayonOrange # no pink crayon?!?
# ^ Still unacceptable.
@@ -278,6 +311,11 @@
whitelist:
tags:
- Write
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-clown
- type: PdaBorderColor
borderColor: "#C18199"
- type: Icon
@@ -312,7 +350,9 @@
components:
- type: Pda
id: VisitorIDCard
- state: pda-clown
+ - type: Tag # Ignore Chameleon tags
+ tags:
+ - DoorBumpOpener
- type: entity
parent: BasePDA
@@ -322,12 +362,16 @@
components:
- type: Pda
id: MimeIDCard
- state: pda-mime
idSlot: # rewrite without sound because mime
name: ID Card
whitelist:
components:
- IdCard
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-mime
- type: PdaBorderColor
borderColor: "#d7d7d0"
accentHColor: "#333333"
@@ -343,7 +387,11 @@
components:
- type: Pda
id: ChaplainIDCard
- state: pda-chaplain
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-chaplain
- type: PdaBorderColor
borderColor: "#333333"
- type: Icon
@@ -356,7 +404,9 @@
components:
- type: Pda
id: VisitorIDCard
- state: pda-chaplain
+ - type: Tag # Ignore Chameleon tags
+ tags:
+ - DoorBumpOpener
- type: entity
name: quartermaster PDA
@@ -366,7 +416,11 @@
components:
- type: Pda
id: QuartermasterIDCard
- state: pda-qm
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-qm
- type: PdaBorderColor
borderColor: "#e39751"
accentVColor: "#a23e3e"
@@ -381,7 +435,11 @@
components:
- type: Pda
id: CargoIDCard
- state: pda-cargo
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-cargo
- type: PdaBorderColor
borderColor: "#e39751"
- type: Icon
@@ -395,7 +453,11 @@
components:
- type: Pda
id: SalvageIDCard
- state: pda-miner
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-miner
- type: PdaBorderColor
borderColor: "#af9366"
accentVColor: "#8900c9"
@@ -417,7 +479,11 @@
components:
- type: Pda
id: BartenderIDCard
- state: pda-bartender
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-bartender
- type: PdaBorderColor
borderColor: "#333333"
- type: Icon
@@ -431,13 +497,17 @@
components:
- type: Pda
id: LibrarianIDCard
- state: pda-library
penSlot:
startingItem: LuxuryPen
priority: -1
whitelist:
tags:
- Write
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-library
- type: PdaBorderColor
borderColor: "#858585"
- type: Icon
@@ -450,7 +520,9 @@
components:
- type: Pda
id: VisitorIDCard
- state: pda-library
+ - type: Tag # Ignore Chameleon tags
+ tags:
+ - DoorBumpOpener
- type: entity
parent: BaseSecurityPDA
@@ -460,13 +532,17 @@
components:
- type: Pda
id: LawyerIDCard
- state: pda-lawyer
penSlot:
startingItem: LuxuryPen
priority: -1
whitelist:
tags:
- Write
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-lawyer
- type: PdaBorderColor
borderColor: "#6f6192"
- type: Icon
@@ -479,7 +555,9 @@
components:
- type: Pda
id: VisitorIDCard
- state: pda-lawyer
+ - type: Tag # Ignore Chameleon tags
+ tags:
+ - DoorBumpOpener
- type: entity
parent: BasePDA
@@ -489,7 +567,11 @@
components:
- type: Pda
id: JanitorIDCard
- state: pda-janitor
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-janitor
- type: PdaBorderColor
borderColor: "#5D2D56"
- type: Icon
@@ -503,13 +585,17 @@
components:
- type: Pda
id: CaptainIDCard
- state: pda-captain
penSlot:
startingItem: PenCap
priority: -1
whitelist:
tags:
- Write
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-captain
- type: PdaBorderColor
borderColor: "#7C5D00"
- type: Icon
@@ -523,13 +609,17 @@
components:
- type: Pda
id: HoPIDCard
- state: pda-hop
penSlot:
startingItem: PenHop
priority: -1
whitelist:
tags:
- Write
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-hop
- type: PdaBorderColor
borderColor: "#789876"
accentHColor: "#447987"
@@ -544,7 +634,11 @@
components:
- type: Pda
id: CEIDCard
- state: pda-ce
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-ce
- type: PdaBorderColor
borderColor: "#949137"
accentHColor: "#447987"
@@ -559,7 +653,11 @@
components:
- type: Pda
id: EngineeringIDCard
- state: pda-engineer
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-engineer
- type: PdaBorderColor
borderColor: "#949137"
accentVColor: "#A32D26"
@@ -574,7 +672,11 @@
components:
- type: Pda
id: CMOIDCard
- state: pda-cmo
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-cmo
- type: PdaBorderColor
borderColor: "#d7d7d0"
accentHColor: "#447987"
@@ -590,7 +692,11 @@
components:
- type: Pda
id: MedicalIDCard
- state: pda-medical
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-medical
- type: PdaBorderColor
borderColor: "#d7d7d0"
accentVColor: "#447987"
@@ -607,7 +713,9 @@
components:
- type: Pda
id: VisitorIDCard
- state: pda-medical
+ - type: Tag # Ignore Chameleon tags
+ tags:
+ - DoorBumpOpener
- type: entity
parent: BaseMedicalPDA
@@ -617,7 +725,11 @@
components:
- type: Pda
id: ParamedicIDCard
- state: pda-paramedic
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-paramedic
- type: PdaBorderColor
borderColor: "#d7d7d0"
accentVColor: "#2a4b5b"
@@ -632,7 +744,11 @@
components:
- type: Pda
id: ChemistIDCard
- state: pda-chemistry
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-chemistry
- type: PdaBorderColor
borderColor: "#d7d7d0"
accentVColor: "#B34200"
@@ -647,7 +763,11 @@
components:
- type: Pda
id: RDIDCard
- state: pda-rd
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-rd
- type: PdaBorderColor
borderColor: "#d7d7d0"
accentHColor: "#447987"
@@ -663,7 +783,11 @@
components:
- type: Pda
id: ResearchIDCard
- state: pda-science
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-science
- type: PdaBorderColor
borderColor: "#d7d7d0"
accentVColor: "#8900c9"
@@ -678,7 +802,11 @@
components:
- type: Pda
id: HoSIDCard
- state: pda-hos
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-hos
- type: PdaBorderColor
borderColor: "#A32D26"
accentHColor: "#447987"
@@ -700,7 +828,11 @@
components:
- type: Pda
id: WardenIDCard
- state: pda-warden
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-warden
- type: PdaBorderColor
borderColor: "#A32D26"
accentVColor: "#949137"
@@ -715,7 +847,11 @@
components:
- type: Pda
id: SecurityIDCard
- state: pda-security
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-security
- type: PdaBorderColor
borderColor: "#A32D26"
- type: Icon
@@ -729,12 +865,16 @@
components:
- type: Pda
id: CentcomIDCard
- state: pda-centcom
penSlot:
startingItem: PenCentcom
whitelist:
tags:
- Write
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-centcom
- type: PdaBorderColor
borderColor: "#00842e"
- type: Icon
@@ -773,6 +913,9 @@
- WantedListCartridge
- MedTekCartridge
- AstroNavCartridge
+ - type: Tag # Ignore Chameleon tags
+ tags:
+ - DoorBumpOpener
- type: entity
parent: CentcomPDA
@@ -781,6 +924,9 @@
components:
- type: Pda
id: CentcomIDCardDeathsquad
+ - type: Tag # Ignore Chameleon tags
+ tags:
+ - DoorBumpOpener
- type: entity
parent: BasePDA
@@ -790,7 +936,11 @@
components:
- type: Pda
id: MusicianIDCard
- state: pda-musician
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-musician
- type: PdaBorderColor
borderColor: "#333333"
- type: Icon
@@ -808,7 +958,9 @@
components:
- type: Pda
id: VisitorIDCard
- state: pda-musician
+ - type: Tag # Ignore Chameleon tags
+ tags:
+ - DoorBumpOpener
- type: entity
parent: BasePDA
@@ -818,7 +970,11 @@
components:
- type: Pda
id: AtmosIDCard
- state: pda-atmos
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-atmos
- type: PdaBorderColor
borderColor: "#949137"
accentVColor: "#447987"
@@ -833,7 +989,11 @@
components:
- type: Pda
id: PassengerIDCard
- state: pda-clear
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-clear
- type: PdaBorderColor
borderColor: "#288e4d"
- type: Icon
@@ -845,7 +1005,9 @@
components:
- type: Pda
id: VisitorIDCard
- state: pda
+ - type: Tag # Ignore Chameleon tags
+ tags:
+ - DoorBumpOpener
- type: entity
parent: BasePDA
@@ -855,7 +1017,11 @@
components:
- type: Pda
id: SyndicateIDCard
- state: pda-syndi
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-syndi
- type: PdaBorderColor
borderColor: "#891417"
- type: Icon
@@ -874,7 +1040,11 @@
components:
- type: Pda
id: ERTLeaderIDCard
- state: pda-ert
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-ert
- type: PdaBorderColor
borderColor: "#A32D26"
accentHColor: "#447987"
@@ -963,7 +1133,11 @@
components:
- type: Pda
id: PsychologistIDCard
- state: pda-medical
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-medical
- type: PdaBorderColor
borderColor: "#d7d7d0"
accentVColor: "#447987"
@@ -978,13 +1152,17 @@
components:
- type: Pda
id: ReporterIDCard
- state: pda-reporter
penSlot:
startingItem: LuxuryPen
priority: -1
whitelist:
tags:
- Write
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-reporter
- type: PdaBorderColor
borderColor: "#3f3f74"
- type: Icon
@@ -998,7 +1176,11 @@
components:
- type: Pda
id: ZookeeperIDCard
- state: pda-zookeeper
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-zookeeper
- type: PdaBorderColor
borderColor: "#ffe685"
- type: Icon
@@ -1012,7 +1194,11 @@
components:
- type: Pda
id: BoxerIDCard
- state: pda-boxer
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-boxer
- type: PdaBorderColor
borderColor: "#333333"
accentVColor: "#390504"
@@ -1027,7 +1213,11 @@
components:
- type: Pda
id: DetectiveIDCard
- state: pda-detective
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-detective
- type: PdaBorderColor
borderColor: "#774705"
- type: Icon
@@ -1048,7 +1238,11 @@
components:
- type: Pda
id: BrigmedicIDCard
- state: pda-brigmedic
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-brigmedic
- type: PdaBorderColor
borderColor: "#A32D26"
accentHColor: "#d7d7d0"
@@ -1072,7 +1266,11 @@
components:
- type: Pda
id: CluwneIDCard
- state: pda-cluwne
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-cluwne
- type: PdaBorderColor
borderColor: "#1c8f4d"
- type: Icon
@@ -1094,7 +1292,11 @@
components:
- type: Pda
id: SeniorEngineerIDCard
- state: pda-seniorengineer
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-seniorengineer
- type: PdaBorderColor
borderColor: "#949137"
accentVColor: "#CD6900"
@@ -1109,7 +1311,11 @@
components:
- type: Pda
id: SeniorResearcherIDCard
- state: pda-seniorresearcher
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-seniorresearcher
- type: PdaBorderColor
borderColor: "#d7d7d0"
accentHColor: "#8900c9"
@@ -1125,7 +1331,11 @@
components:
- type: Pda
id: SeniorPhysicianIDCard
- state: pda-seniorphysician
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-seniorphysician
- type: PdaBorderColor
borderColor: "#d7d7d0"
accentHColor: "#447987"
@@ -1141,7 +1351,11 @@
components:
- type: Pda
id: SeniorOfficerIDCard
- state: pda-seniorofficer
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-seniorofficer
- type: PdaBorderColor
borderColor: "#A32D26"
accentVColor: "#DFDFDF"
@@ -1156,7 +1370,11 @@
components:
- type: Pda
id: PirateIDCard
- state: pda-pirate
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-pirate
- type: Icon
state: pda-pirate
@@ -1168,7 +1386,11 @@
components:
- type: Pda
id: SyndicateIDCard
- state: pda-syndi-agent
+ - type: Appearance
+ appearanceDataInit:
+ enum.PdaVisuals.PdaType:
+ !type:String
+ pda-syndi-agent
- type: PdaBorderColor
borderColor: "#891417"
- type: Icon
@@ -1178,3 +1400,34 @@
preinstalled:
- NotekeeperCartridge
- MedTekCartridge
+
+- type: entity
+ parent: BasePDA
+ id: ChameleonPDA
+ name: passenger PDA
+ description: Why isn't it gray?
+ suffix: Chameleon
+ components:
+ - type: PdaBorderColor
+ borderColor: "#717059"
+ - type: Tag
+ tags: # ignore "WhitelistChameleon" tag
+ - DoorBumpOpener
+ - type: ChameleonClothing
+ slot: [idcard]
+ default: PassengerPDA
+ requireTag: WhitelistChameleonPDA
+ - type: UserInterface
+ interfaces:
+ enum.PdaUiKey.Key:
+ type: PdaBoundUserInterface
+ enum.StoreUiKey.Key:
+ type: StoreBoundUserInterface
+ enum.RingerUiKey.Key:
+ type: RingerBoundUserInterface
+ enum.InstrumentUiKey.Key:
+ type: InstrumentBoundUserInterface
+ enum.HealthAnalyzerUiKey.Key:
+ type: HealthAnalyzerBoundUserInterface
+ enum.ChameleonUiKey.Key:
+ type: ChameleonBoundUserInterface
diff --git a/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml b/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml
index a0e144d0ac..0d224e371f 100644
--- a/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml
+++ b/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml
@@ -22,6 +22,7 @@
tags:
- DoorBumpOpener
- WhitelistChameleon
+ - WhitelistChameleonIdCard
- type: StealTarget
stealGroup: IDCard
@@ -116,6 +117,7 @@
tags:
- DoorBumpOpener
- WhitelistChameleon
+ - WhitelistChameleonIdCard
- HighRiskItem
- type: StealTarget
stealGroup: CaptainIDCard
@@ -314,6 +316,9 @@
- type: PresetIdCard
job: Bartender
name: Pun Pun
+ - type: Tag # Ignore Chameleon tags
+ tags:
+ - DoorBumpOpener
- type: entity
parent: IDCardStandard
@@ -599,6 +604,7 @@
- type: ChameleonClothing
slot: [idcard]
default: PassengerIDCard
+ requireTag: WhitelistChameleonIdCard
- type: UserInterface
interfaces:
enum.AgentIDCardUiKey.Key:
@@ -811,3 +817,6 @@
- NuclearOperative
- SyndicateAgent
- Wizard
+ - type: Tag # Ignore Chameleon tags
+ tags:
+ - DoorBumpOpener
diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml
index 5085894ce5..ea2dffbe6a 100644
--- a/Resources/Prototypes/tags.yml
+++ b/Resources/Prototypes/tags.yml
@@ -1330,6 +1330,12 @@
- type: Tag
id: WhitelistChameleon
+- type: Tag
+ id: WhitelistChameleonIdCard
+
+- type: Tag
+ id: WhitelistChameleonPDA
+
- type: Tag
id: Window
--
2.51.2