Add files via upload
parent
aecd68f08b
commit
7adf19174e
14
craft.lua
14
craft.lua
|
@ -1,5 +1,5 @@
|
|||
minetest.register_craft({
|
||||
output = "was:chemical_lump",
|
||||
output = "was:chemical_lump 3",
|
||||
recipe = {
|
||||
{"group:dye","group:dye","group:dye"},
|
||||
{"group:dye","default:copper_lump","group:dye"},
|
||||
|
@ -7,6 +7,16 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "was:roater_sender",
|
||||
recipe = {
|
||||
{"was:plastic_piece","was:plastic_piece","was:plastic_piece"},
|
||||
{"was:plastic_piece","default:mese","was:plastic_piece"},
|
||||
{"was:plastic_piece","was:wire","was:plastic_piece"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "was:computer",
|
||||
recipe = {
|
||||
|
@ -16,7 +26,7 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "was:wire 30",
|
||||
output = "was:wire 20",
|
||||
recipe = {
|
||||
{"was:plastic_piece","was:plastic_piece","was:plastic_piece"},
|
||||
}
|
||||
|
|
29
items.lua
29
items.lua
|
@ -232,7 +232,7 @@ minetest.register_node("was:touchscreen", {
|
|||
{-0.15, -0.25, 0.45, 0.15, 0.25, 0.5},
|
||||
}
|
||||
},
|
||||
groups = {oddly_breakable_by_hand = 3,was_unit=1},
|
||||
groups = {cracky = 3,was_unit=1},
|
||||
after_place_node = function(pos, placer)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("owner",placer:get_player_name() or "")
|
||||
|
@ -264,4 +264,31 @@ minetest.register_node("was:touchscreen", {
|
|||
meta:set_string("infotext",msg)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("was:roater_sender", {
|
||||
description = "Roater sender",
|
||||
tiles = {"was_wire.png"},
|
||||
drawtype="nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2="facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.37, -0.5, -0.25, 0.37, -0.37, 0.25},
|
||||
{-0.37, -0.37, 0.18, -0.31, -0.125, 0.25},
|
||||
{0.31, -0.5, 0.18, 0.37, -0.12, 0.25}
|
||||
}
|
||||
},
|
||||
groups = {oddly_breakable_by_hand = 3,was_unit=1},
|
||||
on_waswire=function(pos,channel,from_channel,msg)
|
||||
for _,p in pairs(minetest.find_nodes_in_area(vector.add(pos,10),vector.subtract(pos,10),"group:was_unit")) do
|
||||
if not vector.equals(pos,p) then
|
||||
was.send(p,channel,msg,from_channel)
|
||||
end
|
||||
end
|
||||
end,
|
||||
on_timer = function (pos, elapsed)
|
||||
minetest.swap_node(pos,{name="was:wire",param2=135})
|
||||
end,
|
||||
})
|
Loading…
Reference in New Issue