private static void Prefix(IntVec3 c, TerrainGrid __instance)
        {
            bool flag = __instance.TerrainAt(c) is SpecialTerrain;

            if (flag)
            {
                SpecialTerrainList component = Traverse.Create(__instance).Field("map").GetValue <Map>().GetComponent <SpecialTerrainList>();
                component.Notify_RemovedTerrainAt(c);
            }
        }
Ejemplo n.º 2
0
        // Token: 0x0600000E RID: 14 RVA: 0x000023F8 File Offset: 0x000005F8
        private static void Postfix(IntVec3 c, TerrainDef newTerr, TerrainGrid __instance)
        {
            SpecialTerrain special;
            bool           flag = (special = (newTerr as SpecialTerrain)) != null;

            if (flag)
            {
                SpecialTerrainList component = Traverse.Create(__instance).Field("map").GetValue <Map>().GetComponent <SpecialTerrainList>();
                component.RegisterAt(special, c);
            }
        }