Adds Hellspawn (Nar'Sie demon mob) (#20291)
* HellSpawn Mob * added spawner * summary for the namespace * larger collider, cannot enter single tile corridors. * fix * remove duplicate from yml, fix attributions. * moved action to shared, moved comp to shared, networked comp, separated heal, fixed attributions * removed flammable from hellspawn removed the healing effect from firestarter ability (healing can be separate ability). * Update attributions.yml fix attributions * fix * fix
This commit is contained in:
34
Content.Shared/Abilities/Firestarter/FirestarterComponent.cs
Normal file
34
Content.Shared/Abilities/Firestarter/FirestarterComponent.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Abilities.Firestarter;
|
||||
|
||||
/// <summary>
|
||||
/// Lets its owner entity ignite flammables around it and also heal some damage.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(SharedFirestarterSystem))]
|
||||
public sealed partial class FirestarterComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Radius of objects that will be ignited if flammable.
|
||||
/// </summary>
|
||||
[DataField("ignitionRadius")]
|
||||
public float IgnitionRadius = 4f;
|
||||
|
||||
/// <summary>
|
||||
/// The action entity.
|
||||
/// </summary>
|
||||
[DataField("fireStarterAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? FireStarterAction = "ActionFireStarter";
|
||||
|
||||
[DataField("fireStarterActionEntity")] public EntityUid? FireStarterActionEntity;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Radius of objects that will be ignited if flammable.
|
||||
/// </summary>
|
||||
[DataField("igniteSound")]
|
||||
public SoundSpecifier IgniteSound = new SoundPathSpecifier("/Audio/Magic/rumble.ogg");
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Content.Shared.Actions;
|
||||
|
||||
namespace Content.Shared.Abilities.Firestarter;
|
||||
|
||||
public sealed class SharedFirestarterSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<FirestarterComponent, ComponentInit>(OnComponentInit);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the firestarter action.
|
||||
/// </summary>
|
||||
private void OnComponentInit(EntityUid uid, FirestarterComponent component, ComponentInit args)
|
||||
{
|
||||
_actionsSystem.AddAction(uid, ref component.FireStarterActionEntity, component.FireStarterAction, uid);
|
||||
}
|
||||
}
|
||||
10
Content.Shared/Actions/Events/FireStarterActionEvent.cs
Normal file
10
Content.Shared/Actions/Events/FireStarterActionEvent.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Content.Shared.Actions.Events;
|
||||
|
||||
public sealed partial class FireStarterActionEvent : InstantActionEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// Increases the number of fire stacks when a flammable object is ignited.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float Severity = 0.3f;
|
||||
}
|
||||
Reference in New Issue
Block a user