mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-12-26 15:37:27 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
fd81543d2b
@ -3,6 +3,7 @@ minetest.register_node("jeija:wall_button_off", {
|
||||
drawtype = "signlike",
|
||||
tile_images = {"jeija_wall_button_off.png"},
|
||||
inventory_image = "jeija_wall_button_off.png",
|
||||
wield_image = "jeija_wall_button_off.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
legacy_wallmounted = true,
|
||||
|
@ -734,6 +734,7 @@ minetest.register_node("jeija:meselamp_off", {
|
||||
drawtype = "torchlike",
|
||||
tile_images = {"jeija_meselamp_on_ceiling_off.png", "jeija_meselamp_on_floor_off.png", "jeija_meselamp_off.png"},
|
||||
inventory_image = "jeija_meselamp_on_floor_off.png",
|
||||
wield_image = "jeija_meselamp_on_ceiling_off.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
@ -875,6 +876,7 @@ dofile(minetest.get_modpath("jeija").."/alias.lua")
|
||||
dofile(minetest.get_modpath("jeija").."/switch.lua")
|
||||
dofile(minetest.get_modpath("jeija").."/pistons.lua")
|
||||
dofile(minetest.get_modpath("jeija").."/lightstone.lua")
|
||||
dofile(minetest.get_modpath("jeija").."/lever.lua")
|
||||
--TEMPEREST's STUFF
|
||||
if ENABLE_TEMPEREST==1 then
|
||||
dofile(minetest.get_modpath("jeija").."/temperest.lua")
|
||||
|
86
jeija/lever.lua
Normal file
86
jeija/lever.lua
Normal file
@ -0,0 +1,86 @@
|
||||
-- WALL LEVER
|
||||
minetest.register_node("jeija:wall_lever_off", {
|
||||
drawtype = "signlike",
|
||||
tile_images = {"jeija_wall_lever_off.png"},
|
||||
inventory_image = "jeija_wall_lever_off.png",
|
||||
wield_image = "jeija_wall_lever_off.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
legacy_wallmounted = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
material = minetest.digprop_constanttime(0.3),
|
||||
description="Lever",
|
||||
})
|
||||
minetest.register_node("jeija:wall_lever_on", {
|
||||
drawtype = "signlike",
|
||||
tile_images = {"jeija_wall_lever_on.png"},
|
||||
inventory_image = "jeija_wall_lever_on.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
legacy_wallmounted = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
material = minetest.digprop_constanttime(0.3),
|
||||
drop = '"jeija:wall_lever_off" 1',
|
||||
description="Lever",
|
||||
})
|
||||
|
||||
minetest.register_on_dignode(
|
||||
function(pos, oldnode, digger)
|
||||
if oldnode.name == "jeija:wall_lever_on" then
|
||||
mesecon:receptor_off(pos)
|
||||
end
|
||||
end
|
||||
)
|
||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||
if node.name == "jeija:wall_lever_off" then
|
||||
minetest.env:add_node(pos, {name="jeija:wall_lever_on",param2=node.param2})
|
||||
local rules_string=nil
|
||||
if node.param2 == 5 then
|
||||
rules_string="button_z+"
|
||||
end
|
||||
if node.param2 == 3 then
|
||||
rules_string="button_x+"
|
||||
end
|
||||
if node.param2 == 4 then
|
||||
rules_string="button_z-"
|
||||
end
|
||||
if node.param2 == 2 then
|
||||
rules_string="button_x-"
|
||||
end
|
||||
mesecon:receptor_on(pos, rules_string)
|
||||
end
|
||||
if node.name == "jeija:wall_lever_on" then
|
||||
minetest.env:add_node(pos, {name="jeija:wall_lever_off",param2=node.param2})
|
||||
local rules_string=nil
|
||||
if node.param2 == 5 then
|
||||
rules_string="button_z+"
|
||||
end
|
||||
if node.param2 == 3 then
|
||||
rules_string="button_x+"
|
||||
end
|
||||
if node.param2 == 4 then
|
||||
rules_string="button_z-"
|
||||
end
|
||||
if node.param2 == 2 then
|
||||
rules_string="button_x-"
|
||||
end
|
||||
mesecon:receptor_off(pos, rules_string)
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_craft({
|
||||
output = '"jeija:wall_lever_off" 2',
|
||||
recipe = {
|
||||
{'"jeija:mesecon_off"'},
|
||||
{'"default:stone"'},
|
||||
{'"default:stick"'},
|
||||
}
|
||||
})
|
||||
mesecon:add_receptor_node("jeija:wall_lever")
|
||||
mesecon:add_receptor_node_off("jeija:wall_lever_off")
|
@ -9,7 +9,7 @@ function mesecon:lightstone_add(name, base_item, texture_off, texture_on)
|
||||
tile_images = {texture_on},
|
||||
inventory_image = minetest.inventorycube(texture_on),
|
||||
material = minetest.digprop_stonelike(0.5),
|
||||
dug_item = "node jeija:lightstone_" .. name .. "_off 1",
|
||||
drop = "jeija:lightstone_" .. name .. "_off 1",
|
||||
light_source = LIGHT_MAX-2,
|
||||
description=name.." Lightstone",
|
||||
})
|
||||
|
BIN
jeija/textures/jeija_wall_lever_off.png
Normal file
BIN
jeija/textures/jeija_wall_lever_off.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 189 B |
BIN
jeija/textures/jeija_wall_lever_on.png
Normal file
BIN
jeija/textures/jeija_wall_lever_on.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 B |
@ -12,7 +12,7 @@ minetest.register_node("jeija:mesecon_torch_off", {
|
||||
drawtype = "torchlike",
|
||||
tile_images = {"jeija_torches_off.png", "jeija_torches_off_ceiling.png", "jeija_torches_off_side.png"},
|
||||
inventory_image = "jeija_torches_off.png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
paramtype2 = "wallmounted",
|
||||
legacy_wallmounted = true,
|
||||
@ -25,6 +25,7 @@ minetest.register_node("jeija:mesecon_torch_on", {
|
||||
drawtype = "torchlike",
|
||||
tile_images = {"jeija_torches_on.png", "jeija_torches_on_ceiling.png", "jeija_torches_on_side.png"},
|
||||
inventory_image = "jeija_torches_on.png",
|
||||
wield_image = "jeija_torches_on.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
|
Loading…
Reference in New Issue
Block a user