Skip to content

Commit

Permalink
split components bad
Browse files Browse the repository at this point in the history
  • Loading branch information
amylizzle committed Feb 20, 2025
1 parent 0311905 commit ee38d34
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
3 changes: 1 addition & 2 deletions OpenDreamClient/Rendering/ClientDreamParticlesSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ private void OnDreamParticlesComponentChange(EntityUid uid, DreamParticlesCompon

private void HandleComponentAdd(EntityUid uid, DreamParticlesComponent component, ref ComponentAdd args)
{
component.particlesSystem = _particlesManager.CreateParticleSystem(uid, GetParticleSystemArgs(component));
_particlesManager.CreateParticleSystem(uid, GetParticleSystemArgs(component));
}

private void HandleComponentRemove(EntityUid uid, DreamParticlesComponent component, ref ComponentRemove args)
{
component.particlesSystem = null;
_particlesManager.DestroyParticleSystem(uid);
}

Expand Down
11 changes: 0 additions & 11 deletions OpenDreamClient/Rendering/DreamParticlesComponent.cs

This file was deleted.

2 changes: 0 additions & 2 deletions OpenDreamClient/Rendering/DreamViewOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ internal sealed partial class DreamViewOverlay : Overlay {
private readonly ClientImagesSystem _clientImagesSystem;

private readonly EntityQuery<DMISpriteComponent> _spriteQuery;
private readonly EntityQuery<DynamicParticlesComponent> _particlesQuery;
private readonly EntityQuery<TransformComponent> _xformQuery;
private readonly EntityQuery<DreamMobSightComponent> _mobSightQuery;

Expand Down Expand Up @@ -91,7 +90,6 @@ public DreamViewOverlay(RenderTargetPool renderTargetPool, TransformSystem trans
_clientImagesSystem = clientImagesSystem;

_spriteQuery = _entityManager.GetEntityQuery<DMISpriteComponent>();
_particlesQuery = _entityManager.GetEntityQuery<DynamicParticlesComponent>();
_xformQuery = _entityManager.GetEntityQuery<TransformComponent>();
_mobSightQuery = _entityManager.GetEntityQuery<DreamMobSightComponent>();

Expand Down
8 changes: 0 additions & 8 deletions OpenDreamRuntime/Rendering/DreamParticlesComponent.cs

This file was deleted.

4 changes: 2 additions & 2 deletions OpenDreamShared/Rendering/DreamParticlesComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace OpenDreamShared.Rendering;

[NetworkedComponent, AutoGenerateComponentState(true)]
public abstract partial class SharedDreamParticlesComponent : Component {
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
public sealed partial class DreamParticlesComponent : Component {
[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] public int Width;
[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] public int Height;
[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] public int Count;
Expand Down

0 comments on commit ee38d34

Please sign in to comment.