From f07f833dd19f7ebb2b61480d92132039fc6e96d8 Mon Sep 17 00:00:00 2001 From: Sergey Abu Date: Mon, 18 Apr 2022 03:59:09 +0300 Subject: [PATCH 01/37] Add games, server and mods --- database/seeds/GameModsTableSeeder.php | 582 +++++++++++++++++-------- database/seeds/GamesTableSeeder.php | 267 +++++++----- 2 files changed, 566 insertions(+), 283 deletions(-) diff --git a/database/seeds/GameModsTableSeeder.php b/database/seeds/GameModsTableSeeder.php index 18e2b4ea..397ef16d 100644 --- a/database/seeds/GameModsTableSeeder.php +++ b/database/seeds/GameModsTableSeeder.php @@ -14,6 +14,8 @@ class GameModsTableSeeder extends Seeder */ public function run() { + $gapRepoBaseUrl = 'http://files.gameap.ru'; + $defaultGoldSourceFastRcon = [ [ 'info' => 'Status', @@ -38,16 +40,30 @@ public function run() ] ); - /* Half-Life 1 */ + /* Half-Life */ + + DB::table('game_mods')->insert([ + 'game_code' => 'valve', + 'name' => 'Default', + 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), + 'vars' => json_encode(self::getDefaultGoldSourceVars()), + 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'valve'), + 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'valve'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + DB::table('game_mods')->insert([ 'game_code' => 'valve', - 'name' => 'Classic (Standart)', + 'name' => 'Classic (AMX Mod)', 'fast_rcon' => json_encode($defaultGoldSourceAmxFastRcon), 'vars' => json_encode(self::getDefaultGoldSourceVars()), - 'local_repository' => '', - 'remote_repository' => 'http://files.gameap.ru/half-life/amxx.tar.xz', - 'default_start_cmd_linux' => './hlds_run -game valve +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}', - 'default_start_cmd_windows' => 'hlds.exe -console -game valve +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}', + 'remote_repository' => $gapRepoBaseUrl . '/half-life/amxx.tar.xz', + 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'valve'), + 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'valve'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'amx_say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -59,51 +75,43 @@ public function run() DB::table('game_mods')->insert([ 'game_code' => 'valve', - 'name' => 'No AMX MOD X', + 'name' => 'Classic (ReHLDS)', 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), 'vars' => json_encode(self::getDefaultGoldSourceVars()), - 'local_repository' => '', - 'remote_repository' => '', - 'default_start_cmd_linux' => './hlds_run -game valve +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}', - 'default_start_cmd_windows' => 'hlds.exe -console -game valve +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}', + 'remote_repository' => $gapRepoBaseUrl . '/half-life/rehlds-amxx-reunion.tar.xz', + 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'valve'), + 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'valve'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', 'srestart_cmd' => 'restart', - 'chname_cmd' => '', - 'ban_cmd' => '', 'kick_cmd' => 'kick #{id}', ]); + /* Counter-Strike 1.6 */ + DB::table('game_mods')->insert([ - 'game_code' => 'valve', - 'name' => 'ReHLDS', + 'game_code' => 'cstrike', + 'name' => 'Default', 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), - 'vars' => json_encode(self::getDefaultGoldSourceVars()), - 'local_repository' => '', - 'remote_repository' => 'http://files.gameap.ru/half-life/rehlds-amxx-reunion.tar.xz', - 'default_start_cmd_linux' => './hlds_run -game cstrike +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}', - 'default_start_cmd_windows' => 'hlds.exe -console -game cstrike +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}', + 'vars' => json_encode(self::getDefaultGoldSourceVars('de_dust2')), + 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'cstrike'), + 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'cstrike'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', 'srestart_cmd' => 'restart', - 'chname_cmd' => '', - 'ban_cmd' => '', 'kick_cmd' => 'kick #{id}', ]); - /* Counter-Strike 1.6 */ - DB::table('game_mods')->insert([ 'game_code' => 'cstrike', - 'name' => 'Classic (Standart)', + 'name' => 'Classic (AMX Mod)', 'fast_rcon' => json_encode($defaultGoldSourceAmxFastRcon), 'vars' => json_encode(self::getDefaultGoldSourceVars('de_dust2')), - 'local_repository' => '', - 'remote_repository' => 'http://files.gameap.ru/cstrike-1.6/amxx.tar.xz', - 'default_start_cmd_linux' => './hlds_run -game cstrike +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}', - 'default_start_cmd_windows' => 'hlds.exe -console -game cstrike +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}', + 'remote_repository' => $gapRepoBaseUrl . '/cstrike-1.6/amxx.tar.xz', + 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'cstrike'), + 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'cstrike'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'amx_say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -115,141 +123,318 @@ public function run() DB::table('game_mods')->insert([ 'game_code' => 'cstrike', - 'name' => 'No AMX MOD X', + 'name' => 'Classic (ReHLDS)', 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), 'vars' => json_encode(self::getDefaultGoldSourceVars('de_dust2')), - 'local_repository' => '', - 'remote_repository' => '', - 'default_start_cmd_linux' => './hlds_run -game cstrike +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password} +rcon_password {rcon_password}', - 'default_start_cmd_windows' => 'hlds.exe -console -game cstrike +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password} +rcon_password {rcon_password}', + 'remote_repository' => $gapRepoBaseUrl . '/cstrike-1.6/rehlds-amxx-reunion.tar.xz', + 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'cstrike'), + 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'cstrike'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', 'srestart_cmd' => 'restart', - 'chname_cmd' => '', - 'ban_cmd' => '', 'kick_cmd' => 'kick #{id}', ]); + /* Counter-Strike Source */ + DB::table('game_mods')->insert([ - 'game_code' => 'cstrike', - 'name' => 'ReHLDS', - 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), - 'vars' => json_encode(self::getDefaultGoldSourceVars('de_dust2')), - 'local_repository' => '', - 'remote_repository' => 'http://files.gameap.ru/cstrike-1.6/rehlds-amxx-reunion.tar.xz', - 'default_start_cmd_linux' => './hlds_run -game cstrike +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}', - 'default_start_cmd_windows' => 'hlds.exe -console -game cstrike +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}', + 'game_code' => 'cssource', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('de_dust2')), + 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'cstrike'), + 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'cstrike'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', 'srestart_cmd' => 'restart', - 'chname_cmd' => '', - 'ban_cmd' => '', 'kick_cmd' => 'kick #{id}', ]); - /* Minecraft */ + /* Counter-Strike Global Offensive */ DB::table('game_mods')->insert([ - 'game_code' => 'minecraft', - 'name' => 'Multicore', - 'fast_rcon' => '', - 'vars' => '[{"var":"version","default":"1.14.3","info":"Minecraft version"},{"var":"core_mod","default":"vanilla","info":"Core"},{"var":"core_mod_version","default":null,"info":"Core mod version"}]', - 'local_repository' => '', - 'remote_repository' => 'http://files.gameap.ru/minecraft/minecraft-runner.tar.gz', - 'default_start_cmd_linux' => './mcrun.sh run --version={version} --core-mod={core_mod} --core-mod-version={core_mod_version} --ip={ip} --port={port} --query-port={query_port} --rcon-port={rcon_port} --rcon-password={rcon_password}', - 'passwd_cmd' => '', - 'sendmsg_cmd' => '', - 'chmap_cmd' => '', - 'srestart_cmd' => '', - 'chname_cmd' => '', - 'ban_cmd' => '', - 'kick_cmd' => '', + 'game_code' => 'csgo', + 'name' => 'Default', + 'vars' => json_encode(array_merge(self::getDefaultSourceVars('de_dust2'), [ + [ + 'var' => 'mapgroup', + 'default' => 'mg_active', + 'info' => 'Map group', + ], + [ + 'var' => 'steamaccount', + 'default' => '', + 'info' => 'Steam account token', + ], + ])), + 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 0', + 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 0', + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', ]); DB::table('game_mods')->insert([ - 'game_code' => 'minecraft', - 'name' => 'Vanilla', - 'fast_rcon' => '', - 'vars' => '', - 'local_repository' => '', - 'remote_repository' => '', - 'passwd_cmd' => '', - 'sendmsg_cmd' => '', - 'chmap_cmd' => '', - 'srestart_cmd' => '', - 'chname_cmd' => '', - 'ban_cmd' => '', - 'kick_cmd' => '', + 'game_code' => 'csgo', + 'name' => 'Competitive', + 'vars' => json_encode(array_merge(self::getDefaultSourceVars('de_dust2'), [ + [ + 'var' => 'mapgroup', + 'default' => 'mg_active', + 'info' => 'Map group', + ], + [ + 'var' => 'steamaccount', + 'default' => '', + 'info' => 'Steam account token', + ], + ])), + 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 1', + 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 1', + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', ]); - // Rust + DB::table('game_mods')->insert([ + 'game_code' => 'csgo', + 'name' => 'Gungame', + 'vars' => json_encode(array_merge(self::getDefaultSourceVars('de_dust2'), [ + [ + 'var' => 'mapgroup', + 'default' => 'mg_active', + 'info' => 'Map group', + ], + [ + 'var' => 'steamaccount', + 'default' => '', + 'info' => 'Steam account token', + ], + ])), + 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 0', + 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 0', + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); DB::table('game_mods')->insert([ - 'game_code' => 'rust', - 'name' => 'Vanilla', - 'fast_rcon' => '', - 'vars' => '', - 'local_repository' => '', - 'remote_repository' => '', - 'passwd_cmd' => '', - 'sendmsg_cmd' => '', - 'chmap_cmd' => '', - 'srestart_cmd' => '', - 'chname_cmd' => '', - 'ban_cmd' => '', - 'kick_cmd' => '', + 'game_code' => 'csgo', + 'name' => 'Demolition', + 'vars' => json_encode(array_merge(self::getDefaultSourceVars('de_dust2'), [ + [ + 'var' => 'mapgroup', + 'default' => 'mg_active', + 'info' => 'Map group', + ], + [ + 'var' => 'steamaccount', + 'default' => '', + 'info' => 'Steam account token', + ], + ])), + 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 1', + 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 1', + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', ]); DB::table('game_mods')->insert([ - 'game_code' => 'rust', - 'name' => 'Oxide', - 'fast_rcon' => '', - 'vars' => '', - 'local_repository' => '', - 'remote_repository' => '', - 'passwd_cmd' => '', - 'sendmsg_cmd' => '', - 'chmap_cmd' => '', - 'srestart_cmd' => '', - 'chname_cmd' => '', - 'ban_cmd' => '', - 'kick_cmd' => '', + 'game_code' => 'csgo', + 'name' => 'Deathmatch', + 'vars' => json_encode(array_merge(self::getDefaultSourceVars('de_dust2'), [ + [ + 'var' => 'mapgroup', + 'default' => 'mg_active', + 'info' => 'Map group', + ], + [ + 'var' => 'steamaccount', + 'default' => '', + 'info' => 'Steam account token', + ], + ])), + 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 2', + 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 2', + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', ]); - /* Counter-Strike Global Offensive */ + /* Insurgency */ DB::table('game_mods')->insert([ - 'game_code' => 'csgo', - 'name' => 'Classic', - 'fast_rcon' => '', - 'vars' => json_encode(self::getDefaultSourceVars('de_dust2')), - 'default_start_cmd_linux' => './srcds_run -game csgo -console -usercon +game_type 0 +game_mode 0 +ip {ip} +port {port} +maxplayers {maxplayers} +mapgroup mg_active +map {default_map} +rcon_password {rcon_password}', - 'default_start_cmd_windows' => 'srcds.exe -game csgo -console -usercon +game_type 0 +game_mode 0 +ip {ip} +port {port} +maxplayers {maxplayers} +mapgroup mg_active +map {default_map} +rcon_password {rcon_password}', - 'local_repository' => '', - 'remote_repository' => '', + 'game_code' => 'insurgency', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('ministry')), + 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix'), + 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Team Fortress 2 */ + + DB::table('game_mods')->insert([ + 'game_code' => 'tf2', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('cp_badlands')), + 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix'), + 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Garry's Mod */ + + DB::table('game_mods')->insert([ + 'game_code' => 'garrysmod', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('gm_construct')), + 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'garrysmod'), + 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'garrysmod'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Black Mesa: Deathmatch */ + + DB::table('game_mods')->insert([ + 'game_code' => 'bms', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars()), + 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'bms'), + 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'bms'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', 'srestart_cmd' => 'restart', - 'chname_cmd' => '', - 'ban_cmd' => '', 'kick_cmd' => 'kick #{id}', ]); + /* Day of Defeat Source */ + + DB::table('game_mods')->insert([ + 'game_code' => 'dods', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('dod_anzio')), + 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'dods'), + 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'dods'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Minecraft */ + + DB::table('game_mods')->insert([ + 'game_code' => 'minecraft', + 'name' => 'Vanilla', + ]); + + DB::table('game_mods')->insert([ + 'game_code' => 'minecraft', + 'name' => 'Multicore', + 'vars' => json_encode([ + [ + 'var' => 'version', + 'default' => '1.14.3', + 'info' => 'Minecraft version', + ], + [ + 'var' => 'core_mod', + 'default' => 'vanilla', + 'info' => 'Core', + ], + [ + 'var' => 'core_mod_version', + 'default' => null, + 'info' => 'Core mod version', + ], + ]), + 'remote_repository' => $gapRepoBaseUrl . '/minecraft/minecraft-runner.tar.gz', + 'default_start_cmd_linux' => './mcrun.sh run --version={version} --core-mod={core_mod} --core-mod-version={core_mod_version} --ip={ip} --port={port} --query-port={query_port} --rcon-port={rcon_port} --rcon-password={rcon_password}', + ]); + + /* PMMP (MinecraftPE) */ + + DB::table('game_mods')->insert([ + 'game_code' => 'pmmp', + 'name' => 'Default', + 'default_start_cmd_linux' => './bin/php7/bin/php ./PocketMine-MP.phar', + 'default_start_cmd_windows' => '', + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say {msg}', + 'srestart_cmd' => 'reload', + 'ban_cmd' => 'ban {name} {reason}', + 'kick_cmd' => 'kick {name}', + ]); + + /* SAMP */ + + DB::table('game_mods')->insert([ + 'game_code' => 'samp', + 'name' => 'Freeroam (Linux)', + 'default_start_cmd_linux' => './samp03svr', + 'remote_repository' => 'http://files.sa-mp.com/samp037svr_R2-1.tar.gz', + ]); + + DB::table('game_mods')->insert([ + 'game_code' => 'samp', + 'name' => 'Freeroam (Windows)', + 'default_start_cmd_windows' => 'samp-server.exe', + 'remote_repository' => 'http://files.sa-mp.com/samp037_svr_R2-1-1_win32.zip', + ]); + + /* Multi Theft Auto (MTA) */ + + DB::table('game_mods')->insert([ + 'game_code' => 'mta', + 'name' => 'DeathMatch', + 'vars' => json_encode([ + [ + 'var' => 'maxplayers', + 'default' => 32, + 'info' => 'Maximum players on server', + ] + ]), + 'default_start_cmd_linux' => './mta-server64 -t -n --ip {ip} --port {port} --maxplayers {maxplayers}', + 'remote_repository' => $gapRepoBaseUrl . '/mta/default-deathmatch.tar.xz', + ]); + /* FiveM */ DB::table('game_mods')->insert([ 'game_code' => 'fivem', - 'name' => 'Vanilla', - 'fast_rcon' => '', + 'name' => 'Default', 'vars' => json_encode([ [ 'var' => 'hostname', 'default' => 'GameAP FiveM Server', 'info' => 'Server Hostname', - 'admin_var' => false, ], [ 'var' => 'license_key', @@ -260,86 +445,101 @@ public function run() ]), 'default_start_cmd_linux' => './fivem_run.sh --ip={ip} --port={port} --hostname="{hostname}" --rcon-password="{rcon_password}" --license-key="{license_key}"', 'default_start_cmd_windows' => 'run.cmd +exec server.cfg', - 'local_repository' => '', - 'remote_repository' => '', - - 'passwd_cmd' => '', 'sendmsg_cmd' => 'say {msg}', - 'chmap_cmd' => '', - 'srestart_cmd' => '', - 'chname_cmd' => '', - 'ban_cmd' => '', 'kick_cmd' => 'clientkick {id}', ]); + /* Just cause 2 */ + + DB::table('game_mods')->insert([ + 'game_code' => 'justcause2', + 'name' => 'Default', + 'default_start_cmd_linux' => './Jcmp-Server', + 'default_start_cmd_windows' => '', + ]); + + /* Just cause 3 */ + + DB::table('game_mods')->insert([ + 'game_code' => 'justcause3', + 'name' => 'Default', + 'default_start_cmd_linux' => './Server', + 'default_start_cmd_windows' => '', + ]); + + /* Rust */ + + DB::table('game_mods')->insert([ + 'game_code' => 'rust', + 'name' => 'Vanilla', + ]); + + DB::table('game_mods')->insert([ + 'game_code' => 'rust', + 'name' => 'Oxide', + ]); + /* 7 Day to Die */ DB::table('game_mods')->insert([ 'game_code' => '7d2d', 'name' => 'Default', - 'default_start_cmd_linux' => './startserver.sh -configfile=serverconfig.xml', 'default_start_cmd_windows' => 'startdedicated.bat', ]); - /* Multi Theft Auto (MTA) */ + /* Killing floor 2 */ DB::table('game_mods')->insert([ - 'game_code' => 'mta', - 'name' => 'DeathMatch Default', + 'game_code' => 'killingfloor2', + 'name' => 'Default', 'vars' => json_encode([ - [ - 'var' => 'maxplayers', - 'default' => 32, - 'info' => 'Maximum players on server', - 'admin_var' => false, - ] + 'var' => 'default_map', + 'default' => 'kf-bioticslab', + 'info' => 'Default Map', ]), - 'default_start_cmd_linux' => './mta-server64 -t -n --ip {ip} --port {port} --maxplayers {maxplayers}', - 'default_start_cmd_windows' => '', - - 'remote_repository' => 'http://files.gameap.ru/mta/default-deathmatch.tar.xz', + 'default_start_cmd_linux' => './Binaries/Win64/KFGameSteamServer.bin.x86_64 {default_map}', + 'default_start_cmd_windows' => 'Binaries\win64\kfserver {default_map}', ]); - /* Black Mesa: Deathmatch */ + /* TeamSpeak 3 */ DB::table('game_mods')->insert([ - 'game_code' => 'bms', - 'name' => 'Default', - 'fast_rcon' => '', - 'vars' => json_encode(self::getDefaultSourceVars()), - 'default_start_cmd_linux' => './srcds_run -game bms -console -usercon +ip {ip} +port {port} +maxplayers {maxplayers} +map {default_map} +rcon_password {rcon_password}', - 'default_start_cmd_windows' => 'srcds.exe -game bms -console -usercon +ip {ip} +port {port} +maxplayers {maxplayers} +map {default_map} +rcon_password {rcon_password}', - 'local_repository' => '', - 'remote_repository' => '', - 'passwd_cmd' => 'password {password}', - 'sendmsg_cmd' => 'say "{msg}"', - 'chmap_cmd' => 'changelevel {map}', - 'srestart_cmd' => 'restart', - 'chname_cmd' => '', - 'ban_cmd' => '', - 'kick_cmd' => 'kick #{id}', + 'game_code' => 'ts3', + 'name' => 'Linux', + 'default_start_cmd_linux' => './ts3server', + 'remote_repository' => 'https://files.teamspeak-services.com/releases/server/3.13.6/teamspeak3-server_linux_amd64-3.13.6.tar.bz2', ]); - /* Garry's Mod */ - DB::table('game_mods')->insert([ - 'game_code' => 'bms', - 'name' => 'Default', - 'fast_rcon' => '', - 'vars' => json_encode(self::getDefaultGoldSourceVars('gm_flatgrass')), - 'default_start_cmd_linux' => './srcds_run -game bms -console -usercon +ip {ip} +port {port} +maxplayers {maxplayers} +map {default_map} +rcon_password {rcon_password}', - 'default_start_cmd_windows' => 'srcds.exe -game bms -console -usercon +ip {ip} +port {port} +maxplayers {maxplayers} +map {default_map} +rcon_password {rcon_password}', - 'local_repository' => '', - 'remote_repository' => '', - 'passwd_cmd' => 'password {password}', - 'sendmsg_cmd' => 'say "{msg}"', - 'chmap_cmd' => 'changelevel {map}', - 'srestart_cmd' => 'restart', - 'chname_cmd' => '', - 'ban_cmd' => '', - 'kick_cmd' => 'kick #{id}', + 'game_code' => 'ts3', + 'name' => 'Windows', + 'default_start_cmd_windows' => 'teamspeak3-server_win64\ts3server.exe', + 'remote_repository' => 'https://files.teamspeak-services.com/releases/server/3.13.6/teamspeak3-server_win64-3.13.6.zip', ]); + + } + + /** + * @param string $os + * @param string $game + * @return string + */ + private static function getDefaultGoldSourceStartCmd($os, $game) + { + $cmd = ''; + if($game){ + $game = ' -game ' . $game; + } + switch ($os) { + case 'nix': + $cmd = './hlds_run -console' . $game . ' +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}'; + break; + case 'win': + $cmd = 'hlds.exe -console' . $game . ' +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}'; + break; + } + return $cmd; } /** @@ -353,7 +553,11 @@ private static function getDefaultGoldSourceVars($defaultMap = 'crossfire') 'var' => 'default_map', 'default' => $defaultMap, 'info' => 'Default Map', - 'admin_var' => false, + ], + [ + 'var' => 'maxplayers', + 'default' => 32, + 'info' => 'Maximum players on server', ], [ 'var' => 'fps', @@ -361,15 +565,31 @@ private static function getDefaultGoldSourceVars($defaultMap = 'crossfire') 'info' => 'Server FPS (tickrate)', 'admin_var' => true, ], - [ - 'var' => 'maxplayers', - 'default' => 32, - 'info' => 'Maximum players on server', - 'admin_var' => false, - ], ]; } + /** + * @param string $os + * @param string $game + * @return string + */ + private static function getDefaultSourceStartCmd($os, $game = '') + { + $cmd = ''; + if($game){ + $game = ' -game ' . $game; + } + switch ($os) { + case 'nix': + $cmd = './srcds_run -console -usercon' . $game . ' +ip {ip} +port {port} +maxplayers {maxplayers} +map {default_map} -tickrate {tickrate} +rcon_password {rcon_password}'; + break; + case 'win': + $cmd = 'srcds.exe -console -usercon' . $game . ' +ip {ip} +port {port} +maxplayers {maxplayers} +map {default_map} -tickrate {tickrate} +rcon_password {rcon_password}'; + break; + } + return $cmd; + } + /** * @param string $defaultMap * @return array[] @@ -381,14 +601,18 @@ private static function getDefaultSourceVars($defaultMap = 'crossfire') 'var' => 'default_map', 'default' => $defaultMap, 'info' => 'Default Map', - 'admin_var' => false, ], [ 'var' => 'maxplayers', 'default' => 32, 'info' => 'Maximum players on server', - 'admin_var' => false, ], + [ + 'var' => 'tickrate', + 'default' => 64, + 'info' => 'Server tickrate', + 'admin_var' => true, + ] ]; } } diff --git a/database/seeds/GamesTableSeeder.php b/database/seeds/GamesTableSeeder.php index 532b8351..7e060ed5 100644 --- a/database/seeds/GamesTableSeeder.php +++ b/database/seeds/GamesTableSeeder.php @@ -14,24 +14,26 @@ class GamesTableSeeder extends Seeder */ public function run() { + $gapRepoBaseUrl = 'http://files.gameap.ru'; + DB::table('games')->insert([ 'code' => 'valve', 'start_code' => 'valve', 'name' => 'Half-Life 1', 'engine' => 'GoldSource', 'engine_version' => '1', - 'steam_app_id' => 90 + 'steam_app_id' => 90, ]); - + DB::table('games')->insert([ 'code' => 'hl2mp', 'start_code' => 'hl2mp', 'name' => 'Half-Life 2', 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 232370 + 'steam_app_id' => 232370, ]); - + DB::table('games')->insert([ 'code' => 'op4', 'start_code' => 'gearbox', @@ -41,23 +43,25 @@ public function run() 'steam_app_id' => 90, 'steam_app_set_config' => "90 mod gearbox", ]); - + DB::table('games')->insert([ - 'code' => 'l4d', - 'start_code' => 'l4d', - 'name' => 'Left 4 Dead', - 'engine' => 'Source', + 'code' => 'dmc', + 'start_code' => 'dmc', + 'name' => 'Deathmatch Classic', + 'engine' => 'GoldSource', 'engine_version' => '1', - 'steam_app_id' => 222840, + 'steam_app_id' => 90, + 'steam_app_set_config' => "90 mod dmc", ]); - + DB::table('games')->insert([ - 'code' => 'l4d2', - 'start_code' => 'l4d2', - 'name' => 'Left 4 Dead 2', - 'engine' => 'Source', + 'code' => 'ricochet', + 'start_code' => 'ricochet', + 'name' => 'Ricochet', + 'engine' => 'GoldSource', 'engine_version' => '1', - 'steam_app_id' => 222860, + 'steam_app_id' => 90, + 'steam_app_set_config' => "90 mod ricochet", ]); DB::table('games')->insert([ @@ -65,7 +69,7 @@ public function run() 'start_code' => 'cstrike', 'name' => 'Counter-Strike 1.5', 'engine' => 'GoldSource', - 'engine_version' => 'won' + 'engine_version' => '1', ]); DB::table('games')->insert([ @@ -92,8 +96,8 @@ public function run() 'start_code' => "cstrike", 'name' => "Counter-Strike: Source v34", 'engine' => "Source", - 'engine_version' => "v34", - 'steam_app_id' => 232330 + 'engine_version' => "34", + 'steam_app_id' => 232330, ]); DB::table('games')->insert([ @@ -101,17 +105,17 @@ public function run() 'start_code' => "cstrike", 'name' => "Counter-Strike: Source", 'engine' => "Source", - 'engine_version' => "", - 'steam_app_id' => 232330 + 'engine_version' => "1", + 'steam_app_id' => 232330, ]); - + DB::table('games')->insert([ 'code' => "csgo", 'start_code' => "csgo", 'name' => "Counter-Strike: Global Offensive", 'engine' => "Source", 'engine_version' => "1", - 'steam_app_id' => 740 + 'steam_app_id' => 740, ]); DB::table('games')->insert([ @@ -131,8 +135,8 @@ public function run() 'engine_version' => '1', 'steam_app_id' => 90, 'steam_app_set_config' => "90 mod dod", - ]); - + ]); + DB::table('games')->insert([ 'code' => 'dods', 'start_code' => 'dods', @@ -141,7 +145,7 @@ public function run() 'engine_version' => '1', 'steam_app_id' => 232290, ]); - + DB::table('games')->insert([ 'code' => 'tfc', 'start_code' => 'tfc', @@ -151,42 +155,77 @@ public function run() 'steam_app_id' => 90, 'steam_app_set_config' => "90 mod tfc", ]); - + DB::table('games')->insert([ 'code' => 'tf2', 'start_code' => 'tf', 'name' => 'Team Fortress 2', 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 232250 + 'steam_app_id' => 232250, ]); - + + DB::table('games')->insert([ + 'code' => 'insurgency', + 'start_code' => 'insurgency', + 'name' => 'Insurgency', + 'engine' => 'Source', + 'engine_version' => '1', + 'steam_app_id' => 237410, + ]); + DB::table('games')->insert([ 'code' => 'synergy', 'start_code' => 'synergy', 'name' => 'Synergy', 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 17525 + 'steam_app_id' => 17525, ]); DB::table('games')->insert([ - 'code' => 'dmc', - 'start_code' => 'dmc', - 'name' => 'Deathmatch Classic', - 'engine' => 'GoldSource', + 'code' => 'garrysmod', + 'start_code' => 'garrysmod', + 'name' => 'Garry`s Mod', + 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 90, - 'steam_app_set_config' => "90 mod dmc", + 'steam_app_id' => 4020, ]); - + DB::table('games')->insert([ - 'code' => 'garrysmod', - 'start_code' => 'garrysmod', - 'name' => 'Garry\'s Mod', + 'code' => 'bms', + 'start_code' => 'bms', + 'name' => 'Black Mesa: Deathmatch', + 'engine' => 'Source', + 'engine_version' => '4', + 'steam_app_id' => 346680, + ]); + + DB::table('games')->insert([ + 'code' => 'l4d', + 'start_code' => 'l4d', + 'name' => 'Left 4 Dead', + 'engine' => 'Source', + 'engine_version' => '1', + 'steam_app_id' => 222840, + ]); + + DB::table('games')->insert([ + 'code' => 'l4d2', + 'start_code' => 'l4d2', + 'name' => 'Left 4 Dead 2', 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 4020 + 'steam_app_id' => 222860, + ]); + + DB::table('games')->insert([ + 'code' => 'ark', + 'start_code' => 'ark', + 'name' => 'ARK: Survival Evolved', + 'engine' => 'Source', + 'engine_version' => '1', + 'steam_app_id' => 376030, ]); DB::table('games')->insert([ @@ -194,44 +233,39 @@ public function run() 'start_code' => 'minecraft', 'name' => 'Minecraft', 'engine' => 'Minecraft', - 'engine_version' => '1', - 'remote_repository' => 'http://files.gameap.ru/minecraft/minecraft_install.tar.gz', + 'remote_repository' => $gapRepoBaseUrl . '/minecraft/minecraft_install.tar.gz', ]); DB::table('games')->insert([ - 'code' => 'ricochet', - 'start_code' => 'ricochet', - 'name' => 'Ricochet', - 'engine' => 'GoldSource', - 'engine_version' => '1', - 'steam_app_id' => 90, - 'steam_app_set_config' => "90 mod ricochet", + 'code' => 'pmmp', + 'start_code' => 'pmmp', + 'name' => 'PocketMineMP (Minecraft PE)', + 'engine' => 'Minecraft', + 'remote_repository' => 'https://github.com/pmmp/PocketMine-MP/releases/download/4.2.7/PocketMine-MP.phar', ]); DB::table('games')->insert([ 'code' => 'rust', 'start_code' => 'rust', 'name' => 'Rust', - 'engine' => 'rust', - 'engine_version' => 'staging', - 'steam_app_id' => 258550 + 'engine' => 'Unity', + 'steam_app_id' => 258550, ]); DB::table('games')->insert([ 'code' => 'hurtworld', 'start_code' => 'hurtworld', 'name' => 'HurtWorld', - 'engine' => 'hurtworld', - 'engine_version' => 'stable', - 'steam_app_id' => 405100 + 'engine' => 'Unity', + 'steam_app_id' => 405100, ]); DB::table('games')->insert([ 'code' => 'arma2', 'start_code' => 'arma2', 'name' => 'Arma 2', - 'engine' => 'armedassault2', - 'engine_version' => '2', + 'engine' => 'RealVirtuality', + 'engine_version' => '3', 'steam_app_id' => 33905, ]); @@ -239,8 +273,8 @@ public function run() 'code' => 'arma2oa', 'start_code' => 'arma2oa', 'name' => 'Arma 2: Operation Arrowhead', - 'engine' => 'armedassault2oa', - 'engine_version' => '2', + 'engine' => 'RealVirtuality', + 'engine_version' => '3', 'steam_app_id' => 33935, ]); @@ -248,8 +282,8 @@ public function run() 'code' => 'arma3', 'start_code' => 'arma3', 'name' => 'Arma 3', - 'engine' => 'armedassault3', - 'engine_version' => '3', + 'engine' => 'RealVirtuality', + 'engine_version' => '4', 'steam_app_id' => 233780, ]); @@ -257,80 +291,105 @@ public function run() 'code' => 'cod4', 'start_code' => 'cod4', 'name' => 'Call of Duty 4', - 'engine' => 'cod4', - 'engine_version' => '4' - ]); - - DB::table('games')->insert([ - 'code' => 'bms', - 'start_code' => 'bms', - 'name' => 'Black Mesa: Deathmatch', - 'engine' => 'Source', - 'engine_version' => '4', - 'steam_app_id' => 346680, - ]); - - DB::table('games')->insert([ - 'code' => 'ark', - 'start_code' => 'ark', - 'name' => 'ARK: Survival Evolved', - 'engine' => 'Source', - 'steam_app_id' => 376030, + 'engine' => 'IWEngine', + 'engine_version' => '3.0' ]); DB::table('games')->insert([ 'code' => 'mta', 'start_code' => 'mta', 'name' => 'GTA: Multi Theft Auto', - 'engine' => 'mta', - 'remote_repository' => 'http://files.gameap.ru/mta/mta.tar.xz', + 'engine' => 'RenderWare', + 'remote_repository' => $gapRepoBaseUrl . '/mta/mta.tar.xz', ]); DB::table('games')->insert([ 'code' => 'samp', 'start_code' => 'samp', - 'name' => 'GTA: San-Andreas Multiplayer', - 'engine' => 'samp`' + 'name' => 'SA-MP', + 'engine' => 'RenderWare', ]); - + + DB::table('games')->insert([ + 'code' => 'fivem', + 'start_code' => 'fivem', + 'name' => 'FiveM', + 'engine' => 'Rage', + 'remote_repository' => $gapRepoBaseUrl . '/fivem/fivem.tar.xz', + ]); + + DB::table('games')->insert([ + 'code' => 'justcause2', + 'start_code' => 'justcause2', + 'name' => 'Just Cause 2', + 'engine' => 'AvalancheEngine', + 'engine_version' => '2.0', + 'steam_app_id' => 261140, + ]); + + DB::table('games')->insert([ + 'code' => 'justcause3', + 'start_code' => 'justcause3', + 'name' => 'Just Cause 3', + 'engine' => 'AvalancheEngine', + 'engine_version' => '3.0', + 'steam_app_id' => 619960, + ]); + DB::table('games')->insert([ 'code' => '7d2d', 'start_code' => '7d2d', 'name' => '7 Days to Die', - 'engine' => '7d2d', + 'engine' => 'Unity', 'steam_app_id' => 294420, ]); - + DB::table('games')->insert([ - 'code' => 'justcause', - 'start_code' => 'justcause', - 'name' => 'Just Cause 2', - 'engine' => 'JustCause', - 'steam_app_id' => 261140, + 'code' => 'killingfloor', + 'start_code' => 'killingfloor', + 'name' => 'Killing Floor', + 'engine' => 'UnrealEngine', + 'engine_version' => '2.5', + 'steam_app_id' => 232130, ]); DB::table('games')->insert([ - 'code' => 'rok', - 'start_code' => 'rok', - 'name' => 'Reign Of Kings', - 'engine' => 'ReignOfKings', - 'steam_app_id' => 344760, + 'code' => 'killingfloor2', + 'start_code' => 'killingfloor2', + 'name' => 'Killing Floor 2', + 'engine' => 'UnrealEngine', + 'engine_version' => '3', + 'steam_app_id' => 232130, ]); DB::table('games')->insert([ 'code' => 'the-forest', 'start_code' => 'the-forest', 'name' => 'The Forest', - 'engine' => 'TheForest', + 'engine' => 'Unity', 'steam_app_id' => 556450, ]); DB::table('games')->insert([ - 'code' => 'fivem', - 'start_code' => 'fivem', - 'name' => 'FiveM', - 'engine' => 'Gta5m', - 'remote_repository' => 'http://files.gameap.ru/fivem/fivem.tar.xz', + 'code' => 'rok', + 'start_code' => 'rok', + 'name' => 'Reign Of Kings', + 'engine' => 'Unity', + 'steam_app_id' => 344760, + ]); + + DB::table('games')->insert([ + 'code' => 'ts3', + 'start_code' => 'ts3', + 'name' => 'TeamSpeak', + 'engine' => 'TeamSpeak', + ]); + + DB::table('games')->insert([ + 'code' => 'mumble', + 'start_code' => 'mumble', + 'name' => 'Mumble', + 'engine' => 'Mumble', ]); } } From f64877784eaafe6f713431f45c08de6e98a40ef0 Mon Sep 17 00:00:00 2001 From: Sergey Abu Date: Wed, 27 Apr 2022 00:25:23 +0300 Subject: [PATCH 02/37] separate nix and win fields (steam_app_id, local_repository, remote_repository) --- app/Http/Requests/Admin/GameModRequest.php | 4 +- app/Http/Requests/Admin/GameRequest.php | 9 +- app/Models/Game.php | 6 +- app/Models/GameMod.php | 13 +- app/UseCases/CreateGameServer.php | 4 +- database/factories/GameModFactory.php | 4 +- .../2017_09_12_300000_create_games_table.php | 9 +- ...17_09_12_400000_create_game_mods_table.php | 10 +- database/seeds/GameModsTableSeeder.php | 788 +++++++++++++++--- database/seeds/GamesTableSeeder.php | 471 +++++++---- resources/lang/en/games.php | 7 +- resources/lang/en/labels.php | 13 +- resources/lang/ru/games.php | 5 + resources/lang/ru/labels.php | 13 +- .../views/admin/game_mods/create.blade.php | 6 +- .../views/admin/game_mods/edit.blade.php | 22 +- resources/views/admin/games/create.blade.php | 14 +- resources/views/admin/games/edit.blade.php | 41 +- .../Admin/GameModsControllerTest.php | 12 +- 19 files changed, 1128 insertions(+), 323 deletions(-) diff --git a/app/Http/Requests/Admin/GameModRequest.php b/app/Http/Requests/Admin/GameModRequest.php index dd86af9d..0ce177d6 100644 --- a/app/Http/Requests/Admin/GameModRequest.php +++ b/app/Http/Requests/Admin/GameModRequest.php @@ -17,8 +17,8 @@ public function rules() 'name' => 'required|string|max:255', 'game_code' => 'sometimes|string|max:255|exists:games,code', - 'default_start_cmd_linux' => 'nullable|string|max:1000', - 'default_start_cmd_windows' => 'nullable|string|max:1000', + 'start_cmd_nix' => 'nullable|string|max:1000', + 'start_cmd_win' => 'nullable|string|max:1000', 'vars.*.var' => 'max:16', 'vars.*.default' => 'max:64', diff --git a/app/Http/Requests/Admin/GameRequest.php b/app/Http/Requests/Admin/GameRequest.php index 6e6cc619..95ee6976 100644 --- a/app/Http/Requests/Admin/GameRequest.php +++ b/app/Http/Requests/Admin/GameRequest.php @@ -14,10 +14,13 @@ public function rules() 'name' => 'required|min:2', 'engine' => 'required|min:2', 'engine_version' => 'required', - 'steam_app_id' => 'nullable|integer', + 'steam_app_id_nix' => 'nullable|integer', + 'steam_app_id_win' => 'nullable|integer', 'steam_app_set_config' => '', - 'local_repository' => '', - 'remote_repository' => '', + 'local_repository_nix' => '', + 'local_repository_win' => '', + 'remote_repository_nix' => '', + 'remote_repository_win' => '', ]; } } diff --git a/app/Models/Game.php b/app/Models/Game.php index 986bf886..1af87fe4 100644 --- a/app/Models/Game.php +++ b/app/Models/Game.php @@ -54,8 +54,10 @@ class Game extends Model protected $fillable = [ 'code', 'start_code', 'name', 'engine', 'engine_version', - 'steam_app_id', 'steam_app_set_config', - 'local_repository', 'remote_repository', + 'steam_app_id_nix', 'steam_app_id_win', + 'steam_app_set_config', + 'remote_repository_nix', 'remote_repository_win', + 'local_repository_nix', 'local_repository_win' ]; /** diff --git a/app/Models/GameMod.php b/app/Models/GameMod.php index 844d2def..5f08bdd0 100644 --- a/app/Models/GameMod.php +++ b/app/Models/GameMod.php @@ -15,8 +15,8 @@ * @property array $vars * @property string $remote_repository * @property string $local_repository - * @property string $default_start_cmd_linux - * @property string $default_start_cmd_windows + * @property string $start_cmd_nix + * @property string $start_cmd_win * @property string $kick_cmd * @property string $ban_cmd * @property string $chname_cmd @@ -40,8 +40,9 @@ class GameMod extends Model protected $fillable = [ 'name', 'game_code', 'fast_rcon', 'vars', - 'remote_repository', 'local_repository', - 'default_start_cmd_linux', 'default_start_cmd_windows', + 'remote_repository_nix', 'remote_repository_win', + 'local_repository_nix', 'local_repository_win', + 'start_cmd_nix', 'start_cmd_win', 'kick_cmd', 'ban_cmd', 'chname_cmd', 'srestart_cmd', 'chmap_cmd', 'sendmsg_cmd', 'passwd_cmd', ]; @@ -54,8 +55,8 @@ class GameMod extends Model 'name' => 'required|string|max:255', 'game_code' => 'sometimes|string|max:255|exists:games,code', - 'default_start_cmd_linux' => 'nullable|string|max:1000', - 'default_start_cmd_windows' => 'nullable|string|max:1000', + 'start_cmd_nix' => 'nullable|string|max:1000', + 'start_cmd_win' => 'nullable|string|max:1000', 'vars.*.var' => 'max:16', 'vars.*.default' => 'max:64', diff --git a/app/UseCases/CreateGameServer.php b/app/UseCases/CreateGameServer.php index 559c266a..fedf274b 100644 --- a/app/UseCases/CreateGameServer.php +++ b/app/UseCases/CreateGameServer.php @@ -67,8 +67,8 @@ public function __invoke(CreateGameServerCommand $command) $server->start_command = $node->isLinux() - ? $gameMod->default_start_cmd_linux - : $gameMod->default_start_cmd_windows; + ? $gameMod->start_cmd_nix + : $gameMod->start_cmd_win; } else { $server->start_command = $command->startCommand; } diff --git a/database/factories/GameModFactory.php b/database/factories/GameModFactory.php index f90516b2..0871254a 100644 --- a/database/factories/GameModFactory.php +++ b/database/factories/GameModFactory.php @@ -17,8 +17,8 @@ 'vars' => '', 'remote_repository' => '', 'local_repository' => '', - 'default_start_cmd_linux' => '', - 'default_start_cmd_windows' => '', + 'start_cmd_nix' => '', + 'start_cmd_win' => '', 'kick_cmd' => '', 'ban_cmd' => '', 'chname_cmd' => '', diff --git a/database/migrations/2017_09_12_300000_create_games_table.php b/database/migrations/2017_09_12_300000_create_games_table.php index 99f2d929..71008bd1 100644 --- a/database/migrations/2017_09_12_300000_create_games_table.php +++ b/database/migrations/2017_09_12_300000_create_games_table.php @@ -19,10 +19,13 @@ public function up() $table->string('name'); $table->string('engine'); $table->string('engine_version')->default('1.0'); - $table->integer('steam_app_id')->unsigned()->nullable(); + $table->integer('steam_app_id_nix')->unsigned()->nullable(); + $table->integer('steam_app_id_win')->unsigned()->nullable(); $table->string('steam_app_set_config')->nullable(); - $table->string('remote_repository')->nullable(); - $table->string('local_repository')->nullable(); + $table->string('remote_repository_nix')->nullable(); + $table->string('remote_repository_win')->nullable(); + $table->string('local_repository_nix')->nullable(); + $table->string('local_repository_win')->nullable(); }); } diff --git a/database/migrations/2017_09_12_400000_create_game_mods_table.php b/database/migrations/2017_09_12_400000_create_game_mods_table.php index 80a770c2..5c438ab4 100644 --- a/database/migrations/2017_09_12_400000_create_game_mods_table.php +++ b/database/migrations/2017_09_12_400000_create_game_mods_table.php @@ -19,10 +19,12 @@ public function up() $table->string('name'); $table->text('fast_rcon')->nullable(); $table->text('vars')->nullable(); - $table->text('remote_repository')->nullable(); - $table->text('local_repository')->nullable(); - $table->text('default_start_cmd_linux')->nullable(); - $table->text('default_start_cmd_windows')->nullable(); + $table->text('remote_repository_nix')->nullable(); + $table->text('remote_repository_win')->nullable(); + $table->text('local_repository_nix')->nullable(); + $table->text('local_repository_win')->nullable(); + $table->text('start_cmd_nix')->nullable(); + $table->text('start_cmd_win')->nullable(); $table->string('kick_cmd', 64)->nullable(); $table->string('ban_cmd', 64)->nullable(); $table->string('chname_cmd', 64)->nullable(); diff --git a/database/seeds/GameModsTableSeeder.php b/database/seeds/GameModsTableSeeder.php index 397ef16d..e722024d 100644 --- a/database/seeds/GameModsTableSeeder.php +++ b/database/seeds/GameModsTableSeeder.php @@ -40,6 +40,10 @@ public function run() ] ); + ### + ### Half life + ### + /* Half-Life */ DB::table('game_mods')->insert([ @@ -47,8 +51,8 @@ public function run() 'name' => 'Default', 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), 'vars' => json_encode(self::getDefaultGoldSourceVars()), - 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'valve'), - 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'valve'), + 'start_cmd_nix' => self::getDefaultGoldSourceStartCmd('nix', 'valve'), + 'start_cmd_win' => self::getDefaultGoldSourceStartCmd('win', 'valve'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -61,9 +65,10 @@ public function run() 'name' => 'Classic (AMX Mod)', 'fast_rcon' => json_encode($defaultGoldSourceAmxFastRcon), 'vars' => json_encode(self::getDefaultGoldSourceVars()), - 'remote_repository' => $gapRepoBaseUrl . '/half-life/amxx.tar.xz', - 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'valve'), - 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'valve'), + 'remote_repository_nix' => $gapRepoBaseUrl . '/half-life/amxx.tar.xz', + 'remote_repository_win' => $gapRepoBaseUrl . '/half-life/amxx.tar.xz', + 'start_cmd_nix' => self::getDefaultGoldSourceStartCmd('nix', 'valve'), + 'start_cmd_win' => self::getDefaultGoldSourceStartCmd('win', 'valve'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'amx_say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -78,9 +83,10 @@ public function run() 'name' => 'Classic (ReHLDS)', 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), 'vars' => json_encode(self::getDefaultGoldSourceVars()), - 'remote_repository' => $gapRepoBaseUrl . '/half-life/rehlds-amxx-reunion.tar.xz', - 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'valve'), - 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'valve'), + 'remote_repository_nix' => $gapRepoBaseUrl . '/half-life/rehlds-amxx-reunion.tar.xz', + 'remote_repository_win' => $gapRepoBaseUrl . '/half-life/rehlds-amxx-reunion.tar.xz', + 'start_cmd_nix' => self::getDefaultGoldSourceStartCmd('nix', 'valve'), + 'start_cmd_win' => self::getDefaultGoldSourceStartCmd('win', 'valve'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -88,6 +94,56 @@ public function run() 'kick_cmd' => 'kick #{id}', ]); + /* Half-Life: Opposing Force */ + + DB::table('game_mods')->insert([ + 'game_code' => 'op4', + 'name' => 'Default', + 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), + 'vars' => json_encode(self::getDefaultGoldSourceVars()), + 'start_cmd_nix' => self::getDefaultGoldSourceStartCmd('nix', 'valve'), + 'start_cmd_win' => self::getDefaultGoldSourceStartCmd('win', 'valve'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Half Life 2 */ + + DB::table('game_mods')->insert([ + 'game_code' => 'hl2mp', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars()), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', ''), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', ''), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Black Mesa: Deathmatch */ + + DB::table('game_mods')->insert([ + 'game_code' => 'bms', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars()), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'bms'), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'bms'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + ### + ### Counter Strike + ### + /* Counter-Strike 1.6 */ DB::table('game_mods')->insert([ @@ -95,8 +151,8 @@ public function run() 'name' => 'Default', 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), 'vars' => json_encode(self::getDefaultGoldSourceVars('de_dust2')), - 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'cstrike'), - 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'cstrike'), + 'start_cmd_nix' => self::getDefaultGoldSourceStartCmd('nix', 'cstrike'), + 'start_cmd_win' => self::getDefaultGoldSourceStartCmd('win', 'cstrike'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -109,9 +165,10 @@ public function run() 'name' => 'Classic (AMX Mod)', 'fast_rcon' => json_encode($defaultGoldSourceAmxFastRcon), 'vars' => json_encode(self::getDefaultGoldSourceVars('de_dust2')), - 'remote_repository' => $gapRepoBaseUrl . '/cstrike-1.6/amxx.tar.xz', - 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'cstrike'), - 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'cstrike'), + 'remote_repository_nix' => $gapRepoBaseUrl . '/cstrike-1.6/amxx.tar.xz', + 'remote_repository_win' => $gapRepoBaseUrl . '/cstrike-1.6/amxx.tar.xz', + 'start_cmd_nix' => self::getDefaultGoldSourceStartCmd('nix', 'cstrike'), + 'start_cmd_win' => self::getDefaultGoldSourceStartCmd('win', 'cstrike'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'amx_say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -126,9 +183,41 @@ public function run() 'name' => 'Classic (ReHLDS)', 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), 'vars' => json_encode(self::getDefaultGoldSourceVars('de_dust2')), - 'remote_repository' => $gapRepoBaseUrl . '/cstrike-1.6/rehlds-amxx-reunion.tar.xz', - 'default_start_cmd_linux' => self::getDefaultGoldSourceStartCmd('nix', 'cstrike'), - 'default_start_cmd_windows' => self::getDefaultGoldSourceStartCmd('win', 'cstrike'), + 'remote_repository_nix' => $gapRepoBaseUrl . '/cstrike-1.6/rehlds-amxx-reunion.tar.xz', + 'remote_repository_win' => $gapRepoBaseUrl . '/cstrike-1.6/rehlds-amxx-reunion.tar.xz', + 'start_cmd_nix' => self::getDefaultGoldSourceStartCmd('nix', 'cstrike'), + 'start_cmd_win' => self::getDefaultGoldSourceStartCmd('win', 'cstrike'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Counter-Strike Condition Zero */ + + DB::table('game_mods')->insert([ + 'game_code' => 'czero', + 'name' => 'Default', + 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), + 'vars' => json_encode(self::getDefaultGoldSourceVars('de_dust')), + 'start_cmd_nix' => self::getDefaultGoldSourceStartCmd('nix', 'czero'), + 'start_cmd_win' => self::getDefaultGoldSourceStartCmd('win', 'czero'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Counter-Strike Source v34*/ + + DB::table('game_mods')->insert([ + 'game_code' => 'cssv34', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('de_dust2')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'cstrike'), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'cstrike'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -142,8 +231,8 @@ public function run() 'game_code' => 'cssource', 'name' => 'Default', 'vars' => json_encode(self::getDefaultSourceVars('de_dust2')), - 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'cstrike'), - 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'cstrike'), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'cstrike'), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'cstrike'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -168,8 +257,8 @@ public function run() 'info' => 'Steam account token', ], ])), - 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 0', - 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 0', + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 0', + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 0', 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -192,8 +281,8 @@ public function run() 'info' => 'Steam account token', ], ])), - 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 1', - 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 1', + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 1', + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 0 +game_mode 1', 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -216,8 +305,8 @@ public function run() 'info' => 'Steam account token', ], ])), - 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 0', - 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 0', + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 0', + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 0', 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -240,8 +329,8 @@ public function run() 'info' => 'Steam account token', ], ])), - 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 1', - 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 1', + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 1', + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 1', 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -264,8 +353,8 @@ public function run() 'info' => 'Steam account token', ], ])), - 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 2', - 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 2', + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 2', + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'csgo') . ' +sv_setsteamaccount {steamaccount} +mapgroup {mapgroup} +game_type 1 +game_mode 2', 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -273,14 +362,18 @@ public function run() 'kick_cmd' => 'kick #{id}', ]); - /* Insurgency */ + ### + ### Team Fortress + ### + + /* Team Fortress Classic */ DB::table('game_mods')->insert([ - 'game_code' => 'insurgency', + 'game_code' => 'tfc', 'name' => 'Default', - 'vars' => json_encode(self::getDefaultSourceVars('ministry')), - 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix'), - 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win'), + 'vars' => json_encode(self::getDefaultSourceVars('2fort')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'tfc'), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'tfc'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -293,9 +386,147 @@ public function run() DB::table('game_mods')->insert([ 'game_code' => 'tf2', 'name' => 'Default', - 'vars' => json_encode(self::getDefaultSourceVars('cp_badlands')), - 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix'), - 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win'), + 'vars' => json_encode(self::getDefaultSourceVars('ctf_2fort')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'tf'), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'tf'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + ### + ### Day of Defeat + ### + + /* Day of Defeat */ + + DB::table('game_mods')->insert([ + 'game_code' => 'dod', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('dod_anzio')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'dod'), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'dod'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Day of Defeat Source */ + + DB::table('game_mods')->insert([ + 'game_code' => 'dods', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('dod_anzio')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'dods'), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'dods'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + ### + ### Left 4 Dead + ### + + /* Left 4 Dead */ + + DB::table('game_mods')->insert([ + 'game_code' => 'l4d', + 'name' => 'Default', + 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), + 'vars' => json_encode(self::getDefaultGoldSourceVars('l4d_farm04_barn')), + 'start_cmd_nix' => self::getDefaultGoldSourceStartCmd('nix', 'left4dead'), + 'start_cmd_win' => self::getDefaultGoldSourceStartCmd('win', 'left4dead'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Left 4 Dead 2 */ + + DB::table('game_mods')->insert([ + 'game_code' => 'l4d2', + 'name' => 'Default', + 'fast_rcon' => json_encode($defaultGoldSourceFastRcon), + 'vars' => json_encode(self::getDefaultSourceVars('c2m1_highway')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'left4dead2'), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'left4dead2'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + ### + ### Other GoldSource + ### + + /* Deathmatch Classic */ + + DB::table('game_mods')->insert([ + 'game_code' => 'dmc', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', ''), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', ''), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Ricochet */ + + DB::table('game_mods')->insert([ + 'game_code' => 'ricochet', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', ''), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', ''), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Sven Co-op */ + + DB::table('game_mods')->insert([ + 'game_code' => 'svencoop', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultGoldSourceVars('stadium4')), + 'start_cmd_nix' => self::getDefaultGoldSourceStartCmd('nix', '', './svends_run'), + 'start_cmd_win' => self::getDefaultGoldSourceStartCmd('win', '', 'svends.exe'), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + ### + ### Other Source + ### + + /* Insurgency */ + + DB::table('game_mods')->insert([ + 'game_code' => 'insurgency', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('ministry')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix'), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -309,8 +540,8 @@ public function run() 'game_code' => 'garrysmod', 'name' => 'Default', 'vars' => json_encode(self::getDefaultSourceVars('gm_construct')), - 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'garrysmod'), - 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'garrysmod'), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'garrysmod'), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'garrysmod'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -318,14 +549,14 @@ public function run() 'kick_cmd' => 'kick #{id}', ]); - /* Black Mesa: Deathmatch */ + /* No More Room In Hell */ DB::table('game_mods')->insert([ - 'game_code' => 'bms', + 'game_code' => 'nmrih', 'name' => 'Default', - 'vars' => json_encode(self::getDefaultSourceVars()), - 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'bms'), - 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'bms'), + 'vars' => json_encode(self::getDefaultSourceVars('')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', ''), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', ''), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -333,14 +564,29 @@ public function run() 'kick_cmd' => 'kick #{id}', ]); - /* Day of Defeat Source */ + /* Pirates, Vikings, and Knights II */ DB::table('game_mods')->insert([ - 'game_code' => 'dods', + 'game_code' => 'pvk2', 'name' => 'Default', - 'vars' => json_encode(self::getDefaultSourceVars('dod_anzio')), - 'default_start_cmd_linux' => self::getDefaultSourceStartCmd('nix', 'dods'), - 'default_start_cmd_windows' => self::getDefaultSourceStartCmd('win', 'dods'), + 'vars' => json_encode(self::getDefaultSourceVars('')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', ''), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', ''), + 'passwd_cmd' => 'password {password}', + 'sendmsg_cmd' => 'say "{msg}"', + 'chmap_cmd' => 'changelevel {map}', + 'srestart_cmd' => 'restart', + 'kick_cmd' => 'kick #{id}', + ]); + + /* Synergy */ + + DB::table('game_mods')->insert([ + 'game_code' => 'synergy', + 'name' => 'Default', + 'vars' => json_encode(self::getDefaultSourceVars('d1_trainstation_01')), + 'start_cmd_nix' => self::getDefaultSourceStartCmd('nix', 'synergy'), + 'start_cmd_win' => self::getDefaultSourceStartCmd('win', 'synergy'), 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say "{msg}"', 'chmap_cmd' => 'changelevel {map}', @@ -348,11 +594,38 @@ public function run() 'kick_cmd' => 'kick #{id}', ]); + ### + ### Minecraft + ### + /* Minecraft */ DB::table('game_mods')->insert([ 'game_code' => 'minecraft', - 'name' => 'Vanilla', + 'name' => 'Default', + 'vars' => json_encode([ + [ + 'var' => 'world', + 'default' => 'world', + 'info' => 'World file', + ], + [ + 'var' => 'java_xms', + 'default' => '1G', + 'info' => 'Java start RAM amount', + 'admin_var' => true, + ], + [ + 'var' => 'java_xmx', + 'default' => '2G', + 'info' => 'Java max RAM amount', + 'admin_var' => true, + ], + ]), + 'remote_repository_nix' => 'https://launcher.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar', + 'remote_repository_win' => 'https://launcher.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar', + 'start_cmd_nix' => 'java -Xms{java_xms} -Xmx{java_xms} -jar server.jar --port {port} --world {world} --nogui', + 'start_cmd_win' => 'java -Xms{java_xms} -Xmx{java_xms} -jar server.jar --port {port} --world {world} --nogui', ]); DB::table('game_mods')->insert([ @@ -375,8 +648,9 @@ public function run() 'info' => 'Core mod version', ], ]), - 'remote_repository' => $gapRepoBaseUrl . '/minecraft/minecraft-runner.tar.gz', - 'default_start_cmd_linux' => './mcrun.sh run --version={version} --core-mod={core_mod} --core-mod-version={core_mod_version} --ip={ip} --port={port} --query-port={query_port} --rcon-port={rcon_port} --rcon-password={rcon_password}', + 'remote_repository_nix' => $gapRepoBaseUrl . '/minecraft/minecraft-runner.tar.gz', + 'remote_repository_win' => $gapRepoBaseUrl . '/minecraft/minecraft-runner.tar.gz', + 'start_cmd_nix' => './mcrun.sh run --version={version} --core-mod={core_mod} --core-mod-version={core_mod_version} --ip={ip} --port={port} --query-port={query_port} --rcon-port={rcon_port} --rcon-password={rcon_password}', ]); /* PMMP (MinecraftPE) */ @@ -384,8 +658,8 @@ public function run() DB::table('game_mods')->insert([ 'game_code' => 'pmmp', 'name' => 'Default', - 'default_start_cmd_linux' => './bin/php7/bin/php ./PocketMine-MP.phar', - 'default_start_cmd_windows' => '', + 'start_cmd_nix' => './bin/php7/bin/php ./PocketMine-MP.phar', + 'start_cmd_win' => '', 'passwd_cmd' => 'password {password}', 'sendmsg_cmd' => 'say {msg}', 'srestart_cmd' => 'reload', @@ -393,20 +667,20 @@ public function run() 'kick_cmd' => 'kick {name}', ]); - /* SAMP */ + ### + ### GTA + ### - DB::table('game_mods')->insert([ - 'game_code' => 'samp', - 'name' => 'Freeroam (Linux)', - 'default_start_cmd_linux' => './samp03svr', - 'remote_repository' => 'http://files.sa-mp.com/samp037svr_R2-1.tar.gz', - ]); + /* SAMP */ + // ToDo: pre run script - move files from folder samp03 to server root DB::table('game_mods')->insert([ 'game_code' => 'samp', - 'name' => 'Freeroam (Windows)', - 'default_start_cmd_windows' => 'samp-server.exe', - 'remote_repository' => 'http://files.sa-mp.com/samp037_svr_R2-1-1_win32.zip', + 'name' => 'Default (Freeroam)', + 'remote_repository_nix' => 'http://files.sa-mp.com/samp037svr_R2-1.tar.gz', + 'remote_repository_win' => 'http://files.sa-mp.com/samp037_svr_R2-1-1_win32.zip', + 'start_cmd_nix' => './samp03svr', + 'start_cmd_win' => 'samp-server.exe', ]); /* Multi Theft Auto (MTA) */ @@ -421,8 +695,10 @@ public function run() 'info' => 'Maximum players on server', ] ]), - 'default_start_cmd_linux' => './mta-server64 -t -n --ip {ip} --port {port} --maxplayers {maxplayers}', - 'remote_repository' => $gapRepoBaseUrl . '/mta/default-deathmatch.tar.xz', + 'remote_repository_nix' => $gapRepoBaseUrl . '/mta/default-deathmatch.tar.xz', + 'remote_repository_win' => $gapRepoBaseUrl . '/mta/default-deathmatch.tar.xz', + 'start_cmd_nix' => './mta-server64 -t -n --ip {ip} --port {port} --maxplayers {maxplayers}', + 'start_cmd_win' => '', ]); /* FiveM */ @@ -443,19 +719,32 @@ public function run() 'admin_var' => true, ], ]), - 'default_start_cmd_linux' => './fivem_run.sh --ip={ip} --port={port} --hostname="{hostname}" --rcon-password="{rcon_password}" --license-key="{license_key}"', - 'default_start_cmd_windows' => 'run.cmd +exec server.cfg', + 'start_cmd_nix' => './fivem_run.sh --ip={ip} --port={port} --hostname="{hostname}" --rcon-password="{rcon_password}" --license-key="{license_key}"', + 'start_cmd_win' => 'run.cmd +exec server.cfg', 'sendmsg_cmd' => 'say {msg}', 'kick_cmd' => 'clientkick {id}', ]); + /* RageMP */ + + DB::table('game_mods')->insert([ + 'game_code' => 'ragemp', + 'name' => 'Default', + 'start_cmd_nix' => './ragemp-server', + 'start_cmd_win' => '', + ]); + + ### + ### Just cause + ### + /* Just cause 2 */ DB::table('game_mods')->insert([ 'game_code' => 'justcause2', 'name' => 'Default', - 'default_start_cmd_linux' => './Jcmp-Server', - 'default_start_cmd_windows' => '', + 'start_cmd_nix' => './Jcmp-Server', + 'start_cmd_win' => '', ]); /* Just cause 3 */ @@ -463,8 +752,167 @@ public function run() DB::table('game_mods')->insert([ 'game_code' => 'justcause3', 'name' => 'Default', - 'default_start_cmd_linux' => './Server', - 'default_start_cmd_windows' => '', + 'start_cmd_nix' => './Server', + 'start_cmd_win' => '', + ]); + + ### + ### Arma + ### + + /* Arma 2 */ + DB::table('game_mods')->insert([ + 'game_code' => 'arma2', + 'name' => 'Default', + 'vars' => json_encode([ + [ + 'var' => 'server_name', + 'default' => 'Arma 2 server', + 'info' => 'Server name', + ], + [ + 'var' => 'config_file', + 'default' => 'server.cfg', + 'info' => 'Config file name', + ], + ]), + 'start_cmd_nix' => './arma2server -name={server_name} -config={config_file}', + 'start_cmd_win' => '', + ]); + + /* Arma 2 OA */ + DB::table('game_mods')->insert([ + 'game_code' => 'arma2oa', + 'name' => 'Default', + 'vars' => json_encode([ + [ + 'var' => 'server_name', + 'default' => 'Arma 2 server', + 'info' => 'Server name', + ], + [ + 'var' => 'config_file', + 'default' => 'server.cfg', + 'info' => 'Config file name', + ], + ]), + 'start_cmd_nix' => './arma2server -name={server_name} -config={config_file}', + 'start_cmd_win' => '', + ]); + + /* Arma 3 */ + DB::table('game_mods')->insert([ + 'game_code' => 'arma3', + 'name' => 'Default', + 'vars' => json_encode([ + [ + 'var' => 'server_name', + 'default' => 'Arma 2 server', + 'info' => 'Server name', + ], + [ + 'var' => 'config_file', + 'default' => 'server.cfg', + 'info' => 'Config file name', + ], + ]), + 'start_cmd_nix' => './arma3server -name={server_name} -config={config_file}', + 'start_cmd_win' => '', + ]); + + ### + ### Killing floor + ### + + /* Killing floor */ + +// DB::table('game_mods')->insert([ +// 'game_code' => 'killingfloor', +// 'name' => 'Default', +// 'vars' => json_encode([ +// [ +// 'var' => 'maxplayers', +// 'default' => '6', +// 'info' => 'Maximum players on server', +// ], +// [ +// 'var' => 'default_map', +// 'default' => 'KF-bioticslab', +// 'info' => 'Default Map', +// ], +// [ +// 'var' => 'is_vac', +// 'default' => 'true', +// 'info' => 'Is VAC enabled?', +// ], +// ]), +// 'start_cmd_nix' => './ucc-bin server {default_map}.rom?game=KFmod.KFGameType?VACSecured={is_vac}?MaxPlayers={maxplayers} -nohomedir', +// 'start_cmd_win' => 'ucc server {default_map}.rom?game=KFmod.KFGameType?VACSecured={is_vac}?MaxPlayers={maxplayers}', +// ]); + + /* Killing floor 2 */ + + DB::table('game_mods')->insert([ + 'game_code' => 'killingfloor2', + 'name' => 'Default', + 'vars' => json_encode([ + 'var' => 'default_map', + 'default' => 'kf-bioticslab', + 'info' => 'Default Map', + ]), + 'start_cmd_nix' => './Binaries/Win64/KFGameSteamServer.bin.x86_64 {default_map}', + 'start_cmd_win' => 'Binaries\win64\kfserver {default_map}', + ]); + + ### + ### Other games + ### + + /* ARK: Survival Evolved' */ + + DB::table('game_mods')->insert([ + 'game_code' => 'ark', + 'name' => 'Default', + 'vars' => json_encode([ + [ + 'var' => 'server_password', + 'default' => '', + 'info' => 'Server password', + ], + [ + 'var' => 'session_name', + 'default' => 'ARK server', + 'info' => 'Session name', + ], + ]), + 'start_cmd_nix' => './ShooterGameServer TheIsland?listen?SessionName={session_name}?Port={port}?QueryPort={query_port}?MaxPlayers={maxplayers}?ServerPassword={server_password}?ServerAdminPassword={rcon_password} -server -log', + 'start_cmd_win' => 'ShooterGameServer.exe TheIsland?listen?SessionName={session_name}?Port={port}?QueryPort={query_port}?MaxPlayers={maxplayers}?ServerPassword={server_password}?ServerAdminPassword={rcon_password} exit', + ]); + + /* HurtWorld */ + + DB::table('game_mods')->insert([ + 'game_code' => 'hurtworld', + 'name' => 'Default', + 'vars' => json_encode([ + [ + 'var' => 'server_name', + 'default' => 'HurtWorld server', + 'info' => 'Server name', + ], + [ + 'var' => 'admin_uid', + 'default' => '', + 'info' => 'Admin UID', + ], + [ + 'var' => 'log_file', + 'default' => 'gamelog.txt', + 'info' => 'Log file name', + ], + ]), + 'start_cmd_nix' => '', + 'start_cmd_win' => 'Hurtworld.exe -batchmode -nographics -exec "host {port};queryport {query_port};servername {server_name};addadmin admin_uid" -logfile "{log_file}"', ]); /* Rust */ @@ -479,67 +927,141 @@ public function run() 'name' => 'Oxide', ]); + /* 7 Reign Of Kings */ + + DB::table('game_mods')->insert([ + 'game_code' => 'rok', + 'name' => 'Default', + 'start_cmd_nix' => '', + 'start_cmd_win' => '', + ]); + /* 7 Day to Die */ DB::table('game_mods')->insert([ 'game_code' => '7d2d', 'name' => 'Default', - 'default_start_cmd_linux' => './startserver.sh -configfile=serverconfig.xml', - 'default_start_cmd_windows' => 'startdedicated.bat', + 'start_cmd_nix' => './startserver.sh -configfile=serverconfig.xml', + 'start_cmd_win' => 'startdedicated.bat', ]); - /* Killing floor 2 */ + /* Don`t Starve Together */ DB::table('game_mods')->insert([ - 'game_code' => 'killingfloor2', + 'game_code' => 'dst', + 'name' => 'Default', + 'start_cmd_nix' => './dontstarve_dedicated_server_nullrenderer', + 'start_cmd_win' => '', + ]); + + /* The Forest */ + // ToDo: add all launch params https://steamcommunity.com/sharedfiles/filedetails/?id=907906289 + + DB::table('game_mods')->insert([ + 'game_code' => 'the-forest', 'name' => 'Default', 'vars' => json_encode([ - 'var' => 'default_map', - 'default' => 'kf-bioticslab', - 'info' => 'Default Map', + [ + 'var' => 'name', + 'default' => 'The forest dedicated server', + 'info' => 'Server name', + ], + [ + 'var' => 'password', + 'default' => '', + 'info' => 'Server password', + ], + [ + 'var' => 'password_admin', + 'default' => '', + 'info' => 'Server admin password', + ], + [ + 'var' => 'serversteamaccount', + 'default' => '', + 'info' => 'Server steam account', + ], + [ + 'var' => 'enableVAC', + 'default' => 'on', + 'info' => 'Enable VAC?', + ], + [ + 'var' => 'serverautosaveinterval', + 'default' => '15', + 'info' => 'Autosave interval', + ], + [ + 'var' => 'difficulty', + 'default' => 'Normal', + 'info' => 'Difficulty', + ], + [ + 'var' => 'slot', + 'default' => '1', + 'info' => 'slot', + ], + [ + 'var' => 'maxplayers', + 'default' => '8', + 'info' => 'Max players', + 'admin_var' => true, + ], + [ + 'var' => 'steamport', + 'default' => '8766', + 'info' => 'Server steamport', + 'admin_var' => true, + ], ]), - 'default_start_cmd_linux' => './Binaries/Win64/KFGameSteamServer.bin.x86_64 {default_map}', - 'default_start_cmd_windows' => 'Binaries\win64\kfserver {default_map}', + 'start_cmd_win' => 'TheForestDedicatedServer.exe -serverip {ip} -servergameport {port} -serverqueryport {query_port} -serversteamport {steamport} -serverplayers {maxplayers} -servername "{servername}" -serverpassword {password} -serverpassword_admin {password_admin} -enableVAC {enableVAC} -serverautosaveinterval {serverautosaveinterval} -difficulty {difficulty} -slot {slot} ', ]); - /* TeamSpeak 3 */ + /* Teeworlds */ + // ToDo: add commands + // ToDo: add pre run script for generating server.cfg https://www.teeworlds.com/?page=docs&wiki=server_setup DB::table('game_mods')->insert([ - 'game_code' => 'ts3', - 'name' => 'Linux', - 'default_start_cmd_linux' => './ts3server', - 'remote_repository' => 'https://files.teamspeak-services.com/releases/server/3.13.6/teamspeak3-server_linux_amd64-3.13.6.tar.bz2', + 'game_code' => 'teeworlds', + 'name' => 'Default', + 'start_cmd_nix' => './teeworlds-0.7.5-linux_x86_64/teeworlds_srv -f server.cfg', + 'start_cmd_win' => 'teeworlds-0.7.5-win64\teeworlds_srv.exe -f server.cfg', + 'remote_repository_nix' => 'https://github.com/teeworlds/teeworlds/releases/download/0.7.5/teeworlds-0.7.5-linux_x86_64.tar.gz', + 'remote_repository_win' => 'https://github.com/teeworlds/teeworlds/releases/download/0.7.5/teeworlds-0.7.5-win64.zip', ]); DB::table('game_mods')->insert([ - 'game_code' => 'ts3', - 'name' => 'Windows', - 'default_start_cmd_windows' => 'teamspeak3-server_win64\ts3server.exe', - 'remote_repository' => 'https://files.teamspeak-services.com/releases/server/3.13.6/teamspeak3-server_win64-3.13.6.zip', + 'game_code' => 'teeworlds', + 'name' => 'DDrace', + 'start_cmd_nix' => './DDNet-16.0.3-linux_x86_64/DDNet-Server -f server.cfg', + 'start_cmd_win' => 'DDNet-16.0.3-win64\DDNet-Server.exe -f server.cfg', + 'remote_repository_nix' => 'https://ddnet.tw/downloads/DDNet-16.0.3-linux_x86_64.tar.xz', + 'remote_repository_win' => 'https://ddnet.tw/downloads/DDNet-16.0.3-win64.zip', ]); - } + ### + ### Software + ### + + /* TeamSpeak 3 */ + +// DB::table('game_mods')->insert([ +// 'game_code' => 'ts3', +// 'name' => 'Linux', +// 'vars' => json_encode([ +// [ +// 'var' => 'filetransfer_port', +// 'default' => '30033', +// 'info' => 'Filetransfer port', +// 'admin_var' => true, +// ], +// ]), +// 'start_cmd_nix' => './teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh voice_ip={ip} default_voice_port={port} query_ip={ip} query_port={query_port} filetransfer_ip={ip} filetransfer_port={filetransfer_port} license_accepted=1', +// 'start_cmd_win' => 'teamspeak3-server_win64\ts3server.exe', +// 'remote_repository_nix' => 'https://files.teamspeak-services.com/releases/server/3.13.6/teamspeak3-server_linux_amd64-3.13.6.tar.bz2', +// 'remote_repository_win' => 'https://files.teamspeak-services.com/releases/server/3.13.6/teamspeak3-server_win64-3.13.6.zip', +// ]); - /** - * @param string $os - * @param string $game - * @return string - */ - private static function getDefaultGoldSourceStartCmd($os, $game) - { - $cmd = ''; - if($game){ - $game = ' -game ' . $game; - } - switch ($os) { - case 'nix': - $cmd = './hlds_run -console' . $game . ' +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}'; - break; - case 'win': - $cmd = 'hlds.exe -console' . $game . ' +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}'; - break; - } - return $cmd; } /** @@ -558,6 +1080,7 @@ private static function getDefaultGoldSourceVars($defaultMap = 'crossfire') 'var' => 'maxplayers', 'default' => 32, 'info' => 'Maximum players on server', + 'admin_var' => true, ], [ 'var' => 'fps', @@ -571,20 +1094,27 @@ private static function getDefaultGoldSourceVars($defaultMap = 'crossfire') /** * @param string $os * @param string $game + * @param string $file * @return string */ - private static function getDefaultSourceStartCmd($os, $game = '') + private static function getDefaultGoldSourceStartCmd($os, $game = '', $file = '') { $cmd = ''; - if($game){ + if(!empty($game)){ $game = ' -game ' . $game; } switch ($os) { case 'nix': - $cmd = './srcds_run -console -usercon' . $game . ' +ip {ip} +port {port} +maxplayers {maxplayers} +map {default_map} -tickrate {tickrate} +rcon_password {rcon_password}'; + if(empty($file)){ + $file = './hlds_run'; + } + $cmd = $file . ' -console' . $game . ' +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}'; break; case 'win': - $cmd = 'srcds.exe -console -usercon' . $game . ' +ip {ip} +port {port} +maxplayers {maxplayers} +map {default_map} -tickrate {tickrate} +rcon_password {rcon_password}'; + if(empty($file)){ + $file = 'hlds.exe'; + } + $cmd = $file . ' -console' . $game . ' +ip {ip} +port {port} +map {default_map} +maxplayers {maxplayers} +sys_ticrate {fps} +rcon_password {rcon_password}'; break; } return $cmd; @@ -606,6 +1136,7 @@ private static function getDefaultSourceVars($defaultMap = 'crossfire') 'var' => 'maxplayers', 'default' => 32, 'info' => 'Maximum players on server', + 'admin_var' => true, ], [ 'var' => 'tickrate', @@ -615,4 +1146,33 @@ private static function getDefaultSourceVars($defaultMap = 'crossfire') ] ]; } + + /** + * @param string $os + * @param string $game + * @param string $file + * @return string + */ + private static function getDefaultSourceStartCmd($os, $game = '', $file = '') + { + $cmd = ''; + if(!empty($game)){ + $game = ' -game ' . $game; + } + switch ($os) { + case 'nix': + if(empty($file)){ + $file = './srcds_run'; + } + $cmd = $file . ' -console' . $game . ' +ip {ip} +port {port} +maxplayers {maxplayers} +map {default_map} -tickrate {tickrate} +rcon_password {rcon_password}'; + break; + case 'win': + if(empty($file)){ + $file = 'srcds.exe'; + } + $cmd = $file . ' -console' . $game . ' +ip {ip} +port {port} +maxplayers {maxplayers} +map {default_map} -tickrate {tickrate} +rcon_password {rcon_password}'; + break; + } + return $cmd; + } } diff --git a/database/seeds/GamesTableSeeder.php b/database/seeds/GamesTableSeeder.php index 7e060ed5..69730e8a 100644 --- a/database/seeds/GamesTableSeeder.php +++ b/database/seeds/GamesTableSeeder.php @@ -16,22 +16,18 @@ public function run() { $gapRepoBaseUrl = 'http://files.gameap.ru'; + /* + * Half life + */ + DB::table('games')->insert([ 'code' => 'valve', 'start_code' => 'valve', 'name' => 'Half-Life 1', 'engine' => 'GoldSource', 'engine_version' => '1', - 'steam_app_id' => 90, - ]); - - DB::table('games')->insert([ - 'code' => 'hl2mp', - 'start_code' => 'hl2mp', - 'name' => 'Half-Life 2', - 'engine' => 'Source', - 'engine_version' => '1', - 'steam_app_id' => 232370, + 'steam_app_id_nix' => 90, + 'steam_app_id_win' => 90, ]); DB::table('games')->insert([ @@ -40,30 +36,35 @@ public function run() 'name' => 'Half-Life: Opposing Force', 'engine' => 'GoldSource', 'engine_version' => '1', - 'steam_app_id' => 90, + 'steam_app_id_nix' => 90, + 'steam_app_id_win' => 90, 'steam_app_set_config' => "90 mod gearbox", ]); DB::table('games')->insert([ - 'code' => 'dmc', - 'start_code' => 'dmc', - 'name' => 'Deathmatch Classic', - 'engine' => 'GoldSource', + 'code' => 'hl2mp', + 'start_code' => 'hl2mp', + 'name' => 'Half-Life 2', + 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 90, - 'steam_app_set_config' => "90 mod dmc", + 'steam_app_id_nix' => 232370, + 'steam_app_id_win' => 232370, ]); DB::table('games')->insert([ - 'code' => 'ricochet', - 'start_code' => 'ricochet', - 'name' => 'Ricochet', - 'engine' => 'GoldSource', - 'engine_version' => '1', - 'steam_app_id' => 90, - 'steam_app_set_config' => "90 mod ricochet", + 'code' => 'bms', + 'start_code' => 'bms', + 'name' => 'Black Mesa: Deathmatch', + 'engine' => 'Source', + 'engine_version' => '4', + 'steam_app_id_nix' => 346680, + 'steam_app_id_win' => 346680, ]); + /* + * Counter Strike + */ + DB::table('games')->insert([ 'code' => 'cs15', 'start_code' => 'cstrike', @@ -78,7 +79,8 @@ public function run() 'name' => 'Counter-Strike 1.6', 'engine' => 'GoldSource', 'engine_version' => '1', - 'steam_app_id' => 90, + 'steam_app_id_nix' => 90, + 'steam_app_id_win' => 90, ]); DB::table('games')->insert([ @@ -87,7 +89,8 @@ public function run() 'name' => "Counter-Strike: Condition Zero", 'engine' => "GoldSource", 'engine_version' => "1", - 'steam_app_id' => 90, + 'steam_app_id_nix' => 90, + 'steam_app_id_win' => 90, 'steam_app_set_config' => "90 mod czero", ]); @@ -97,7 +100,8 @@ public function run() 'name' => "Counter-Strike: Source v34", 'engine' => "Source", 'engine_version' => "34", - 'steam_app_id' => 232330, + 'steam_app_id_nix' => 232330, + 'steam_app_id_win' => 232330, ]); DB::table('games')->insert([ @@ -106,7 +110,8 @@ public function run() 'name' => "Counter-Strike: Source", 'engine' => "Source", 'engine_version' => "1", - 'steam_app_id' => 232330, + 'steam_app_id_nix' => 232330, + 'steam_app_id_win' => 232330, ]); DB::table('games')->insert([ @@ -115,25 +120,47 @@ public function run() 'name' => "Counter-Strike: Global Offensive", 'engine' => "Source", 'engine_version' => "1", - 'steam_app_id' => 740, + 'steam_app_id_nix' => 740, + 'steam_app_id_win' => 740, ]); + /* + * Team Fortress + */ + DB::table('games')->insert([ - 'code' => 'svencoop', - 'start_code' => 'svencoop', - 'name' => 'Sven Co-op', + 'code' => 'tfc', + 'start_code' => 'tfc', + 'name' => 'Team Fortress Classic', 'engine' => 'GoldSource', 'engine_version' => '1', - 'steam_app_id' => 276060, + 'steam_app_id_nix' => 90, + 'steam_app_id_win' => 90, + 'steam_app_set_config' => "90 mod tfc", ]); + DB::table('games')->insert([ + 'code' => 'tf2', + 'start_code' => 'tf', + 'name' => 'Team Fortress 2', + 'engine' => 'Source', + 'engine_version' => '1', + 'steam_app_id_nix' => 232250, + 'steam_app_id_win' => 232250, + ]); + + /* + * Day of Defeat + */ + DB::table('games')->insert([ 'code' => 'dod', 'start_code' => 'dod', 'name' => 'Day of Defeat', 'engine' => 'GoldSource', 'engine_version' => '1', - 'steam_app_id' => 90, + 'steam_app_id_nix' => 90, + 'steam_app_id_win' => 90, 'steam_app_set_config' => "90 mod dod", ]); @@ -143,97 +170,145 @@ public function run() 'name' => 'Day of Defeat: Source', 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 232290, + 'steam_app_id_nix' => 232290, + 'steam_app_id_win' => 232290, ]); + /* + * Left 4 Dead + */ + DB::table('games')->insert([ - 'code' => 'tfc', - 'start_code' => 'tfc', - 'name' => 'Team Fortress Classic', - 'engine' => 'GoldSource', + 'code' => 'l4d', + 'start_code' => 'l4d', + 'name' => 'Left 4 Dead', + 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 90, - 'steam_app_set_config' => "90 mod tfc", + 'steam_app_id_nix' => 222840, + 'steam_app_id_win' => 222840, ]); DB::table('games')->insert([ - 'code' => 'tf2', - 'start_code' => 'tf', - 'name' => 'Team Fortress 2', + 'code' => 'l4d2', + 'start_code' => 'l4d2', + 'name' => 'Left 4 Dead 2', 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 232250, + 'steam_app_id_nix' => 222860, + 'steam_app_id_win' => 222860, ]); + /* + * Other gold source + */ + DB::table('games')->insert([ - 'code' => 'insurgency', - 'start_code' => 'insurgency', - 'name' => 'Insurgency', - 'engine' => 'Source', + 'code' => 'dmc', + 'start_code' => 'dmc', + 'name' => 'Deathmatch Classic', + 'engine' => 'GoldSource', 'engine_version' => '1', - 'steam_app_id' => 237410, + 'steam_app_id_nix' => 90, + 'steam_app_id_win' => 90, + 'steam_app_set_config' => "90 mod dmc", ]); DB::table('games')->insert([ - 'code' => 'synergy', - 'start_code' => 'synergy', - 'name' => 'Synergy', - 'engine' => 'Source', + 'code' => 'ricochet', + 'start_code' => 'ricochet', + 'name' => 'Ricochet', + 'engine' => 'GoldSource', 'engine_version' => '1', - 'steam_app_id' => 17525, + 'steam_app_id_nix' => 90, + 'steam_app_id_win' => 90, + 'steam_app_set_config' => "90 mod ricochet", ]); - + DB::table('games')->insert([ - 'code' => 'garrysmod', - 'start_code' => 'garrysmod', - 'name' => 'Garry`s Mod', + 'code' => 'svencoop', + 'start_code' => 'svencoop', + 'name' => 'Sven Co-op', + 'engine' => 'GoldSource', + 'engine_version' => '1', + 'steam_app_id_nix' => 276060, + 'steam_app_id_win' => 276060, + ]); + + /* + * Other source + */ + + DB::table('games')->insert([ + 'code' => 'insurgency', + 'start_code' => 'insurgency', + 'name' => 'Insurgency', 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 4020, + 'steam_app_id_nix' => 237410, + 'steam_app_id_win' => 237410, ]); DB::table('games')->insert([ - 'code' => 'bms', - 'start_code' => 'bms', - 'name' => 'Black Mesa: Deathmatch', + 'code' => 'garrysmod', + 'start_code' => 'garrysmod', + 'name' => 'Garry`s Mod', 'engine' => 'Source', - 'engine_version' => '4', - 'steam_app_id' => 346680, + 'engine_version' => '1', + 'steam_app_id_nix' => 4020, + 'steam_app_id_win' => 4020, ]); DB::table('games')->insert([ - 'code' => 'l4d', - 'start_code' => 'l4d', - 'name' => 'Left 4 Dead', + 'code' => 'pvk2', + 'start_code' => 'pvk2', + 'name' => 'Pirates, Vikings, and Knights II', 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 222840, + 'steam_app_id_nix' => 17575, + 'steam_app_id_win' => 17575, ]); DB::table('games')->insert([ - 'code' => 'l4d2', - 'start_code' => 'l4d2', - 'name' => 'Left 4 Dead 2', + 'code' => 'nmrih', + 'start_code' => 'nmrih', + 'name' => 'No More Room In Hell', 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 222860, + 'steam_app_id_nix' => 317670, + 'steam_app_id_win' => 317670, ]); DB::table('games')->insert([ - 'code' => 'ark', - 'start_code' => 'ark', - 'name' => 'ARK: Survival Evolved', + 'code' => 'synergy', + 'start_code' => 'synergy', + 'name' => 'Synergy', 'engine' => 'Source', 'engine_version' => '1', - 'steam_app_id' => 376030, + 'steam_app_id_nix' => 17525, + 'steam_app_id_win' => 17525, ]); - + +// DB::table('games')->insert([ +// 'code' => 'dota2', +// 'start_code' => 'dota2', +// 'name' => 'Dota 2', +// 'engine' => 'Source', +// 'engine_version' => '1', +// 'steam_app_id_nix' => 570, +// 'steam_app_id_win' => 570, +// ]); + + /* + * Minecraft + */ + DB::table('games')->insert([ 'code' => 'minecraft', 'start_code' => 'minecraft', 'name' => 'Minecraft', 'engine' => 'Minecraft', - 'remote_repository' => $gapRepoBaseUrl . '/minecraft/minecraft_install.tar.gz', + 'remote_repository_nix' => $gapRepoBaseUrl . '/minecraft/minecraft_install.tar.gz', + 'remote_repository_win' => $gapRepoBaseUrl . '/minecraft/minecraft_install.tar.gz', ]); DB::table('games')->insert([ @@ -241,68 +316,69 @@ public function run() 'start_code' => 'pmmp', 'name' => 'PocketMineMP (Minecraft PE)', 'engine' => 'Minecraft', - 'remote_repository' => 'https://github.com/pmmp/PocketMine-MP/releases/download/4.2.7/PocketMine-MP.phar', - ]); - - DB::table('games')->insert([ - 'code' => 'rust', - 'start_code' => 'rust', - 'name' => 'Rust', - 'engine' => 'Unity', - 'steam_app_id' => 258550, - ]); - - DB::table('games')->insert([ - 'code' => 'hurtworld', - 'start_code' => 'hurtworld', - 'name' => 'HurtWorld', - 'engine' => 'Unity', - 'steam_app_id' => 405100, + 'remote_repository_nix' => 'https://github.com/pmmp/PocketMine-MP/releases/download/4.2.7/PocketMine-MP.phar', + 'remote_repository_win' => 'https://github.com/pmmp/PocketMine-MP/releases/download/4.2.7/PocketMine-MP.phar', ]); + /* + * Arma + */ + DB::table('games')->insert([ 'code' => 'arma2', 'start_code' => 'arma2', 'name' => 'Arma 2', 'engine' => 'RealVirtuality', 'engine_version' => '3', - 'steam_app_id' => 33905, + 'steam_app_id_nix' => 33905, + 'steam_app_id_win' => 33905, ]); - + DB::table('games')->insert([ 'code' => 'arma2oa', 'start_code' => 'arma2oa', 'name' => 'Arma 2: Operation Arrowhead', 'engine' => 'RealVirtuality', 'engine_version' => '3', - 'steam_app_id' => 33935, + 'steam_app_id_nix' => 33935, + 'steam_app_id_win' => 33935, ]); - + DB::table('games')->insert([ 'code' => 'arma3', 'start_code' => 'arma3', 'name' => 'Arma 3', 'engine' => 'RealVirtuality', 'engine_version' => '4', - 'steam_app_id' => 233780, + 'steam_app_id_nix' => 233780, + 'steam_app_id_win' => 233780, ]); - + + /* + * Call of duty + */ + + DB::table('games')->insert([ + 'code' => 'cod3', + 'start_code' => 'cod3', + 'name' => 'Call of Duty 3', + 'engine' => 'Treyarch NGL', + 'steam_app_id_nix' => 42750, + 'steam_app_id_win' => 42750, + ]); + DB::table('games')->insert([ 'code' => 'cod4', 'start_code' => 'cod4', 'name' => 'Call of Duty 4', 'engine' => 'IWEngine', - 'engine_version' => '3.0' - ]); - - DB::table('games')->insert([ - 'code' => 'mta', - 'start_code' => 'mta', - 'name' => 'GTA: Multi Theft Auto', - 'engine' => 'RenderWare', - 'remote_repository' => $gapRepoBaseUrl . '/mta/mta.tar.xz', + 'engine_version' => '3.0', ]); - + + /* + * GTA + */ + DB::table('games')->insert([ 'code' => 'samp', 'start_code' => 'samp', @@ -310,21 +386,45 @@ public function run() 'engine' => 'RenderWare', ]); + DB::table('games')->insert([ + 'code' => 'mta', + 'start_code' => 'mta', + 'name' => 'GTA: Multi Theft Auto', + 'engine' => 'RenderWare', + 'remote_repository_nix' => $gapRepoBaseUrl . '/mta/mta.tar.xz', + 'remote_repository_win' => $gapRepoBaseUrl . '/mta/mta.tar.xz', + ]); + DB::table('games')->insert([ 'code' => 'fivem', 'start_code' => 'fivem', 'name' => 'FiveM', 'engine' => 'Rage', - 'remote_repository' => $gapRepoBaseUrl . '/fivem/fivem.tar.xz', + 'remote_repository_nix' => $gapRepoBaseUrl . '/fivem/fivem.tar.xz', + 'remote_repository_win' => $gapRepoBaseUrl . '/fivem/fivem.tar.xz', + ]); + + DB::table('games')->insert([ + 'code' => 'ragemp', + 'start_code' => 'ragemp', + 'name' => 'RageMP', + 'engine' => 'Rage', + 'remote_repository_nix' => 'https://cdn.rage.mp/updater/prerelease/server-files/linux_x64.tar.gz', + 'remote_repository_win' => 'https://cdn.rage.mp/updater/prerelease/server-files/linux_x64.tar.gz', ]); + /* + * Just Cause + */ + DB::table('games')->insert([ 'code' => 'justcause2', 'start_code' => 'justcause2', 'name' => 'Just Cause 2', 'engine' => 'AvalancheEngine', 'engine_version' => '2.0', - 'steam_app_id' => 261140, + 'steam_app_id_nix' => 261140, + 'steam_app_id_win' => 261140, ]); DB::table('games')->insert([ @@ -333,25 +433,23 @@ public function run() 'name' => 'Just Cause 3', 'engine' => 'AvalancheEngine', 'engine_version' => '3.0', - 'steam_app_id' => 619960, + 'steam_app_id_nix' => 619960, + 'steam_app_id_win' => 619960, ]); - DB::table('games')->insert([ - 'code' => '7d2d', - 'start_code' => '7d2d', - 'name' => '7 Days to Die', - 'engine' => 'Unity', - 'steam_app_id' => 294420, - ]); + /* + * Killing Floor + */ - DB::table('games')->insert([ - 'code' => 'killingfloor', - 'start_code' => 'killingfloor', - 'name' => 'Killing Floor', - 'engine' => 'UnrealEngine', - 'engine_version' => '2.5', - 'steam_app_id' => 232130, - ]); +// DB::table('games')->insert([ +// 'code' => 'killingfloor', +// 'start_code' => 'killingfloor', +// 'name' => 'Killing Floor', +// 'engine' => 'UnrealEngine', +// 'engine_version' => '2.5', +// 'steam_app_id_nix' => 232130, +// 'steam_app_id_win' => 232130, +// ]); DB::table('games')->insert([ 'code' => 'killingfloor2', @@ -359,7 +457,49 @@ public function run() 'name' => 'Killing Floor 2', 'engine' => 'UnrealEngine', 'engine_version' => '3', - 'steam_app_id' => 232130, + 'steam_app_id_nix' => 232130, + 'steam_app_id_win' => 232130, + ]); + + /* + * Other games + */ + + DB::table('games')->insert([ + 'code' => 'ark', + 'start_code' => 'ark', + 'name' => 'ARK: Survival Evolved', + 'engine' => 'Unreal Engine', + 'engine_version' => '4', + 'steam_app_id_nix' => 376030, + 'steam_app_id_win' => 376030, + ]); + + DB::table('games')->insert([ + 'code' => 'rust', + 'start_code' => 'rust', + 'name' => 'Rust', + 'engine' => 'Unity', + 'steam_app_id_nix' => 258550, + 'steam_app_id_win' => 258550, + ]); + + DB::table('games')->insert([ + 'code' => 'hurtworld', + 'start_code' => 'hurtworld', + 'name' => 'HurtWorld', + 'engine' => 'Unity', + 'steam_app_id_nix' => 405100, + 'steam_app_id_win' => 405100, + ]); + + DB::table('games')->insert([ + 'code' => '7d2d', + 'start_code' => '7d2d', + 'name' => '7 Days to Die', + 'engine' => 'Unity', + 'steam_app_id_nix' => 294420, + 'steam_app_id_win' => 294420, ]); DB::table('games')->insert([ @@ -367,7 +507,8 @@ public function run() 'start_code' => 'the-forest', 'name' => 'The Forest', 'engine' => 'Unity', - 'steam_app_id' => 556450, + 'steam_app_id_nix' => 556450, + 'steam_app_id_win' => 556450, ]); DB::table('games')->insert([ @@ -375,21 +516,61 @@ public function run() 'start_code' => 'rok', 'name' => 'Reign Of Kings', 'engine' => 'Unity', - 'steam_app_id' => 344760, - ]); - - DB::table('games')->insert([ - 'code' => 'ts3', - 'start_code' => 'ts3', - 'name' => 'TeamSpeak', - 'engine' => 'TeamSpeak', + 'steam_app_id_nix' => 344760, + 'steam_app_id_win' => 344760, ]); DB::table('games')->insert([ - 'code' => 'mumble', - 'start_code' => 'mumble', - 'name' => 'Mumble', - 'engine' => 'Mumble', - ]); + 'code' => 'dst', + 'start_code' => 'dst', + 'name' => 'Don`t Starve Together', + 'engine' => 'Don`t Starve', + 'engine_version' => '1', + 'steam_app_id_nix' => 343050, + 'steam_app_id_win' => 343050, + ]); + + DB::table('games')->insert([ + 'code' => 'teeworlds', + 'start_code' => 'teeworlds', + 'name' => 'Teeworlds', + 'engine' => 'Teeworlds', + ]); + +// DB::table('games')->insert([ +// 'code' => 'terraria', +// 'start_code' => 'terraria', +// 'name' => 'Terraria', +// 'engine' => 'Terraria', +// 'steam_app_id_nix' => 105600, +// 'steam_app_id_win' => 105600, +// ]); + +// DB::table('games')->insert([ +// 'code' => 'unturned', +// 'start_code' => 'unturned', +// 'name' => 'Unturned', +// 'engine' => 'Unturned', +// 'steam_app_id_nix' => 1110390, +// 'steam_app_id_win' => 1110390, +// ]); + + /* + * Software + */ + +// DB::table('games')->insert([ +// 'code' => 'ts3', +// 'start_code' => 'ts3', +// 'name' => 'TeamSpeak', +// 'engine' => 'TeamSpeak', +// ]); + +// DB::table('games')->insert([ +// 'code' => 'mumble', +// 'start_code' => 'mumble', +// 'name' => 'Mumble', +// 'engine' => 'Mumble', +// ]); } } diff --git a/resources/lang/en/games.php b/resources/lang/en/games.php index 4ef4a04f..70a53139 100644 --- a/resources/lang/en/games.php +++ b/resources/lang/en/games.php @@ -31,8 +31,13 @@ 'vars' => 'Vars', 'fast_rcon_commands' => 'Fast RCON commands', - 'basic_info' => 'Basic Info', + 'basic_info' => 'Basic info', + 'game_info' => 'Game info', + 'game_mod_info' => 'Game mod info', + 'steam_info' => 'Steamcmd settings', 'repositories' => 'Repositories', + 'repositories_local' => 'Local repositories', + 'repositories_remote' => 'Remote repositories', // Descriptions 'd_kick_cmd' => 'Shortcodes: {id} -- player id, {name} -- player name', diff --git a/resources/lang/en/labels.php b/resources/lang/en/labels.php index f814948b..cf6f6699 100644 --- a/resources/lang/en/labels.php +++ b/resources/lang/en/labels.php @@ -45,15 +45,18 @@ 'start_code' => 'Start Code', 'engine' => 'Engine', 'engine_version' => 'Engine Version', - 'steam_app_id' => 'Steam App ID', + 'steam_app_id_nix' => 'Steam App ID (Linux)', + 'steam_app_id_win' => 'Steam App ID (Windows)', 'steam_app_set_config' => 'Steam App Set Config', // GameMod 'game_code' => 'Game Code', 'fast_rcon' => 'Fast RCON', 'vars' => 'Vars', - 'remote_repository' => 'Remote Repository', - 'local_repository' => 'Local Repository', + 'remote_repository_nix' => 'Remote Repository (Linux)', + 'remote_repository_win' => 'Remote Repository (Windows)', + 'local_repository_nix' => 'Local Repository (Linux)', + 'local_repository_win' => 'Local Repository (Windows)', 'kick_cmd' => 'Kick Command', 'ban_cmd' => 'Ban Command', 'chname_cmd' => 'Change Name Command', @@ -61,8 +64,8 @@ 'chmap_cmd' => 'Change Map Command', 'sendmsg_cmd' => 'Send Message Command', 'passwd_cmd' => 'Set/Change Password Command', - 'default_start_cmd_linux' => 'Default Start Command (Linux)', - 'default_start_cmd_windows' => 'Default Start Command (Windows)', + 'start_cmd_nix' => 'Start Command (Linux)', + 'start_cmd_win' => 'Start Command (Windows)', // Server 'game_server' => 'Game server', diff --git a/resources/lang/ru/games.php b/resources/lang/ru/games.php index 1fc65010..de86cc51 100644 --- a/resources/lang/ru/games.php +++ b/resources/lang/ru/games.php @@ -32,7 +32,12 @@ 'fast_rcon_commands' => 'Fast RCON команды', 'basic_info' => 'Основное', + 'game_info' => 'Параметры игры', + 'game_mod_info' => 'Параметры игрового мода', + 'steam_info' => 'Настройки steamcmd', 'repositories' => 'Репозитории', + 'repositories_local' => 'Локальные репозитории', + 'repositories_remote' => 'Удаленные репозитории', // Descriptions 'd_kick_cmd' => 'Шорткоды: {id} -- id игрока, {name} -- имя игрока', diff --git a/resources/lang/ru/labels.php b/resources/lang/ru/labels.php index 9da949b3..76241ceb 100644 --- a/resources/lang/ru/labels.php +++ b/resources/lang/ru/labels.php @@ -45,15 +45,18 @@ 'start_code' => 'Старт код', 'engine' => 'Движок', 'engine_version' => 'Версия движка', - 'steam_app_id' => 'Steam App ID', + 'steam_app_id_nix' => 'Steam App ID (Linux)', + 'steam_app_id_win' => 'Steam App ID (Windows)', 'steam_app_set_config' => 'Steam App Set Config', // GameMod 'game_code' => 'Код игры', 'fast_rcon' => 'Fast RCON', 'vars' => 'Переменные', - 'remote_repository' => 'Удалённый репозиторий', - 'local_repository' => 'Локальный репозиторий', + 'remote_repository_nix' => 'Удалённый репозиторий (Linux)', + 'remote_repository_win' => 'Удалённый репозиторий (Windows)', + 'local_repository_nix' => 'Локальный репозиторий (Linux)', + 'local_repository_win' => 'Локальный репозиторий (Windows)', 'kick_cmd' => 'Команда кика', 'ban_cmd' => 'Команда бана', 'chname_cmd' => 'Команда смены имени (ника)', @@ -61,8 +64,8 @@ 'chmap_cmd' => 'Команда смены карты', 'sendmsg_cmd' => 'Команда отправки сообщения', 'passwd_cmd' => 'Команда установки/смены пароля', - 'default_start_cmd_linux' => 'Команда запуска по умолчанию (Linux)', - 'default_start_cmd_windows' => 'Команда запуска по умолчанию (Windows)', + 'start_cmd_nix' => 'Команда запуска (Linux)', + 'start_cmd_win' => 'Команда запуска (Windows)', // Server 'game_server' => 'Игровой сервер', diff --git a/resources/views/admin/game_mods/create.blade.php b/resources/views/admin/game_mods/create.blade.php index 0c805794..8d0bcb66 100644 --- a/resources/views/admin/game_mods/create.blade.php +++ b/resources/views/admin/game_mods/create.blade.php @@ -27,8 +27,10 @@ {{ Form::bsText('name') }} - {{ Form::bsText('remote_repository') }} - {{ Form::bsText('local_repository') }} + {{ Form::bsText('remote_repository_nix') }} + {{ Form::bsText('remote_repository_win') }} + {{ Form::bsText('local_repository_nix') }} + {{ Form::bsText('local_repository_win') }} diff --git a/resources/views/admin/game_mods/edit.blade.php b/resources/views/admin/game_mods/edit.blade.php index 4381cfe6..929d4de5 100644 --- a/resources/views/admin/game_mods/edit.blade.php +++ b/resources/views/admin/game_mods/edit.blade.php @@ -48,10 +48,8 @@ {{ __('games.run_commands') }}
- {{ Form::bsText('default_start_cmd_linux') }} -
-
- {{ Form::bsText('default_start_cmd_windows') }} + {{ Form::bsText('start_cmd_nix') }} + {{ Form::bsText('start_cmd_win') }}
@@ -59,11 +57,21 @@
- {{ __('games.repositories') }} + {{ __('games.repositories_local') }} +
+
+ {{ Form::bsText('local_repository_nix') }} + {{ Form::bsText('local_repository_win') }} +
+
+ +
+
+ {{ __('games.repositories_remote') }}
- {{ Form::bsText('remote_repository') }} - {{ Form::bsText('local_repository') }} + {{ Form::bsText('remote_repository_nix') }} + {{ Form::bsText('remote_repository_win') }}
diff --git a/resources/views/admin/games/create.blade.php b/resources/views/admin/games/create.blade.php index aab94e49..0f78f79f 100644 --- a/resources/views/admin/games/create.blade.php +++ b/resources/views/admin/games/create.blade.php @@ -30,15 +30,23 @@
- {{ Form::bsText('steam_app_id') }} + {{ Form::bsText('steam_app_id_nix') }} + {{ Form::bsText('steam_app_id_win') }} {{ Form::bsText('steam_app_set_config') }}
+ +
+
+ {{ Form::bsText('local_repository_nix') }} + {{ Form::bsText('local_repository_win') }} +
+
- {{ Form::bsText('local_repository') }} - {{ Form::bsText('remote_repository') }} + {{ Form::bsText('local_repository_nix') }} + {{ Form::bsText('local_repository_win') }}
diff --git a/resources/views/admin/games/edit.blade.php b/resources/views/admin/games/edit.blade.php index 3b0ce3dd..7fbc6af4 100644 --- a/resources/views/admin/games/edit.blade.php +++ b/resources/views/admin/games/edit.blade.php @@ -24,6 +24,9 @@
+
+ {{ __('games.basic_info') }} +
{{ Form::bsText('code', null, null, ['disabled']) }} {{ Form::bsText('start_code') }} @@ -33,34 +36,50 @@ {{ Form::bsText('engine_version') }}
+ +
+
+ {{ __('games.mods') }} +
+
+ +
+
+
+ {{ __('games.steam_info') }} +
- {{ Form::bsText('steam_app_id') }} + {{ Form::bsText('steam_app_id_nix') }} + {{ Form::bsText('steam_app_id_win') }} {{ Form::bsText('steam_app_set_config') }}
+
+ {{ __('games.repositories_local') }} +
- {{ Form::bsText('local_repository') }} - {{ Form::bsText('remote_repository') }} + {{ Form::bsText('local_repository_nix') }} + {{ Form::bsText('local_repository_win') }}
- +
- {{ __('games.mods') }} + {{ __('games.repositories_remote') }}
- - + {{ Form::bsText('remote_repository_nix') }} + {{ Form::bsText('remote_repository_win') }}
diff --git a/tests/Feature/Permissions/Controllers/Admin/GameModsControllerTest.php b/tests/Feature/Permissions/Controllers/Admin/GameModsControllerTest.php index c28a6384..21c33043 100644 --- a/tests/Feature/Permissions/Controllers/Admin/GameModsControllerTest.php +++ b/tests/Feature/Permissions/Controllers/Admin/GameModsControllerTest.php @@ -56,8 +56,8 @@ public function testAllow() 'vars' => null, 'remote_repository' => null, 'local_repository' => null, - 'default_start_cmd_linux' => '', - 'default_start_cmd_windows' => '', + 'start_cmd_nix' => '', + 'start_cmd_win' => '', 'kick_cmd' => null, 'ban_cmd' => null, 'chname_cmd' => null, @@ -104,8 +104,8 @@ public function testForbidden() 'vars' => null, 'remote_repository' => null, 'local_repository' => null, - 'default_start_cmd_linux' => '', - 'default_start_cmd_windows' => '', + 'start_cmd_nix' => '', + 'start_cmd_win' => '', 'kick_cmd' => null, 'ban_cmd' => null, 'chname_cmd' => null, @@ -151,8 +151,8 @@ public function testForbiddenUser() 'vars' => null, 'remote_repository' => null, 'local_repository' => null, - 'default_start_cmd_linux' => '', - 'default_start_cmd_windows' => '', + 'start_cmd_nix' => '', + 'start_cmd_win' => '', 'kick_cmd' => null, 'ban_cmd' => null, 'chname_cmd' => null, From 7ee433c12969188b10ad8a34f53c45a6c0acf5e1 Mon Sep 17 00:00:00 2001 From: Sergey Abu Date: Wed, 27 Apr 2022 01:18:22 +0300 Subject: [PATCH 03/37] Fix server controller. Now return 'remote_repository', 'local_repository', 'steam_app_id', 'start_cmd' special for DS OS. --- .../GdaemonAPI/ServersController.php | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/GdaemonAPI/ServersController.php b/app/Http/Controllers/GdaemonAPI/ServersController.php index 08a4ef9f..03683ffc 100644 --- a/app/Http/Controllers/GdaemonAPI/ServersController.php +++ b/app/Http/Controllers/GdaemonAPI/ServersController.php @@ -6,6 +6,7 @@ use Gameap\Http\Requests\GdaemonAPI\ServerRequest; use Gameap\Models\DedicatedServer; use Gameap\Models\Server; +use Gameap\Repositories\NodeRepository; use Gameap\Repositories\ServerRepository; use Illuminate\Http\JsonResponse; use Illuminate\Http\Response; @@ -30,6 +31,7 @@ public function index(DedicatedServer $dedicatedServer): JsonResponse return response()->json( QueryBuilder::for(Server::where('ds_id', '=', $dedicatedServer->id)) ->allowedFilters('id') + ->with('dedicatedServer') ->with('game') ->with('gameMod') ->with('settings') @@ -39,11 +41,34 @@ public function index(DedicatedServer $dedicatedServer): JsonResponse public function server(Server $server): JsonResponse { - // Get Relations + $server->getRelationValue('dedicatedServer'); + $isLinux = $server->dedicatedServer->isLinux(); + $server->unsetRelation('dedicatedServer'); + $server->getRelationValue('game'); $server->getRelationValue('gameMod'); $server->getRelationValue('settings'); + $fieldSiffix = 'win'; + if($isLinux) { + $fieldSiffix = 'nix'; + } + $arFields = [ + 'game' => [ + 'remote_repository', 'local_repository', 'steam_app_id', + ], + 'gameMod' => [ + 'remote_repository', 'local_repository', 'start_cmd', + ], + ]; + foreach($arFields as $relationName => $arRelationFields){ + foreach($arRelationFields as $gameField){ + $server->{$relationName}->{$gameField} = $server->{$relationName}->{$gameField . '_' . $fieldSiffix}; + unset($server->{$relationName}->{$gameField . '_nix'}); + unset($server->{$relationName}->{$gameField . '_win'}); + } + } + return response()->json($server); } From 57c610c51d723854234ad5bee996a3e70270dc38 Mon Sep 17 00:00:00 2001 From: Sergey Abu Date: Wed, 27 Apr 2022 01:21:07 +0300 Subject: [PATCH 04/37] FastFix: Cleanup --- app/Http/Controllers/GdaemonAPI/ServersController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Http/Controllers/GdaemonAPI/ServersController.php b/app/Http/Controllers/GdaemonAPI/ServersController.php index 03683ffc..d7fefcaa 100644 --- a/app/Http/Controllers/GdaemonAPI/ServersController.php +++ b/app/Http/Controllers/GdaemonAPI/ServersController.php @@ -6,7 +6,6 @@ use Gameap\Http\Requests\GdaemonAPI\ServerRequest; use Gameap\Models\DedicatedServer; use Gameap\Models\Server; -use Gameap\Repositories\NodeRepository; use Gameap\Repositories\ServerRepository; use Illuminate\Http\JsonResponse; use Illuminate\Http\Response; From f249a0a862fbdc5b57afce632daf2237eb00420f Mon Sep 17 00:00:00 2001 From: Sergey Abu Date: Wed, 27 Apr 2022 01:41:10 +0300 Subject: [PATCH 05/37] FastFix: Cleanup games and modes --- database/seeds/GameModsTableSeeder.php | 4 ++++ database/seeds/GamesTableSeeder.php | 26 +++----------------------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/database/seeds/GameModsTableSeeder.php b/database/seeds/GameModsTableSeeder.php index e722024d..97b19fe1 100644 --- a/database/seeds/GameModsTableSeeder.php +++ b/database/seeds/GameModsTableSeeder.php @@ -658,6 +658,8 @@ public function run() DB::table('game_mods')->insert([ 'game_code' => 'pmmp', 'name' => 'Default', + 'remote_repository_nix' => 'https://github.com/pmmp/PocketMine-MP/releases/download/4.2.7/PocketMine-MP.phar', + 'remote_repository_win' => 'https://github.com/pmmp/PocketMine-MP/releases/download/4.2.7/PocketMine-MP.phar', 'start_cmd_nix' => './bin/php7/bin/php ./PocketMine-MP.phar', 'start_cmd_win' => '', 'passwd_cmd' => 'password {password}', @@ -719,6 +721,8 @@ public function run() 'admin_var' => true, ], ]), + 'remote_repository_nix' => $gapRepoBaseUrl . '/fivem/fivem.tar.xz', + 'remote_repository_win' => $gapRepoBaseUrl . '/fivem/fivem.tar.xz', 'start_cmd_nix' => './fivem_run.sh --ip={ip} --port={port} --hostname="{hostname}" --rcon-password="{rcon_password}" --license-key="{license_key}"', 'start_cmd_win' => 'run.cmd +exec server.cfg', 'sendmsg_cmd' => 'say {msg}', diff --git a/database/seeds/GamesTableSeeder.php b/database/seeds/GamesTableSeeder.php index 69730e8a..0eb8d9e2 100644 --- a/database/seeds/GamesTableSeeder.php +++ b/database/seeds/GamesTableSeeder.php @@ -295,7 +295,6 @@ public function run() // 'engine' => 'Source', // 'engine_version' => '1', // 'steam_app_id_nix' => 570, -// 'steam_app_id_win' => 570, // ]); /* @@ -307,8 +306,6 @@ public function run() 'start_code' => 'minecraft', 'name' => 'Minecraft', 'engine' => 'Minecraft', - 'remote_repository_nix' => $gapRepoBaseUrl . '/minecraft/minecraft_install.tar.gz', - 'remote_repository_win' => $gapRepoBaseUrl . '/minecraft/minecraft_install.tar.gz', ]); DB::table('games')->insert([ @@ -316,8 +313,6 @@ public function run() 'start_code' => 'pmmp', 'name' => 'PocketMineMP (Minecraft PE)', 'engine' => 'Minecraft', - 'remote_repository_nix' => 'https://github.com/pmmp/PocketMine-MP/releases/download/4.2.7/PocketMine-MP.phar', - 'remote_repository_win' => 'https://github.com/pmmp/PocketMine-MP/releases/download/4.2.7/PocketMine-MP.phar', ]); /* @@ -330,7 +325,6 @@ public function run() 'name' => 'Arma 2', 'engine' => 'RealVirtuality', 'engine_version' => '3', - 'steam_app_id_nix' => 33905, 'steam_app_id_win' => 33905, ]); @@ -340,7 +334,6 @@ public function run() 'name' => 'Arma 2: Operation Arrowhead', 'engine' => 'RealVirtuality', 'engine_version' => '3', - 'steam_app_id_nix' => 33935, 'steam_app_id_win' => 33935, ]); @@ -363,7 +356,6 @@ public function run() 'start_code' => 'cod3', 'name' => 'Call of Duty 3', 'engine' => 'Treyarch NGL', - 'steam_app_id_nix' => 42750, 'steam_app_id_win' => 42750, ]); @@ -391,8 +383,6 @@ public function run() 'start_code' => 'mta', 'name' => 'GTA: Multi Theft Auto', 'engine' => 'RenderWare', - 'remote_repository_nix' => $gapRepoBaseUrl . '/mta/mta.tar.xz', - 'remote_repository_win' => $gapRepoBaseUrl . '/mta/mta.tar.xz', ]); DB::table('games')->insert([ @@ -400,8 +390,6 @@ public function run() 'start_code' => 'fivem', 'name' => 'FiveM', 'engine' => 'Rage', - 'remote_repository_nix' => $gapRepoBaseUrl . '/fivem/fivem.tar.xz', - 'remote_repository_win' => $gapRepoBaseUrl . '/fivem/fivem.tar.xz', ]); DB::table('games')->insert([ @@ -410,7 +398,7 @@ public function run() 'name' => 'RageMP', 'engine' => 'Rage', 'remote_repository_nix' => 'https://cdn.rage.mp/updater/prerelease/server-files/linux_x64.tar.gz', - 'remote_repository_win' => 'https://cdn.rage.mp/updater/prerelease/server-files/linux_x64.tar.gz', + 'remote_repository_win' => '', ]); /* @@ -433,8 +421,6 @@ public function run() 'name' => 'Just Cause 3', 'engine' => 'AvalancheEngine', 'engine_version' => '3.0', - 'steam_app_id_nix' => 619960, - 'steam_app_id_win' => 619960, ]); /* @@ -447,8 +433,8 @@ public function run() // 'name' => 'Killing Floor', // 'engine' => 'UnrealEngine', // 'engine_version' => '2.5', -// 'steam_app_id_nix' => 232130, -// 'steam_app_id_win' => 232130, +// 'steam_app_id_nix' => 215360, +// 'steam_app_id_win' => 215350, // ]); DB::table('games')->insert([ @@ -480,7 +466,6 @@ public function run() 'start_code' => 'rust', 'name' => 'Rust', 'engine' => 'Unity', - 'steam_app_id_nix' => 258550, 'steam_app_id_win' => 258550, ]); @@ -507,7 +492,6 @@ public function run() 'start_code' => 'the-forest', 'name' => 'The Forest', 'engine' => 'Unity', - 'steam_app_id_nix' => 556450, 'steam_app_id_win' => 556450, ]); @@ -516,7 +500,6 @@ public function run() 'start_code' => 'rok', 'name' => 'Reign Of Kings', 'engine' => 'Unity', - 'steam_app_id_nix' => 344760, 'steam_app_id_win' => 344760, ]); @@ -527,7 +510,6 @@ public function run() 'engine' => 'Don`t Starve', 'engine_version' => '1', 'steam_app_id_nix' => 343050, - 'steam_app_id_win' => 343050, ]); DB::table('games')->insert([ @@ -543,7 +525,6 @@ public function run() // 'name' => 'Terraria', // 'engine' => 'Terraria', // 'steam_app_id_nix' => 105600, -// 'steam_app_id_win' => 105600, // ]); // DB::table('games')->insert([ @@ -552,7 +533,6 @@ public function run() // 'name' => 'Unturned', // 'engine' => 'Unturned', // 'steam_app_id_nix' => 1110390, -// 'steam_app_id_win' => 1110390, // ]); /* From e692b1c3ce6dadbfdd9d655667a9c39ce7195204 Mon Sep 17 00:00:00 2001 From: Sergey Abu Date: Wed, 27 Apr 2022 01:44:56 +0300 Subject: [PATCH 06/37] FastFix: Move all repos to related game modes --- database/seeds/GameModsTableSeeder.php | 2 ++ database/seeds/GamesTableSeeder.php | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/database/seeds/GameModsTableSeeder.php b/database/seeds/GameModsTableSeeder.php index 97b19fe1..bf7e4fcd 100644 --- a/database/seeds/GameModsTableSeeder.php +++ b/database/seeds/GameModsTableSeeder.php @@ -734,6 +734,8 @@ public function run() DB::table('game_mods')->insert([ 'game_code' => 'ragemp', 'name' => 'Default', + 'remote_repository_nix' => 'https://cdn.rage.mp/updater/prerelease/server-files/linux_x64.tar.gz', + 'remote_repository_win' => '', 'start_cmd_nix' => './ragemp-server', 'start_cmd_win' => '', ]); diff --git a/database/seeds/GamesTableSeeder.php b/database/seeds/GamesTableSeeder.php index 0eb8d9e2..6a3d7de0 100644 --- a/database/seeds/GamesTableSeeder.php +++ b/database/seeds/GamesTableSeeder.php @@ -14,7 +14,6 @@ class GamesTableSeeder extends Seeder */ public function run() { - $gapRepoBaseUrl = 'http://files.gameap.ru'; /* * Half life @@ -397,8 +396,6 @@ public function run() 'start_code' => 'ragemp', 'name' => 'RageMP', 'engine' => 'Rage', - 'remote_repository_nix' => 'https://cdn.rage.mp/updater/prerelease/server-files/linux_x64.tar.gz', - 'remote_repository_win' => '', ]); /* From 44e62a13e4034c8fad381938ee2bcd3b07f920ed Mon Sep 17 00:00:00 2001 From: Sergey Abu Date: Wed, 27 Apr 2022 18:33:27 +0300 Subject: [PATCH 07/37] Fix list UIs --- resources/lang/en/home.php | 2 ++ resources/lang/en/modules.php | 1 + resources/lang/ru/home.php | 2 ++ resources/lang/ru/modules.php | 1 + .../client_certificates/create.blade.php | 2 +- .../admin/client_certificates/list.blade.php | 2 +- .../admin/client_certificates/view.blade.php | 2 +- .../admin/dedicated_servers/create.blade.php | 2 +- .../admin/dedicated_servers/edit.blade.php | 2 +- .../admin/dedicated_servers/list.blade.php | 17 ++++++------- .../admin/dedicated_servers/view.blade.php | 2 +- .../views/admin/game_mods/create.blade.php | 2 +- .../views/admin/game_mods/edit.blade.php | 2 +- resources/views/admin/games/create.blade.php | 2 +- resources/views/admin/games/edit.blade.php | 2 +- resources/views/admin/games/list.blade.php | 24 +++++++++---------- resources/views/admin/games/view.blade.php | 2 +- .../views/admin/gdaemon_tasks/list.blade.php | 2 +- .../views/admin/gdaemon_tasks/view.blade.php | 2 +- .../views/admin/servers/create.blade.php | 2 +- resources/views/admin/servers/edit.blade.php | 2 +- resources/views/admin/servers/list.blade.php | 9 ++++--- .../admin/servers_settings/settings.blade.php | 2 +- resources/views/admin/users/create.blade.php | 2 +- resources/views/admin/users/edit.blade.php | 2 +- resources/views/admin/users/list.blade.php | 9 ++++--- .../admin/users/server_perms/edit.blade.php | 2 +- resources/views/admin/users/view.blade.php | 2 +- resources/views/help.blade.php | 2 +- resources/views/layouts/main.blade.php | 2 +- resources/views/modules/installed.blade.php | 12 ++++++++-- resources/views/modules/marketplace.blade.php | 13 ++++++++-- resources/views/report_bug.blade.php | 9 +++++-- resources/views/servers/not_active.blade.php | 2 +- resources/views/servers/view.blade.php | 2 +- resources/views/update.blade.php | 2 +- 36 files changed, 92 insertions(+), 57 deletions(-) diff --git a/resources/lang/en/home.php b/resources/lang/en/home.php index 357c18ff..46f4e2da 100644 --- a/resources/lang/en/home.php +++ b/resources/lang/en/home.php @@ -32,6 +32,8 @@ 'd_report_bug' => 'Please check the PHP version and the availability of the necessary PHP extensions. PHP versions should be no lower than the minimum recommended. Some functions of the panel will not work correctly without the necessary extensions', + 'send_report' => 'Send report', + 'system_check' => 'System check', 'send_bug_success_msg' => 'Error message sent successfully', diff --git a/resources/lang/en/modules.php b/resources/lang/en/modules.php index f0434144..329cbd79 100644 --- a/resources/lang/en/modules.php +++ b/resources/lang/en/modules.php @@ -1,6 +1,7 @@ 'Modules', 'title' => 'GameAP Modules', 'migrate' => 'Run migrate', diff --git a/resources/lang/ru/home.php b/resources/lang/ru/home.php index f9cf5e6b..62d73f68 100644 --- a/resources/lang/ru/home.php +++ b/resources/lang/ru/home.php @@ -32,6 +32,8 @@ 'd_report_bug' => 'Пожалуйста, проверьте версию PHP и наличи необходимых расширений PHP. Версий PHP должна быть не ниже минимальной рекомендуемой. Без необходимых расширений некоторые функции панели будут работать некорректно.', + 'send_report' => 'Отправить отчет', + 'system_check' => 'Проверка системы', 'send_bug_success_msg' => 'Информация об ошибке успешно отправлена', diff --git a/resources/lang/ru/modules.php b/resources/lang/ru/modules.php index f12bcf14..d7f0c46c 100644 --- a/resources/lang/ru/modules.php +++ b/resources/lang/ru/modules.php @@ -1,6 +1,7 @@ 'Модули', 'title' => 'GameAP Модули', 'migrate' => 'Запустить миграцию', diff --git a/resources/views/admin/client_certificates/create.blade.php b/resources/views/admin/client_certificates/create.blade.php index 2f1a16fa..906440f0 100644 --- a/resources/views/admin/client_certificates/create.blade.php +++ b/resources/views/admin/client_certificates/create.blade.php @@ -2,7 +2,7 @@ @extends('layouts.main') -@section('breadclumbs') +@section('breadcrumbs')