-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from emipa606/main
Mechanoids should now stay in the charging station
- Loading branch information
Showing
9 changed files
with
43 additions
and
63 deletions.
There are no files selected for viewing
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
File renamed without changes.
22 changes: 22 additions & 0 deletions
22
Source/WhatTheHack/Harmony/JobGiver_GetEnergy_ShouldAutoRecharge.cs
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using HarmonyLib; | ||
using RimWorld; | ||
using Verse; | ||
|
||
namespace WhatTheHack.Harmony; | ||
|
||
[HarmonyPatch(typeof(JobGiver_GetEnergy), "ShouldAutoRecharge")] | ||
internal static class JobGiver_GetEnergy_ShouldAutoRecharge | ||
{ | ||
private static void Postfix(ref bool __result, Pawn pawn) | ||
{ | ||
if (!__result) | ||
{ | ||
return; | ||
} | ||
|
||
if (pawn.IsHacked()) | ||
{ | ||
__result = false; | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Source/WhatTheHack/Harmony/Need_MechEnergy_NeedInterval.cs
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using HarmonyLib; | ||
using RimWorld; | ||
|
||
namespace WhatTheHack.Harmony; | ||
|
||
[HarmonyPatch(typeof(Need_MechEnergy), "NeedInterval")] | ||
internal static class Need_MechEnergy_NeedInterval | ||
{ | ||
private static bool Prefix(Need_MechEnergy __instance) | ||
{ | ||
return !__instance.pawn.IsHacked(); | ||
} | ||
} |
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