Make the station start with random broken wiring (#26695)

Random wire cutting on round start
This commit is contained in:
Tayrtahn
2024-04-04 02:28:09 -04:00
committed by GitHub
parent 705f029424
commit a1a12194a5
6 changed files with 125 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using Content.Shared.Whitelist;
namespace Content.Server.GameTicking.Rules.VariationPass.Components;
/// <summary>
/// Handles cutting a random wire on random devices around the station.
/// </summary>
[RegisterComponent]
public sealed partial class CutWireVariationPassComponent : Component
{
/// <summary>
/// Blacklist of hackable entities that should not be chosen to
/// have wires cut.
/// </summary>
[DataField]
public EntityWhitelist Blacklist = new();
/// <summary>
/// Chance for an individual wire to be cut.
/// </summary>
[DataField]
public float WireCutChance = 0.05f;
/// <summary>
/// Maximum number of wires that can be cut stationwide.
/// </summary>
[DataField]
public int MaxWiresCut = 10;
}