mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-13 05:26:05 +00:00
Dehardcode maps (currently not working)
maps need work and proper configs
This commit is contained in:
parent
404b664617
commit
896cdc651f
10 changed files with 37 additions and 12 deletions
15
mods/maps/init.lua
Normal file
15
mods/maps/init.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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)
|
||||
dofile(map_path .. map .. "/map.lua")
|
||||
return map_data
|
||||
end
|
||||
|
||||
function remove_barrier(x, y, z)
|
||||
for node_x = 1, x do
|
||||
for node_z = 1, z do
|
||||
core.set_node({x=x, y=y, z=z}, {name = "air"})
|
||||
end
|
||||
end
|
||||
return ""
|
||||
end
|
||||
11
mods/maps/maps/forest/map.lua
Normal file
11
mods/maps/maps/forest/map.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
local map_data = {
|
||||
size_x = 0,
|
||||
size_y = 0, -- <- currently not used for anything
|
||||
size_z = 0,
|
||||
|
||||
barrier_level = 0, -- <- Y level of the barrier
|
||||
|
||||
spawn_x = 0,
|
||||
spawn_y = 0,
|
||||
spawn_z = 0
|
||||
}
|
||||
BIN
mods/maps/maps/forest/map.mts
Normal file
BIN
mods/maps/maps/forest/map.mts
Normal file
Binary file not shown.
1
mods/maps/maps/pine/map.lua
Normal file
1
mods/maps/maps/pine/map.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
|
||||
BIN
mods/maps/maps/pine/map.mts
Normal file
BIN
mods/maps/maps/pine/map.mts
Normal file
Binary file not shown.
1
mods/maps/maps/savanna/map.lua
Normal file
1
mods/maps/maps/savanna/map.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
|
||||
BIN
mods/maps/maps/savanna/map.mts
Normal file
BIN
mods/maps/maps/savanna/map.mts
Normal file
Binary file not shown.
3
mods/maps/mod.conf
Normal file
3
mods/maps/mod.conf
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
name = maps
|
||||
description = Maps mod for simple-shooter-game
|
||||
depends = main
|
||||
Loading…
Add table
Add a link
Reference in a new issue