Created
May 3, 2022 17:19
-
-
Save slippycheeze/5fd20838007052769302102a71c799d9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is just an excerpt, of course... | |
namespace CrashLanding { | |
public class Ticker_MTcounter : Building { | |
public void DoSpawn(int tickAmt) { | |
Predicate<IntVec3> validator = (Predicate<IntVec3>) (x => { | |
foreach (IntVec3 c in GenAdj.OccupiedRect(x, Rot4.North, new IntVec2(3, 3))) { | |
if (!c.InBounds(this.Map) || c.Fogged(this.Map) || !c.Standable(this.Map) || c.Roofed(this.Map) && c.GetRoof(this.Map).isThickRoof) | |
return false; | |
foreach (Thing thing in c.GetThingList(this.Map)) { | |
if (thing.def.preventSkyfallersLandingOn) | |
return false; | |
} | |
} | |
return true; | |
}); | |
// rest of the method left as an exercise for the reader and their own decompiler | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment