Skip to content

Commit

Permalink
fixes deleteallthenghost
Browse files Browse the repository at this point in the history
  • Loading branch information
deathride58 committed Dec 6, 2023
1 parent 0ea63b1 commit 859f555
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
using Content.Server._Citadel.Contracts.Components;
using Content.Shared._Citadel.CitVars;
using Content.Server._Citadel.Contracts.Components;
using Content.Shared._Citadel.Contracts;
using Robust.Shared.Configuration;

namespace Content.Server._Citadel.Contracts.Systems;

// SHITCODESHITCODESHITCODESHITCODESHITCODE
// Whoever touches this next, REPLACE IT.

//we cri ; m; -bhijn
public sealed class DefaultContractSpawningSystem : EntitySystem
{
[Dependency] private readonly ContractManagementSystem _contract = default!;
[Dependency] protected readonly IConfigurationManager ConfigManager = default!;

public Dictionary<string, EntityUid> Contracts = new ()
{
Expand All @@ -17,6 +22,9 @@ public sealed class DefaultContractSpawningSystem : EntitySystem

public override void Update(float frameTime)
{
if (!ConfigManager.GetCVar(CitVars.CitDebugContractSpawning))
return;

foreach (var (contract, ent) in Contracts)
{
if (Deleted(ent) ||
Expand Down
15 changes: 15 additions & 0 deletions Content.Shared/_Citadel/CitVars.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using Robust.Shared;
using Robust.Shared.Configuration;

namespace Content.Shared._Citadel.CitVars
{
[CVarDefs]
public sealed class CitVars : CVars
{
/// <summary>
/// Automatically spawns more contracts as contracts are cleared
/// </summary>
public static readonly CVarDef<bool>
CitDebugContractSpawning = CVarDef.Create("debug.citadel.contractspawning", false, CVar.ARCHIVE | CVar.SERVERONLY);
}
}

0 comments on commit 859f555

Please sign in to comment.