RJW-Sexperience/Source/RJWSexperience/Settings/SettingsContainer.cs
2023-03-24 20:22:54 +05:00

39 lines
No EOL
911 B
C#

using System.Collections.Generic;
using Verse;
namespace RJWSexperience.Settings
{
public class SettingsContainer : IExposable
{
public List<ISettingHandle> Handles { get; }
public SettingsContainer(List<ISettingHandle> handles)
{
Handles = handles;
}
public void ExposeData()
{
foreach (ISettingHandle setting in Handles)
{
setting.Scribe();
}
}
public static SettingsContainer CreateHistoryContainer(Configurations settings) => new SettingsContainer(new List<ISettingHandle> {
settings.EnableRecordRandomizer,
settings.MaxLustDeviation,
settings.AvgLust,
settings.MaxSexCountDeviation,
settings.SexPerYear,
settings.MinSexableFromLifestage,
settings.MinSexablePercent,
settings.VirginRatio,
settings.SlavesBeenRapedExp,
settings.EnableSexHistory,
settings.HideGizmoWhenDrafted,
settings.HideGizmoWithRJW
}
);
}
}