1: | <?php |
2: | /** |
3: | * This file is part of GameQ. |
4: | * |
5: | * GameQ is free software; you can redistribute it and/or modify |
6: | * it under the terms of the GNU Lesser General Public License as published by |
7: | * the Free Software Foundation; either version 3 of the License, or |
8: | * (at your option) any later version. |
9: | * |
10: | * GameQ is distributed in the hope that it will be useful, |
11: | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12: | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13: | * GNU Lesser General Public License for more details. |
14: | * |
15: | * You should have received a copy of the GNU Lesser General Public License |
16: | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17: | */ |
18: | |
19: | namespace GameQ\Protocols; |
20: | |
21: | /** |
22: | * Class Battalion 1944 |
23: | * |
24: | * @package GameQ\Protocols |
25: | * @author TacTicToe66 <https://github.com/TacTicToe66> |
26: | */ |
27: | class Batt1944 extends Source |
28: | { |
29: | |
30: | /** |
31: | * String name of this protocol class |
32: | * |
33: | * @type string |
34: | */ |
35: | protected $name = 'batt1944'; |
36: | |
37: | /** |
38: | * Longer string name of this protocol class |
39: | * |
40: | * @type string |
41: | */ |
42: | protected $name_long = "Battalion 1944"; |
43: | |
44: | /** |
45: | * query_port = client_port + 3 |
46: | * |
47: | * @type int |
48: | */ |
49: | protected $port_diff = 3; |
50: | |
51: | /** |
52: | * Normalize main fields |
53: | * |
54: | * @var array |
55: | */ |
56: | protected $normalize = [ |
57: | // General |
58: | 'general' => [ |
59: | // target => source |
60: | 'gametype' => 'bat_gamemode_s', |
61: | 'hostname' => 'bat_name_s', |
62: | 'mapname' => 'bat_map_s', |
63: | 'maxplayers' => 'bat_max_players_i', |
64: | 'numplayers' => 'bat_player_count_s', |
65: | 'password' => 'bat_has_password_s', |
66: | ], |
67: | ]; |
68: | } |
69: |