Add ElDewrito support

* Add support Eldewrito

Added support for ElDewrito

* Update CHANGELOG.md

* Removed defaults and fix eof

* Update eldewrito.js
This commit is contained in:
Mokarran 2023-12-03 10:27:43 -05:00 committed by GitHub
parent 26ea510312
commit 4a79e7e6c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 0 deletions

View file

@ -10,6 +10,7 @@
* Fix `Post Scriptum` not being on the valve protocol.
* Fix `Epic` protocol's `numplayers` not being in the `raw` field.
* Added support for the Minecraft [Better Compatibility Checker](https://www.curseforge.com/minecraft/mc-mods/better-compatibility-checker) Mod.
* Halo Online (ElDewrito) - Added support (by @Sphyrna-029)
### 4.2.0
* Renamed `Counter Strike: 2D` to `CS2D` in [games.txt](games.txt) (why? see [this](https://cs2d.com/faq.php?show=misc_name#misc_name)).

View file

@ -109,6 +109,7 @@
| `drakan` | Drakan: Order of the Flame (1999) | |
| `dys` | Dystopia (2005) | [Valve Protocol](#valve) |
| `eco` | Eco (2018) | |
| `eldewrito` | Halo Online - ElDewrito (2007) | |
| `em` | Empires Mod (2008) | [Valve Protocol](#valve) |
| `empyrion` | Empyrion - Galactic Survival (2015) | [Valve Protocol](#valve) |
| `etqw` | Enemy Territory: Quake Wars (2007) | |

View file

@ -121,6 +121,7 @@ drakan|Drakan: Order of the Flame (1999)|gamespy1|port=27045,port_query_offset=1
dst|Don't Starve Together (2016)|valve|port=10999,port_query=27016
dys|Dystopia (2005)|valve|port=27015
eco|Eco (2018)|eco|port=3000,port_query_offset=1
eldewrito|Halo Online (ElDewrito)|eldewrito|port=11775
em|Empires Mod (2008)|valve|port=27015
empyrion|Empyrion - Galactic Survival (2015)|valve|port=30000,port_query_offset=1
etqw|Enemy Territory: Quake Wars (2007)|doom3|port=3074,port_query=27733

24
protocols/eldewrito.js Normal file
View file

@ -0,0 +1,24 @@
const Core = require('./core');
class Eldewrito extends Core {
async run (state) {
const json = await this.request({
url: 'http://' + this.options.address + ':' + this.options.port,
responseType: 'json'
})
for (const one of json.players) {
state.players.push({ name: one.name, team: one.team })
}
state.name = json.name
state.map = json.map
state.maxplayers = json.maxPlayers
state.connect = this.options.address + ":" + json.port
state.raw = json
}
}
module.exports = Eldewrito;