mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-06-15 07:40:28 +02:00
Replace on_rotate_horiz with on_rotate and paramtype2 = "4dir"
This raises the minimal Luanti/Minetest version to 5.7.0.
This commit is contained in:
parent
b79962402b
commit
27072542cf
@ -99,8 +99,9 @@ do
|
|||||||
offstate = "mesecons:test_conductor_rot_off",
|
offstate = "mesecons:test_conductor_rot_off",
|
||||||
}}
|
}}
|
||||||
mesecon.register_node("mesecons:test_conductor_rot", {
|
mesecon.register_node("mesecons:test_conductor_rot", {
|
||||||
|
paramtype2 = "4dir",
|
||||||
description = "Rotatable Test Conductor",
|
description = "Rotatable Test Conductor",
|
||||||
on_rotate = mesecon.on_rotate_horiz,
|
on_rotate = mesecon.on_rotate,
|
||||||
}, {mesecons = off_spec}, {mesecons = on_spec})
|
}, {mesecons = off_spec}, {mesecons = on_spec})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ function mesecon.on_rotate(pos, node, _, _, new_param2)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- An on_rotate callback for components which stay horizontal.
|
-- An on_rotate callback for components which stay horizontal.
|
||||||
|
-- Deprecated. Use paramtype2 = "4dir" instead.
|
||||||
function mesecon.on_rotate_horiz(pos, node, user, mode, new_param2)
|
function mesecon.on_rotate_horiz(pos, node, user, mode, new_param2)
|
||||||
if not minetest.global_exists("screwdriver") or mode ~= screwdriver.ROTATE_FACE then
|
if not minetest.global_exists("screwdriver") or mode ~= screwdriver.ROTATE_FACE then
|
||||||
return false
|
return false
|
||||||
|
@ -18,7 +18,7 @@ minetest.register_node("mesecons_extrawires:corner_on", {
|
|||||||
{ name = "jeija_insulated_wire_ends_on.png", backface_culling = true },
|
{ name = "jeija_insulated_wire_ends_on.png", backface_culling = true },
|
||||||
},
|
},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "4dir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -33,7 +33,7 @@ minetest.register_node("mesecons_extrawires:corner_on", {
|
|||||||
offstate = "mesecons_extrawires:corner_off"
|
offstate = "mesecons_extrawires:corner_off"
|
||||||
}},
|
}},
|
||||||
on_blast = mesecon.on_blastnode,
|
on_blast = mesecon.on_blastnode,
|
||||||
on_rotate = mesecon.on_rotate_horiz,
|
on_rotate = mesecon.on_rotate,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mesecons_extrawires:corner_off", {
|
minetest.register_node("mesecons_extrawires:corner_off", {
|
||||||
@ -45,7 +45,7 @@ minetest.register_node("mesecons_extrawires:corner_off", {
|
|||||||
{ name = "jeija_insulated_wire_ends_off.png", backface_culling = true },
|
{ name = "jeija_insulated_wire_ends_off.png", backface_culling = true },
|
||||||
},
|
},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "4dir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -59,7 +59,7 @@ minetest.register_node("mesecons_extrawires:corner_off", {
|
|||||||
onstate = "mesecons_extrawires:corner_on"
|
onstate = "mesecons_extrawires:corner_on"
|
||||||
}},
|
}},
|
||||||
on_blast = mesecon.on_blastnode,
|
on_blast = mesecon.on_blastnode,
|
||||||
on_rotate = mesecon.on_rotate_horiz,
|
on_rotate = mesecon.on_rotate,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -41,7 +41,7 @@ for k, state in ipairs(doublecorner_states) do
|
|||||||
{ name = "jeija_insulated_wire_ends_" .. w2 .. ".png", backface_culling = true },
|
{ name = "jeija_insulated_wire_ends_" .. w2 .. ".png", backface_culling = true },
|
||||||
},
|
},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "4dir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -56,7 +56,7 @@ for k, state in ipairs(doublecorner_states) do
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
on_blast = mesecon.on_blastnode,
|
on_blast = mesecon.on_blastnode,
|
||||||
on_rotate = mesecon.on_rotate_horiz,
|
on_rotate = mesecon.on_rotate,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ minetest.register_node("mesecons_extrawires:tjunction_on", {
|
|||||||
"jeija_insulated_wire_ends_on.png"
|
"jeija_insulated_wire_ends_on.png"
|
||||||
},
|
},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "4dir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -45,7 +45,7 @@ minetest.register_node("mesecons_extrawires:tjunction_on", {
|
|||||||
offstate = "mesecons_extrawires:tjunction_off"
|
offstate = "mesecons_extrawires:tjunction_off"
|
||||||
}},
|
}},
|
||||||
on_blast = mesecon.on_blastnode,
|
on_blast = mesecon.on_blastnode,
|
||||||
on_rotate = mesecon.on_rotate_horiz,
|
on_rotate = mesecon.on_rotate,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mesecons_extrawires:tjunction_off", {
|
minetest.register_node("mesecons_extrawires:tjunction_off", {
|
||||||
@ -60,7 +60,7 @@ minetest.register_node("mesecons_extrawires:tjunction_off", {
|
|||||||
"jeija_insulated_wire_ends_off.png"
|
"jeija_insulated_wire_ends_off.png"
|
||||||
},
|
},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "4dir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -75,7 +75,7 @@ minetest.register_node("mesecons_extrawires:tjunction_off", {
|
|||||||
onstate = "mesecons_extrawires:tjunction_on"
|
onstate = "mesecons_extrawires:tjunction_on"
|
||||||
}},
|
}},
|
||||||
on_blast = mesecon.on_blastnode,
|
on_blast = mesecon.on_blastnode,
|
||||||
on_rotate = mesecon.on_rotate_horiz,
|
on_rotate = mesecon.on_rotate,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -89,7 +89,7 @@ local function register_gate(name, inputnumber, assess, recipe, description)
|
|||||||
description = description,
|
description = description,
|
||||||
inventory_image = "jeija_gate_off.png^jeija_gate_"..name..".png",
|
inventory_image = "jeija_gate_off.png^jeija_gate_"..name..".png",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "4dir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
drop = basename.."_off",
|
drop = basename.."_off",
|
||||||
@ -102,7 +102,7 @@ local function register_gate(name, inputnumber, assess, recipe, description)
|
|||||||
offstate = basename.."_off",
|
offstate = basename.."_off",
|
||||||
inputnumber = inputnumber,
|
inputnumber = inputnumber,
|
||||||
after_dig_node = mesecon.do_cooldown,
|
after_dig_node = mesecon.do_cooldown,
|
||||||
on_rotate = mesecon.on_rotate_horiz,
|
on_rotate = mesecon.on_rotate,
|
||||||
},{
|
},{
|
||||||
tiles = {
|
tiles = {
|
||||||
"jeija_microcontroller_bottom.png^".."jeija_gate_off.png^"..
|
"jeija_microcontroller_bottom.png^".."jeija_gate_off.png^"..
|
||||||
|
@ -17,7 +17,7 @@ minetest.register_node("mesecons_insulated:insulated_on", {
|
|||||||
"jeija_insulated_wire_sides_on.png"
|
"jeija_insulated_wire_sides_on.png"
|
||||||
},
|
},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "4dir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -39,7 +39,7 @@ minetest.register_node("mesecons_insulated:insulated_on", {
|
|||||||
rules = insulated_wire_get_rules
|
rules = insulated_wire_get_rules
|
||||||
}},
|
}},
|
||||||
on_blast = mesecon.on_blastnode,
|
on_blast = mesecon.on_blastnode,
|
||||||
on_rotate = mesecon.on_rotate_horiz,
|
on_rotate = mesecon.on_rotate,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mesecons_insulated:insulated_off", {
|
minetest.register_node("mesecons_insulated:insulated_off", {
|
||||||
@ -54,7 +54,7 @@ minetest.register_node("mesecons_insulated:insulated_off", {
|
|||||||
"jeija_insulated_wire_sides_off.png"
|
"jeija_insulated_wire_sides_off.png"
|
||||||
},
|
},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "4dir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -75,7 +75,7 @@ minetest.register_node("mesecons_insulated:insulated_off", {
|
|||||||
rules = insulated_wire_get_rules
|
rules = insulated_wire_get_rules
|
||||||
}},
|
}},
|
||||||
on_blast = mesecon.on_blastnode,
|
on_blast = mesecon.on_blastnode,
|
||||||
on_rotate = mesecon.on_rotate_horiz,
|
on_rotate = mesecon.on_rotate,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name = mesecons
|
name = mesecons
|
||||||
description = Mod that implements a ton of items related to digital circuitry.
|
description = Mod that implements a ton of items related to digital circuitry.
|
||||||
min_minetest_version = 5.0
|
min_minetest_version = 5.7.0
|
||||||
author = Jeija
|
author = Jeija
|
||||||
title = Mesecons
|
title = Mesecons
|
||||||
|
Loading…
x
Reference in New Issue
Block a user