Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fallback map order fix
Was curious about when the random map order gets enabled.
After doing some investigating, it seems that originally the idea was if no
map-pools.yml
was found, then PGM should resort to using the fallback map order.Due to the way configurations are loaded, if no
map-pools.yml
is provided the one located in the resources directory is read instead. So it's not currently possible to delete themap-pools.yml
as a default one will be used, similar to starting a PGM server for the first time and receiving the default maps.An alternative method would be to set the existing
map-pools.yml
contents as follows:With no defined pools, ideally PGM should recognize this and fallback to the random map order. Though due to some unsafe calls to the
activeMapPool
, this results in several NPEs and PGM not being able to enable.This PR resolves that issue by ensuring the calls are safe and the fallback does in fact work 🙂
Let me know if there's any suggestions or feedback 👍
Signed-off-by: applenick applenick@users.noreply.github.com