using Content.Shared.Singularity.EntitySystems;
using Content.Shared.Singularity.Components;
-namespace Content.Client.Singularity.EntitySystems;
+namespace Content.Client.Singularity.Systems;
/// <summary>
/// The client-side version of <see cref="SharedEventHorizonSystem"/>.
--- /dev/null
+using Content.Shared.Singularity.EntitySystems;
+using Content.Shared.Singularity.Components;
+
+namespace Content.Client.Singularity.Systems;
+
+/// <summary>
+/// The client-side version of <see cref="SharedSingularityGeneratorSystem"/>.
+/// Manages <see cref="SingularityGeneratorComponent"/>s.
+/// Exists to make relevant signal handlers (ie: <see cref="SharedSingularityGeneratorSystem.OnEmagged"/>) work on the client.
+/// </summary>
+public sealed class SingularityGeneratorSystem : SharedSingularityGeneratorSystem
+{}
using Robust.Shared.GameStates;
using Robust.Shared.Utility;
-namespace Content.Client.Singularity.EntitySystems;
+namespace Content.Client.Singularity.Systems;
/// <summary>
/// The client-side version of <see cref="SharedSingularitySystem"/>.
}
}
+/// <summary>
+/// Shows a popup to emag user (client side only!) and adds <see cref="EmaggedComponent"/> to the entity when handled
+/// </summary>
+/// <param name="UserUid">Emag user</param>
+/// <param name="Handled">Did the emagging succeed? Causes a user-only popup to show on client side</param>
+/// <param name="Repeatable">Can the entity be emagged more than once? Prevents adding of <see cref="EmaggedComponent"/></param>
+/// <remarks>Needs to be handled in shared/client, not just the server, to actually show the emagging popup</remarks>
[ByRefEvent]
public record struct GotEmaggedEvent(EntityUid UserUid, bool Handled = false, bool Repeatable = false);
using Content.Shared.Physics;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
+using Robust.Shared.GameStates;
namespace Content.Shared.Singularity.Components;
-[RegisterComponent, AutoGenerateComponentPause, AutoGenerateComponentState]
+[RegisterComponent, AutoGenerateComponentPause, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class SingularityGeneratorComponent : Component
{
/// <summary>
private void OnEmagged(EntityUid uid, SingularityGeneratorComponent component, ref GotEmaggedEvent args)
{
- PopupSystem.PopupEntity(Loc.GetString("comp-generator-failsafe-disabled", ("target", uid)), uid);
component.FailsafeDisabled = true;
args.Handled = true;
}