Skip to content

Commit

Permalink
cleanup + meteorite fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rheirman committed Jul 21, 2021
1 parent ad48759 commit 233e309
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 37 deletions.
Binary file modified 1.3/Assemblies/WhatTheHack.dll
Binary file not shown.
3 changes: 0 additions & 3 deletions 1.3/Source/WhatTheHack/Comps/CompOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ public override void PostDraw()
base.PostDraw();
Building_RogueAI parent = this.parent as Building_RogueAI;
DrawBackground(parent);
Log.Message("postdraw called");
if (ShowEye)
{
Log.Message("postdraw called, showEye is true");
DrawEye(parent);
}

Expand All @@ -75,7 +73,6 @@ private void DrawEye(Building_RogueAI parent)
drawPosEye.y += 0.046875f;
drawPosEye += overlay.offsetDefault;
SetAnimationOffset(ref drawPosEye);
Log.Message("draw eye called!");
gdEye.Graphic.Draw(drawPosEye, parent.Rotation, parent, 0f);
}

Expand Down
21 changes: 21 additions & 0 deletions 1.3/Source/WhatTheHack/Harmony/CaravanFormingUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,32 @@
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using Verse;
using Verse.AI;
using Verse.AI.Group;
using WhatTheHack.Storage;
using WhatTheHack.ThinkTree;

namespace WhatTheHack.Harmony
{

[HarmonyPatch(typeof(CaravanFormingUtility), "StartFormingCaravan")]
static class CaravanFormingUtility_StartFormingCaravan
{
static void Postfix(List<Pawn> pawns)
{
foreach (var pawn in pawns)
{
if (pawn.IsHacked())
{
pawn.jobs.EndCurrentJob(JobCondition.InterruptForced, false);
ExtendedPawnData pawnData = Base.Instance.GetExtendedDataStorage().GetExtendedDataFor(pawn);
pawnData.isActive = true;
}
}
}
}

[HarmonyPatch(typeof(CaravanFormingUtility), "AllSendablePawns")]
static class CaravanFormingUtility_AllSendablePawns
{
Expand Down
32 changes: 0 additions & 32 deletions 1.3/Source/WhatTheHack/Harmony/Test.cs

This file was deleted.

2 changes: 1 addition & 1 deletion 1.3/Source/WhatTheHack/Harmony/ThingSetMaker_Meteorite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace WhatTheHack.Harmony
[HarmonyPatch(typeof(ThingSetMaker_Meteorite), "FindRandomMineableDef")]
static class ThingSetMaker_Meteorite_FindRandomMineableDef
{
static void Postfix(ThingSetMaker_Meteorite __instance, ThingDef __result)
static void Postfix(ThingSetMaker_Meteorite __instance, ref ThingDef __result)
{
if(__result == WTH_DefOf.WTH_MechanoidParts)
{
Expand Down
1 change: 0 additions & 1 deletion 1.3/Source/WhatTheHack/WhatTheHack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
<Compile Include="Harmony\Pawn_SkillTracker.cs" />
<Compile Include="Harmony\PrisonLabor\PrisonLabor_Patch_RenamePrisoners.cs" />
<Compile Include="Harmony\Sustainer.cs" />
<Compile Include="Harmony\Test.cs" />
<Compile Include="Harmony\ThingDef.cs" />
<Compile Include="Harmony\ThingSetMaker_Meteorite.cs" />
<Compile Include="Jobs\Depricated\JobDriver_Ability.cs" />
Expand Down

0 comments on commit 233e309

Please sign in to comment.