forked from minetest-mods/mesecons
Don’t damage unloaded blocks (#435)
This commit is contained in:
parent
028c290cd7
commit
45bbd9f7e3
@ -55,8 +55,6 @@ end
|
|||||||
|
|
||||||
-- tests if the node can be pushed into, e.g. air, water, grass
|
-- tests if the node can be pushed into, e.g. air, water, grass
|
||||||
local function node_replaceable(name)
|
local function node_replaceable(name)
|
||||||
if name == "ignore" then return true end
|
|
||||||
|
|
||||||
if minetest.registered_nodes[name] then
|
if minetest.registered_nodes[name] then
|
||||||
return minetest.registered_nodes[name].buildable_to or false
|
return minetest.registered_nodes[name].buildable_to or false
|
||||||
end
|
end
|
||||||
@ -260,6 +258,10 @@ function mesecon.mvps_move_objects(pos, dir, nodestack, movefactor)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Never push into unloaded blocks. Don’t try to pull from them, either.
|
||||||
|
-- TODO: load blocks instead, as with wires.
|
||||||
|
mesecon.register_mvps_stopper("ignore")
|
||||||
|
|
||||||
mesecon.register_mvps_stopper("doors:door_steel_b_1")
|
mesecon.register_mvps_stopper("doors:door_steel_b_1")
|
||||||
mesecon.register_mvps_stopper("doors:door_steel_t_1")
|
mesecon.register_mvps_stopper("doors:door_steel_t_1")
|
||||||
mesecon.register_mvps_stopper("doors:door_steel_b_2")
|
mesecon.register_mvps_stopper("doors:door_steel_b_2")
|
||||||
|
Loading…
Reference in New Issue
Block a user