summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesecons/wires.lua38
-rw-r--r--mesecons_commandblock/init.lua22
2 files changed, 54 insertions, 6 deletions
diff --git a/mesecons/wires.lua b/mesecons/wires.lua
index d753120..d74cdb2 100644
--- a/mesecons/wires.lua
+++ b/mesecons/wires.lua
@@ -237,12 +237,38 @@ function mesecon:update_autoconnect(pos, secondcall, replace_old)
end
end
-minetest.register_craft({
- output = '"mesecons:wire_00000000_off" 16',
- recipe = {
- {'"default:mese"'},
- }
-})
+if minetest.registered_nodes["default:stone_with_mese"] == nil then
+
+ minetest.register_craft({
+ output = "mesecons:wire_00000000_off 18",
+ recipe = {
+ {"default:mese"},
+ }
+ })
+else
+
+ minetest.register_craft({
+ type = "cooking",
+ output = "mesecons:wire_00000000_off 2",
+ recipe = "default:mese_crystal_fragment",
+ cooktime = 3,
+ })
+
+ minetest.register_craft({
+ type = "cooking",
+ output = "mesecons:wire_00000000_off 18",
+ recipe = "default:mese_crystal",
+ cooktime = 15,
+ })
+
+ minetest.register_craft({
+ type = "cooking",
+ output = "mesecons:wire_00000000_off 162",
+ recipe = "default:mese",
+ cooktime = 30,
+ })
+
+end
minetest.register_craft({
type = "cooking",
diff --git a/mesecons_commandblock/init.lua b/mesecons_commandblock/init.lua
index b61c85b..35eea25 100644
--- a/mesecons_commandblock/init.lua
+++ b/mesecons_commandblock/init.lua
@@ -1,3 +1,25 @@
+minetest.register_chatcommand("say", {
+ params = "<text>",
+ description = "Say <text> as the server",
+ privs = {server=true},
+ func = function(name, param)
+ minetest.chat_send_all(param)
+ end
+})
+
+minetest.register_chatcommand("tell", {
+ params = "<name> <text>",
+ description = "Say <text> to <name> privately",
+ func = function(name, param)
+ local found, _, target, message = param:find("^([^%s]+)%s+(.*)$")
+ if found == nil then
+ minetest.chat_send_player(name, "Invalid usage: " .. param)
+ return
+ end
+ minetest.chat_send_player(target, name .. " whispers: " .. message)
+ end
+})
+
local initialize_data = function(meta, player, command, param)
meta:set_string("formspec",
"invsize[9,6;]" ..