Skip to content
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

Change: rename fields in the API to more match what it does #36

Merged
merged 1 commit into from Jul 10, 2021

Conversation

TrueBrain
Copy link
Member

A while ago we renamed a bunch of variables in the OpenTTD client,
as this old list of names wasn't always that obvious. Now we apply
the same change to the API too.

This is also needed to make sure the master-server is talking
the same language as the new upcoming game-coordinator.

This is what is changing:

server_name -> name (we already know it is a server ..)
server_revision -> openttd_version
map_set -> map_type
grfs -> newgrfs
dedicated -> is_dedicated
language -> removed (was always ALL for 1.11)
map_name -> removed (was always "" for 1.11)
num_grfs -> removed (just count the entries in newgrfs, no need to tell you twice)

I did ponder about adding an API versioning, and clue the old fields back in .. but I realised that https://github.com/OpenTTD/master-server-web is most likely the only consumer of the API, so it felt like a lot of effort for zero gain.

A while ago we renamed a bunch of variables in the OpenTTD client,
as this old list of names wasn't always that obvious. Now we apply
the same change to the API too.

This is also needed to make sure the master-server is talking
the same language as the new upcoming game-coordinator.
@TrueBrain TrueBrain added the changelog: breaking change This Pull Request should be marked as "Breaking Change" in the changelog label Jul 10, 2021
@TrueBrain TrueBrain merged commit 6539aea into OpenTTD:main Jul 10, 2021
@TrueBrain TrueBrain deleted the rename-fields branch July 10, 2021 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: breaking change This Pull Request should be marked as "Breaking Change" in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant