-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
63 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,49 @@ | ||
using HarmonyLib; | ||
using UnityEngine; | ||
using Verse; | ||
|
||
namespace VisualExceptions | ||
{ | ||
[StaticConstructorOnStartup] | ||
class HarmonyMain : Mod | ||
{ | ||
internal static string harmony_id = "net.pardeike.rimworld.lib.harmony"; | ||
|
||
static HarmonyMain() | ||
static HarmonyMain() // loads earliest | ||
{ | ||
var harmony = new Harmony(harmony_id); | ||
_ = new PatchClassProcessor(harmony, typeof(ShowHarmonyVersionOnMainScreen)).Patch(); | ||
|
||
|
||
ExceptionState.Load(); | ||
if (ExceptionState.configuration.Debugging) | ||
Patcher.Apply(harmony); | ||
Patcher.Apply(); | ||
} | ||
|
||
public HarmonyMain(ModContentPack content) : base(content) { } | ||
|
||
public override void DoSettingsWindowContents(Rect inRect) | ||
{ | ||
var list = new Listing_Standard { ColumnWidth = inRect.width / 2f }; | ||
list.Begin(inRect); | ||
list.Gap(12f); | ||
|
||
var conf = ExceptionState.configuration; | ||
var debugging = conf.Debugging; | ||
var tabToTheRight = conf.TabToTheRight; | ||
var useSound = conf.UseSound; | ||
|
||
list.CheckboxLabeled("Enabled", ref debugging); | ||
list.CheckboxLabeled("Show exceptions to the right", ref tabToTheRight); | ||
list.CheckboxLabeled("Use sound", ref useSound); | ||
|
||
if (debugging != conf.Debugging || tabToTheRight != conf.TabToTheRight || useSound != conf.UseSound) | ||
{ | ||
conf.Debugging = debugging; | ||
conf.TabToTheRight = tabToTheRight; | ||
conf.UseSound = useSound; | ||
ExceptionState.Save(); | ||
} | ||
|
||
list.End(); | ||
} | ||
|
||
public override string SettingsCategory() | ||
{ | ||
return "Visual Exceptions"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.