Skip to content

Commit

Permalink
v1.4.4
Browse files Browse the repository at this point in the history
- Added support for RimWorld 1.2
- Removed support for RimWorld 1.0
  • Loading branch information
Jaxe-Dev committed Aug 20, 2020
1 parent 2fdc96a commit 5de5ba6
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 296 deletions.
30 changes: 13 additions & 17 deletions About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,20 @@
<packageId>Jaxe.PawnRules</packageId>
<name>Pawn Rules</name>
<author>Jaxe</author>
<description>Mod Version: 1.4.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.</description>
<description>Mod Version: 1.4.4\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.</description>
<supportedVersions>
<li>1.0</li>
<li>1.1</li>
<li>1.2</li>
</supportedVersions>
<modDependenciesByVersion>
<v1.1>
<li>
<packageId>brrainz.harmony</packageId>
<displayName>Harmony</displayName>
<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>
</li>
</v1.1>
</modDependenciesByVersion>
<loadAfterByVersion>
<v1.1>
<li>brrainz.harmony</li>
</v1.1>
</loadAfterByVersion>
<modDependencies>
<li>
<packageId>brrainz.harmony</packageId>
<displayName>Harmony</displayName>
<steamWorkshopUrl>steam://url/CommunityFilePage/2009463077</steamWorkshopUrl>
<downloadUrl>https://github.com/pardeike/HarmonyRimWorld/releases/latest</downloadUrl>
</li>
</modDependencies>
<loadAfter>
<li>brrainz.harmony</li>
</loadAfter>
</ModMetaData>
14 changes: 0 additions & 14 deletions LoadFolders.xml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Pawn Rules
![Mod Version](https://img.shields.io/badge/Mod_Version-1.4.3-blue.svg)
![RimWorld Version](https://img.shields.io/badge/Built_for_RimWorld-1.1-blue.svg)
![Harmony Version](https://img.shields.io/badge/Powered_by_Harmony-2.0-blue.svg)\
![Mod Version](https://img.shields.io/badge/Mod_Version-1.4.4-blue.svg)
![RimWorld Version](https://img.shields.io/badge/Built_for_RimWorld-1.2-blue.svg)
![Harmony Version](https://img.shields.io/badge/Powered_by_Harmony-2.x-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)
![GitHub Downloads](https://img.shields.io/github/downloads/Jaxe-Dev/PawnRules/total.svg?colorB=blue&label=GitHub+Downloads)

Expand Down
2 changes: 1 addition & 1 deletion Source/Interface/Dialog_Plans.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected override void DoContent(Rect rect)
_listing.Begin(vGrid[1], true);
foreach (var plan in _plans)
{
if (_listing.RadioButton(plan, _selected == plan)) { _selected = plan; }
if (_listing.RadioButton_NewTemp(plan, _selected == plan)) { _selected = plan; }
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion Source/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal class Mod : Verse.Mod
{
public const string Id = "PawnRules";
public const string Name = "Pawn Rules";
public const string Version = "1.4.3";
public const string Version = "1.4.4";

public static readonly DirectoryInfo ConfigDirectory = new DirectoryInfo(Path.Combine(GenFilePaths.ConfigFolderPath, Id));

Expand Down
20 changes: 10 additions & 10 deletions Source/Patch/Access.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ namespace PawnRules.Patch
{
internal static class Access
{
private static readonly MethodInfo Method_RimWorld_FoodUtility_GetMaxRegionsToScan = AccessTools.Method(typeof(FoodUtility), "GetMaxRegionsToScan");
private static readonly MethodInfo Method_RimWorld_FoodUtility_IsFoodSourceOnMapSociallyProper = AccessTools.Method(typeof(FoodUtility), "IsFoodSourceOnMapSociallyProper");
private static readonly MethodInfo Method_RimWorld_FoodUtility_SpawnedFoodSearchInnerScan = AccessTools.Method(typeof(FoodUtility), "SpawnedFoodSearchInnerScan");
private static readonly FieldInfo Field_RimWorld_FoodUtility_Filtered = AccessTools.Field(typeof(FoodUtility), "filtered");
private static readonly FieldInfo Field_Verse_LoadedModManager_RunningMods = AccessTools.Field(typeof(LoadedModManager), "runningMods");
private static readonly MethodInfo MethodRimWorldFoodUtilityGetMaxRegionsToScan = AccessTools.Method(typeof(FoodUtility), "GetMaxRegionsToScan");
private static readonly MethodInfo MethodRimWorldFoodUtilityIsFoodSourceOnMapSociallyProper = AccessTools.Method(typeof(FoodUtility), "IsFoodSourceOnMapSociallyProper");
private static readonly MethodInfo MethodRimWorldFoodUtilitySpawnedFoodSearchInnerScan = AccessTools.Method(typeof(FoodUtility), "SpawnedFoodSearchInnerScan");
private static readonly FieldInfo FieldRimWorldFoodUtilityFiltered = AccessTools.Field(typeof(FoodUtility), "filtered");
private static readonly FieldInfo FieldVerseLoadedModManagerRunningMods = AccessTools.Field(typeof(LoadedModManager), "runningMods");

public static int Method_RimWorld_FoodUtility_GetMaxRegionsToScan_Call(Pawn getter, bool forceScanWholeMap) => (int) Method_RimWorld_FoodUtility_GetMaxRegionsToScan.Invoke(null, new object[] { getter, forceScanWholeMap });
public static bool Method_RimWorld_FoodUtility_IsFoodSourceOnMapSociallyProper_Call(Thing thing, Pawn getter, Pawn eater, bool allowSociallyImproper) => (bool) Method_RimWorld_FoodUtility_IsFoodSourceOnMapSociallyProper.Invoke(null, new object[] { thing, getter, eater, allowSociallyImproper });
public static Thing Method_RimWorld_FoodUtility_SpawnedFoodSearchInnerScan_Call(Pawn eater, IntVec3 root, List<Thing> searchSet, PathEndMode peMode, TraverseParms traverseParams, float maxDistance = 9999f, Predicate<Thing> validator = null) => (Thing) Method_RimWorld_FoodUtility_SpawnedFoodSearchInnerScan.Invoke(null, new object[] { eater, root, searchSet, peMode, traverseParams, maxDistance, validator });
public static HashSet<Thing> Field_RimWorld_FoodUtility_Filtered_Get() => (HashSet<Thing>) Field_RimWorld_FoodUtility_Filtered.GetValue(null);
public static List<ModContentPack> Field_Verse_LoadedModManager_RunningMods_Get() => (List<ModContentPack>) Field_Verse_LoadedModManager_RunningMods.GetValue(null);
public static int Method_RimWorld_FoodUtility_GetMaxRegionsToScan_Call(Pawn getter, bool forceScanWholeMap) => (int) MethodRimWorldFoodUtilityGetMaxRegionsToScan.Invoke(null, new object[] { getter, forceScanWholeMap });
public static bool Method_RimWorld_FoodUtility_IsFoodSourceOnMapSociallyProper_Call(Thing thing, Pawn getter, Pawn eater, bool allowSociallyImproper) => (bool) MethodRimWorldFoodUtilityIsFoodSourceOnMapSociallyProper.Invoke(null, new object[] { thing, getter, eater, allowSociallyImproper });
public static Thing Method_RimWorld_FoodUtility_SpawnedFoodSearchInnerScan_Call(Pawn eater, IntVec3 root, List<Thing> searchSet, PathEndMode peMode, TraverseParms traverseParams, float maxDistance = 9999f, Predicate<Thing> validator = null) => (Thing) MethodRimWorldFoodUtilitySpawnedFoodSearchInnerScan.Invoke(null, new object[] { eater, root, searchSet, peMode, traverseParams, maxDistance, validator });
public static HashSet<Thing> Field_RimWorld_FoodUtility_Filtered_Get() => (HashSet<Thing>) FieldRimWorldFoodUtilityFiltered.GetValue(null);
public static List<ModContentPack> Field_Verse_LoadedModManager_RunningMods_Get() => (List<ModContentPack>) FieldVerseLoadedModManagerRunningMods.GetValue(null);
}
}
11 changes: 4 additions & 7 deletions Source/PawnRules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\v1.1\Assemblies\</OutputPath>
<OutputPath>..\Assemblies\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<DocumentationFile>..\v1.1\Assemblies\PawnRules.xml</DocumentationFile>
<DocumentationFile>..\Assemblies\PawnRules.xml</DocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony, Version=2.0.0.8, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Lib.Harmony.2.0.0.8\lib\net472\0Harmony.dll</HintPath>
<Reference Include="0Harmony, Version=2.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Lib.Harmony.2.0.2\lib\net472\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp">
Expand Down Expand Up @@ -128,9 +128,6 @@
<Content Include="..\Languages\English\Keyed\Keys.xml">
<Link>-\Languages\English\Keyed\Keys.xml</Link>
</Content>
<Content Include="..\LoadFolders.xml">
<Link>-\LoadFolders.xml</Link>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Loading

0 comments on commit 5de5ba6

Please sign in to comment.