Skip to content

Commit

Permalink
Merge pull request #676 from zymex22/issue668
Browse files Browse the repository at this point in the history
#668 removed obsolete Locks2 Patch
  • Loading branch information
Sn1p3rr3c0n authored Feb 4, 2023
2 parents f85f905 + c43143c commit 53960f7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,6 @@

namespace ProjectRimFactory.Common.HarmonyPatches
{
static class Patch_Locks2_ConfigRuleRace_Allows
{

static public void Prefix(Pawn pawn)
{
if (pawn is Pawn_Drone)
{
Patch_Pawn_IsColonist.overrideIsColonist = true;
}
}

static public void Postfix(Pawn pawn)
{
if (pawn is Pawn_Drone)
{
Patch_Pawn_IsColonist.overrideIsColonist = false;
}
}
}



// A patch to the problem of forbidding what drones have mined.
// When mineable yields, if pawn is Drone, Drone will be Colonist.
[HarmonyPatch(typeof(Mineable), "TrySpawnYield")]
Expand Down
23 changes: 0 additions & 23 deletions Source/ProjectRimFactory/Common/ProjectRimFactory_ModComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,29 +142,6 @@ private void LoadModSupport()
Log.Warning("Project Rimfactory - Failed to added Support for ResearchPowl when using Lite Mode");
}
}
if (ModLister.HasActiveModWithName("Locks 2: Lock Them Out!"))
{
MethodBase methodBase = null;
Type ConfigRuleRace = Type.GetType("Locks2.Core.LockConfig, Locks2", false).GetNestedType("ConfigRuleRace");

if (ConfigRuleRace != null)
{
methodBase = AccessTools.Method(ConfigRuleRace, "Allows");
}

if (methodBase != null)
{
var prefix = typeof(HarmonyPatches.Patch_Locks2_ConfigRuleRace_Allows).GetMethod("Prefix");
var postfix = typeof(HarmonyPatches.Patch_Locks2_ConfigRuleRace_Allows).GetMethod("Postfix");
this.HarmonyInstance.Patch(methodBase, new HarmonyMethod(prefix), new HarmonyMethod(postfix));

Log.Message("Project Rimfactory - added Support for Locks 2: Lock Them Out!");
}
else
{
Log.Warning("Project Rimfactory - Failed to added Support for Locks 2: Lock Them Out!");
}
}
if (ModLister.HasActiveModWithName("[KV] Save Storage, Outfit, Crafting, Drug, & Operation Settings [1.4]"))
{
//Get the Local Transpilers
Expand Down

0 comments on commit 53960f7

Please sign in to comment.