2023-11-12 12:14:43 +01:00
|
|
|
export class Player {
|
|
|
|
name = ''
|
|
|
|
raw = {}
|
|
|
|
|
|
|
|
constructor (data) {
|
|
|
|
if (typeof data === 'string') {
|
|
|
|
this.name = data
|
|
|
|
} else {
|
|
|
|
const { name, ...raw } = data
|
|
|
|
if (name) this.name = name
|
|
|
|
if (raw) this.raw = raw
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Players extends Array {
|
|
|
|
push (data) {
|
|
|
|
super.push(new Player(data))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Results {
|
|
|
|
name = ''
|
|
|
|
map = ''
|
|
|
|
password = false
|
|
|
|
|
|
|
|
raw = {}
|
2024-02-24 19:46:40 +01:00
|
|
|
version = ''
|
2023-11-12 12:14:43 +01:00
|
|
|
|
|
|
|
maxplayers = 0
|
2024-01-16 23:23:29 +01:00
|
|
|
numplayers = 0
|
2023-11-12 12:14:43 +01:00
|
|
|
players = new Players()
|
|
|
|
bots = new Players()
|
2024-01-16 23:20:56 +01:00
|
|
|
|
|
|
|
queryPort = 0
|
2023-11-12 12:14:43 +01:00
|
|
|
}
|