diff --git a/Robust.Client/GameObjects/Components/Renderable/ParticlesComponent.cs b/Robust.Client/GameObjects/Components/Renderable/ParticlesComponent.cs index 1a3e7fa726e..dd4d5846f92 100644 --- a/Robust.Client/GameObjects/Components/Renderable/ParticlesComponent.cs +++ b/Robust.Client/GameObjects/Components/Renderable/ParticlesComponent.cs @@ -9,7 +9,7 @@ namespace Robust.Shared.GameObjects; -[RegisterComponent, NetworkedComponent] +[RegisterComponent] public sealed partial class ParticlesComponent : SharedParticlesComponent { public ParticleSystem? particlesSystem; } diff --git a/Robust.Client/GameObjects/EntitySystems/ParticlesSystem.cs b/Robust.Client/GameObjects/EntitySystems/ClientParticlesSystem.cs similarity index 66% rename from Robust.Client/GameObjects/EntitySystems/ParticlesSystem.cs rename to Robust.Client/GameObjects/EntitySystems/ClientParticlesSystem.cs index bcbaa89f5f8..a4a57098b13 100644 --- a/Robust.Client/GameObjects/EntitySystems/ParticlesSystem.cs +++ b/Robust.Client/GameObjects/EntitySystems/ClientParticlesSystem.cs @@ -12,10 +12,18 @@ namespace Robust.Client.GameObjects { [UsedImplicitly] - public sealed class ParticlesSystem : SharedParticlesSystem + public sealed class ClientParticlesSystem : SharedParticlesSystem { [Dependency] private readonly ParticlesManager _particlesManager = default!; - protected override void OnParticlesComponentGetState(EntityUid uid, SharedParticlesComponent component, ref ComponentGetState args) + + + public override void Initialize() { + base.Initialize(); + SubscribeLocalEvent(OnParticlesComponentGetState); + } + + + private void OnParticlesComponentGetState(EntityUid uid, ParticlesComponent component, ref ComponentGetState args) { //do a lookup for some yaml thing or some such based on particle type ParticleSystemArgs particleSystemArgs = new( @@ -28,7 +36,7 @@ protected override void OnParticlesComponentGetState(EntityUid uid, SharedPartic particleSystemArgs.SpawnPosition = () => new Vector3(new Random().NextFloat()*200, 0, 0); particleSystemArgs.Color = (float lifetime) => Color.Red; - ((ParticlesComponent) component).particlesSystem = _particlesManager.CreateParticleSystem(particleSystemArgs); + component.particlesSystem = _particlesManager.CreateParticleSystem(particleSystemArgs); } } diff --git a/Robust.Server/GameObjects/EntitySystems/ParticlesSystem.cs b/Robust.Server/GameObjects/EntitySystems/ParticlesSystem.cs deleted file mode 100644 index e36b2737f89..00000000000 --- a/Robust.Server/GameObjects/EntitySystems/ParticlesSystem.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Robust.Shared.GameObjects; -using Robust.Shared.GameStates; - -namespace Robust.Server.GameObjects; - -public sealed class ParticlesSystem : SharedParticlesSystem -{ - protected override void OnParticlesComponentGetState(EntityUid uid, SharedParticlesComponent component, ref ComponentGetState args) - { - - } -} diff --git a/Robust.Server/GameObjects/EntitySystems/ServerParticlesSystem.cs b/Robust.Server/GameObjects/EntitySystems/ServerParticlesSystem.cs new file mode 100644 index 00000000000..35142199787 --- /dev/null +++ b/Robust.Server/GameObjects/EntitySystems/ServerParticlesSystem.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameObjects; +using Robust.Shared.GameStates; + +namespace Robust.Server.GameObjects; + +public sealed class ServerParticlesSystem : SharedParticlesSystem +{ + +} diff --git a/Robust.Server/Graphics/ParticlesComponent.cs b/Robust.Server/Graphics/ParticlesComponent.cs new file mode 100644 index 00000000000..646c524f5ef --- /dev/null +++ b/Robust.Server/Graphics/ParticlesComponent.cs @@ -0,0 +1,7 @@ +using Robust.Shared.GameObjects; + +namespace Robust.Server.Graphics; + +[RegisterComponent] +public sealed partial class ParticlesComponent : SharedParticlesComponent { +} diff --git a/Robust.Shared/GameObjects/Components/Renderable/ParticlesComponent.cs b/Robust.Shared/GameObjects/Components/Renderable/ParticlesComponent.cs index 01ef01a4354..2929e75cdd6 100644 --- a/Robust.Shared/GameObjects/Components/Renderable/ParticlesComponent.cs +++ b/Robust.Shared/GameObjects/Components/Renderable/ParticlesComponent.cs @@ -7,7 +7,7 @@ namespace Robust.Shared.GameObjects; -[RegisterComponent, NetworkedComponent] +[NetworkedComponent] public abstract partial class SharedParticlesComponent : Component { [ViewVariables] public string ParticleType; } diff --git a/Robust.Shared/GameObjects/Systems/ParticlesComponentSystem.cs b/Robust.Shared/GameObjects/Systems/ParticlesComponentSystem.cs index ee773b0fb7c..20408edfb5c 100644 --- a/Robust.Shared/GameObjects/Systems/ParticlesComponentSystem.cs +++ b/Robust.Shared/GameObjects/Systems/ParticlesComponentSystem.cs @@ -4,11 +4,4 @@ namespace Robust.Shared.GameObjects; public abstract class SharedParticlesSystem : EntitySystem { - - public override void Initialize() { - base.Initialize(); - SubscribeLocalEvent(OnParticlesComponentGetState); - } - - protected abstract void OnParticlesComponentGetState(EntityUid uid, SharedParticlesComponent component, ref ComponentGetState args); }