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 custom map pool support for dedicated servers #21179
Conversation
This takes a list of map UIDs which may be locally installed or hosted on the resource center. If any maps aren't found, startup will be delayed by up to 10 seconds while it attempts to query the resource center.
Maps that aren't installed are queried from the resource center.
// The default null means "no map restriction" while an empty set means "all maps restricted" | ||
public HashSet<string> ServerMapPool = null; | ||
|
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.
We really need to have a better system to store stuff (with proper lifecycle), now we are storing it here because its convenient.
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 system bugs out if you include maps from other mods in the map pool. Let's say in RA I include https://resource.openra.net/maps/55010/ then it allows me to install that TD map. Afterwards after I enter map chooser the map isn't installed, and when I exit it wants me to install again
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.
Otherwise LGTM
To fix that, we'd have to enforce that maps must be available and queryable at server-start time (right now, it only requires that they are available and queryable at player-selects-map time). This would mean that servers may start crashing (no available maps) on startup if the RC is offline. Are we happy to make that tradeoff, compared to just telling server operators to not do that? |
What about instead just not allowing clients to download the maps & not showing them in map chooser |
It could also log errors for the server provider instead of crashing |
It does log errors; the issue is that if we want to validate the map hashes server-side then they need to be available, and if none are available the server won't have any valid maps to choose from. Handling this client-side by making |
Updated. |
#19323 resurrected and updated for translations etc: