Firestarter fixes (#24647)
* Firestarter fixes - Actually networks the action. - Namespace fixes. * No networky for you
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
using Content.Shared.Atmos.EntitySystems;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Abilities.Firestarter;
|
||||
namespace Content.Shared.Atmos.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Lets its owner entity ignite flammables around it and also heal some damage.
|
||||
@@ -14,21 +14,21 @@ public sealed partial class FirestarterComponent : Component
|
||||
/// <summary>
|
||||
/// Radius of objects that will be ignited if flammable.
|
||||
/// </summary>
|
||||
[DataField("ignitionRadius")]
|
||||
[DataField]
|
||||
public float IgnitionRadius = 4f;
|
||||
|
||||
/// <summary>
|
||||
/// The action entity.
|
||||
/// </summary>
|
||||
[DataField("fireStarterAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? FireStarterAction = "ActionFireStarter";
|
||||
[DataField]
|
||||
public EntProtoId? FireStarterAction = "ActionFireStarter";
|
||||
|
||||
[DataField("fireStarterActionEntity")] public EntityUid? FireStarterActionEntity;
|
||||
[DataField] public EntityUid? FireStarterActionEntity;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Radius of objects that will be ignited if flammable.
|
||||
/// </summary>
|
||||
[DataField("igniteSound")]
|
||||
[DataField]
|
||||
public SoundSpecifier IgniteSound = new SoundPathSpecifier("/Audio/Magic/rumble.ogg");
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Atmos.Components;
|
||||
|
||||
namespace Content.Shared.Abilities.Firestarter;
|
||||
namespace Content.Shared.Atmos.EntitySystems;
|
||||
|
||||
public sealed class SharedFirestarterSystem : EntitySystem
|
||||
public abstract class SharedFirestarterSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
|
||||
|
||||
@@ -18,5 +19,6 @@ public sealed class SharedFirestarterSystem : EntitySystem
|
||||
private void OnComponentInit(EntityUid uid, FirestarterComponent component, ComponentInit args)
|
||||
{
|
||||
_actionsSystem.AddAction(uid, ref component.FireStarterActionEntity, component.FireStarterAction, uid);
|
||||
Dirty(uid, component);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user