|
|
|
@ -36,6 +36,27 @@ local rules = {
|
|
|
|
|
{x = 0, y = 0, z =-1},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
local sounds = {}
|
|
|
|
|
|
|
|
|
|
local materials = {
|
|
|
|
|
steel = "default:steel_ingot",
|
|
|
|
|
wire = "mesecons:wire_00000000_off",
|
|
|
|
|
diamond = "default:diamond"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if minetest.get_modpath("default") then
|
|
|
|
|
sounds = default.node_sound_metal_defaults()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if minetest.get_modpath("mcl_core") then
|
|
|
|
|
materials.steel = "mcl_core:iron_ingot"
|
|
|
|
|
materials.diamond = "mcl_core:diamond"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if minetest.get_modpath("digilines") then
|
|
|
|
|
materials.wire = "digilines:wire_std_00000000"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local function hash(pos)
|
|
|
|
|
return minetest.hash_node_position(pos)
|
|
|
|
|
end
|
|
|
|
@ -98,7 +119,9 @@ mesecon.register_node("mesecons_wireless:transmitter", {
|
|
|
|
|
},
|
|
|
|
|
paramtype2 = "color",
|
|
|
|
|
palette = "mesecons_wireless_signal_palette.png",
|
|
|
|
|
sounds = default.node_sound_metal_defaults(),
|
|
|
|
|
sounds = sounds,
|
|
|
|
|
_mcl_hardness = 0.8,
|
|
|
|
|
drops = "mesecons_wireless:transmitter_off",
|
|
|
|
|
digiline = {
|
|
|
|
|
effector = {
|
|
|
|
|
action = function(pos, node, dchannel, msg)
|
|
|
|
@ -267,7 +290,9 @@ mesecon.register_node("mesecons_wireless:receiver", {
|
|
|
|
|
},
|
|
|
|
|
paramtype2 = "color",
|
|
|
|
|
palette = "mesecons_wireless_signal_palette.png",
|
|
|
|
|
sounds = default.node_sound_metal_defaults(),
|
|
|
|
|
sounds = sounds,
|
|
|
|
|
drops = "mesecons_wireless:receiver_off",
|
|
|
|
|
_mcl_hardness = 0.8,
|
|
|
|
|
digiline = {
|
|
|
|
|
receptor = {},
|
|
|
|
|
},
|
|
|
|
@ -349,7 +374,7 @@ mesecon.register_node("mesecons_wireless:receiver", {
|
|
|
|
|
},
|
|
|
|
|
color = 0,
|
|
|
|
|
place_param2 = 0,
|
|
|
|
|
groups = {cracky=1},
|
|
|
|
|
groups = {cracky=1, oddly_breakable_by_hand=2},
|
|
|
|
|
mesecons = {
|
|
|
|
|
receptor = {
|
|
|
|
|
state = mesecon.state.off,
|
|
|
|
@ -367,7 +392,7 @@ mesecon.register_node("mesecons_wireless:receiver", {
|
|
|
|
|
place_param2 = 64,
|
|
|
|
|
paramtype = "light",
|
|
|
|
|
light_source = 2,
|
|
|
|
|
groups = {cracky=1, not_in_creative_inventory=1},
|
|
|
|
|
groups = {cracky=1, oddly_breakable_by_hand=2,not_in_creative_inventory=1},
|
|
|
|
|
mesecons = {
|
|
|
|
|
receptor = {
|
|
|
|
|
state = mesecon.state.on,
|
|
|
|
@ -407,8 +432,8 @@ minetest.register_craftitem("mesecons_wireless:dish", {
|
|
|
|
|
minetest.register_craft({
|
|
|
|
|
output = "mesecons_wireless:antenna",
|
|
|
|
|
recipe = {
|
|
|
|
|
{"default:steel_ingot"},
|
|
|
|
|
{"default:steel_ingot"},
|
|
|
|
|
{materials.steel},
|
|
|
|
|
{materials.steel},
|
|
|
|
|
{"mesecons_materials:fiber"}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -416,32 +441,27 @@ minetest.register_craft({
|
|
|
|
|
minetest.register_craft({
|
|
|
|
|
output = "mesecons_wireless:dish",
|
|
|
|
|
recipe = {
|
|
|
|
|
{"", "", "default:steel_ingot"},
|
|
|
|
|
{"", "default:steel_ingot", "default:steel_ingot"},
|
|
|
|
|
{"default:steel_ingot", "default:steel_ingot", "mesecons_materials:fiber"}
|
|
|
|
|
{"", "", materials.steel},
|
|
|
|
|
{"", materials.steel, materials.steel},
|
|
|
|
|
{materials.steel, materials.steel, "mesecons_materials:fiber"}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
|
output = "mesecons_wireless:dish",
|
|
|
|
|
recipe = {
|
|
|
|
|
{"default:steel_ingot", "", ""},
|
|
|
|
|
{"default:steel_ingot", "default:steel_ingot", ""},
|
|
|
|
|
{"mesecons_materials:fiber", "default:steel_ingot", "default:steel_ingot"}
|
|
|
|
|
{materials.steel, "", ""},
|
|
|
|
|
{materials.steel, materials.steel, ""},
|
|
|
|
|
{"mesecons_materials:fiber", materials.steel, materials.steel}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
local wire = "mesecons:wire_00000000_off"
|
|
|
|
|
if minetest.get_modpath("digilines") then
|
|
|
|
|
wire = "digilines:wire_std_00000000"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
|
output = "mesecons_wireless:transmitter_off",
|
|
|
|
|
recipe = {
|
|
|
|
|
{"", "mesecons_wireless:antenna", ""},
|
|
|
|
|
{"default:steel_ingot", "default:diamond", "default:steel_ingot"},
|
|
|
|
|
{"mesecons:wire_00000000_off", "mesecons_luacontroller:luacontroller0000", wire}
|
|
|
|
|
{materials.steel, materials.diamond, materials.steel},
|
|
|
|
|
{"mesecons:wire_00000000_off", "mesecons_luacontroller:luacontroller0000", materials.wire}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -449,7 +469,7 @@ minetest.register_craft({
|
|
|
|
|
output = "mesecons_wireless:receiver_off",
|
|
|
|
|
recipe = {
|
|
|
|
|
{"", "mesecons_wireless:dish", ""},
|
|
|
|
|
{"default:steel_ingot", "default:diamond", "default:steel_ingot"},
|
|
|
|
|
{"mesecons:wire_00000000_off", "mesecons_luacontroller:luacontroller0000", wire}
|
|
|
|
|
{materials.steel, materials.diamond, materials.steel},
|
|
|
|
|
{"mesecons:wire_00000000_off", "mesecons_luacontroller:luacontroller0000", materials.wire}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|