From a5fa04cfceb64448d666cb98125465b23bede7bf Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 29 Jan 2012 19:10:03 +0100 Subject: [PATCH 1/5] Fixed some graphic glitches --- jeija/button.lua | 1 + jeija/init.lua | 3 +++ jeija/torches.lua | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/jeija/button.lua b/jeija/button.lua index 0b1232c..e9f7128 100644 --- a/jeija/button.lua +++ b/jeija/button.lua @@ -3,6 +3,7 @@ minetest.register_node("jeija:wall_button_off", { drawtype = "signlike", tile_images = {"jeija_wall_button_off.png"}, inventory_image = "jeija_wall_button_off.png", + wield_image = "jeija_wall_button_off.png", paramtype = "light", paramtype2 = "wallmounted", legacy_wallmounted = true, diff --git a/jeija/init.lua b/jeija/init.lua index afc13b6..2b74808 100644 --- a/jeija/init.lua +++ b/jeija/init.lua @@ -82,6 +82,7 @@ minetest.register_node("jeija:mesecon_off", { drawtype = "raillike", tile_images = {"jeija_mesecon_off.png", "jeija_mesecon_curved_off.png", "jeija_mesecon_t_junction_off.png", "jeija_mesecon_crossing_off.png"}, inventory_image = "jeija_mesecon_off.png", + wield_image = "jeija_mesecon_off.png", paramtype = "light", is_ground_content = true, walkable = false, @@ -646,6 +647,7 @@ minetest.register_node("jeija:solar_panel", { drawtype = "raillike", tile_images = {"jeija_solar_panel.png"}, inventory_image = "jeija_solar_panel.png", + wield_image = "jeija_solar_panel.png", paramtype = "light", walkable = false, is_ground_content = true, @@ -712,6 +714,7 @@ 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"}, inventory_image = "jeija_meselamp_on_floor_off.png", + wield_image = "jeija_meselamp_on_ceiling_off.png", paramtype = "light", sunlight_propagates = true, walkable = false, diff --git a/jeija/torches.lua b/jeija/torches.lua index fca051c..ce46436 100644 --- a/jeija/torches.lua +++ b/jeija/torches.lua @@ -12,7 +12,7 @@ minetest.register_node("jeija:mesecon_torch_off", { drawtype = "torchlike", tile_images = {"jeija_torches_off.png", "jeija_torches_off_ceiling.png", "jeija_torches_off_side.png"}, inventory_image = "jeija_torches_off.png", - sunlight_propagates = true, + paramtype = "light", walkable = false, paramtype2 = "wallmounted", legacy_wallmounted = true, @@ -24,6 +24,7 @@ minetest.register_node("jeija:mesecon_torch_on", { drawtype = "torchlike", tile_images = {"jeija_torches_on.png", "jeija_torches_on_ceiling.png", "jeija_torches_on_side.png"}, inventory_image = "jeija_torches_on.png", + wield_image = "jeija_torches_on.png", paramtype = "light", sunlight_propagates = true, walkable = false, @@ -43,7 +44,7 @@ end)]] minetest.register_abm({ nodenames = {"jeija:mesecon_torch_off","jeija:mesecon_torch_on"}, - interval = 0.1, + interval = 0.2, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) local pa = {x=0, y=0, z=0} From 72411cc337b6aadcf75e0ff31c356c4feb071452 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 5 Feb 2012 10:10:23 +0100 Subject: [PATCH 2/5] Added Levers --- jeija/init.lua | 1 + jeija/lever.lua | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 jeija/lever.lua diff --git a/jeija/init.lua b/jeija/init.lua index 33f80c6..d216324 100644 --- a/jeija/init.lua +++ b/jeija/init.lua @@ -878,6 +878,7 @@ 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") +dofile(minetest.get_modpath("jeija").."/lever.lua") --TEMPEREST's STUFF if ENABLE_TEMPEREST==1 then dofile(minetest.get_modpath("jeija").."/temperest.lua") diff --git a/jeija/lever.lua b/jeija/lever.lua new file mode 100644 index 0000000..6f20fec --- /dev/null +++ b/jeija/lever.lua @@ -0,0 +1,86 @@ +-- WALL LEVER +minetest.register_node("jeija:wall_lever_off", { + drawtype = "signlike", + tile_images = {"jeija_wall_lever_off.png"}, + inventory_image = "jeija_wall_lever_off.png", + wield_image = "jeija_wall_lever_off.png", + paramtype = "light", + paramtype2 = "wallmounted", + legacy_wallmounted = true, + walkable = false, + selection_box = { + type = "wallmounted", + }, + material = minetest.digprop_constanttime(0.3), + description="Lever", +}) +minetest.register_node("jeija:wall_lever_on", { + drawtype = "signlike", + tile_images = {"jeija_wall_lever_on.png"}, + inventory_image = "jeija_wall_lever_on.png", + paramtype = "light", + paramtype2 = "wallmounted", + legacy_wallmounted = true, + walkable = false, + selection_box = { + type = "wallmounted", + }, + material = minetest.digprop_constanttime(0.3), + drop = '"jeija:wall_lever_off" 1', + description="Lever", +}) + +minetest.register_on_dignode( + function(pos, oldnode, digger) + if oldnode.name == "jeija:wall_lever_on" then + mesecon:receptor_off(pos) + end + end +) +minetest.register_on_punchnode(function(pos, node, puncher) + if node.name == "jeija:wall_lever_off" then + minetest.env:add_node(pos, {name="jeija:wall_lever_on",param2=node.param2}) + local rules_string=nil + if node.param2 == 5 then + rules_string="button_z+" + end + if node.param2 == 3 then + rules_string="button_x+" + end + if node.param2 == 4 then + rules_string="button_z-" + end + if node.param2 == 2 then + rules_string="button_x-" + end + mesecon:receptor_on(pos, rules_string) + end + if node.name == "jeija:wall_lever_on" then + minetest.env:add_node(pos, {name="jeija:wall_lever_off",param2=node.param2}) + local rules_string=nil + if node.param2 == 5 then + rules_string="button_z+" + end + if node.param2 == 3 then + rules_string="button_x+" + end + if node.param2 == 4 then + rules_string="button_z-" + end + if node.param2 == 2 then + rules_string="button_x-" + end + mesecon:receptor_off(pos, rules_string) + end +end) + +minetest.register_craft({ + output = '"jeija:wall_lever_off" 2', + recipe = { + {'"jeija:mesecon_off"'}, + {'"default:stone"'}, + {'"default:stick"'}, + } +}) +mesecon:add_receptor_node("jeija:wall_lever") +mesecon:add_receptor_node_off("jeija:wall_lever_off") From 0d0271280fd5d702a4915b5d37a2d8e6d39ff579 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 5 Feb 2012 10:11:24 +0100 Subject: [PATCH 3/5] Lever Textures --- jeija/textures/jeija_wall_lever_off.png | Bin 0 -> 189 bytes jeija/textures/jeija_wall_lever_on.png | Bin 0 -> 173 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 jeija/textures/jeija_wall_lever_off.png create mode 100644 jeija/textures/jeija_wall_lever_on.png diff --git a/jeija/textures/jeija_wall_lever_off.png b/jeija/textures/jeija_wall_lever_off.png new file mode 100644 index 0000000000000000000000000000000000000000..ed2d4603bdc79a147f063a7a3c391a386bb61948 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfM*kAB}h>jWDu^@b=cdJoneXPo6Ms+OefPhZ%NUmcQ5C&b_a4X6t2!Jqp*tp6;J4q<-zg jfu~H94jLFVBrz}?ijoL^c_Vl#(0&F_S3j3^P6 Date: Sun, 5 Feb 2012 10:14:31 +0100 Subject: [PATCH 4/5] Fixed Lightstone Drop --- jeija/lightstone.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jeija/lightstone.lua b/jeija/lightstone.lua index 08e79dd..454eb4a 100644 --- a/jeija/lightstone.lua +++ b/jeija/lightstone.lua @@ -3,15 +3,15 @@ function mesecon:lightstone_add(name, base_item, texture_off, texture_on) tile_images = {texture_off}, inventory_image = minetest.inventorycube(texture_off), material = minetest.digprop_stonelike(0.5), - description=name.." Lightstone", + description=name.." Lightstone", }) minetest.register_node("jeija:lightstone_" .. name .. "_on", { tile_images = {texture_on}, inventory_image = minetest.inventorycube(texture_on), material = minetest.digprop_stonelike(0.5), - dug_item = "node jeija:lightstone_" .. name .. "_off 1", + drop = "jeija:lightstone_" .. name .. "_off 1", light_source = LIGHT_MAX-2, - description=name.." Lightstone", + description=name.." Lightstone", }) assert(loadstring('mesecon:register_on_signal_on(function(pos, node) \n \ if node.name == "jeija:lightstone_' .. name .. '_off" then \n \ From f4fa9dec32d7debe1a8aa058f2b0a413193a43aa Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 5 Feb 2012 10:28:32 +0100 Subject: [PATCH 5/5] Made Torches faster --- jeija/torches.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jeija/torches.lua b/jeija/torches.lua index 3f92f1e..28e9985 100644 --- a/jeija/torches.lua +++ b/jeija/torches.lua @@ -46,7 +46,7 @@ end)]] minetest.register_abm({ nodenames = {"jeija:mesecon_torch_off","jeija:mesecon_torch_on"}, - interval = 0.2, + interval = 0.1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) local pa = {x=0, y=0, z=0}