save main tab on/off

This commit is contained in:
Platinum 2020-06-01 10:48:19 -07:00
parent 1c1b94e8f7
commit b0b06eb208
4 changed files with 35 additions and 1 deletions

View file

@ -88,6 +88,7 @@
<Compile Include="Source\Defs\AnimationDef.cs" />
<Compile Include="Source\JobDrivers\JobDriver_SexBaseRecieverLovedForAnimation.cs" />
<Compile Include="Source\JobDrivers\JobDriver_SexCasualForAnimation.cs" />
<Compile Include="Source\MainTabWindows\WorldComponent_UpdateMainTab.cs" />
<Compile Include="Source\MainTabWindows\MainTabWindow_OffsetConfigure.cs" />
<Compile Include="Source\MainTabWindows\OffsetMainButtonDefOf.cs" />
<Compile Include="Source\Patches\HarmonyPatch_AlienRace.cs" />

View file

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using RimWorld.Planet;
using Verse;
namespace Rimworld_Animations {
public class WorldComponent_UpdateMainTab : WorldComponent {
public WorldComponent_UpdateMainTab(World world) : base(world) {
}
public override void FinalizeInit() {
base.FinalizeInit();
OffsetMainButtonDefOf.OffsetManager.buttonVisible = AnimationSettings.offsetTab;
}
}
}

View file

@ -8,9 +8,11 @@ using UnityEngine;
using RimWorld;
namespace Rimworld_Animations {
public class AnimationSettings : ModSettings {
public static bool orgasmQuiver, rapeShiver, soundOverride = true, hearts = true, controlGenitalRotation = false, applySemenOnAnimationOrgasm = false, fastAnimForQuickie = false;
public static bool offsetTab = false;
public static float shiverIntensity = 2f;
public static Dictionary<string, Vector2> offsets = new Dictionary<string, Vector2>();
@ -20,6 +22,7 @@ namespace Rimworld_Animations {
base.ExposeData();
Scribe_Values.Look(ref offsetTab, "EnableOffsetTab", false);
Scribe_Values.Look(ref controlGenitalRotation, "controlGenitalRotation", false);
Scribe_Values.Look(ref orgasmQuiver, "orgasmQuiver");
Scribe_Values.Look(ref fastAnimForQuickie, "fastAnimForQuickie");
@ -67,7 +70,7 @@ namespace Rimworld_Animations {
listingStandard.CheckboxLabeled("Enable Rape Shiver", ref AnimationSettings.rapeShiver);
listingStandard.CheckboxLabeled("Enable hearts during lovin'", ref AnimationSettings.hearts);
listingStandard.CheckboxLabeled("Enable Offset Tab", ref OffsetMainButtonDefOf.OffsetManager.buttonVisible);
listingStandard.CheckboxLabeled("Enable Offset Tab", ref AnimationSettings.offsetTab);
listingStandard.Label("Shiver/Quiver Intensity (default 2): " + AnimationSettings.shiverIntensity);
AnimationSettings.shiverIntensity = listingStandard.Slider(AnimationSettings.shiverIntensity, 0.0f, 12f);
@ -77,6 +80,12 @@ namespace Rimworld_Animations {
base.DoSettingsWindowContents(inRect);
}
public override void WriteSettings() {
base.WriteSettings();
OffsetMainButtonDefOf.OffsetManager.buttonVisible = AnimationSettings.offsetTab;
}
public override string SettingsCategory() {
return "RJW Animation Settings";
}