diff --git a/About/About.xml b/About/About.xml index 946c52f..dee01ba 100644 --- a/About/About.xml +++ b/About/About.xml @@ -4,5 +4,5 @@ Pawn Rules Jaxe 1.0.0 - Mod Version: 1.2.2\n\n\nPawn Rules is a mod that allows custom rules to be assigned individually to your colonists, animals, guests and prisoners.\n\nCurrently the following rules can be applied:\n\n- Disallow certain foods\n- Disallow bonding with certain animals\n- Disallow new romances\n- Disallow constructing items that have a quality level\n\nAny of these rules can be disabled and hidden from the rules window. Rules presets and defaults can be imported and exported between games. + Mod Version: 1.2.3\n\n\nPawn Rules is a mod that allows custom rules to be assigned individually to your colonists, animals, guests and prisoners.\n\nCurrently the following rules can be applied:\n\n- Disallow certain foods\n- Disallow bonding with certain animals\n- Disallow new romances\n- Disallow constructing items that have a quality level\n\nAny of these rules can be disabled and hidden from the rules window. Rules presets and defaults can be imported and exported between games. diff --git a/About/Manifest.xml b/About/Manifest.xml index 9cac1e5..e710f72 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -2,7 +2,7 @@ PawnRules - 1.2.2 + 1.2.3 https://raw.githubusercontent.com/Jaxe-Dev/PawnRules/master/About/Manifest.xml https://github.com/Jaxe-Dev/PawnRules/releases/latest diff --git a/README.md b/README.md index 61bfa34..4e7bbdf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Pawn Rules -![Mod Version](https://img.shields.io/badge/Mod_Version-1.2.2-blue.svg) +![Mod Version](https://img.shields.io/badge/Mod_Version-1.2.3-blue.svg) ![RimWorld Version](https://img.shields.io/badge/Built_for_RimWorld-1.0-blue.svg) ![Harmony Version](https://img.shields.io/badge/Powered_by_Harmony-1.2.0.1-blue.svg)\ ![Steam Subscribers](https://img.shields.io/badge/dynamic/xml.svg?label=Steam+Subscribers&query=//table/tr[2]/td[1]&colorB=blue&url=https://steamcommunity.com/sharedfiles/filedetails/%3Fid=1499843448&suffix=+total) diff --git a/Source/Data/Registry.cs b/Source/Data/Registry.cs index 296063e..991db05 100644 --- a/Source/Data/Registry.cs +++ b/Source/Data/Registry.cs @@ -185,7 +185,8 @@ public static Rules GetOrDefaultRules(Pawn pawn) private static void ChangeTypeOrCreateRules(Pawn pawn, PawnType type) { if (type == pawn.GetTargetType()) { return; } - _instance._rules[pawn] = GetDefaultRules(type); + var defaultRules = GetDefaultRules(type); + _instance._rules[pawn] = defaultRules.IsVoid ? defaultRules.CloneRulesFor(pawn) : defaultRules; } public static Rules CloneRules(Pawn original, Pawn cloner) diff --git a/Source/Interface/Dialog_Global.cs b/Source/Interface/Dialog_Global.cs index 72c3fa4..4cd7605 100644 --- a/Source/Interface/Dialog_Global.cs +++ b/Source/Interface/Dialog_Global.cs @@ -7,7 +7,7 @@ namespace PawnRules.Interface { internal class Dialog_Global : WindowPlus { - private Dialog_Global() : base(Lang.Get("Dialog_Global.Title").Bold(), new Vector2(300f, 400f)) + private Dialog_Global() : base(Lang.Get("Dialog_Global.Title").Bold(), new Vector2(300f, 450f)) { } public static void Open() => Find.WindowStack.Add(new Dialog_Global()); diff --git a/Source/Mod.cs b/Source/Mod.cs index dd96430..84a9fde 100644 --- a/Source/Mod.cs +++ b/Source/Mod.cs @@ -13,7 +13,7 @@ internal class Mod : Verse.Mod { public const string Id = "PawnRules"; public const string Name = "Pawn Rules"; - public const string Version = "1.2.2"; + public const string Version = "1.2.3"; public static readonly DirectoryInfo ConfigDirectory = new DirectoryInfo(Path.Combine(GenFilePaths.ConfigFolderPath, Id)); diff --git a/Source/Patch/Extensions.cs b/Source/Patch/Extensions.cs index 6e95ba4..4647ef6 100644 --- a/Source/Patch/Extensions.cs +++ b/Source/Patch/Extensions.cs @@ -111,6 +111,5 @@ public static Rect[] GetVGrid(this Rect self, float padding, params float[] heig return rects.ToArray(); } - } }