public HostWindow(SaveFile file = null, bool withSimulation = false)
        {
            closeOnAccept = false;
            doCloseX      = true;

            settings = MultiplayerMod.settings.serverSettings;

            this.withSimulation = withSimulation;
            this.file           = file;
            settings.gameName   = file?.gameName ?? Multiplayer.session?.gameName ?? $"{Multiplayer.username}'s game";

            MultiplayerWorldComp.asyncTime = file?.asyncTime ?? false;
            if (file?.asyncTime ?? false)
            {
                asyncTimeLocked = true; // once enabled in a save, cannot be disabled
            }

            var localAddr = MpUtil.GetLocalIpAddress() ?? "127.0.0.1";

            settings.lanAddress = localAddr;

            if (MpVersion.IsDebug)
            {
                debugMode       = true;
                logDesyncTraces = true;
            }
        }
Beispiel #2
0
        public HostWindow(SaveFile file = null)
        {
            closeOnAccept = false;
            doCloseX      = true;

            this.file         = file;
            settings.gameName = file?.gameName ?? $"{Multiplayer.username}'s game";

            var localAddr = MpUtil.GetLocalIpAddress() ?? "127.0.0.1";

            settings.lanAddress = localAddr;
            addressBuffer       = localAddr;

            lan = true;
            settings.arbiter = true;
        }
Beispiel #3
0
        public HostWindow(SaveFile file = null, bool withSimulation = false)
        {
            closeOnAccept = false;
            doCloseX      = true;

            settings = MultiplayerMod.settings.serverSettings;

            this.withSimulation = withSimulation;
            this.file           = file;
            settings.gameName   = file?.gameName ?? Multiplayer.session?.gameName ?? $"{Multiplayer.username}'s game";

            var localAddr = MpUtil.GetLocalIpAddress() ?? "127.0.0.1";

            settings.lanAddress = localAddr;

            if (MpVersion.IsDebug)
            {
                debugMode = true;
            }
        }