more games with version
This commit is contained in:
parent
69c94cbbad
commit
c367771801
|
@ -24,6 +24,7 @@ export default class doom3 extends Core {
|
|||
let reader = this.reader(body)
|
||||
const protoVersion = reader.uint(4)
|
||||
state.raw.protocolVersion = (protoVersion >> 16) + '.' + (protoVersion & 0xffff)
|
||||
state.version = state.raw.protocolVersion
|
||||
|
||||
// some doom implementations send us a packet size here, some don't (etqw does this)
|
||||
// we can tell if this is a packet size, because the third and fourth byte will be 0 (no packets are that massive)
|
||||
|
|
|
@ -17,5 +17,6 @@ export default class eco extends Core {
|
|||
state.gamePort = serverInfo.GamePort
|
||||
state.players = serverInfo.OnlinePlayersNames?.map(name => ({ name, raw: {} })) || []
|
||||
state.raw = serverInfo
|
||||
state.version = state.raw.Version
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,5 +19,6 @@ export default class factorio extends Core {
|
|||
state.players = players.map(player => ({ name: player, raw: {} }))
|
||||
|
||||
state.raw = serverInfo
|
||||
state.version = state.raw.application_version.game_version + '.' + state.raw.application_version.build_version
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue