mirror of
https://github.com/FalloutCollaborationProject/FCP-Tools.git
synced 2026-07-27 16:59:37 -07:00
Add updated FCP_StimPacks.dll under Source and update the distributed assembly. Clean up ModConfig code: normalize namespace/bracing style, move Config fields into the Configs class, and implement ExposeData method body. Add a null-check in PawnPatches to return early if __instance.story is null to prevent potential NREs. Update Stims.csproj to target C# 7.3, disable implicit usings and global usings generation for compatibility.
33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
using UnityEngine;
|
|
using Verse;
|
|
|
|
namespace StimPacks.ModConfig
|
|
{
|
|
public class ConfigUI : Mod
|
|
{
|
|
public static Configs Config;
|
|
public ConfigUI(ModContentPack content) : base(content)
|
|
{
|
|
Config = GetSettings<Configs>();
|
|
}
|
|
|
|
public override string SettingsCategory()
|
|
{
|
|
return "Stims";
|
|
}
|
|
|
|
public override void DoSettingsWindowContents(Rect inRect)
|
|
{
|
|
Listing_Standard listing = new Listing_Standard();
|
|
listing.Begin(inRect);
|
|
|
|
listing.CheckboxLabeled("AutoStim".Translate(), ref Config.AutoStim, "AutoStimDesc".Translate());
|
|
|
|
listing.CheckboxLabeled("TeetotalerAutoStim".Translate(), ref Config.TeetotalerAutoStim, "TeetotalerAutoStimDesc".Translate());
|
|
|
|
listing.End();
|
|
|
|
base.DoSettingsWindowContents(inRect);
|
|
}
|
|
}
|
|
} |