dv_CR-style_smoke_deflectors/CR-style_smoke_deflectors/Settings.cs

42 lines
1.3 KiB
C#
Raw Permalink Normal View History

2023-11-25 14:38:56 +00:00
using System;
using System.ComponentModel;
2023-11-25 14:38:56 +00:00
using UnityEngine;
using UnityModManagerNet;
2023-12-09 15:33:48 +00:00
namespace CR_style_smoke_deflectors
2023-11-25 14:38:56 +00:00
{
public class Settings : UnityModManager.ModSettings
{
public enum SmokeDeflectorType
{
[Description("No smoke deflectors")]
None,
2023-12-09 15:33:48 +00:00
[Description("Chinese Railways-style smoke deflectors")]
2023-11-25 14:38:56 +00:00
Chinese,
}
2023-12-09 15:33:48 +00:00
public SmokeDeflectorType smokeDeflectorType = SmokeDeflectorType.Chinese;
2023-11-25 14:38:56 +00:00
public void Draw(UnityModManager.ModEntry modEntry)
{
2023-12-09 15:33:48 +00:00
// GUILayout.BeginVertical();
2023-11-25 14:38:56 +00:00
GUILayout.Label("These settings are applied on train spawn, meaning rejoining the game will refresh all 282 locos to the settings specified here, but if you don't unload the train it will keep whatever settings were there previously. This is a temporary solution until I have a proper GUI implemented.");
GUILayout.Label("Also, reloading a save will currently break things and the tweaks won't load. This isn't good.");
2023-12-09 15:33:48 +00:00
// GUILayout.Space(2f);
2023-11-25 14:38:56 +00:00
GUILayout.Label("Smoke Deflector Type");
smokeDeflectorType = (SmokeDeflectorType) GUILayout.SelectionGrid((int) smokeDeflectorType, Enum.GetNames(typeof(SmokeDeflectorType)), 1, "toggle");
2023-12-09 15:33:48 +00:00
//
// GUILayout.EndVertical();
2023-11-25 14:38:56 +00:00
}
public override void Save(UnityModManager.ModEntry modEntry)
{
Save(this, modEntry);
}
}
}