Exemplo n.º 1
0
        private void OnServerInitialized()
        {
            if (serverInitialized)
            {
                return;
            }
            serverInitialized = true;

            Analytics.Collect();

            // Add some Steam tags
            SteamGameServer.SetGameTags("oxide,modded");

            // Update server console window and status bars
            TheForestExtension.ServerConsole();

            // Save the level every X minutes
            Interface.Oxide.GetLibrary <Timer>().Repeat(300f, 0, () =>
            {
                LevelSerializer.SaveGame("Game"); // TODO: Make optional
                LevelSerializer.Checkpoint();
                Interface.Oxide.LogInfo("Server has been saved!");
            });

            // Check if client should be disabled
            //if (commandLine.HasVariable("batchmode") || commandLine.HasVariable("nographics"))
            //{
            TheForestExtension.DisableAudio();
            TheForestExtension.DisableClient();
            //}
        }
Exemplo n.º 2
0
        private void OnServerInitialized()
        {
            if (serverInitialized)
            {
                return;
            }
            serverInitialized = true;

            // Configure remote logging
            RemoteLogger.SetTag("hostname", PlayerPrefs.GetString("MpGameName"));

            // Add some Steam tags
            SteamGameServer.SetGameTags("oxide,modded");

            // Update server console window and status bars
            TheForestExtension.ServerConsole();

            // Save the level every X minutes
            Interface.Oxide.GetLibrary <Timer>().Repeat(300f, 0, () =>
            {
                LevelSerializer.SaveGame("Game"); // TODO: Make optional
                LevelSerializer.Checkpoint();
                Interface.Oxide.LogInfo("Server has been saved!");
            });
        }
Exemplo n.º 3
0
        private void OnServerInitialized()
        {
            if (serverInitialized)
            {
                return;
            }
            serverInitialized = true;

            // Configure the hostname after it has been set
            RemoteLogger.SetTag("hostname", PlayerPrefs.GetString("MpGameName"));

            // Add 'oxide' and 'modded' tags
            SteamGameServer.SetGameTags("oxide,modded");

            // Update server console window and status bars
            TheForestExtension.ServerConsole();

            // Disable audio and client-side elements if not dedicated
            if (TheForestExtension.DisableClient)
            {
                DisableAudio();
                DisableClient();
            }

            // Save the level every X minutes
            Interface.Oxide.GetLibrary <Timer>().Once(300f, () => LevelSerializer.SaveGame("Game"));
        }
Exemplo n.º 4
0
        private void OnServerInitialized()
        {
            if (!serverInitialized)
            {
                Analytics.Collect();

                // Show the server console, if enabled
                TheForestExtension.ServerConsole();

                serverInitialized = true;
            }
        }
Exemplo n.º 5
0
        private void OnServerInitialized()
        {
            if (serverInitialized)
            {
                return;
            }
            serverInitialized = true;

            Analytics.Collect();
            SteamGameServer.SetGameTags("oxide,modded");
            TheForestExtension.ServerConsole();
        }