diff --git a/Content.Server/NPC/HTN/HTNSystem.cs b/Content.Server/NPC/HTN/HTNSystem.cs index 6fa9af0ccd..2c1dadb127 100644 --- a/Content.Server/NPC/HTN/HTNSystem.cs +++ b/Content.Server/NPC/HTN/HTNSystem.cs @@ -10,6 +10,7 @@ using Content.Server.NPC.Systems; using Content.Shared.Administration; using Content.Shared.Mobs; using Content.Shared.NPC; +using Content.Shared.NPC; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Server.Player; diff --git a/Content.Server/NPC/Systems/NPCCombatSystem.Melee.cs b/Content.Server/NPC/Systems/NPCCombatSystem.Melee.cs index 1b7bf19198..11ba4d102b 100644 --- a/Content.Server/NPC/Systems/NPCCombatSystem.Melee.cs +++ b/Content.Server/NPC/Systems/NPCCombatSystem.Melee.cs @@ -3,6 +3,7 @@ using Content.Server.NPC.Components; using Content.Server.NPC.Events; using Content.Shared.CombatMode; using Content.Shared.NPC; +using Content.Shared.NPC; using Content.Shared.Weapons.Melee; using Robust.Shared.Map; using Robust.Shared.Physics.Components; diff --git a/Content.Server/NPC/Systems/NPCSteeringSystem.cs b/Content.Server/NPC/Systems/NPCSteeringSystem.cs index 62fd13fc9f..cbc2ba6d2c 100644 --- a/Content.Server/NPC/Systems/NPCSteeringSystem.cs +++ b/Content.Server/NPC/Systems/NPCSteeringSystem.cs @@ -15,6 +15,7 @@ using Content.Shared.Interaction; using Content.Shared.Movement.Components; using Content.Shared.Movement.Systems; using Content.Shared.NPC; +using Content.Shared.NPC; using Content.Shared.NPC.Events; using Content.Shared.Physics; using Content.Shared.Weapons.Melee; diff --git a/Content.Server/NPC/Systems/NPCSystem.cs b/Content.Server/NPC/Systems/NPCSystem.cs index 40b8e26897..02dc4ceea6 100644 --- a/Content.Server/NPC/Systems/NPCSystem.cs +++ b/Content.Server/NPC/Systems/NPCSystem.cs @@ -4,6 +4,7 @@ using Content.Server.NPC.HTN; using Content.Shared.CCVar; using Content.Shared.Mobs; using Content.Shared.Mobs.Systems; +using Content.Shared.NPC; using Robust.Server.GameObjects; using Robust.Shared.Configuration; diff --git a/Content.Server/NPC/Components/ActiveNPCComponent.cs b/Content.Shared/NPC/ActiveNPCComponent.cs similarity index 58% rename from Content.Server/NPC/Components/ActiveNPCComponent.cs rename to Content.Shared/NPC/ActiveNPCComponent.cs index 75491ee1c8..08ea65feb5 100644 --- a/Content.Server/NPC/Components/ActiveNPCComponent.cs +++ b/Content.Shared/NPC/ActiveNPCComponent.cs @@ -1,7 +1,9 @@ -namespace Content.Server.NPC.Components; +using Robust.Shared.GameStates; + +namespace Content.Shared.NPC; /// /// Added to NPCs that are actively being updated. /// -[RegisterComponent] +[RegisterComponent, NetworkedComponent] public sealed partial class ActiveNPCComponent : Component {} diff --git a/Content.Shared/SSDIndicator/SSDIndicatorComponent.cs b/Content.Shared/SSDIndicator/SSDIndicatorComponent.cs index 66310505a1..53e1f6a140 100644 --- a/Content.Shared/SSDIndicator/SSDIndicatorComponent.cs +++ b/Content.Shared/SSDIndicator/SSDIndicatorComponent.cs @@ -13,7 +13,7 @@ public sealed partial class SSDIndicatorComponent : Component { [ViewVariables(VVAccess.ReadWrite)] [AutoNetworkedField] - public bool IsSSD = true; + public bool IsSSD = false; [ViewVariables(VVAccess.ReadWrite)] [DataField("icon", customTypeSerializer: typeof(PrototypeIdSerializer))] diff --git a/Content.Shared/SSDIndicator/SSDIndicatorSystem.cs b/Content.Shared/SSDIndicator/SSDIndicatorSystem.cs index d6db56be9c..4fe726113a 100644 --- a/Content.Shared/SSDIndicator/SSDIndicatorSystem.cs +++ b/Content.Shared/SSDIndicator/SSDIndicatorSystem.cs @@ -1,4 +1,5 @@ using Content.Shared.Mind.Components; +using Content.Shared.NPC; namespace Content.Shared.SSDIndicator; @@ -9,10 +10,19 @@ public sealed class SSDIndicatorSystem : EntitySystem { public override void Initialize() { + SubscribeLocalEvent(OnInit); SubscribeLocalEvent(OnMindAdded); SubscribeLocalEvent(OnMindRemoved); } + private void OnInit(EntityUid uid, SSDIndicatorComponent component, ComponentInit args) + { + if (HasComp(uid)) + return; + + component.IsSSD = !HasComp(uid); + } + private void OnMindAdded(EntityUid uid, SSDIndicatorComponent component, MindAddedMessage args) { component.IsSSD = false; @@ -21,6 +31,9 @@ public sealed class SSDIndicatorSystem : EntitySystem private void OnMindRemoved(EntityUid uid, SSDIndicatorComponent component, MindRemovedMessage args) { + if (HasComp(uid)) + return; + component.IsSSD = true; Dirty(uid, component); }