--- /dev/null
+using Content.Shared.Explosion.EntitySystems;
+
+namespace Content.Client.Explosion.EntitySystems;
+
+public sealed class ExplosionSystem : SharedExplosionSystem
+{
+
+}
using Content.Shared.Atmos;
using Content.Shared.Damage;
using Content.Shared.Explosion;
+using Content.Shared.Explosion.EntitySystems;
using Content.Shared.FixedPoint;
using Robust.Shared.Map.Components;
-
namespace Content.Server.Explosion.EntitySystems;
-public sealed partial class ExplosionSystem : EntitySystem
+public sealed partial class ExplosionSystem : SharedExplosionSystem
{
[Dependency] private readonly DestructibleSystem _destructibleSystem = default!;
using Content.Shared.CCVar;
-
+using Content.Shared.Explosion.EntitySystems;
namespace Content.Server.Explosion.EntitySystems;
-public sealed partial class ExplosionSystem : EntitySystem
+public sealed partial class ExplosionSystem : SharedExplosionSystem
{
public int MaxIterations { get; private set; }
public int MaxArea { get; private set; }
using Content.Shared.Atmos;
using Content.Shared.Explosion;
using Content.Shared.Explosion.Components;
+using Content.Shared.Explosion.EntitySystems;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
// A good portion of it is focused around keeping track of what tile-indices on a grid correspond to tiles that border
// space. AFAIK no other system currently needs to track these "edge-tiles". If they do, this should probably be a
// property of the grid itself?
-public sealed partial class ExplosionSystem : EntitySystem
+public sealed partial class ExplosionSystem : SharedExplosionSystem
{
/// <summary>
/// Set of tiles of each grid that are directly adjacent to space, along with the directions that face space.
using Content.Shared.Damage;
using Content.Shared.Explosion;
using Content.Shared.Explosion.Components;
+using Content.Shared.Explosion.EntitySystems;
using Content.Shared.Maps;
using Content.Shared.Physics;
using Content.Shared.Projectiles;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using TimedDespawnComponent = Robust.Shared.Spawners.TimedDespawnComponent;
-
namespace Content.Server.Explosion.EntitySystems;
-public sealed partial class ExplosionSystem
+public sealed partial class ExplosionSystem : SharedExplosionSystem
{
[Dependency] private readonly FlammableSystem _flammableSystem = default!;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics.Components;
using Robust.Shared.Timing;
-
+using Content.Shared.Explosion.EntitySystems;
namespace Content.Server.Explosion.EntitySystems;
// This partial part of the explosion system has all of the functions used to create the actual explosion map.
// I.e, to get the sets of tiles & intensity values that describe an explosion.
-public sealed partial class ExplosionSystem : EntitySystem
+public sealed partial class ExplosionSystem : SharedExplosionSystem
{
/// <summary>
/// This is the main explosion generating function.
using System.Numerics;
using Content.Shared.Explosion;
using Content.Shared.Explosion.Components;
+using Content.Shared.Explosion.EntitySystems;
using Robust.Server.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.Map;
-
namespace Content.Server.Explosion.EntitySystems;
// This part of the system handled send visual / overlay data to clients.
-public sealed partial class ExplosionSystem : EntitySystem
+public sealed partial class ExplosionSystem : SharedExplosionSystem
{
public void InitVisuals()
{
using Content.Shared.Inventory;
using Content.Shared.Projectiles;
using Content.Shared.Throwing;
+using Content.Shared.Explosion.Components;
+using Content.Shared.Explosion.EntitySystems;
using Robust.Server.GameStates;
using Robust.Server.Player;
using Robust.Shared.Audio.Systems;
namespace Content.Server.Explosion.EntitySystems;
-public sealed partial class ExplosionSystem : EntitySystem
+public sealed partial class ExplosionSystem : SharedExplosionSystem
{
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IRobustRandom _robustRandom = default!;
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnReset);
- SubscribeLocalEvent<ExplosionResistanceComponent, ArmorExamineEvent>(OnArmorExamine);
-
// Handled by ExplosionSystem.Processing.cs
SubscribeLocalEvent<MapChangedEvent>(OnMapChanged);
_recoilSystem.KickCamera(uid, -delta.Normalized() * effect);
}
}
-
- private void OnArmorExamine(EntityUid uid, ExplosionResistanceComponent component, ref ArmorExamineEvent args)
- {
- var value = MathF.Round((1f - component.DamageCoefficient) * 100, 1);
-
- if (value == 0)
- return;
-
- args.Msg.PushNewline();
- args.Msg.AddMarkupOrThrow(Loc.GetString(component.Examine, ("value", value)));
- }
}
-using Content.Server.Explosion.EntitySystems;
-using Content.Shared.Explosion;
+using Content.Shared.Explosion.EntitySystems;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
+using Robust.Shared.GameStates;
-namespace Content.Server.Explosion.Components;
+namespace Content.Shared.Explosion.Components;
/// <summary>
/// Component that provides entities with explosion resistance.
/// This is desirable over just using damage modifier sets, given that equipment like bomb-suits need to
/// significantly reduce the damage, but shouldn't be silly overpowered in regular combat.
/// </remarks>
-[RegisterComponent]
-[Access(typeof(ExplosionSystem))]
+[NetworkedComponent, RegisterComponent]
+[Access(typeof(SharedExplosionSystem))]
public sealed partial class ExplosionResistanceComponent : Component
{
/// <summary>
--- /dev/null
+using Content.Shared.Explosion.Components;
+using Content.Shared.Armor;
+
+namespace Content.Shared.Explosion.EntitySystems;
+
+public abstract class SharedExplosionSystem : EntitySystem
+{
+
+ public override void Initialize()
+ {
+ base.Initialize();
+ SubscribeLocalEvent<ExplosionResistanceComponent, ArmorExamineEvent>(OnArmorExamine);
+ }
+
+ private void OnArmorExamine(EntityUid uid, ExplosionResistanceComponent component, ref ArmorExamineEvent args)
+ {
+ var value = MathF.Round((1f - component.DamageCoefficient) * 100, 1);
+
+ if (value == 0)
+ return;
+
+ args.Msg.PushNewline();
+ args.Msg.AddMarkupOrThrow(Loc.GetString(component.Examine, ("value", value)));
+ }
+}