Skip to content

Commit

Permalink
Merge pull request #16 from Maeyanie/patch-1
Browse files Browse the repository at this point in the history
Avoid lag burst when a CE grenade explodes
  • Loading branch information
jecrell authored Apr 11, 2019
2 parents daa6e41 + 908ad35 commit 35b4662
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/HarmonyPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,12 @@ public static bool WipeExistingThings(IntVec3 thingPos, Rot4 thingRot, Buildable
//GenSpawn
public static void InvisDoorsDontWipe(BuildableDef newEntDef, BuildableDef oldEntDef, ref bool __result)
{
if (newEntDef.defName.StartsWith("Fragment_") &&
oldEntDef.defName.StartsWith("Fragment_"))
{
return;
}

var oldTrueDef =
DefDatabase<ThingDef>.AllDefs.FirstOrDefault(predicate: x => x.defName == oldEntDef.defName);
var newTrueDef =
Expand Down Expand Up @@ -947,4 +953,4 @@ public static void GetHeronRegionType(ref RegionType __result, IntVec3 c, Map ma
}
}
}
}
}

0 comments on commit 35b4662

Please sign in to comment.