summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2017-03-23 00:18:59 +0000
committerparamat <mat.gregory@virginmedia.com>2017-03-27 03:18:09 +0100
commitec0c4d33db9e0b7b3e541757e34c04c08c3b48c9 (patch)
treea1d31e46b60906c71c9aa29a0588d6016b63f6d3 /builtin
parent09f2cd0264993e7b81d84d77bfc670b40ef82444 (diff)
downloadminetest-ec0c4d33db9e0b7b3e541757e34c04c08c3b48c9.tar.gz
minetest-ec0c4d33db9e0b7b3e541757e34c04c08c3b48c9.tar.bz2
minetest-ec0c4d33db9e0b7b3e541757e34c04c08c3b48c9.zip
Map generation limit: Make per-world
The setting limits map generation but affects nothing else. Add 'mapgen_limit' to global mapgen parameters. Move 'blockpos_over_mapgen_limit()' to the only place it is called from: map.cpp. Allow teleportation to any part of the world even if over the set mapgen limit. Simplify the reading of this limit in mgvalleys. Remove the 'map_generation_limit' setting.
Diffstat (limited to 'builtin')
-rw-r--r--builtin/game/chatcommands.lua2
-rw-r--r--builtin/settingtypes.txt11
2 files changed, 5 insertions, 8 deletions
diff --git a/builtin/game/chatcommands.lua b/builtin/game/chatcommands.lua
index b4fa4f828..16f5f3be9 100644
--- a/builtin/game/chatcommands.lua
+++ b/builtin/game/chatcommands.lua
@@ -303,7 +303,7 @@ core.register_chatcommand("teleport", {
p.y = tonumber(p.y)
p.z = tonumber(p.z)
if p.x and p.y and p.z then
- local lm = tonumber(minetest.setting_get("map_generation_limit") or 31000)
+ local lm = 31000
if p.x < -lm or p.x > lm or p.y < -lm or p.y > lm or p.z < -lm or p.z > lm then
return false, "Cannot teleport out of map bounds!"
end
diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt
index e63697f61..c9e0f7b87 100644
--- a/builtin/settingtypes.txt
+++ b/builtin/settingtypes.txt
@@ -893,13 +893,10 @@ water_level (Water level) int 1
# From how far blocks are generated for clients, stated in mapblocks (16 nodes).
max_block_generate_distance (Max block generate distance) int 6
-# Where the map generator stops.
-# Please note:
-# - Limited to 31000 (setting above has no effect)
-# - The map generator works in groups of 80x80x80 nodes (5x5x5 MapBlocks).
-# - Those groups have an offset of -32, -32 nodes from the origin.
-# - Only groups which are within the map_generation_limit are generated
-map_generation_limit (Map generation limit) int 31000 0 31000
+# Limit of map generation, in nodes, in all 6 directions from (0, 0, 0).
+# Only mapchunks completely within the mapgen limit are generated.
+# Value is stored per-world.
+mapgen_limit (Map generation limit) int 31000 0 31000
# Global map generation attributes.
# In Mapgen v6 the 'decorations' flag controls all decorations except trees