-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Farming Simulator 2022/2019 #531
Conversation
I am not able to start a Farming Simulator 17 Server. It will likely work, but I cannot test it. |
To add support for a game we need to make sure queries work on them, so FS17 could be added later.
So as the changes in this PR, we would need to also test FS19. |
GAMES_LIST.md
Outdated
@@ -460,6 +461,10 @@ Conan Exiles never responds to player query. | |||
### <a name="minecraft">Minecraft | |||
Many Minecraft servers do not respond with players data. | |||
|
|||
### <a name='farmingsimulator'>Farming Simulator | |||
Farming Simulator 2022 servers need a token (reffered as code in the game). It can be obtained at your server's web interface (http://ip:port/settings.html). It can be passed to GameDig with the additional option: `token` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Farming Simulator 2022 servers need a token
, so, only FS22 or both? as this note is added on both of them.
lib/QueryRunner.js
Outdated
@@ -102,7 +102,7 @@ export default class QueryRunner { | |||
errors.push(e) | |||
} | |||
} | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line doesnt need to be changed.
lib/games.js
Outdated
@@ -1186,6 +1186,22 @@ export const games = { | |||
protocol: 'ase' | |||
} | |||
}, | |||
farmingsimulator2019: { | |||
name: 'Farming Simulator 2019', | |||
release_year: 2021, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be 2018.
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). |
I tested it with Farming Simulator 19 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Privately validated that the queries work.
Please also run eslint (:
protocols/farmingsimulator.js
Outdated
} | ||
}); | ||
|
||
state.mods = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mods
is not a stabilized field, so it should be under state.raw
.
GAMES_LIST.md
Outdated
@@ -122,6 +122,8 @@ | |||
| factorio | Factorio | | | |||
| farcry | Far Cry | | | |||
| farcry2 | Far Cry 2 | | | |||
| farmingsimulator2019 | Farming Simulator 2019 | [Notes](#farmingsimulator) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the game should be Farming Simulator 19
, same for 22.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the naming of the keys also be changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Requesting the name change as seeing on their website that they call the game "Farming Simulator 22", not "Farming Simulator 2022")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(same goes for the names in the games.js
file).
@Vito0912 Sorry, but still a conflict to resolve before merging... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to merge, but please also run eslint
of the protocol file.
@Vito0912 Do we have a |
@podrivo Yeah, I am pretty sure it does have a version in it's response. Can't remember that there was a top level |
No sweat! |
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. |
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.