4 Commits

2 changed files with 4 additions and 1 deletions

View File

@ -122,7 +122,7 @@ minetest.register_node("scifi_nodes:digicode_on", {
paramtype2 = "wallmounted",
light_source = 5,
groups = {cracky=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1, mesecon_needs_receiver = 1},
drop = {items = {"scifi_nodes:digicode_off"}},
drop = "scifi_nodes:digicode_off",
mesecons = {
receptor = {
state = (has_mesecons and mesecon.state.on)

View File

@ -22,6 +22,8 @@ local function activate_palm_scanner(pos, node, player)
-- check protection
minetest.after(2, function()
if minetest.get_node(pos).name ~= node.name then return end
if minetest.is_protected(pos, name or "") then
-- clicker has no access to area
minetest.chat_send_player(name, "Access denied !")
@ -36,6 +38,7 @@ local function activate_palm_scanner(pos, node, player)
-- reset state
minetest.after(1, function()
if minetest.get_node(pos).name ~= node.name then return end
node.name = "scifi_nodes:palm_scanner_off"
minetest.swap_node(pos, node)
mesecon.receptor_off(pos, scifi_nodes.get_switch_rules(node.param2))