Пример #1
0
        public virtual bool StartGame()
        {
            if (IsDestroyed)
            {
                return(false);
            }

            var region = "";

            propertiesList.Set(MsfDictKeys.isPublic, "false");

            // Extract the region if available
            if (propertiesList.Has(MsfDictKeys.region))
            {
                region = propertiesList.AsString(MsfDictKeys.region);
            }

            var task = Module.SpawnersModule.Spawn(propertiesList, region, GenerateOptions());

            if (task == null)
            {
                BroadcastChatMessage("Servers are busy", true);
                return(false);
            }

            State = LobbyState.StartingGameServer;

            SetGameSpawnTask(task);

            return(true);
        }