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:
pathetic meowmeow
2026-07-05 14:29:38 -04:00
committed by GitHub
parent 6bd4603734
commit acc9361a34
12 changed files with 536 additions and 38 deletions
+6
View File
@@ -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;
}