Don't allow constructor to operate if bad facedir (fixes #328)

Also, use "simple" screwdriver mode for "off" constructor, and disable screwdriver for "on" one.
This commit is contained in:
Vanessa Ezekowitz 2017-04-13 20:48:18 -04:00
parent 69feeef0af
commit e65c8b7130

View File

@ -2,6 +2,7 @@
local S = technic.getter local S = technic.getter
local function deploy_node(inv, slot_name, pos, node, machine_node) local function deploy_node(inv, slot_name, pos, node, machine_node)
if node.param2 > 3 then return end
if node.name ~= "air" then if node.name ~= "air" then
if node.name == "ignore" or if node.name == "ignore" or
node.name == "default:lava_source" or node.name == "default:lava_source" or
@ -162,6 +163,7 @@ local function make_constructor(mark, length)
allow_metadata_inventory_put = technic.machine_inventory_put, allow_metadata_inventory_put = technic.machine_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take, allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move, allow_metadata_inventory_move = technic.machine_inventory_move,
on_rotate = screwdriver.rotate_simple
}) })
minetest.register_node("technic:constructor_mk"..mark.."_on", { minetest.register_node("technic:constructor_mk"..mark.."_on", {
@ -180,6 +182,7 @@ local function make_constructor(mark, length)
allow_metadata_inventory_put = technic.machine_inventory_put, allow_metadata_inventory_put = technic.machine_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take, allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move, allow_metadata_inventory_move = technic.machine_inventory_move,
on_rotate = false
}) })
end end