mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-08 20:12:11 +00:00
Merge branch 'main' of https://github.com/IonicCheese/simple-shooter-game-fork
This commit is contained in:
commit
fdfbf561d6
1 changed files with 5 additions and 9 deletions
|
|
@ -51,15 +51,11 @@ function place_map(map)
|
||||||
return map_data
|
return map_data
|
||||||
end
|
end
|
||||||
|
|
||||||
function remove_barrier()
|
function remove_barrier(x, y, z) -- name and arguments kept for backwards compat
|
||||||
for node_x = 1, x - 2 do
|
for _, player in pairs(core.get_connected_players()) do
|
||||||
for node_z = 1, z - 2 do
|
local pos = player:get_pos()
|
||||||
core.set_node({x = node_x, y = y - 1, z = node_z}, {name = "air"}) -- account for the fact that lua counts starting at 1... i think.... whatever, it works \_('_')_/
|
player:set_pos({x=pos.x, y=map_data.barrier_level - 3.5, z=pos.z})
|
||||||
end
|
end
|
||||||
end
|
assert(loadstring(map_data.scripts.on_barrier_remove or ""))()
|
||||||
if map_data.on_barrier_remove then
|
|
||||||
map_data.on_barrier_remove()
|
|
||||||
end
|
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue