mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 16:17:27 +00:00
Add the ability to spawn in as a vent critter at will (#6187)
* Add the ability to spawn in as a vent critter at will * cooldown
This commit is contained in:
@@ -222,6 +222,12 @@ public sealed partial class DCCVars
|
||||
public static readonly CVarDef<bool> EnablePresetCooldowns =
|
||||
CVarDef.Create("game.enable_preset_cooldowns", false, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// The amount of time a player must wait after spawning as a vent critter ghost role before spawning as another one
|
||||
/// </summary>
|
||||
public static readonly CVarDef<TimeSpan> VentCritterGhostRoleSpawnCooldown =
|
||||
CVarDef.Create("ghost.vent_critter_spawn_cooldown", TimeSpan.FromMinutes(3), CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// A string containing a list of newline-separated strings to be highlighted in the chat. Use this instead of Wizden's CVar.
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared._DV.Ghost.Roles;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class DVSpawnableGhostRoleRequestEvent(ProtoId<DVSpawnableGhostRolePrototype> prototype) : EntityEventArgs
|
||||
{
|
||||
public ProtoId<DVSpawnableGhostRolePrototype> Prototype = prototype;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class DVSpawnableGhostRoleCooldownRequestEvent : EntityEventArgs;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class DVSpawnableGhostRoleCooldownUpdateEvent(TimeSpan? cooldownEnd) : EntityEventArgs
|
||||
{
|
||||
public TimeSpan? CooldownEnd = cooldownEnd;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared._DV.Ghost.Roles;
|
||||
|
||||
[Prototype("dvSpawnableGhostRole")]
|
||||
public sealed partial class DVSpawnableGhostRolePrototype : IPrototype
|
||||
{
|
||||
[IdDataField]
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
public LocId Name => $"dv-spawnable-{ID}.name";
|
||||
|
||||
public LocId Description => $"dv-spawnable-{ID}.description";
|
||||
|
||||
[DataField(required: true)]
|
||||
public LocId Rules;
|
||||
|
||||
[DataField]
|
||||
public List<EntProtoId> MindRoles = new() { "MindRoleGhostRoleNeutral" };
|
||||
|
||||
[DataField(required: true)]
|
||||
public EntProtoId Entity;
|
||||
}
|
||||
Reference in New Issue
Block a user