32 lines
1.2 KiB
C#
32 lines
1.2 KiB
C#
|
|
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);
|
||
|
|
|
||
|
|
public override string SettingsCategory() => "Blax Defaults";
|
||
|
|
|
||
|
|
public override void DoSettingsWindowContents(Rect inRect) => SettingsPage.Draw(inRect);
|
||
|
|
}
|
||
|
|
}
|