| 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: | * Serious Sam Protocol Class |
| 23: | * |
| 24: | * @author ZCaliptium <zcaliptium@gmail.com> |
| 25: | */ |
| 26: | class Serioussam extends Gamespy |
| 27: | { |
| 28: | /** |
| 29: | * String name of this protocol class |
| 30: | * |
| 31: | * @var string |
| 32: | */ |
| 33: | protected $name = 'serioussam'; |
| 34: | |
| 35: | /** |
| 36: | * Longer string name of this protocol class |
| 37: | * |
| 38: | * @var string |
| 39: | */ |
| 40: | protected $name_long = "Serious Sam"; |
| 41: | |
| 42: | /** |
| 43: | * query_port = client_port + 1 |
| 44: | * |
| 45: | * @var int |
| 46: | */ |
| 47: | protected $port_diff = 1; |
| 48: | |
| 49: | /** |
| 50: | * Normalize settings for this protocol |
| 51: | * |
| 52: | * @var array |
| 53: | */ |
| 54: | protected $normalize = [ |
| 55: | // General |
| 56: | 'general' => [ |
| 57: | // target => source |
| 58: | 'dedicated' => 'dedicated', |
| 59: | 'gametype' => 'gametype', |
| 60: | 'hostname' => 'hostname', |
| 61: | 'mapname' => 'mapname', |
| 62: | 'maxplayers' => 'maxplayers', |
| 63: | 'mod' => 'activemod', |
| 64: | 'numplayers' => 'numplayers', |
| 65: | 'password' => 'password', |
| 66: | ], |
| 67: | // Individual |
| 68: | 'player' => [ |
| 69: | 'name' => 'player', |
| 70: | 'ping' => 'ping', |
| 71: | 'score' => 'frags', |
| 72: | ], |
| 73: | ]; |
| 74: | } |
| 75: |