Esempio n. 1
0
        public MsfArgs()
        {
            _args = Environment.GetCommandLineArgs();

            // Android fix
            if (_args == null)
            {
                _args = new string[0];
            }

            Names = new MsfArgNames();

            StartMaster = IsProvided(Names.StartMaster);
            MasterPort  = ExtractValueInt(Names.MasterPort, 5000);
            MasterIp    = ExtractValue(Names.MasterIp);
            MachineIp   = ExtractValue(Names.MachineIp);
            DestroyUi   = IsProvided(Names.DestroyUi);

            SpawnId              = ExtractValueInt(Names.SpawnId, -1);
            AssignedPort         = ExtractValueInt(Names.AssignedPort, -1);
            SpawnCode            = ExtractValue(Names.SpawnCode);
            ExecutablePath       = ExtractValue(Names.ExecutablePath);
            DontSpawnInBatchmode = IsProvided(Names.DontSpawnInBatchmode);
            MaxProcesses         = ExtractValueInt(Names.MaxProcesses, 0);

            LoadScene = ExtractValue(Names.LoadScene);

            DbConnectionString = ExtractValue(Names.DbConnectionString);

            LobbyId = ExtractValueInt(Names.LobbyId);
            WebGl   = IsProvided(Names.WebGl);
        }
Esempio n. 2
0
        public MsfArgs()
        {
            _args = Environment.GetCommandLineArgs();

            // Android fix
            if (_args == null)
            {
                _args = Array.Empty <string>();
            }

            Names = new MsfArgNames();

            StartMaster           = IsProvided(Names.StartMaster);
            StartSpawner          = IsProvided(Names.StartSpawner);
            StartClientConnection = IsProvided(Names.StartClientConnection);
            DestroyUi             = IsProvided(Names.DestroyUi);

            MasterPort = ExtractValueInt(Names.MasterPort, 5000);
            MasterIp   = ExtractValue(Names.MasterIp, "127.0.0.1");

            RoomName           = ExtractValue(Names.RoomName, "Room_" + Msf.Helper.CreateRandomString(5));
            RoomIp             = ExtractValue(Names.RoomIp, "127.0.0.1");
            RoomPort           = ExtractValueInt(Names.RoomPort, 7777);
            RoomDefaultPort    = ExtractValueInt(Names.RoomDefaultPort, 1500);
            RoomExecutablePath = ExtractValue(Names.RoomExecutablePath);
            RoomRegion         = ExtractValue(Names.RoomRegion, string.Empty);
            RoomMaxConnections = ExtractValueInt(Names.RoomMaxConnections, 10);
            RoomIsPrivate      = !IsProvided(Names.RoomIsPrivate);
            RoomPassword       = ExtractValue(Names.RoomPassword, string.Empty);

            SpawnTaskId          = ExtractValueInt(Names.SpawnTaskId, -1);
            SpawnTaskUniqueCode  = ExtractValue(Names.SpawnTaskUniqueCode);
            DontSpawnInBatchmode = IsProvided(Names.DontSpawnInBatchmode);
            MaxProcesses         = ExtractValueInt(Names.MaxProcesses, 0);

            LoadScene = ExtractValue(Names.LoadScene);

            DbConnectionString = ExtractValue(Names.DbConnectionString);

            LobbyId = ExtractValueInt(Names.LobbyId);
            WebGl   = IsProvided(Names.UseWebSockets);
        }
Esempio n. 3
0
        public MsfArgs()
        {
            _args = Environment.GetCommandLineArgs();

            // Android fix
            if (_args == null)
            {
                _args = new string[0];
            }

            Names = new MsfArgNames();

            StartMaster = IsProvided(Names.StartMaster);
            MasterPort  = ExtractValueInt(Names.MasterPort, 5000);
            MasterIp    = ExtractValue(Names.MasterIp);
            MachineIp   = ExtractValue(Names.MachineIp);
            DestroyUi   = IsProvided(Names.DestroyUi);

            SpawnId              = ExtractValue(Names.SpawnId, "");
            AssignedPort         = ExtractValueInt(Names.AssignedPort, -1);
            SpawnCode            = ExtractValue(Names.SpawnCode);
            ExecutablePath       = ExtractValue(Names.ExecutablePath);
            DontSpawnInBatchmode = IsProvided(Names.DontSpawnInBatchmode);
            MaxProcesses         = ExtractValueInt(Names.MaxProcesses, 0);

            LoadScene = ExtractValue(Names.LoadScene);

            DbConnectionString = ExtractValue(Names.DbConnectionString);

            LobbyId = ExtractValueInt(Names.LobbyId);
            WebGl   = IsProvided(Names.WebGl);


            //Albot Custom args
            RealTime       = ExtractValue(Names.Realtime, false.ToString());
            GameTypeString = ExtractValue(Names.GameType, "error game type");
            GameType       = Game.GameUtils.stringToGameType(GameTypeString);
            Spectators     = ExtractValue(Names.Spectators, false.ToString());
            broadcastInitArgs();
        }
Esempio n. 4
0
        public MsfArgs()
        {
            _args = Environment.GetCommandLineArgs();

            // Android fix
            if (_args == null)
            {
                _args = Array.Empty <string>();
            }

            Names = new MsfArgNames();

            StartMaster       = IsProvided(Names.StartMaster);
            AutoConnectClient = IsProvided(Names.StartClientConnection);
            DestroyUi         = IsProvided(Names.DestroyUi);

            MasterPort = ExtractValueInt(Names.MasterPort, 5000);
            MasterIp   = ExtractValue(Names.MasterIp);

            RoomIp             = ExtractValue(Names.RoomIp, "127.0.0.1");
            RoomPort           = ExtractValueInt(Names.RoomPort, 7777);
            RoomExecutablePath = ExtractValue(Names.RoomExecutablePath);
            RoomMaxConnections = ExtractValueInt(Names.RoomMaxConnections, 1000);

            SpawnId              = ExtractValueInt(Names.SpawnId);
            SpawnCode            = ExtractValue(Names.SpawnCode);
            DontSpawnInBatchmode = IsProvided(Names.DontSpawnInBatchmode);
            MaxProcesses         = ExtractValueInt(Names.MaxProcesses, 0);

            LoadScene = ExtractValue(Names.LoadScene);

            DbConnectionString = ExtractValue(Names.DbConnectionString);

            LobbyId = ExtractValueInt(Names.LobbyId);
            WebGl   = IsProvided(Names.UseWebSockets);
        }