Add basic screwdriver support
This commit is contained in:
parent
2b9f37b3e8
commit
320567e1f2
33 changed files with 144 additions and 5 deletions
|
@ -2,3 +2,4 @@ mesecons
|
|||
mesecons_mvps
|
||||
mcl_mobitems
|
||||
doc?
|
||||
screwdriver?
|
||||
|
|
|
@ -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 on_rotate
|
||||
if minetest.get_modpath("screwdriver") then
|
||||
on_rotate = screwdriver.disallow
|
||||
end
|
||||
|
||||
-- offstate
|
||||
minetest.register_node("mesecons_pistons:piston_normal_off", {
|
||||
description = "Piston",
|
||||
|
@ -200,6 +205,7 @@ minetest.register_node("mesecons_pistons:piston_normal_off", {
|
|||
}},
|
||||
_mcl_blast_resistance = 2.5,
|
||||
_mcl_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- onstate
|
||||
|
@ -230,6 +236,7 @@ minetest.register_node("mesecons_pistons:piston_normal_on", {
|
|||
}},
|
||||
_mcl_blast_resistance = 2.5,
|
||||
_mcl_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- pusher
|
||||
|
@ -254,6 +261,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_normal", {
|
|||
node_box = piston_pusher_box,
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_mcl_blast_resistance = 2.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- Sticky ones
|
||||
|
@ -296,6 +304,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", {
|
|||
}},
|
||||
_mcl_blast_resistance = 2.5,
|
||||
_mcl_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- onstate
|
||||
|
@ -326,6 +335,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", {
|
|||
}},
|
||||
_mcl_blast_resistance = 2.5,
|
||||
_mcl_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- pusher
|
||||
|
@ -350,6 +360,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_sticky", {
|
|||
node_box = piston_pusher_box,
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_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(),
|
||||
_mcl_blast_resistance = 2.5,
|
||||
_mcl_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- onstate
|
||||
|
@ -436,6 +448,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal_on", {
|
|||
}},
|
||||
_mcl_blast_resistance = 2.5,
|
||||
_mcl_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- pusher
|
||||
|
@ -460,6 +473,7 @@ minetest.register_node("mesecons_pistons:piston_up_pusher_normal", {
|
|||
node_box = piston_up_pusher_box,
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_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_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- onstate
|
||||
|
@ -529,6 +544,7 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_on", {
|
|||
}},
|
||||
_mcl_blast_resistance = 2.5,
|
||||
_mcl_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- pusher
|
||||
|
@ -553,6 +569,7 @@ minetest.register_node("mesecons_pistons:piston_up_pusher_sticky", {
|
|||
node_box = piston_up_pusher_box,
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_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_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- onstate
|
||||
|
@ -641,6 +659,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal_on", {
|
|||
}},
|
||||
_mcl_blast_resistance = 2.5,
|
||||
_mcl_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- pusher
|
||||
|
@ -665,6 +684,7 @@ minetest.register_node("mesecons_pistons:piston_down_pusher_normal", {
|
|||
node_box = piston_down_pusher_box,
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_mcl_blast_resistance = 2.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- Sticky
|
||||
|
@ -701,6 +721,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_off", {
|
|||
}},
|
||||
_mcl_blast_resistance = 2.5,
|
||||
_mcl_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- onstate
|
||||
|
@ -731,6 +752,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_on", {
|
|||
}},
|
||||
_mcl_blast_resistance = 2.5,
|
||||
_mcl_hardness = 0.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
-- pusher
|
||||
|
@ -755,6 +777,7 @@ minetest.register_node("mesecons_pistons:piston_down_pusher_sticky", {
|
|||
node_box = piston_down_pusher_box,
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_mcl_blast_resistance = 2.5,
|
||||
on_rotate = on_rotate,
|
||||
})
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue