Skip to content

Commit

Permalink
prevent self-hauling for mechs with hauling module, causing crash
Browse files Browse the repository at this point in the history
  • Loading branch information
rheirman committed Apr 24, 2019
1 parent 961bf8b commit 2d1a4da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Binary file modified Assemblies/WhatTheHack.dll
Binary file not shown.
1 change: 0 additions & 1 deletion Source/WhatTheHack/Buildings/Building_RogueAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public class Building_RogueAI : Building

private bool warnedPlayerAboutMood = false;


public override void SpawnSetup(Map map, bool respawningAfterLoad)
{
base.SpawnSetup(map, respawningAfterLoad);
Expand Down
4 changes: 4 additions & 0 deletions Source/WhatTheHack/Jobs/WorkGiver_HaulMechanoid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false)
{
Job result = null;
Pawn mech = t as Pawn;
if (pawn == mech)
{
return null;
}
if(mech != null && HaulAIUtility.PawnCanAutomaticallyHaulFast(pawn, t, forced))
{
Building_HackingTable closestAvailableTable = Utilities.GetAvailableHackingTable(pawn, mech);
Expand Down

0 comments on commit 2d1a4da

Please sign in to comment.