diff options
author | sfan5 <sfan5@live.de> | 2012-02-05 09:23:06 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2012-02-05 09:23:06 +0100 |
commit | 8690d8a07f5d1dc892bf396c36e0e2265685c7a6 (patch) | |
tree | 6e87d5bcc7763c52765143a80f0542e6f624a7e8 | |
parent | 592563c5fbfb408b489b83b3da06de5459a97ef3 (diff) | |
parent | f54166af45bf270cd671b3cda3cf693a3865da77 (diff) | |
download | mesecons-8690d8a07f5d1dc892bf396c36e0e2265685c7a6.tar mesecons-8690d8a07f5d1dc892bf396c36e0e2265685c7a6.tar.gz mesecons-8690d8a07f5d1dc892bf396c36e0e2265685c7a6.tar.bz2 mesecons-8690d8a07f5d1dc892bf396c36e0e2265685c7a6.tar.xz mesecons-8690d8a07f5d1dc892bf396c36e0e2265685c7a6.zip |
Merge branch 'master' of github.com:Jeija/minetest-mod-mesecons
-rw-r--r-- | jeija/alias.lua | 6 | ||||
-rw-r--r-- | jeija/init.lua | 33 | ||||
-rw-r--r-- | jeija/movestone.lua | 10 | ||||
-rw-r--r-- | jeija/temperest.lua | 17 | ||||
-rw-r--r-- | jeija/wireless.lua | 36 |
5 files changed, 50 insertions, 52 deletions
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 diff --git a/jeija/init.lua b/jeija/init.lua index 6324b9f..33f80c6 100644 --- a/jeija/init.lua +++ b/jeija/init.lua @@ -639,16 +639,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 = { + {'jeija:silicon', 'jeija:silicon', 'jeija:mesecon_off'}, + {'jeija:silicon', 'jeija:silicon', 'jeija:mesecon_off'}, + {'jeija:mesecon_off', 'jeija:mesecon_off', ''}, + } +}) + +-- Solar Panel minetest.register_node("jeija:solar_panel", { drawtype = "raillike", tile_images = {"jeija_solar_panel.png"}, @@ -700,7 +714,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, @@ -709,8 +723,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), @@ -720,7 +734,7 @@ 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", wield_image = "jeija_meselamp_on_ceiling_off.png", paramtype = "light", @@ -728,7 +742,7 @@ minetest.register_node("jeija:meselamp_off", { 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), @@ -863,9 +877,10 @@ 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") + dofile(minetest.get_modpath("jeija").."/temperest.lua") end --INIT 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}) diff --git a/jeija/temperest.lua b/jeija/temperest.lua index d54da73..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, @@ -16,7 +17,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 +29,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) @@ -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, @@ -136,7 +138,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( @@ -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, @@ -185,7 +188,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( diff --git a/jeija/wireless.lua b/jeija/wireless.lua index d067167..36af390 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() @@ -170,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", }) @@ -231,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", }) @@ -243,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', ''}, } }) @@ -305,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', ''}, } }) |