Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rheirman committed Sep 16, 2018
1 parent 43ce11d commit 8e01ec0
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 7 deletions.
Binary file modified Assemblies/WhatTheHack.dll
Binary file not shown.
2 changes: 0 additions & 2 deletions Source/WhatTheHack/Buildings/Building_HackingTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ public override void SpawnSetup(Map map, bool respawningAfterLoad)

public bool TryAddPawnForModification(Pawn pawn, RecipeDef recipeDef)
{
Log.Message("TryAddPawnForModification called");
Bill_Medical bill = new Bill_Medical(recipeDef);
IEnumerable<BodyPartRecord> bodyparts = RecipeUtility.GetPartsToApplyOn(pawn, bill.recipe);
if(bodyparts.Count() == 0)
{
Log.Message("no found body parts for mech");
return false;
}
if(pawn.health.surgeryBills.FirstShouldDoNow == null || pawn.health.surgeryBills.FirstShouldDoNow.recipe != WTH_DefOf.WTH_HackMechanoid)
Expand Down
3 changes: 0 additions & 3 deletions Source/WhatTheHack/Harmony/CharacterCardUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> inst
{
if(instruction.operand == typeof(Pawn).GetMethod("get_IsColonist"))
{
Log.Message("IsColonist property call found");
yield return new CodeInstruction(OpCodes.Call, typeof(CharacterCardUtility_DrawCharacterCard).GetMethod("IsColonistOrHackedMech"));
}
else
Expand All @@ -50,10 +49,8 @@ static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> inst

public static bool IsColonistOrHackedMech(Pawn pawn)
{
Log.Message("isColonistOrHackedMech called");
if (pawn.IsColonist || pawn.IsHacked())
{
Log.Message("returning true");
return true;
}
return false;
Expand Down
2 changes: 0 additions & 2 deletions Source/WhatTheHack/Harmony/Thing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,10 @@ private static IEnumerable<Thing> GenerateExtraButcherProducts(IEnumerable<Thing
}
foreach(Hediff hediff in pawn.health.hediffSet.hediffs)
{
Log.Message("found hediff: " + hediff);
if(hediff.def.GetModExtension<DefModextension_Hediff>() is DefModextension_Hediff ext)
{
if(ext.extraButcherProduct != null)
{
Log.Message("found extra butchery product, spawning " + ext.extraButcherProduct);
yield return ThingMaker.MakeThing(ext.extraButcherProduct);
}
}
Expand Down

0 comments on commit 8e01ec0

Please sign in to comment.