RJW-Sexperience/Source/RJWSexperience/Configurations.cs

58 lines
2.8 KiB
C#
Raw Normal View History

2023-03-24 15:22:54 +00:00
using Verse;
2022-05-09 03:16:51 +00:00
using RJWSexperience.Settings;
2021-07-30 17:25:46 +00:00
namespace RJWSexperience
{
2023-03-24 15:22:54 +00:00
public class Configurations : ModSettings
{
2022-05-09 03:16:51 +00:00
public const int CurrentSettingsVersion = 1;
2022-05-06 14:30:26 +00:00
2023-03-24 15:22:54 +00:00
public readonly SettingHandle<float> LustEffectPower = new SettingHandle<float>("LustEffectPower", 0.5f);
public readonly SettingHandle<bool> EnableBastardRelation = new SettingHandle<bool>("EnableBastardRelation", true);
public readonly SettingHandle<float> LustLimit = new SettingHandle<float>("LustLimit", 150f);
public readonly SettingHandle<float> MaxSingleLustChange = new SettingHandle<float>("maxSingleLustChange", 1f);
public readonly SettingHandle<bool> SexCanFillBuckets = new SettingHandle<bool>("SexCanFillBuckets", false);
public readonly SettingHandle<bool> EnableRecordRandomizer = new SettingHandle<bool>("EnableRecordRandomizer", true);
public readonly SettingHandle<float> MaxLustDeviation = new SettingHandle<float>("MaxLustDeviation", 200f);
public readonly SettingHandle<float> AvgLust = new SettingHandle<float>("AvgLust", 0f);
public readonly SettingHandle<float> MaxSexCountDeviation = new SettingHandle<float>("MaxSexCountDeviation", 90f);
public readonly SettingHandle<float> SexPerYear = new SettingHandle<float>("SexPerYear", 30f);
public readonly SettingHandle<bool> MinSexableFromLifestage = new SettingHandle<bool>("MinSexableFromLifestage", true);
public readonly SettingHandle<float> MinSexablePercent = new SettingHandle<float>("MinSexablePercent", 0.2f);
public readonly SettingHandle<float> VirginRatio = new SettingHandle<float>("VirginRatio", 0.01f);
public readonly SettingHandle<bool> SlavesBeenRapedExp = new SettingHandle<bool>("SlavesBeenRapedExp", true);
public readonly SettingHandle<bool> EnableSexHistory = new SettingHandle<bool>("EnableSexHistory", true);
public readonly SettingHandle<bool> HideGizmoWhenDrafted = new SettingHandle<bool>("HideGizmoWhenDrafted", true);
public readonly SettingHandle<bool> DevMode = new SettingHandle<bool>("DevMode", false);
public readonly SettingHandle<bool> SelectionLocked = new SettingHandle<bool>("SelectionLocked", false);
public override void ExposeData()
{
2023-03-24 15:22:54 +00:00
SettingsContainer history = SettingsContainer.CreateHistoryContainer(this);
2022-05-09 03:16:51 +00:00
int version = CurrentSettingsVersion;
Scribe_Values.Look(ref version, "SettingsVersion", 0);
2023-03-24 15:22:54 +00:00
LustEffectPower.Scribe();
EnableBastardRelation.Scribe();
LustLimit.Scribe();
MaxSingleLustChange.Scribe();
SelectionLocked.Scribe();
SexCanFillBuckets.Scribe();
DevMode.Scribe();
Scribe_Deep.Look(ref history, "History", history.Handles);
base.ExposeData();
2022-05-06 14:30:26 +00:00
if (Scribe.mode != LoadSaveMode.LoadingVars)
return;
2022-05-09 03:16:51 +00:00
if (history == null)
{
// Previously history settings were in Configurations. Direct call to try read old data
2023-03-24 15:22:54 +00:00
SettingsContainer.CreateHistoryContainer(this).ExposeData();
}
}
}
2021-07-30 17:25:46 +00:00
}