mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-11-11 12:50:21 +01:00
Bug fixes
Can't use vector.new right now because it's got a bug when x/y/z == 0 Also making sure to use the word "level" not "levels" <_<
This commit is contained in:
parent
fcc7414716
commit
2ffd00909a
|
@ -5,7 +5,7 @@ local S = homedecor.gettext
|
||||||
-- doors
|
-- doors
|
||||||
|
|
||||||
function isSolid(pos,adj)
|
function isSolid(pos,adj)
|
||||||
adj = vector.new(adj[1],adj[2],adj[3])
|
adj = {x=adj[1],y=adj[2],z=adj[3]}
|
||||||
local node = minetest.get_node(vector.add(pos,adj))
|
local node = minetest.get_node(vector.add(pos,adj))
|
||||||
if node then
|
if node then
|
||||||
local idef = minetest.registered_nodes[minetest.get_node(vector.add(pos,adj)).name]
|
local idef = minetest.registered_nodes[minetest.get_node(vector.add(pos,adj)).name]
|
||||||
|
@ -53,7 +53,7 @@ function calculateClosed(pos)
|
||||||
if isTrap then
|
if isTrap then
|
||||||
-- the trap door is considered closed when all nodes on its sides are solid
|
-- the trap door is considered closed when all nodes on its sides are solid
|
||||||
-- or all nodes in the 3x3 above/below it are solid except the center
|
-- or all nodes in the 3x3 above/below it are solid except the center
|
||||||
for levels = 0, 1 do
|
for level = 0, 1 do
|
||||||
local fail = false
|
local fail = false
|
||||||
local solids = countSolids(pos,node,level)
|
local solids = countSolids(pos,node,level)
|
||||||
if solids == 8 then
|
if solids == 8 then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user