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

Merge pull request #160 from rocco27/master

XML files updates and missing a string from lang
OwN-3m-All 9 лет назад
Родитель
Сommit
e37f0cfc54

+ 1 - 0
lang/English/modules/server.php

@@ -134,4 +134,5 @@ define('firewall_status', "Firewall status");
 define('save_firewall_settings', "Save firewall settings");
 define('reset_firewall', "Reset Firewall");
 define('firewall_settings', "Firewall Settings");
+define('default_public_ip', "Default Public IP");
 ?>

+ 4 - 4
modules/config_games/server_configs/arkse_linux64.xml

@@ -145,10 +145,10 @@
       else
         echo "File $maplist not found."
         echo "Generating new maplist file in $maplist!"
-        touch maplist.txt
-        echo ScorchedEarth_P> maplist.txt
-        echo TheCenter>> maplist.txt
-        echo TheIsland>> maplist.txt
+        touch $maplist
+        echo ScorchedEarth_P> $maplist
+        echo TheCenter>> $maplist
+        echo TheIsland>> $maplist
     fi
     if [ -f "Engine/Binaries/ThirdParty/SteamCMD/Linux/linux32/steamcmd" ]
       then

+ 4 - 4
modules/config_games/server_configs/arkse_win64.xml

@@ -145,10 +145,10 @@
       else
         echo "File $maplist not found."
         echo "Generating new maplist file in $maplist!"
-        touch maplist.txt
-        echo ScorchedEarth_P> maplist.txt
-        echo TheCenter>> maplist.txt
-        echo TheIsland>> maplist.txt
+        touch $maplist
+        echo ScorchedEarth_P> $maplist
+        echo TheCenter>> $maplist
+        echo TheIsland>> $maplist
     fi
   </post_install>
 </game_config>

+ 0 - 27
modules/config_games/server_configs/openttd.xml

@@ -1,27 +0,0 @@
-<game_config>
-  <game_key>openttd_linux32</game_key>
-  <protocol>lgsl</protocol>
-  <lgsl_query_name>openttd</lgsl_query_name>
-  <game_name>OpenTTD</game_name>
-  <server_exec_name>openttd</server_exec_name>
-  <cli_template>-D %IP%:%PORT% %SAVEGAME%</cli_template>
-  <cli_params>
-    <cli_param id="IP" cli_string="" />
-    <cli_param id="PORT" cli_string="" />
-  </cli_params>
-  <mods>
-    <mod key="default">
-      <name>none</name>
-    </mod>
-  </mods>
-  <server_params>
-   <param id='SAVEGAME' key='-g' type='select'>
-    <option value=''>No</option>
-    <option value='save/autosave/ogp.sav'>Yes</option>
-    <desc>Should the last game be loaded</desc>
-   </param>
-  </server_params>
-  <pre_start>
-   find save/autosave -type f | sort -r | head -n1 | xargs -I &apos;{}&apos; mv -f &apos;{}&apos; save/autosave/ogp.sav
-  </pre_start>
-</game_config>

+ 45 - 0
modules/config_games/server_configs/openttd_linux64.xml

@@ -0,0 +1,45 @@
+<game_config>
+  <game_key>openttd_linux64</game_key>
+  <protocol>lgsl</protocol>
+  <lgsl_query_name>openttd</lgsl_query_name>
+  <game_name>OpenTTD</game_name>
+  <server_exec_name>openttd</server_exec_name>
+  <cli_template>-D %IP%:%PORT% %SAVEGAME%</cli_template>
+  <cli_params>
+    <cli_param id="IP" cli_string="" />
+    <cli_param id="PORT" cli_string="" />
+  </cli_params>
+  <max_user_amount>255</max_user_amount>
+  <mods>
+    <mod key="default">
+      <name>None</name>
+    </mod>
+  </mods>
+  <replace_texts>
+    <text key="home_name">
+      <default>server_name=.*</default>
+      <var>server_name=</var>
+      <filepath>openttd.cfg</filepath>
+    </text>
+    <text key="control_password">
+      <default>rcon_password=.*</default>
+      <var>rcon_password=</var>
+      <filepath>openttd.cfg</filepath>
+    </text>
+    <text key="max_players">
+      <default>max_clients=.*</default>
+      <var>max_clients=</var>
+      <filepath>openttd.cfg</filepath>
+    </text>
+  </replace_texts>
+  <server_params>
+    <param key="-g" type="select" id="SAVEGAME">
+      <option value="">No</option>
+      <option value="save/autosave/latest_autosave.sav">Yes</option>
+      <desc>If no, starts a new game. If yes, loads the latest autosaved game.</desc>
+    </param>
+  </server_params>
+  <pre_start>
+    find save/autosave -type f | sort -r | head -n1 | xargs -I &apos;{}&apos; cp -f &apos;{}&apos; save/autosave/latest_autosave.sav
+  </pre_start>
+</game_config>

+ 45 - 0
modules/config_games/server_configs/openttd_win64.xml

@@ -0,0 +1,45 @@
+<game_config>
+  <game_key>openttd_win64</game_key>
+  <protocol>lgsl</protocol>
+  <lgsl_query_name>openttd</lgsl_query_name>
+  <game_name>OpenTTD</game_name>
+  <server_exec_name>openttd.exe</server_exec_name>
+  <cli_template>-D %IP%:%PORT% %SAVEGAME%</cli_template>
+  <cli_params>
+    <cli_param id="IP" cli_string="" />
+    <cli_param id="PORT" cli_string="" />
+  </cli_params>
+  <max_user_amount>255</max_user_amount>
+  <mods>
+    <mod key="default">
+      <name>None</name>
+    </mod>
+  </mods>
+  <replace_texts>
+    <text key="home_name">
+      <default>server_name=.*</default>
+      <var>server_name=</var>
+      <filepath>openttd.cfg</filepath>
+    </text>
+    <text key="control_password">
+      <default>rcon_password=.*</default>
+      <var>rcon_password=</var>
+      <filepath>openttd.cfg</filepath>
+    </text>
+    <text key="max_players">
+      <default>max_clients=.*</default>
+      <var>max_clients=</var>
+      <filepath>openttd.cfg</filepath>
+    </text>
+  </replace_texts>
+  <server_params>
+    <param key="-g" type="select" id="SAVEGAME">
+      <option value="">No</option>
+      <option value="save/autosave/latest_autosave.sav">Yes</option>
+      <desc>If no, starts a new game. If yes, loads the latest autosaved game.</desc>
+    </param>
+  </server_params>
+  <pre_start>
+    find save/autosave -type f | sort -r | head -n1 | xargs -I &apos;{}&apos; cp -f &apos;{}&apos; save/autosave/latest_autosave.sav
+  </pre_start>
+</game_config>

+ 81 - 0
modules/config_games/server_configs/squad_linux64.xml

@@ -0,0 +1,81 @@
+<game_config>
+  <game_key>squad_linux64</game_key>
+  <protocol>lgsl</protocol>
+  <lgsl_query_name>squad</lgsl_query_name>
+  <installer>steamcmd</installer>
+  <game_name>Squad</game_name>
+  <server_exec_name>SquadServer.sh</server_exec_name>
+  <cli_template>%IP% %PORT% %QUERY_PORT% %PLAYERS% %TICKRATE% %MAP% -log</cli_template>
+  <cli_params>
+    <cli_param id="IP" cli_string="MultiHome=" />
+    <cli_param id="PORT" cli_string="Port=" />
+    <cli_param id="PLAYERS" cli_string="FIXEDMAXPLAYERS=" />
+  </cli_params>
+  <reserve_ports>
+    <port type="add" id="QUERY_PORT" cli_string="QueryPort=">19378</port>
+  </reserve_ports>
+  <console_log>Squad/Saved/Logs/Squad.log</console_log>
+  <max_user_amount>80</max_user_amount>
+  <mods>
+    <mod key="squad">
+      <name>None</name>
+      <installer_name>403240</installer_name>
+      <installer_login>anonymous</installer_login>
+    </mod>
+  </mods>
+  <replace_texts>
+    <text key="home_name">
+      <default>ServerName=.*</default>
+      <var>ServerName=</var>
+      <filepath>Squad/ServerConfig/Server.cfg</filepath>
+      <options></options>
+    </text>
+    <text key="max_players">
+      <default>MaxPlayers=.*</default>
+      <var>MaxPlayers=</var>
+      <filepath>Squad/ServerConfig/Server.cfg</filepath>
+      <options></options>
+    </text>
+    <text key="ip">
+      <default>Ip=.*</default>
+      <var>Ip=</var>
+      <filepath>Squad/ServerConfig/Rcon.cfg</filepath>
+      <options></options>
+    </text>
+    <text key="control_password">
+      <default>Password=.*</default>
+      <var>Password=</var>
+      <filepath>Squad/ServerConfig/Rcon.cfg</filepath>
+      <options></options>
+    </text>
+  </replace_texts>
+  <server_params>
+  <param key="FIXEDMAXTICKRATE=" type="text" id="TICKRATE">
+      <default>50</default>
+      <caption></caption>
+      <desc>MAX server tickrate.</desc>
+      <options>ns</options>
+    </param>
+  <param key="RANDOM=" type="select" id="MAP">
+      <option value="ALWAYS">Always</option>
+      <option value="FIRST">First</option>
+      <option value="NONE">None</option>
+      <caption></caption>
+      <desc>Randomize map rotation.</desc>
+      <options>ns</options>
+    </param>
+  </server_params>
+  <custom_fields>
+    <field key="RCON Port" type="text">
+      <default>Port=.*</default>
+      <default_value>21114</default_value>
+      <var>Port=</var>
+      <filepath>Squad/ServerConfig/Rcon.cfg</filepath>
+      <options></options>
+      <desc></desc>
+    </field>
+  </custom_fields>
+  <post_install>
+    sed -i '4s/IP/Ip/g' Squad/ServerConfig/Rcon.cfg
+  </post_install>
+</game_config>