示例#1
0
        private static void CreateDestroyObjects_Postfix(ZNetScene __instance)
        {
            bool all_loaded = true;
            int  count      = 0;

            foreach (ZDO zdo in __instance.m_tempCurrentObjects)
            {
                if (ZNetScene.instance.GetPrefab(zdo.GetPrefab()).GetComponent <TerrainModifier>() != null)
                {
                    count++;
                    if (!__instance.m_instances.Keys.Contains(zdo))
                    {
                        all_loaded = false;
                    }
                }
            }
            if (all_loaded && !ZNetScene.instance.InLoadingScreen())
            {
                bool can_save = HMAPManager.can_save;
                HMAPManager.can_save = true;
                TModManager.UpdateTMods();
                TModManager.DeleteTMods();
                if (can_save)
                {
                    return;
                }
                foreach (Heightmap heightmap in Heightmap.m_heightmaps)
                {
                    heightmap.Regenerate();
                }
            }
            else
            {
                HMAPManager.can_save = false;
            }
        }
示例#2
0
 private static void Shutdown_Postfix()
 {
     HMAPManager.Reset();
     TModManager.Reset();
 }