mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-03 13:01:04 +01:00
c82554ad1a
Organize files Rewrite readme for new game IDs and command line Add command line access Replace some dependencies that required binaries with simpler alternatives Switch gbxremote back to upstream, Closes #2 Moved simple aliases into an alias file, rather than seperate files for each Patched nearly every protocol variant with tons of bug fixes Re-tested every combination of server and protocol types except nadeo Added alternative minecraft query check (minecraftping) Fixed mutant factions query Fixed valve gold not working at all Stripped colors more reliably from protocols that support colors Added a couple more fields to ut2004 and killing floor and more that I probably forgot. This shouldn't break compatibility too bad -- at the most, some game IDs may have changed.
52 lines
1.4 KiB
JavaScript
52 lines
1.4 KiB
JavaScript
module.exports = require('./protocols/gamespy3').extend({
|
|
init: function() {
|
|
this._super();
|
|
this.pretty = 'Unreal Tournament 3';
|
|
this.options.port = 6500;
|
|
},
|
|
finalizeState: function(state) {
|
|
this._super(state);
|
|
|
|
this.translate(state.raw,{
|
|
'mapname': false,
|
|
'p1073741825': 'map',
|
|
'p1073741826': 'gametype',
|
|
'p1073741827': 'servername',
|
|
'p1073741828': 'custom_mutators',
|
|
'gamemode': 'joininprogress',
|
|
's32779': 'gamemode',
|
|
's0': 'bot_skill',
|
|
's6': 'pure_server',
|
|
's7': 'password',
|
|
's8': 'vs_bots',
|
|
's10': 'force_respawn',
|
|
'p268435704': 'frag_limit',
|
|
'p268435705': 'time_limit',
|
|
'p268435703': 'numbots',
|
|
'p268435717': 'stock_mutators',
|
|
'p1073741829': 'stock_mutators',
|
|
's1': false,
|
|
's9': false,
|
|
's11': false,
|
|
's12': false,
|
|
's13': false,
|
|
's14': false,
|
|
'p268435706': false,
|
|
'p268435968': false,
|
|
'p268435969': false
|
|
});
|
|
|
|
function split(a) {
|
|
var s = a.split('\x1c');
|
|
s = s.filter(function(e) { return e });
|
|
return s;
|
|
}
|
|
if('custom_mutators' in state) state['custom_mutators'] = split(state['custom_mutators']);
|
|
if('stock_mutators' in state) state['stock_mutators'] = split(state['stock_mutators']);
|
|
|
|
if('map' in state.raw) state.map = state.raw.map;
|
|
if('password' in state.raw) state.password = state.raw.password;
|
|
if('servername' in state.raw) state.name = state.raw.servername;
|
|
}
|
|
});
|