Familiars respawn (#7640)
This commit is contained in:
17
Content.Server/Bible/Components/FamiliarComponent.cs
Normal file
17
Content.Server/Bible/Components/FamiliarComponent.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace Content.Server.Bible.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// This component is for the chaplain's familiars, and mostly
|
||||
/// used to track their current state and to give a component to check for
|
||||
/// if any special behavior is needed.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class FamiliarComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity this familiar was summoned from.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public EntityUid? Source = null;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Content.Server.Bible;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.Bible.Components
|
||||
@@ -22,6 +21,12 @@ namespace Content.Server.Bible.Components
|
||||
[DataField("requriesBibleUser")]
|
||||
public bool RequiresBibleUser = true;
|
||||
|
||||
/// <summary>
|
||||
/// The specific creature this summoned, if the SpecialItemPrototype has a mobstate.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public EntityUid? Summon = null;
|
||||
|
||||
[DataField("summonAction")]
|
||||
public InstantAction SummonAction = new()
|
||||
{
|
||||
@@ -30,5 +35,13 @@ namespace Content.Server.Bible.Components
|
||||
Description = "bible-summon-verb-desc",
|
||||
Event = new SummonActionEvent(),
|
||||
};
|
||||
|
||||
/// Used for respawning
|
||||
[ViewVariables]
|
||||
[DataField("accumulator")]
|
||||
public float Accumulator = 0f;
|
||||
[ViewVariables]
|
||||
[DataField("respawnTime")]
|
||||
public float RespawnTime = 180f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Content.Server.Bible.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// EntityQuery Tracking Component for Summonables that are counting up a respawn.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class SummonableRespawningComponent : Component
|
||||
{}
|
||||
}
|
||||
Reference in New Issue
Block a user