2026-11-29 18:26:50 +00:00
|
|
|
using UnityEngine;
|
|
|
|
|
using Verse;
|
|
|
|
|
|
|
|
|
|
namespace BlaxDefaults
|
|
|
|
|
{
|
|
|
|
|
public class BlaxDefaultsMod : Mod
|
|
|
|
|
{
|
|
|
|
|
public static BlaxDefaultsSettings Settings;
|
|
|
|
|
|
|
|
|
|
public BlaxDefaultsMod(ModContentPack content) : base(content)
|
|
|
|
|
{
|
|
|
|
|
Settings = GetSettings<BlaxDefaultsSettings>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>The master switch. True before the settings exist.</summary>
|
|
|
|
|
public static bool Enabled => Settings == null || Settings.enabled;
|
|
|
|
|
|
|
|
|
|
/// <summary>New stockpiles start from their type's default.</summary>
|
|
|
|
|
public static bool StockpilesOn => Enabled && (Settings == null || Settings.stockpileDefaults);
|
|
|
|
|
|
|
|
|
|
/// <summary>New storage buildings start from their kind's default.</summary>
|
|
|
|
|
public static bool StorageOn => Enabled && (Settings == null || Settings.storageDefaults);
|
|
|
|
|
|
|
|
|
|
/// <summary>New production bills get the values of "Every new bill".</summary>
|
|
|
|
|
public static bool BillsOn => Enabled && (Settings == null || Settings.billDefaults);
|
|
|
|
|
|
2026-11-30 21:33:42 +00:00
|
|
|
/// <summary>The forbid rules may act (each rule still needs its own switch and filter).</summary>
|
|
|
|
|
public static bool ForbidOn => Enabled && (Settings == null || Settings.forbidRules);
|
|
|
|
|
|
2026-11-29 18:26:50 +00:00
|
|
|
public override string SettingsCategory() => "Blax Defaults";
|
|
|
|
|
|
|
|
|
|
public override void DoSettingsWindowContents(Rect inRect) => SettingsPage.Draw(inRect);
|
|
|
|
|
}
|
|
|
|
|
}
|