public SpaceInstance(uint InstanceId, SpaceInfo Info, SpaceModel Model)
        {
            this.uint_0                 = InstanceId;
            this.spaceInfo_0            = Info;
            this.concurrentDictionary_0 = new ConcurrentDictionary <uint, SpaceActor>();
            this.spaceModel_0           = Model;
            this.string_0               = string.Empty;
            this.list_2                 = new List <uint> {
                1, 2, 3, 4, 5, 6, 6, 8, 9, 10, 11, 12, 13, 14, 15, 0x10,
                0x11, 0x12, 0x13, 20, 0x15
            };
            this.object_2    = new object();
            this.tileState_0 = new TileState[this.spaceModel_0.Heightmap.SizeX, this.spaceModel_0.Heightmap.SizeY];
            this.list_0      = new List <SpaceActor> [this.spaceModel_0.Heightmap.SizeX, this.spaceModel_0.Heightmap.SizeY];
            SqlDatabaseClient mySqlClient = SqlDatabaseManager.GetClient();

            try
            {
                this.InitializeContestWorker(mySqlClient);
            }
            catch (Exception exception)
            {
                Output.WriteLine("[ContestMgr] An exception has been trhown while trying to start the worker. The thread was already destroyed. Stack trace:\r\n" + exception.ToString(), OutputLevel.CriticalError);
            }
            finally
            {
                if (mySqlClient != null)
                {
                    mySqlClient.Dispose();
                }
            }
            this.RegenerateRelativeHeightmap(false);
        }
        public static SpaceInstance TryCreateSpaceInstance(uint InstanceId, uint SpaceId)
        {
            SpaceInfo spaceInfo = SpaceInfoLoader.GetSpaceInfo(SpaceId);

            if (spaceInfo == null)
            {
                return(null);
            }
            SpaceModel model = spaceInfo.TryGetModel();

            if (model == null)
            {
                return(null);
            }
            return(new SpaceInstance(InstanceId, spaceInfo, model));
        }