Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
comms console job fix
VE framework patch collision fix
  • Loading branch information
PeteTimesSix committed Jan 19, 2024
1 parent cc778c7 commit 3ee8149
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
namespace PeteTimesSix.ResearchReinvented.HarmonyPatches.Prototypes
{
[HarmonyPatch(typeof(Frame), nameof(Frame.CompleteConstruction))]
[HarmonyBefore(new string[]{ "OskarPotocki.VFECore" })]
public static class Frame_CompleteConstruction_Patches
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public override IEnumerable<Thing> PotentialWorkThingsGlobal(Pawn pawn)
List<Thing> consoles = new List<Thing>();
foreach(var def in CommsConsoles)
{
consoles.AddRange(pawn.Map?.listerThings.ThingsOfDef(ThingDefOf.CommsConsole));
consoles.AddRange(pawn.Map?.listerThings.ThingsOfDef(def));
}
return consoles;
}
Expand All @@ -92,6 +92,12 @@ public override bool HasJobOnThing(Pawn pawn, Thing thing, bool forced = false)
if (!pawn.CanReserve(thing, 1, -1, null, forced))
return false;

if (!(thing is Building_CommsConsole commsConsole))
return false;

if (!commsConsole.CanUseCommsNow)
return false;

if (OpportunityCache == null)
return false;

Expand Down
Binary file modified ResearchReinvented/v1.4/Assemblies/ResearchReinvented.dll
Binary file not shown.

0 comments on commit 3ee8149

Please sign in to comment.