فهرست منبع

Added Arma 3 (final version). Thanks buggy.

DieFeM 12 سال پیش
والد
کامیت
b9c56e884c
4فایلهای تغییر یافته به همراه3212 افزوده شده و 3165 حذف شده
  1. BIN
      images/icons/arma3.png
  2. 50 0
      modules/config_games/server_configs/arma3_win32.xml
  3. 6 1
      modules/gamemanager/cfg_text_replace.php
  4. 3156 3164
      protocol/lgsl/lgsl_protocol.php

BIN
images/icons/arma3.png


+ 50 - 0
modules/config_games/server_configs/arma3_win32.xml

@@ -0,0 +1,50 @@
+<game_config>
+  <game_key>arma3_win32</game_key>
+  <protocol>lgsl</protocol>
+  <lgsl_query_name>arma3</lgsl_query_name>
+  <installer>steamcmd</installer>
+  <game_name>Arma 3</game_name>
+  <server_exec_name>arma3server.exe</server_exec_name>
+  <cli_template>-netlog -config=server.cfg -cfg=basic.cfg -profiles=profile %MEMORY% %PORT% %PLAYERS%</cli_template>
+  <cli_params>
+   <cli_param cli_string="-port=" id="PORT"/>
+   <cli_param cli_string="-maxplayers=" id="PLAYERS"/>
+  </cli_params>
+  <console_log>profile/server_console.log</console_log>
+  <max_user_amount>64</max_user_amount>
+  <control_protocol>rcon2</control_protocol>
+  <mods>
+   <mod key='Arma3'>
+    <name>none</name>
+    <installer_name>233780</installer_name>
+   </mod>
+  </mods>
+  <replace_texts>
+   <text key="home_name">
+    <default>(hostname\s*=\s*")(.*)(";)</default>
+    <var>hostname = "%key%";</var>
+    <filepath>server.cfg</filepath>
+    <options>key-regex</options>
+   </text>
+   <text key="max_players">
+    <default>(maxPlayers\s*=\s*)(.*)(;)</default>
+    <var>maxPlayers = %key%;</var>
+    <filepath>server.cfg</filepath>
+    <options>key-regex</options>
+   </text>
+   <text key="control_password">
+    <default>(passwordAdmin\s*=\s*")(.*)(";)</default>
+    <var>passwordAdmin = "%key%";</var>
+    <filepath>server.cfg</filepath>
+    <options>key-regex</options>
+   </text>
+  </replace_texts>
+  <server_params>
+   <param id="MEMORY" key="-maxMem=" type="text">
+    <option>ns</option>
+    <default>1024</default>
+    <caption>Max RAM allocated</caption>
+    <desc>Maximum usable memory in MB, for example: 1024</desc>
+   </param>
+  </server_params>
+</game_config>

+ 6 - 1
modules/gamemanager/cfg_text_replace.php

@@ -125,7 +125,7 @@ foreach($file_replacements as $filepath => $replacements)
 		if($param_enc != $file_enc)
 			$file_content = mb_convert_encoding($file_content, $param_enc, $file_enc);
 			
-		if( !in_array( $options, array("tags","tagValueByName","sc","sqc","key-regex") ) )
+		if( !in_array( $options, array("tags","tagValueByName","sc","sqc") ) )
 		{
 			$match_found = preg_match("/$default/m", $file_content);
 			if($var == "")
@@ -155,6 +155,11 @@ foreach($file_replacements as $filepath => $replacements)
 				$file_content .= "\n$var\"$info_param\"";
 			elseif ($options == "sq")//separated & quoted
 				$file_content .= "\n$var \"$info_param\"";
+			elseif ($options == "key-regex")
+			{
+				$var = str_replace("%key%", $info_param, $var);
+				$file_content .= "\n$var";
+			}
 			elseif ($options == "")
 				$file_content .= "\n$var$info_param";
 		}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3156 - 3164
protocol/lgsl/lgsl_protocol.php


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است