Add proper maps and configs

This commit is contained in:
a-bad-dev 2025-12-08 22:30:34 -04:00
commit a53c37e2f2
7 changed files with 38 additions and 7 deletions

View file

@ -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

View file

@ -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

Binary file not shown.

View file

@ -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

Binary file not shown.

View file

@ -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

Binary file not shown.