Просмотр исходного кода

Added Wreckfest xml

- Windows support only, but it works fine under Linux/Wine v3.11
rocco27 8 лет назад
Родитель
Сommit
3cfbab2446

BIN
images/icons/wreckfest.png


+ 67 - 0
modules/config_games/server_configs/wreckfest_win32.xml

@@ -0,0 +1,67 @@
+<game_config>
+  <game_key>wreckfest_win32</game_key>
+  <protocol>lgsl</protocol>
+  <lgsl_query_name>wreckfest</lgsl_query_name>
+  <installer>steamcmd</installer>
+  <game_name>Wreckfest</game_name>
+  <server_exec_name>server/Wreckfest.exe</server_exec_name>
+  <query_port type="add">-6524</query_port>
+  <cli_template>-s server_config=server_config.cfg</cli_template>
+  <max_user_amount>24</max_user_amount>
+  <mods>
+    <mod key="default">
+      <name>None</name>
+      <installer_name>361580</installer_name>
+      <installer_login>anonymous</installer_login>
+    </mod>
+  </mods>
+  <replace_texts>
+    <text key="port">
+      <default>game_port=.*</default>
+      <var>game_port=</var>
+      <filepath>server_config.cfg</filepath>
+    </text>
+    <text key="query_port">
+      <default>query_port=.*</default>
+      <var>query_port=</var>
+      <filepath>server_config.cfg</filepath>
+    </text>
+    <text key="max_players">
+      <default>max_players=.*</default>
+      <var>max_players=</var>
+      <filepath>server_config.cfg</filepath>
+      <occurrence>2</occurrence>
+    </text>
+    <text key="home_name">
+      <default>server_name=.*</default>
+      <var>server_name=</var>
+      <filepath>server_config.cfg</filepath>
+      <occurrence>2</occurrence>
+    </text>
+  </replace_texts>
+  <custom_fields>
+    <field key="Steam Port" type="text">
+      <default>steam_port=.*</default>
+      <default_value>27015</default_value>
+      <var>steam_port=</var>
+      <filepath>server_config.cfg</filepath>
+      <options>ns</options>
+      <access>admin</access>
+      <desc>Port of Game.</desc>
+    </field>
+  </custom_fields>
+  <post_install>
+    config="server_config.cfg"
+    if [ -s "$config" ]
+      then
+        echo "File $config found. OK!"
+      else
+        echo "File $config not found."
+        echo "Copying default config file in $config!"
+        cp -f initial_$config $config
+    fi
+  </post_install>
+  <configuration_files>
+    <file description="Advanced Modifications">server_config.cfg</file>
+  </configuration_files>
+</game_config>

+ 5 - 1
protocol/lgsl/lgsl_protocol.php

@@ -159,7 +159,8 @@ if (!function_exists('lgsl_version')) { // START OF DOUBLE LOAD PROTECTION
 		"wolfet"		=> "Wolfenstein: Enemy Territory",
 		"wolfrtcw"		=> "Wolfenstein: Return To Castle Wolfenstein",
 		"wolf2009"		=> "Wolfenstein ( 2009 By Raven )",
-		"xonotic"		=> "Xonotic"); 
+		"wreckfest"		=> "Wreckfest",
+		"xonotic"		=> "Xonotic");
 	}
 
 //------------------------------------------------------------------------------------------------------------+
@@ -314,6 +315,7 @@ if (!function_exists('lgsl_version')) { // START OF DOUBLE LOAD PROTECTION
 		"wolfet"		=> "02",
 		"wolfrtcw"		=> "02",
 		"wolf2009"		=> "10",
+		"wreckfest"		=> "05",
 		"xonotic"		=> "02");
 
 		return $lgsl_protocol_list;
@@ -461,6 +463,7 @@ if (!function_exists('lgsl_version')) { // START OF DOUBLE LOAD PROTECTION
 		"wolfet"		=> "qtracker://{IP}:{S_PORT}?game=WolfensteinEnemyTerritory&action=show",
 		"wolfrtcw"		=> "qtracker://{IP}:{S_PORT}?game=ReturntoCastleWolfenstein&action=show",
 		"wolf2009"		=> "http://en.wikipedia.org/wiki/Wolfenstein_(2009_video_game)",
+		"wreckfest"		=> "http://www.wreckfestgame.com/",
 		"xonotic"		=> "qtracker://{IP}:{S_PORT}?game=Xonotic&action=show");
 
 		// SOFTWARE PORT IS THE QUERY PORT UNLESS SET
@@ -549,6 +552,7 @@ if (!function_exists('lgsl_version')) { // START OF DOUBLE LOAD PROTECTION
 			case "ut3"				: $c_to_q = -1277;	$c_def = 7777;	$q_def = 6500;	$c_to_s = 0;	break;
 			case "vietcong"			: $c_to_q = 10000;	$c_def = 5425;	$q_def = 15425;	$c_to_s = 0;	break;
 			case "vietcong2"		: $c_to_q = 0;		$c_def = 5001;	$q_def = 19967;	$c_to_s = 0;	break;
+			case "wreckfest"		: $c_to_q = -6524;	$c_def = 33540;	$q_def = 27016;	$c_to_s = 0;	break;
 			default					: $c_to_q = 0;		$c_def = 0;		$q_def = 0;		$c_to_s = 0;	break;
 		}