gamedig / node-gamedig

Query game servers and not only! Node.JS/Deno/Bun or Bash (via the CLI).
https://www.npmjs.com/package/gamedig
MIT License
606 stars 148 forks source link

Add Farming Simulator 2022/2019 #531

Closed Vito0912 closed 7 months ago

Vito0912 commented 8 months ago

Added Farming Simulator 2022. It may also work with older versions, although I currently only own Farming Simulator 19 and 17. I will need to investigate whether I can set up a server for them. As of now, this has only been tested with a Farming Simulator 2022 server.

Note: Server queries are not possible. To obtain the necessary token, you must own or have permission to access the web interface.

I have not tested whether the token works when used in code; my testing was limited to using it with the command line.

Vito0912 commented 8 months ago

I am not able to start a Farming Simulator 17 Server. It will likely work, but I cannot test it.

CosminPerRam commented 8 months ago

To add support for a game we need to make sure queries work on them, so FS17 could be added later.

As of now, this has only been tested with a Farming Simulator 2022 server.

So as the changes in this PR, we would need to also test FS19.

CosminPerRam commented 8 months ago

As the queries require tokens to be made, you think you could join the Discord server or message me on Discord regarding providing me the needed ones? As I dont own the game I cannot really verify that this PR is valid (not that I don't trust you, but its just to make sure all is good).

Vito0912 commented 8 months ago

So as the changes in this PR, we would need to also test FS19.

I tested it with Farming Simulator 19

podrivo commented 7 months ago

@Vito0912 Sorry, but still a conflict to resolve before merging...

podrivo commented 7 months ago

@Vito0912 Do we have a version field in the query response? Wondering if we should add a version top level for Farming Simulator as well.

Vito0912 commented 7 months ago

@podrivo Yeah, I am pretty sure it does have a version in it's response. Can't remember that there was a top level version. I will add it as soon as I have time.

podrivo commented 7 months ago

No sweat! If you could add a query response at the original post, I'll make sure to add it in the other PR (https://github.com/gamedig/node-gamedig/pull/532).

Vito0912 commented 7 months ago

I've updated the file to adhere to the ESLint standards and have also added the version information to raw.version. I'm uncertain as to why it triggered another merge of the branch. I hope this won't cause any issues.