diff --git a/mods/maps/init.lua b/mods/maps/init.lua index 4dcbccd..ea62450 100644 --- a/mods/maps/init.lua +++ b/mods/maps/init.lua @@ -2,6 +2,13 @@ function place_map(map) local map_path = core.get_modpath("maps") .. "/maps/" core.place_schematic({x=0, y=0, z=0}, map_path .. map .. "/map.mts", 0, nil, false) local map_data = dofile(map_path .. map .. "/map.lua") + + if map_data.spawn_x == nil or map_data.spawn_y == nil or map_data.spawn_z == nil do -- set a default spawnpoint if not set + map_data.spawn_x = map_data.size_x / 2 + map_data.spawn_y = map_data.barrier_level + 1 + map_data.spawn_z = map_data.size_z / 2 + end + return map_data end diff --git a/mods/maps/maps/forest/map.lua b/mods/maps/maps/forest/map.lua index dc9dd3e..7cfd9be 100644 --- a/mods/maps/maps/forest/map.lua +++ b/mods/maps/maps/forest/map.lua @@ -1,13 +1,13 @@ local map_data = { - size_x = 0, - size_y = 0, -- <- currently not used for anything - size_z = 0, + size_x = 155, + size_y = 53, + size_z = 147, - barrier_level = 0, -- <- Y level of the barrier + barrier_level = 49, -- <- Y level of the barrier - spawn_x = 0, - spawn_y = 0, - spawn_z = 0 + spawn_x = nil, + spawn_y = nil, + spawn_z = nil } return map_data diff --git a/mods/maps/maps/forest/map.mts b/mods/maps/maps/forest/map.mts index ffe3954..9f52a1a 100644 Binary files a/mods/maps/maps/forest/map.mts and b/mods/maps/maps/forest/map.mts differ diff --git a/mods/maps/maps/pine/map.lua b/mods/maps/maps/pine/map.lua index 8b13789..a124292 100644 --- a/mods/maps/maps/pine/map.lua +++ b/mods/maps/maps/pine/map.lua @@ -1 +1,13 @@ +local map_data = { + size_x = 111, + size_y = 64, + size_z = 107, + + barrier_level = 60, -- <- Y level of the barrier + + spawn_x = nil, + spawn_y = nil, + spawn_z = nil +} +return map_data diff --git a/mods/maps/maps/pine/map.mts b/mods/maps/maps/pine/map.mts index 28564dc..9e6c830 100644 Binary files a/mods/maps/maps/pine/map.mts and b/mods/maps/maps/pine/map.mts differ diff --git a/mods/maps/maps/savanna/map.lua b/mods/maps/maps/savanna/map.lua index 8b13789..f3851e7 100644 --- a/mods/maps/maps/savanna/map.lua +++ b/mods/maps/maps/savanna/map.lua @@ -1 +1,13 @@ +local map_data = { + size_x = 341, + size_y = 83, + size_z = 188, + + barrier_level = 79, -- <- Y level of the barrier + + spawn_x = nil, + spawn_y = nil, + spawn_z = nil +} +return map_data diff --git a/mods/maps/maps/savanna/map.mts b/mods/maps/maps/savanna/map.mts index f3eb463..c6401b5 100644 Binary files a/mods/maps/maps/savanna/map.mts and b/mods/maps/maps/savanna/map.mts differ