From 83b5ee4bae923883adad8dc5bef0f3971b1d2899 Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Sun, 29 Jan 2012 13:19:14 -0500 Subject: [PATCH 1/9] Add missing forward slash (was causing plugs and sockets to fail). --- jeija/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jeija/init.lua b/jeija/init.lua index 067575d..b9482f5 100644 --- a/jeija/init.lua +++ b/jeija/init.lua @@ -862,7 +862,7 @@ dofile(minetest.get_modpath("jeija").."/switch.lua") dofile(minetest.get_modpath("jeija").."/pistons.lua") --TEMPEREST's STUFF if ENABLE_TEMPEREST==1 then - dofile(minetest.get_modpath("jeija").."temperest.lua") + dofile(minetest.get_modpath("jeija").."/temperest.lua") end --INIT From 15c9988a4581dd3d4bd18eeb0874ab010b54915e Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Sun, 29 Jan 2012 13:19:40 -0500 Subject: [PATCH 2/9] Make variables local. --- jeija/temperest.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jeija/temperest.lua b/jeija/temperest.lua index d54da73..4843212 100644 --- a/jeija/temperest.lua +++ b/jeija/temperest.lua @@ -16,7 +16,7 @@ minetest.register_node("jeija:mesecon_plug", { mesecon:register_on_signal_on(function(pos, node) if node.name=="jeija:mesecon_plug" then local set_node_on = function(pos) - node = minetest.env:get_node(pos) + local node = minetest.env:get_node(pos) if node.name=="jeija:mesecon_socket_off" then minetest.env:add_node(pos, {name="jeija:mesecon_socket_on"}) nodeupdate(pos) @@ -28,16 +28,16 @@ mesecon:register_on_signal_on(function(pos, node) end end - lnode = minetest.env:get_node({x=pos.x-1, y=pos.y, z=pos.z}) --a node between this node and the one two nodes away + local lnode = minetest.env:get_node({x=pos.x-1, y=pos.y, z=pos.z}) --a node between this node and the one two nodes away if lnode.name=="air" then set_node_on({x=pos.x-2, y=pos.y, z=pos.z}) end - lnode = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z}) --a node between this node and the one two nodes away + local lnode = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z}) --a node between this node and the one two nodes away if lnode.name=="air" then set_node_on({x=pos.x+2, y=pos.y, z=pos.z}) end - lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z-1}) --a node between this node and the one two nodes away + local lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z-1}) --a node between this node and the one two nodes away if lnode.name=="air" then set_node_on({x=pos.x, y=pos.y, z=pos.z-2}) end - lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1}) --a node between this node and the one two nodes away + local lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1}) --a node between this node and the one two nodes away if lnode.name=="air" then set_node_on({x=pos.x, y=pos.y, z=pos.z+2}) end end end) @@ -136,7 +136,7 @@ minetest.register_node("jeija:mesecon_socket_on", { selection_box = { type = "fixed", }, - dug_item='node "jeija:mesecon_socket_off" 1', + drop='node "jeija:mesecon_socket_off" 1', }) minetest.register_on_dignode( @@ -185,7 +185,7 @@ minetest.register_node("jeija:mesecon_inverter_on", { selection_box = { type = "fixed", }, - dug_item='node "jeija:mesecon_inverter_off" 1', + drop='node "jeija:mesecon_inverter_off" 1', }) minetest.register_on_dignode( From 1289cefee05bcac5121563a948dd9d7e9f0c4d77 Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Sun, 29 Jan 2012 14:16:28 -0500 Subject: [PATCH 3/9] Descriptions for plugs and sockets. --- jeija/temperest.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jeija/temperest.lua b/jeija/temperest.lua index 4843212..7fa61e3 100644 --- a/jeija/temperest.lua +++ b/jeija/temperest.lua @@ -1,6 +1,7 @@ --TEMPEREST-PLUG minetest.register_node("jeija:mesecon_plug", { + description = "Plug", drawtype = "raillike", paramtype = "light", is_ground_content = true, @@ -113,6 +114,7 @@ minetest.register_craft({ --TEMPEREST-SOCKET minetest.register_node("jeija:mesecon_socket_off", { + description = "Socket", drawtype = "raillike", paramtype = "light", is_ground_content = true, @@ -162,6 +164,7 @@ minetest.register_craft({ --TEMPEREST-INVERTER minetest.register_node("jeija:mesecon_inverter_off", { + description = "Inverter", drawtype = "raillike", paramtype = "light", is_ground_content = true, From dbd9b4e6b75bd996ae8529516861407bb942bfe4 Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Mon, 30 Jan 2012 13:10:03 -0500 Subject: [PATCH 4/9] Add aliases for plugs, sockets, inverters, and buttons. --- jeija/alias.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jeija/alias.lua b/jeija/alias.lua index 90ed87b..079bb8d 100644 --- a/jeija/alias.lua +++ b/jeija/alias.lua @@ -7,9 +7,15 @@ minetest.register_alias("jeija:wireless_inverter", "jeija:wireless_inverter_on") minetest.register_alias("jeija:wireless_receiver", "jeija:wireless_receiver_off") minetest.register_alias("jeija:wireless_transmitter", "jeija:wireless_transmitter_off") minetest.register_alias("jeija:switch", "jeija:mesecon_switch_off") +minetest.register_alias("jeija:wall_button", "jeija:wall_button_off") minetest.register_alias("jeija:piston", "jeija:piston_normal") minetest.register_alias("jeija:blinky_plant", "jeija:blinky_plant_off") minetest.register_alias("jeija:mesecon_torch", "jeija:mesecon_torch_on") minetest.register_alias("jeija:hydro_turbine", "jeija:hydro_turbine_off") minetest.register_alias("jeija:pressure_plate_stone", "jeija:pressure_plate_stone_off") minetest.register_alias("jeija:pressure_plate_wood", "jeija:pressure_plate_wood_off") + +if ENABLE_TEMPEREST==1 then + minetest.register_alias("jeija:mesecon_socket", "jeija:mesecon_socket_off") + minetest.register_alias("jeija:mesecon_inverter", "jeija:mesecon_inverter_off") +end \ No newline at end of file From bb820a5a55010cc1cd6d91d6b68cfbf1b1a89e33 Mon Sep 17 00:00:00 2001 From: Jeija Date: Tue, 31 Jan 2012 12:48:55 +0100 Subject: [PATCH 5/9] Remove 2nd craft recipte for sticky movestones --- jeija/movestone.lua | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/jeija/movestone.lua b/jeija/movestone.lua index ec0cd9a..6831979 100644 --- a/jeija/movestone.lua +++ b/jeija/movestone.lua @@ -254,16 +254,6 @@ minetest.register_entity("jeija:sticky_movestone_entity", { end }) -minetest.register_craft({ - output = '"jeija:sticky_movestone" 2', - recipe = { - {'"default:stone"', '"default:stone"', '"default:stone"'}, - {'"jeija:mesecon_off"', '"jeija:mesecon_off"', '"default:tree"'}, - {'"default:stone"', '"default:stone"', '"default:stone"'}, - } -}) - - mesecon:register_on_signal_on(function (pos, node) if node.name=="jeija:sticky_movestone" then local direction=jeija_get_movestone_direction({x=pos.x, y=pos.y, z=pos.z}) From c76070fa27c92bca24d6fa9e20b5381d62c48d79 Mon Sep 17 00:00:00 2001 From: Jeija Date: Sat, 4 Feb 2012 18:02:51 +0100 Subject: [PATCH 6/9] Fix Meselamp-Orientation Bug --- jeija/init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jeija/init.lua b/jeija/init.lua index b9482f5..86cc08f 100644 --- a/jeija/init.lua +++ b/jeija/init.lua @@ -698,7 +698,7 @@ minetest.register_abm( -- MESELAMPS minetest.register_node("jeija:meselamp_on", { drawtype = "torchlike", - tile_images = {"jeija_meselamp_on_floor_on.png", "jeija_meselamp_on_ceiling_on.png", "jeija_meselamp_on.png"}, + tile_images = {"jeija_meselamp_on_ceiling_on.png", "jeija_meselamp_on_floor_on.png", "jeija_meselamp_on.png"}, inventory_image = "jeija_meselamp_on_floor_on.png", paramtype = "light", sunlight_propagates = true, @@ -707,8 +707,8 @@ minetest.register_node("jeija:meselamp_on", { paramtype2 = "wallmounted", light_source = LIGHT_MAX, selection_box = { - type = "wallmounted", - type = "fixed", + --type = "wallmounted", + --type = "fixed", fixed = {-0.38, -0.5, -0.1, 0.38, -0.2, 0.1}, }, material = minetest.digprop_constanttime(0.1), @@ -718,14 +718,14 @@ minetest.register_node("jeija:meselamp_on", { minetest.register_node("jeija:meselamp_off", { drawtype = "torchlike", - tile_images = {"jeija_meselamp_on_floor_off.png", "jeija_meselamp_on_ceiling_off.png", "jeija_meselamp_off.png"}, + 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", paramtype = "light", sunlight_propagates = true, walkable = false, wall_mounted = false, selection_box = { - type = "fixed", + --type = "fixed", fixed = {-0.38, -0.5, -0.1, 0.38, -0.2, 0.1}, }, material = minetest.digprop_constanttime(0.1), From 400511949ab0fac6a9f1612b6b9e6a2cee71a46f Mon Sep 17 00:00:00 2001 From: Jeija Date: Sat, 4 Feb 2012 18:21:12 +0100 Subject: [PATCH 7/9] Apply lightstone --- jeija/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/jeija/init.lua b/jeija/init.lua index 86cc08f..b680b24 100644 --- a/jeija/init.lua +++ b/jeija/init.lua @@ -860,6 +860,7 @@ dofile(minetest.get_modpath("jeija").."/wireless.lua") 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") --TEMPEREST's STUFF if ENABLE_TEMPEREST==1 then dofile(minetest.get_modpath("jeija").."/temperest.lua") From 9aaa4af37e5f2a9c3a85cfe30049429ccdfea9e4 Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Sat, 4 Feb 2012 13:01:56 -0500 Subject: [PATCH 8/9] Move the IC craft definition into init.lua, since it is also needed byt the node detector. --- jeija/init.lua | 20 +++++++++++++++++--- jeija/wireless.lua | 16 ---------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/jeija/init.lua b/jeija/init.lua index b680b24..f39e3eb 100644 --- a/jeija/init.lua +++ b/jeija/init.lua @@ -638,16 +638,30 @@ minetest.register_on_dignode( end ) - --- Solar Panel - +-- Silicon minetest.register_craftitem("jeija:silicon", { image = "jeija_silicon.png", on_place_on_ground = minetest.craftitem_place_item, description="Silicon", }) +-- IC +minetest.register_craftitem("jeija:ic", { + image = "jeija_ic.png", + on_place_on_ground = minetest.craftitem_place_item, + description="IC", +}) +minetest.register_craft({ + output = 'craft "jeija:ic" 2', + recipe = { + {'craft "jeija:silicon"', 'craft "jeija:silicon"', 'node "jeija:mesecon_off"'}, + {'craft "jeija:silicon"', 'craft "jeija:silicon"', 'node "jeija:mesecon_off"'}, + {'node "jeija:mesecon_off"', 'node "jeija:mesecon_off"', ''}, + } +}) + +-- Solar Panel minetest.register_node("jeija:solar_panel", { drawtype = "raillike", tile_images = {"jeija_solar_panel.png"}, diff --git a/jeija/wireless.lua b/jeija/wireless.lua index d067167..dcd6c92 100644 --- a/jeija/wireless.lua +++ b/jeija/wireless.lua @@ -1,19 +1,3 @@ --- IC -minetest.register_craftitem("jeija:ic", { - image = "jeija_ic.png", - on_place_on_ground = minetest.craftitem_place_item, - description="IC", -}) - -minetest.register_craft({ - output = 'craft "jeija:ic" 2', - recipe = { - {'craft "jeija:silicon"', 'craft "jeija:silicon"', 'node "jeija:mesecon_off"'}, - {'craft "jeija:silicon"', 'craft "jeija:silicon"', 'node "jeija:mesecon_off"'}, - {'node "jeija:mesecon_off"', 'node "jeija:mesecon_off"', ''}, - } -}) - --COMMON WIRELESS FUNCTIONS function mesecon:read_wlre_from_file() From f54166af45bf270cd671b3cda3cf693a3865da77 Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Sat, 4 Feb 2012 13:07:36 -0500 Subject: [PATCH 9/9] Update wireless and IC nodes for itemdef. --- jeija/init.lua | 6 +++--- jeija/wireless.lua | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/jeija/init.lua b/jeija/init.lua index f39e3eb..34c20c6 100644 --- a/jeija/init.lua +++ b/jeija/init.lua @@ -655,9 +655,9 @@ minetest.register_craftitem("jeija:ic", { minetest.register_craft({ output = 'craft "jeija:ic" 2', recipe = { - {'craft "jeija:silicon"', 'craft "jeija:silicon"', 'node "jeija:mesecon_off"'}, - {'craft "jeija:silicon"', 'craft "jeija:silicon"', 'node "jeija:mesecon_off"'}, - {'node "jeija:mesecon_off"', 'node "jeija:mesecon_off"', ''}, + {'jeija:silicon', 'jeija:silicon', 'jeija:mesecon_off'}, + {'jeija:silicon', 'jeija:silicon', 'jeija:mesecon_off'}, + {'jeija:mesecon_off', 'jeija:mesecon_off', ''}, } }) diff --git a/jeija/wireless.lua b/jeija/wireless.lua index dcd6c92..36af390 100644 --- a/jeija/wireless.lua +++ b/jeija/wireless.lua @@ -154,7 +154,7 @@ minetest.register_node("jeija:wireless_receiver_on", { tile_images = {"jeija_wireless_receiver_tb_on.png", "jeija_wireless_receiver_tb_on.png", "jeija_wireless_receiver_on.png", "jeija_wireless_receiver_on.png", "jeija_wireless_receiver_on.png", "jeija_wireless_receiver_on.png"}, inventory_image = minetest.inventorycube("jeija_wireless_receiver_on.png"), material = minetest.digprop_constanttime(0.8), - dug_item = 'node "jeija:wireless_receiver_off" 1', + drop = 'jeija:wireless_receiver_off', description="Wireless Receiver", }) @@ -215,7 +215,7 @@ minetest.register_node("jeija:wireless_inverter_off", { tile_images = {"jeija_wireless_inverter_tb.png", "jeija_wireless_inverter_tb.png", "jeija_wireless_inverter_off.png", "jeija_wireless_inverter_off.png", "jeija_wireless_inverter_off.png", "jeija_wireless_inverter_off.png"}, inventory_image = minetest.inventorycube("jeija_wireless_inverter_off.png"), material = minetest.digprop_constanttime(0.8), - dug_item = 'node "jeija:wireless_inverter_on" 1', + drop = 'jeija:wireless_inverter_on', description="Wireless Inverter", }) @@ -227,11 +227,11 @@ minetest.register_node("jeija:wireless_inverter_on", { }) minetest.register_craft({ - output = 'node "jeija:wireless_inverter_off" 2', + output = '"jeija:wireless_inverter_off" 2', recipe = { - {'', 'craft "default:steel_ingot"', ''}, - {'craft "jeija:ic"', 'node "jeija:mesecon_off"', 'craft "jeija:ic"'}, - {'', 'node "jeija:mesecon_off"', ''}, + {'', 'default:steel_ingot', ''}, + {'jeija:ic', 'jeija:mesecon_off', 'jeija:ic'}, + {'', 'jeija:mesecon_off', ''}, } }) @@ -289,11 +289,11 @@ minetest.register_node("jeija:wireless_transmitter_off", { }) minetest.register_craft({ - output = 'node "jeija:wireless_transmitter_off" 2', + output = '"jeija:wireless_transmitter_off" 2', recipe = { - {'craft "default:steel_ingot"', 'node "jeija:mesecon_off"', 'craft "default:steel_ingot"'}, - {'', 'node "jeija:mesecon_off"', ''}, - {'', 'craft "jeija:ic"', ''}, + {'default:steel_ingot', 'jeija:mesecon_off', 'default:steel_ingot'}, + {'', 'jeija:mesecon_off', ''}, + {'', 'jeija:ic', ''}, } })