more component ref removal + combining server/client comps (#13178)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
using Content.Shared.Singularity.Components;
|
||||
using Content.Client.Singularity.EntitySystems;
|
||||
|
||||
namespace Content.Client.Singularity.Components;
|
||||
|
||||
/// <summary>
|
||||
/// The client-side version of <see cref="SharedSingularityComponent"/>.
|
||||
/// Primarily managed by <see cref="SingularitySystem"/>.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedSingularityComponent))]
|
||||
public sealed class SingularityComponent : SharedSingularityComponent
|
||||
{}
|
||||
@@ -14,7 +14,7 @@ public sealed class SingularitySystem : SharedSingularitySystem
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<SharedSingularityComponent, ComponentHandleState>(HandleSingularityState);
|
||||
SubscribeLocalEvent<SingularityComponent, ComponentHandleState>(HandleSingularityState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -23,7 +23,7 @@ public sealed class SingularitySystem : SharedSingularitySystem
|
||||
/// <param name="uid">The uid of the singularity to sync.</param>
|
||||
/// <param name="comp">The state of the singularity to sync.</param>
|
||||
/// <param name="args">The event arguments including the state to sync the singularity with.</param>
|
||||
private void HandleSingularityState(EntityUid uid, SharedSingularityComponent comp, ref ComponentHandleState args)
|
||||
private void HandleSingularityState(EntityUid uid, SingularityComponent comp, ref ComponentHandleState args)
|
||||
{
|
||||
if (args.Current is not SingularityComponentState state)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user