1
0
Fork 0

Add basic screwdriver support

This commit is contained in:
Wuzzy 2017-12-05 14:09:39 +01:00
parent 2b9f37b3e8
commit 320567e1f2
33 changed files with 144 additions and 5 deletions

View File

@ -1,3 +1,4 @@
mesecons mesecons
mcl_sounds mcl_sounds
doc? doc?
screwdriver?

View File

@ -196,6 +196,11 @@ local groups = {
attached_node = 1, attached_node = 1,
} }
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.disallow
end
for _, mode in pairs{"comp", "sub"} do for _, mode in pairs{"comp", "sub"} do
for _, state in pairs{mesecon.state.on, mesecon.state.off} do for _, state in pairs{mesecon.state.on, mesecon.state.off} do
local state_str = state_strs[state] local state_str = state_strs[state]
@ -255,7 +260,8 @@ for _, state in pairs{mesecon.state.on, mesecon.state.off} do
rules = comparator_get_input_rules, rules = comparator_get_input_rules,
action_change = update_self, action_change = update_self,
} }
} },
on_rotate = on_rotate,
} }
if mode == "comp" and state == mesecon.state.off then if mode == "comp" and state == mesecon.state.off then

View File

@ -8,3 +8,4 @@ mcl_nether
3d_armor_stand 3d_armor_stand
3d_armor 3d_armor
doc? doc?
screwdriver?

View File

@ -26,6 +26,11 @@ local setup_dispenser = function(pos)
inv:set_size("main", 9) inv:set_size("main", 9)
end end
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.rotate_simple
end
-- Shared core definition table -- Shared core definition table
local dispenserdef = { local dispenserdef = {
is_ground_content = false, is_ground_content = false,
@ -363,7 +368,8 @@ local dispenserdef = {
end end
end, end,
rules = mesecon.rules.alldirs, rules = mesecon.rules.alldirs,
}} }},
on_rotate = on_rotate,
} }
-- Horizontal dispenser -- Horizontal dispenser

View File

@ -2,3 +2,4 @@ mcl_init
mesecons mesecons
mcl_util mcl_util
doc? doc?
screwdriver?

View File

@ -26,6 +26,11 @@ local setup_dropper = function(pos)
inv:set_size("main", 9) inv:set_size("main", 9)
end end
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.rotate_simple
end
-- Shared core definition table -- Shared core definition table
local dropperdef = { local dropperdef = {
is_ground_content = false, is_ground_content = false,
@ -91,7 +96,8 @@ local dropperdef = {
end end
end, end,
rules = mesecon.rules.alldirs, rules = mesecon.rules.alldirs,
}} }},
on_rotate = on_rotate,
} }
-- Horizontal dropper -- Horizontal dropper

View File

@ -1,2 +1,3 @@
mesecons mesecons
doc? doc?
screwdriver?

View File

@ -95,6 +95,11 @@ else
help = false help = false
end end
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.disallow
end
minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), { minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), {
description = "Redstone Repeater", description = "Redstone Repeater",
inventory_image = icon, inventory_image = icon,
@ -156,7 +161,8 @@ minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), {
rules = delayer_get_input_rules, rules = delayer_get_input_rules,
action_on = delayer_activate action_on = delayer_activate
} }
} },
on_rotate = on_rotate,
}) })
@ -215,7 +221,8 @@ minetest.register_node("mesecons_delayer:delayer_on_"..tostring(i), {
rules = delayer_get_input_rules, rules = delayer_get_input_rules,
action_off = delayer_deactivate action_off = delayer_deactivate
} }
} },
on_rotate = on_rotate,
}) })
end end

View File

@ -2,3 +2,4 @@ mesecons
mesecons_mvps mesecons_mvps
mcl_mobitems mcl_mobitems
doc? doc?
screwdriver?

View File

@ -173,6 +173,11 @@ local pistonspec_normal = {
local usagehelp_piston = "This block can have one of 6 possible orientations. On placement, the pusher will face you." local usagehelp_piston = "This block can have one of 6 possible orientations. On placement, the pusher will face you."
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.disallow
end
-- offstate -- offstate
minetest.register_node("mesecons_pistons:piston_normal_off", { minetest.register_node("mesecons_pistons:piston_normal_off", {
description = "Piston", description = "Piston",
@ -200,6 +205,7 @@ minetest.register_node("mesecons_pistons:piston_normal_off", {
}}, }},
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- onstate -- onstate
@ -230,6 +236,7 @@ minetest.register_node("mesecons_pistons:piston_normal_on", {
}}, }},
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- pusher -- pusher
@ -254,6 +261,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_normal", {
node_box = piston_pusher_box, node_box = piston_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
on_rotate = on_rotate,
}) })
-- Sticky ones -- Sticky ones
@ -296,6 +304,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", {
}}, }},
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- onstate -- onstate
@ -326,6 +335,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", {
}}, }},
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- pusher -- pusher
@ -350,6 +360,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_sticky", {
node_box = piston_pusher_box, node_box = piston_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
on_rotate = on_rotate,
}) })
-- --
@ -406,6 +417,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal_off", {
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- onstate -- onstate
@ -436,6 +448,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal_on", {
}}, }},
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- pusher -- pusher
@ -460,6 +473,7 @@ minetest.register_node("mesecons_pistons:piston_up_pusher_normal", {
node_box = piston_up_pusher_box, node_box = piston_up_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
on_rotate = on_rotate,
}) })
@ -499,6 +513,7 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_off", {
}}, }},
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- onstate -- onstate
@ -529,6 +544,7 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_on", {
}}, }},
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- pusher -- pusher
@ -553,6 +569,7 @@ minetest.register_node("mesecons_pistons:piston_up_pusher_sticky", {
node_box = piston_up_pusher_box, node_box = piston_up_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
on_rotate = on_rotate,
}) })
-- --
@ -611,6 +628,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal_off", {
}}, }},
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- onstate -- onstate
@ -641,6 +659,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal_on", {
}}, }},
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- pusher -- pusher
@ -665,6 +684,7 @@ minetest.register_node("mesecons_pistons:piston_down_pusher_normal", {
node_box = piston_down_pusher_box, node_box = piston_down_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
on_rotate = on_rotate,
}) })
-- Sticky -- Sticky
@ -701,6 +721,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_off", {
}}, }},
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- onstate -- onstate
@ -731,6 +752,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_on", {
}}, }},
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
_mcl_hardness = 0.5, _mcl_hardness = 0.5,
on_rotate = on_rotate,
}) })
-- pusher -- pusher
@ -755,6 +777,7 @@ minetest.register_node("mesecons_pistons:piston_down_pusher_sticky", {
node_box = piston_down_pusher_box, node_box = piston_down_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(), sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5, _mcl_blast_resistance = 2.5,
on_rotate = on_rotate,
}) })

View File

@ -1,2 +1,3 @@
mcl_core mcl_core
mcl_sounds mcl_sounds
screwdriver?

View File

@ -87,6 +87,11 @@ local drop_item = function(pos, node, meta)
remove_item(pos, node) remove_item(pos, node)
end end
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.disallow
end
minetest.register_node("itemframes:frame",{ minetest.register_node("itemframes:frame",{
description = "Item Frame", description = "Item Frame",
_doc_items_longdesc = "Item frames are decorative blocks in which items can be placed.", _doc_items_longdesc = "Item frames are decorative blocks in which items can be placed.",
@ -138,6 +143,7 @@ minetest.register_node("itemframes:frame",{
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
return player:get_player_name() == meta:get_string("owner") return player:get_player_name() == meta:get_string("owner")
end, end,
on_rotate = on_rotate,
}) })
minetest.register_craft({ minetest.register_craft({

View File

@ -2,3 +2,4 @@ mcl_sounds
mcl_core mcl_core
mcl_hunger mcl_hunger
mcl_death_messages mcl_death_messages
screwdriver?

View File

@ -18,6 +18,9 @@ local anvildef = {
_mcl_blast_resistance = 6000, _mcl_blast_resistance = 6000,
_mcl_hardness = 5, _mcl_hardness = 5,
} }
if minetest.get_modpath("screwdriver") then
anvildef.on_rotate = screwdriver.rotate_simple
end
local anvildef0 = table.copy(anvildef) local anvildef0 = table.copy(anvildef)
anvildef0.description = "Anvil" anvildef0.description = "Anvil"

View File

@ -3,3 +3,4 @@ mcl_core?
mcl_wool? mcl_wool?
mcl_cauldrons? mcl_cauldrons?
doc? doc?
screwdriver?

View File

@ -96,6 +96,11 @@ local make_banner_texture = function(base_color, layers)
end end
end end
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.disallow
end
-- Banner nodes. -- Banner nodes.
-- These are an invisible nodes which are only used to destroy the banner entity. -- These are an invisible nodes which are only used to destroy the banner entity.
-- All the important banner information (such as color) is stored in the entity. -- All the important banner information (such as color) is stored in the entity.
@ -147,6 +152,7 @@ minetest.register_node("mcl_banners:hanging_banner", {
on_destruct = on_destruct_hanging_banner, on_destruct = on_destruct_hanging_banner,
_mcl_hardness = 1, _mcl_hardness = 1,
_mcl_blast_resistance = 5, _mcl_blast_resistance = 5,
on_rotate = on_rotate,
}) })
for colorid, colortab in pairs(mcl_banners.colors) do for colorid, colortab in pairs(mcl_banners.colors) do

View File

@ -4,3 +4,4 @@ mcl_sounds
mcl_end mcl_end
mesecons mesecons
doc? doc?
screwdriver?

View File

@ -7,6 +7,12 @@ else
drop = "mcl_chests:"..drop drop = "mcl_chests:"..drop
end end
local no_rotate, simple_rotate
if minetest.get_modpath("screwdriver") then
no_rotate = screwdriver.disallow
simple_rotate = screwdriver.rotate_simple
end
minetest.register_node("mcl_chests:"..basename, { minetest.register_node("mcl_chests:"..basename, {
description = desc, description = desc,
_doc_items_longdesc = longdesc, _doc_items_longdesc = longdesc,
@ -116,6 +122,7 @@ minetest.register_node("mcl_chests:"..basename, {
end end
end, end,
mesecons = mesecons, mesecons = mesecons,
on_rotate = simple_rotate,
}) })
minetest.register_node("mcl_chests:"..basename.."_left", { minetest.register_node("mcl_chests:"..basename.."_left", {
@ -230,6 +237,7 @@ minetest.register_node("mcl_chests:"..basename.."_left", {
end end
end, end,
mesecons = mesecons, mesecons = mesecons,
on_rotate = no_rotate,
}) })
minetest.register_node("mcl_chests:"..basename.."_right", { minetest.register_node("mcl_chests:"..basename.."_right", {
@ -345,6 +353,7 @@ minetest.register_node("mcl_chests:"..basename.."_right", {
end end
end, end,
mesecons = mesecons, mesecons = mesecons,
on_rotate = no_rotate,
}) })
if minetest.get_modpath("doc") then if minetest.get_modpath("doc") then
@ -546,6 +555,7 @@ minetest.register_node("mcl_chests:ender_chest", {
end, end,
_mcl_blast_resistance = 3000, _mcl_blast_resistance = 3000,
_mcl_hardness = 22.5, _mcl_hardness = 22.5,
on_rotate = simple_rotate,
}) })
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)

View File

@ -1,3 +1,4 @@
mcl_core mcl_core
mcl_sounds mcl_sounds
mcl_dye mcl_dye
screwdriver?

View File

@ -44,6 +44,10 @@ minetest.register_craft({
cooktime = 10, cooktime = 10,
}) })
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.rotate_simple
end
for _, row in ipairs(block.dyes) do for _, row in ipairs(block.dyes) do
local name = row[1] local name = row[1]
@ -124,6 +128,7 @@ for _, row in ipairs(block.dyes) do
sounds = mcl_sounds.node_sound_stone_defaults(), sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 7, _mcl_blast_resistance = 7,
_mcl_hardness = 1.4, _mcl_hardness = 1.4,
on_rotate = on_rotate,
}) })
-- Crafting recipes -- Crafting recipes

View File

@ -17,6 +17,11 @@ end
---- Trapdoor ---- ---- Trapdoor ----
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.rotate_simple
end
function mcl_doors:register_trapdoor(name, def) function mcl_doors:register_trapdoor(name, def)
local groups = table.copy(def.groups) local groups = table.copy(def.groups)
if groups == nil then if groups == nil then
@ -123,6 +128,7 @@ function mcl_doors:register_trapdoor(name, def)
return minetest.item_place(itemstack, placer, pointed_thing, param2) return minetest.item_place(itemstack, placer, pointed_thing, param2)
end, end,
on_rightclick = on_rightclick, on_rightclick = on_rightclick,
on_rotate = on_rotate,
}) })
-- Open trapdoor -- Open trapdoor
@ -156,6 +162,7 @@ function mcl_doors:register_trapdoor(name, def)
punch(pos) punch(pos)
end), end),
}}, }},
on_rotate = on_rotate,
}) })
if minetest.get_modpath("doc") then if minetest.get_modpath("doc") then

View File

@ -1,3 +1,4 @@
mcl_core mcl_core
mcl_sounds mcl_sounds
doc? doc?
screwdriver?

View File

@ -1,3 +1,4 @@
mcl_core mcl_core
mcl_sounds mcl_sounds
doc? doc?
screwdriver?

View File

@ -111,6 +111,11 @@ mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups,
meta2:set_int("state", state2) meta2:set_int("state", state2)
end end
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.rotate_simple
end
local cgroups = table.copy(groups) local cgroups = table.copy(groups)
if cgroups == nil then cgroups = {} end if cgroups == nil then cgroups = {} end
cgroups.fence_gate = 1 cgroups.fence_gate = 1
@ -157,6 +162,7 @@ mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups,
punch_gate(pos, node) punch_gate(pos, node)
end), end),
}}, }},
on_rotate = on_rotate,
sounds = sounds, sounds = sounds,
_mcl_blast_resistance = blast_resistance, _mcl_blast_resistance = blast_resistance,
_mcl_hardness = hardness, _mcl_hardness = hardness,
@ -215,6 +221,7 @@ mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups,
punch_gate(pos, node) punch_gate(pos, node)
end), end),
}}, }},
on_rotate = on_rotate,
on_rightclick = function(pos, node, clicker) on_rightclick = function(pos, node, clicker)
punch_gate(pos, node) punch_gate(pos, node)
end, end,

View File

@ -4,3 +4,4 @@ mcl_sounds
mcl_craftguide mcl_craftguide
mcl_achievements mcl_achievements
doc? doc?
screwdriver?

View File

@ -281,6 +281,11 @@ local function furnace_node_timer(pos, elapsed)
return result return result
end end
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.rotate_simple
end
minetest.register_node("mcl_furnaces:furnace", { minetest.register_node("mcl_furnaces:furnace", {
description = "Furnace", description = "Furnace",
_doc_items_longdesc = "Furnaces cook or smelt several items, using a furnace fuel, into something else.", _doc_items_longdesc = "Furnaces cook or smelt several items, using a furnace fuel, into something else.",
@ -336,6 +341,7 @@ minetest.register_node("mcl_furnaces:furnace", {
on_receive_fields = receive_fields, on_receive_fields = receive_fields,
_mcl_blast_resistance = 17.5, _mcl_blast_resistance = 17.5,
_mcl_hardness = 3.5, _mcl_hardness = 3.5,
on_rotate = on_rotate,
}) })
minetest.register_node("mcl_furnaces:furnace_active", { minetest.register_node("mcl_furnaces:furnace_active", {
@ -378,6 +384,7 @@ minetest.register_node("mcl_furnaces:furnace_active", {
on_receive_fields = receive_fields, on_receive_fields = receive_fields,
_mcl_blast_resistance = 17.5, _mcl_blast_resistance = 17.5,
_mcl_hardness = 3.5, _mcl_hardness = 3.5,
on_rotate = on_rotate,
}) })
minetest.register_craft({ minetest.register_craft({

View File

@ -1 +1,2 @@
mcl_sounds mcl_sounds
screwdriver?

View File

@ -1,6 +1,11 @@
-- Heads system -- Heads system
local function addhead(name, texture, desc, longdesc) local function addhead(name, texture, desc, longdesc)
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.rotate_simple
end
minetest.register_node("mcl_heads:"..name, { minetest.register_node("mcl_heads:"..name, {
description = desc, description = desc,
_doc_items_longdesc = longdesc, _doc_items_longdesc = longdesc,
@ -37,6 +42,7 @@ local function addhead(name, texture, desc, longdesc)
sounds = mcl_sounds.node_sound_defaults({ sounds = mcl_sounds.node_sound_defaults({
footstep = {name="default_hard_footstep", gain=0.3} footstep = {name="default_hard_footstep", gain=0.3}
}), }),
on_rotate = on_rotate,
_mcl_blast_resistance = 5, _mcl_blast_resistance = 5,
_mcl_hardness = 1, _mcl_hardness = 1,
}) })

View File

@ -2,3 +2,4 @@ mcl_core
mcl_sounds mcl_sounds
mcl_util mcl_util
doc? doc?
screwdriver?

View File

@ -143,6 +143,11 @@ Hoppers interact with containers the following way:
_mcl_hardness = 3, _mcl_hardness = 3,
}) })
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.rotate_simple
end
minetest.register_node("mcl_hoppers:hopper_side", { minetest.register_node("mcl_hoppers:hopper_side", {
description = "Hopper (Side)", description = "Hopper (Side)",
_doc_items_create_entry = false, _doc_items_create_entry = false,
@ -213,6 +218,7 @@ minetest.register_node("mcl_hoppers:hopper_side", {
minetest.log("action", player:get_player_name().. minetest.log("action", player:get_player_name()..
" takes stuff from mcl_hoppers at "..minetest.pos_to_string(pos)) " takes stuff from mcl_hoppers at "..minetest.pos_to_string(pos))
end, end,
on_rotate = on_rotate,
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 24, _mcl_blast_resistance = 24,
_mcl_hardness = 3, _mcl_hardness = 3,

View File

@ -371,6 +371,10 @@ minetest.register_node("mcl_signs:wall_sign", {
_mcl_blast_resistance = 5, _mcl_blast_resistance = 5,
}) })
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.disallow
end
-- Standing sign nodes. -- Standing sign nodes.
-- 4 rotations at 0°, 22.5°, 45° and 67.5°. -- 4 rotations at 0°, 22.5°, 45° and 67.5°.
@ -400,6 +404,8 @@ local ssign = {
on_punch = function(pos, node, puncher) on_punch = function(pos, node, puncher)
update_sign(pos) update_sign(pos)
end, end,
on_rotate = on_rotate,
_mcl_hardness = 1, _mcl_hardness = 1,
_mcl_blast_resistance = 5, _mcl_blast_resistance = 5,
} }

View File

@ -3,3 +3,4 @@ mcl_core
mcl_sounds mcl_sounds
mcl_stairs mcl_stairs
doc_identifier? doc_identifier?
screwdriver?

View File

@ -81,6 +81,11 @@ local drop_armor = function(pos)
end end
end end
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.disallow
end
-- FIXME: The armor stand should be an entity -- FIXME: The armor stand should be an entity
minetest.register_node("3d_armor_stand:armor_stand", { minetest.register_node("3d_armor_stand:armor_stand", {
description = "Armor Stand", description = "Armor Stand",
@ -201,6 +206,7 @@ minetest.register_node("3d_armor_stand:armor_stand", {
update_entity(pos) update_entity(pos)
end, pos) end, pos)
end, end,
on_rotate = on_rotate,
}) })
minetest.register_entity("3d_armor_stand:armor_entity", { minetest.register_entity("3d_armor_stand:armor_entity", {