forked from Mirrorlandia_minetest/mesecons
Properly handle missing screwdriver mod
This commit is contained in:
parent
c7136b72cb
commit
199fb62108
@ -1 +1,2 @@
|
||||
default
|
||||
screwdriver?
|
||||
|
@ -93,3 +93,11 @@ mesecon.queue:add_function("cooldown", function (pos)
|
||||
meta:set_int("heat", heat - 1)
|
||||
end
|
||||
end)
|
||||
|
||||
-- "Shim" for simple rotation, will result in the following item in nodedefs using it:
|
||||
-- "on_rotate = screwdriver.rotate_simple" if screwdriver mod is installed
|
||||
-- "on_rotate = nil" (essentially not present) if screwdriver mod is missing
|
||||
|
||||
if screwdriver then
|
||||
mesecon.rotate_simple = screwdriver.rotate_simple
|
||||
end
|
||||
|
@ -37,7 +37,7 @@ minetest.register_node("mesecons_extrawires:corner_on", {
|
||||
sunlight_propagates = true,
|
||||
selection_box = corner_selectionbox,
|
||||
node_box = corner_nodebox,
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
on_rotate = mesecon.rotate_simple,
|
||||
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
|
||||
drop = "mesecons_extrawires:corner_off",
|
||||
mesecons = {conductor =
|
||||
@ -65,7 +65,7 @@ minetest.register_node("mesecons_extrawires:corner_off", {
|
||||
sunlight_propagates = true,
|
||||
selection_box = corner_selectionbox,
|
||||
node_box = corner_nodebox,
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
on_rotate = mesecon.rotate_simple,
|
||||
groups = {dig_immediate = 3},
|
||||
mesecons = {conductor =
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ minetest.register_node("mesecons_extrawires:tjunction_on", {
|
||||
sunlight_propagates = true,
|
||||
selection_box = tjunction_selectionbox,
|
||||
node_box = tjunction_nodebox,
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
on_rotate = mesecon.rotate_simple,
|
||||
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
|
||||
drop = "mesecons_extrawires:tjunction_off",
|
||||
mesecons = {conductor =
|
||||
@ -66,7 +66,7 @@ minetest.register_node("mesecons_extrawires:tjunction_off", {
|
||||
sunlight_propagates = true,
|
||||
selection_box = tjunction_selectionbox,
|
||||
node_box = tjunction_nodebox,
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
on_rotate = mesecon.rotate_simple,
|
||||
groups = {dig_immediate = 3},
|
||||
mesecons = {conductor =
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ minetest.register_node("mesecons_insulated:insulated_on", {
|
||||
type = "fixed",
|
||||
fixed = { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }
|
||||
},
|
||||
on_rotate = screwdriver.rotate_simple,
|
||||
on_rotate = mesecon.rotate_simple,
|
||||
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
|
||||
drop = "mesecons_insulated:insulated_off",
|
||||
mesecons = {conductor = {
|
||||
|
Loading…
Reference in New Issue
Block a user