private string Hash()
    {
        Checksum checksum = new Checksum();

        WorldSerialization.MapData map = this.GetMap("terrain");
        if (map != null)
        {
            for (int i = 0; i < (int)map.data.Length; i++)
            {
                checksum.Add(map.data[i]);
            }
        }
        List <WorldSerialization.PrefabData> prefabDatas = this.world.prefabs;

        if (prefabDatas != null)
        {
            for (int j = 0; j < prefabDatas.Count; j++)
            {
                WorldSerialization.PrefabData item = prefabDatas[j];
                checksum.Add(item.id);
                checksum.Add(item.position.x, 3);
                checksum.Add(item.position.y, 3);
                checksum.Add(item.position.z, 3);
                checksum.Add(item.scale.x, 3);
                checksum.Add(item.scale.y, 3);
                checksum.Add(item.scale.z, 3);
            }
        }
        return(checksum.MD5());
    }
    private string Hash()
    {
        var checksum = new Checksum();

        var heights = GetMap("terrain");

        if (heights != null)
        {
            //StreamWriter writer = new StreamWriter("Assets/test.txt", false);

            for (int i = 0; i < heights.data.Length; i++)
            {
                checksum.Add(heights.data[i]);
                //writer.Write((char)heights.data[i]);
            }


            //writer.Close();
        }

        var prefabs = world.prefabs;

        if (prefabs != null)
        {
            for (int i = 0; i < prefabs.Count; i++)
            {
                var prefab = prefabs[i];

                checksum.Add(prefab.id);

                // Include the 3 most significant bytes as an approximation
                checksum.Add(prefab.position.x, 3);
                checksum.Add(prefab.position.y, 3);
                checksum.Add(prefab.position.z, 3);
                checksum.Add(prefab.scale.x, 3);
                checksum.Add(prefab.scale.y, 3);
                checksum.Add(prefab.scale.z, 3);
            }
        }

        return(checksum.MD5());
    }
        // Token: 0x06001415 RID: 5141 RVA: 0x0006A47C File Offset: 0x0006867C
        internal Checksum Tick(SimFrameNumber frameNumber)
        {
            Checksum checksum = new Checksum();

            this.UnitManager.Tick(checksum, frameNumber);
            this.CommanderManager.Tick(checksum);
            // MOD
            MapModManager.Tick(frameNumber);
            // MOD
            AllEntityProcessor.Process(this.Settings.EntitySystem, checksum);
            if (this.Settings.GameMode != null && frameNumber > SimFrameNumber.First)
            {
                this.Settings.GameMode.EvaluateGameConditions(frameNumber, checksum);
            }
            if (this.AIManager != null)
            {
                this.AIManager.Tick(checksum);
            }
            checksum.Add((int)this.GlobalFrameCount.FrameNumber);
            return(checksum);
        }
    private string Hash()
    {
        var checksum = new Checksum();

        var heights = GetMap("terrain");

        if (heights != null)
        {
            for (int i = 0; i < heights.data.Length; i++)
            {
                checksum.Add(heights.data[i]);
            }
        }

        var prefabs = this.World.prefabs;

        if (prefabs != null)
        {
            for (int i = 0; i < prefabs.Count; i++)
            {
                var prefab = prefabs[i];

                checksum.Add(prefab.id);

                // Include the 3 most significant bytes as an approximation
                checksum.Add(prefab.position.x, 3);
                checksum.Add(prefab.position.y, 3);
                checksum.Add(prefab.position.z, 3);
                checksum.Add(prefab.scale.x, 3);
                checksum.Add(prefab.scale.y, 3);
                checksum.Add(prefab.scale.z, 3);
            }
        }

        return(checksum.MD5());
    }