Skip to content

Commit

Permalink
Don’t damage unloaded blocks (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
numberZero committed Oct 29, 2018
1 parent 028c290 commit 45bbd9f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mesecons_mvps/init.lua
Expand Up @@ -55,8 +55,6 @@ end

-- tests if the node can be pushed into, e.g. air, water, grass
local function node_replaceable(name)
if name == "ignore" then return true end

if minetest.registered_nodes[name] then
return minetest.registered_nodes[name].buildable_to or false
end
Expand Down Expand Up @@ -260,6 +258,10 @@ function mesecon.mvps_move_objects(pos, dir, nodestack, movefactor)
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_t_1")
mesecon.register_mvps_stopper("doors:door_steel_b_2")
Expand Down

0 comments on commit 45bbd9f

Please sign in to comment.