mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
Add eslint (#364)
* Add initial prettier and eslint configs * Modify prettierrc * Run eslint on everything * Actually remove prettier * Fix some eslints * Remove label in gs2 * Update CHANGELOG * Update eslintrc to specify es2021
This commit is contained in:
parent
bff9507189
commit
93a9095d99
67 changed files with 6960 additions and 5211 deletions
|
|
@ -1,45 +1,45 @@
|
|||
import gamespy3 from './gamespy3.js';
|
||||
|
||||
export default class ut3 extends gamespy3 {
|
||||
async run(state) {
|
||||
await super.run(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
|
||||
});
|
||||
|
||||
const split = (a) => {
|
||||
let s = a.split('\x1c');
|
||||
s = s.filter((e) => { return e });
|
||||
return s;
|
||||
};
|
||||
if('custom_mutators' in state.raw) state.raw['custom_mutators'] = split(state.raw['custom_mutators']);
|
||||
if('stock_mutators' in state.raw) state.raw['stock_mutators'] = split(state.raw['stock_mutators']);
|
||||
if('map' in state.raw) state.map = state.raw.map;
|
||||
}
|
||||
}
|
||||
import gamespy3 from './gamespy3.js'
|
||||
|
||||
export default class ut3 extends gamespy3 {
|
||||
async run (state) {
|
||||
await super.run(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
|
||||
})
|
||||
|
||||
const split = (a) => {
|
||||
let s = a.split('\x1c')
|
||||
s = s.filter((e) => { return e })
|
||||
return s
|
||||
}
|
||||
if ('custom_mutators' in state.raw) state.raw.custom_mutators = split(state.raw.custom_mutators)
|
||||
if ('stock_mutators' in state.raw) state.raw.stock_mutators = split(state.raw.stock_mutators)
|
||||
if ('map' in state.raw) state.map = state.raw.map
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue