diff --git a/Content.Shared/Silicons/StationAi/SharedStationAiSystem.cs b/Content.Shared/Silicons/StationAi/SharedStationAiSystem.cs index baef62c3da..7eef20cebd 100644 --- a/Content.Shared/Silicons/StationAi/SharedStationAiSystem.cs +++ b/Content.Shared/Silicons/StationAi/SharedStationAiSystem.cs @@ -285,6 +285,8 @@ public abstract partial class SharedStationAiSystem : EntitySystem private bool SetupEye(Entity ent) { + if (_net.IsClient) + return false; if (ent.Comp.RemoteEntity != null) return false; @@ -299,8 +301,11 @@ public abstract partial class SharedStationAiSystem : EntitySystem private void ClearEye(Entity ent) { + if (_net.IsClient) + return; QueueDel(ent.Comp.RemoteEntity); ent.Comp.RemoteEntity = null; + Dirty(ent); } private void AttachEye(Entity ent) @@ -330,6 +335,8 @@ public abstract partial class SharedStationAiSystem : EntitySystem if (_timing.ApplyingState) return; + SetupEye(ent); + // Just so text and the likes works properly _metadata.SetEntityName(ent.Owner, MetaData(args.Entity).EntityName); @@ -351,6 +358,7 @@ public abstract partial class SharedStationAiSystem : EntitySystem { _eye.SetTarget(args.Entity, null, eyeComp); } + ClearEye(ent); } private void UpdateAppearance(Entity entity) diff --git a/Content.Shared/UserInterface/IntrinsicUISystem.cs b/Content.Shared/UserInterface/IntrinsicUISystem.cs index 2d8c5d1480..b16492b835 100644 --- a/Content.Shared/UserInterface/IntrinsicUISystem.cs +++ b/Content.Shared/UserInterface/IntrinsicUISystem.cs @@ -10,6 +10,7 @@ public sealed class IntrinsicUISystem : EntitySystem public override void Initialize() { SubscribeLocalEvent(InitActions); + SubscribeLocalEvent(OnShutdown); SubscribeLocalEvent(OnActionToggle); } @@ -21,6 +22,15 @@ public sealed class IntrinsicUISystem : EntitySystem args.Handled = InteractUI(uid, args.Key, component); } + private void OnShutdown(EntityUid uid, IntrinsicUIComponent component, ref ComponentShutdown args) + { + foreach (var actionEntry in component.UIs.Values) + { + var actionId = actionEntry.ToggleActionEntity; + _actionsSystem.RemoveAction(uid, actionId); + } + } + private void InitActions(EntityUid uid, IntrinsicUIComponent component, MapInitEvent args) { foreach (var entry in component.UIs.Values) diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml index 82660f8f13..1cc97c2401 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml @@ -261,6 +261,7 @@ id: LockerFillResearchDirectorNoHardsuit table: !type:AllSelector children: + - id: Intellicard - id: BoxEncryptionKeyScience - id: CircuitImprinterMachineCircuitboard - id: ClothingBeltUtilityFilled diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index c9164b14d1..9f7e206c24 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -71,6 +71,26 @@ title: comms-console-announcement-title-station-ai color: "#2ed2fd" +- type: entity + id: AiHeldIntellicard + description: Components added / removed from an entity that gets inserted into an Intellicard. + categories: [ HideSpawnMenu ] + components: + - type: IntrinsicRadioReceiver + - type: IntrinsicRadioTransmitter + channels: + - Binary + - type: ActiveRadio + channels: + - Binary + - Common + - type: ActionGrant + actions: + - ActionAIViewLaws + - type: UserInterface + interfaces: + enum.SiliconLawsUiKey.Key: + type: SiliconLawBoundUserInterface # Ai - type: entity @@ -82,7 +102,8 @@ - type: StationAiHolder slot: name: station-ai-mind-slot - locked: true + locked: false + disableEject: true whitelist: tags: - StationAi @@ -256,13 +277,16 @@ # Items - type: entity id: Intellicard - name: Intellicard + name: intellicard description: A storage device for AIs. parent: - BaseItem - AiHolder suffix: Empty components: + - type: ContainerComp + proto: AiHeldIntellicard + container: station_ai_mind_slot - type: Sprite sprite: Objects/Devices/ai_card.rsi layers: @@ -361,7 +385,6 @@ enum.SiliconLawsUiKey.Key: type: SiliconLawBoundUserInterface - type: ComplexInteraction - - type: DoorRemote - type: Actions - type: Access groups: diff --git a/Resources/Textures/Objects/Devices/ai_card.rsi/base.png b/Resources/Textures/Objects/Devices/ai_card.rsi/base.png index 244183c078..535f5a48e9 100644 Binary files a/Resources/Textures/Objects/Devices/ai_card.rsi/base.png and b/Resources/Textures/Objects/Devices/ai_card.rsi/base.png differ diff --git a/Resources/Textures/Objects/Devices/ai_card.rsi/empty.png b/Resources/Textures/Objects/Devices/ai_card.rsi/empty.png index 7e61f368de..a62b9263d5 100644 Binary files a/Resources/Textures/Objects/Devices/ai_card.rsi/empty.png and b/Resources/Textures/Objects/Devices/ai_card.rsi/empty.png differ diff --git a/Resources/Textures/Objects/Devices/ai_card.rsi/full.png b/Resources/Textures/Objects/Devices/ai_card.rsi/full.png index 59131c8c0a..69a1825d91 100644 Binary files a/Resources/Textures/Objects/Devices/ai_card.rsi/full.png and b/Resources/Textures/Objects/Devices/ai_card.rsi/full.png differ