mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-07-16 11:16:44 -04:00
The air/vacuum fix to end all fixes
Probably will have a bug in the next few days. :P Fixed air and vacuum not flowing back in when liquids are removed. Also added an ABM to regular air to make it change to moontest air or vacuum based on neighbors. Liquid no longer deletes atmosphere diagonally placed from it.
This commit is contained in:
parent
170596c13f
commit
e09c391650
2 changed files with 39 additions and 10 deletions
|
@ -139,10 +139,19 @@ minetest.register_abm({
|
|||
for x = -1,1 do
|
||||
for y = -1,0 do
|
||||
for z = -1,1 do
|
||||
n_pos = {x=x + pos.x,y=y+pos.y,z=z+pos.z}
|
||||
n_name = minetest.get_node(n_pos).name
|
||||
if n_name == "moontest:vacuum" or n_name == "moontest:air" then
|
||||
minetest.remove_node(n_pos)
|
||||
--ignore diagonals
|
||||
if x ~= 1 and z ~= 1 then
|
||||
if x ~= -1 and z ~= 1 then
|
||||
if x ~= 1 and z ~= -1 then
|
||||
if x ~= -1 and z ~= -1 then
|
||||
n_pos = {x=x + pos.x,y=y+pos.y,z=z+pos.z}
|
||||
n_name = minetest.get_node(n_pos).name
|
||||
if n_name == "moontest:vacuum" or n_name == "moontest:air" then
|
||||
minetest.remove_node(n_pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue