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

Overridden mapgen settings ignored in settings.lua #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

srutzky
Copy link

@srutzky srutzky commented Feb 6, 2021

Use minetest.get_mapgen_setting() instead of minetest.settings:get() when getting: mapgen_limit, chunksize, and water_level.

The issue is that minetest.settings:get() only gets values from the minetest.conf file, but these 3 settings are mapgen settings and can be overridden in the per-world map_meta.txt file. The minetest.get_mapgen_setting() function checks both and returns the same value that's used by the mapgen. For example:

minetest.conf has:

  • mapgen_limit = 31000
  • water_level = 1

map_meta.txt (for one particular world) has:

  • mapgen_limit = 5000
  • water_level = 100

minetest.settings:get("mapgen_limit") returns: 31000
minetest.get_mapgen_setting("mapgen_limit") returns: 5000 (and is the actual value used by mapgen)

Take care,
Solomon...
https://SqlQuantumLift.com/
https://SqlQuantumLeap.com/
https://SQLsharp.com/

Use `minetest.get_mapgen_setting()` instead of `minetest.settings:get()` when getting: mapgen_limit, chunksize, and water_level.

The issue is that `minetest.settings:get()` only gets values from the minetest.conf file, but these 3 settings are mapgen settings and can be overriden in the per-world map_meta.txt file. The `minetest.get_mapgen_setting()` function checks both and returns the same value that's used by the mapgen. For example:

minetest.conf has:
* mapgen_limit = 31000
* water_level = 1

map_meta.txt (for one particular world) has:
* mapgen_limit = 5000
* water_level = 70

`minetest.settings:get("mapgen_limit")` returns: 31000
`minetest.get_mapgen_setting("mapgen_limit")` returns: 5000 (and is the actual value used by mapgen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant