diff --git a/README.md b/README.md index 99604b0..0b63074 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ License: License: code: LGPL-2.1, media: CC BY-SA-4.0 -Depends: default, mesecons +Depends: mesecons Version 3.2 diff --git a/craft.lua b/craft.lua deleted file mode 100644 index 8ee1e03..0000000 --- a/craft.lua +++ /dev/null @@ -1,125 +0,0 @@ -minetest.register_craft({ - output = "mesetec:nodeswitch", - recipe = {{"","mesecons:wire_00000000_off",""}, - {"mesecons_materials:silicon","mesecons_lamp:lamp_off","mesecons_materials:silicon"}, - {"","default:mese_crystal",""}, - } -}) - - -minetest.register_craft({ - output = "mesetec:objdec", - recipe = {{"mesecons_materials:silicon","mesecons_solarpanel:solar_panel_off","mesecons_materials:silicon"} - } -}) - - -minetest.register_craft({ - output = "mesetec:light", - recipe = {{"mesecons_materials:silicon","mesecons_solarpanel:solar_panel_off","mesecons_materials:silicon"} - } -}) - -minetest.register_craft({ - output = "mesetec:delayer", - recipe = {{"mesecons_delayer:delayer_off_1","default:copper_ingot","mesecons_delayer:delayer_off_1"}, - } -}) - - -minetest.register_craft({ - output = "mesetec:oxygen 3", - recipe = {{"","mesecons:wire_00000000_off",""}, - {"default:sand","mesecons_lamp:lamp_off","default:sand"}, - {"","default:torch",""}, - } -}) - -minetest.register_craft({ - output = "mesetec:dmg 3", - recipe = {{"","mesecons:wire_00000000_off",""}, - {"default:sand","mesecons_lamp:lamp_off","default:sand"}, - {"","default:mese_crystal",""}, - } -}) - -minetest.register_craft({ - output = "mesetec:ladder 3", - recipe = {{"","mesecons:wire_00000000_off",""}, - {"default:sand","mesecons_lamp:lamp_off","default:sand"}, - {"","default:ladder_wood",""}, - } -}) - - -minetest.register_craft({ - output = "mesetec:keycard", - recipe = {{"mesecons_materials:silicon","mesecons:wire_00000000_off","mesecons_materials:silicon"}, - {"mesecons_materials:silicon","mesecons_lamp:lamp_off","mesecons_materials:silicon"}, - } -}) - -minetest.register_craft({ - output = "mesetec:codelock", - recipe = {{"default:steel_ingot","mesecons:wire_00000000_off","default:steel_ingot"}, - {"default:steel_ingot","mesecons_luacontroller:luacontroller0000","default:steel_ingot"}, - {"default:steel_ingot","mesecons_lamp:lamp_off","default:steel_ingot"}, - } -}) - -minetest.register_craft({ - output = "mesetec:controller", - recipe = {{"","mesecons:wire_00000000_off",""}, - {"default:steel_ingot","mesecons_walllever:wall_lever_off","default:steel_ingot"}, - {"","default:stick",""}, - } -}) - -minetest.register_craft({ - output = "mesetec:hacktool", - recipe = {{"mesecons:wire_00000000_off","","mesecons:wire_00000000_off"}, - {"default:steel_ingot","default:mese_crystal","default:steel_ingot"}, - {"","default:stick",""}, - } -}) - -minetest.register_craft({ - output = "mesetec:objdec", - recipe = {{"","mesecons:wire_00000000_off",""}, - {"","mesecons_detector:object_detector_off",""}, - {"","mesecons_luacontroller:luacontroller0000",""}, - } -}) - -minetest.register_craft({ - output = "mesetec:mtptarget", - recipe = {{"default:steel_ingot","mesecons:wire_00000000_off","default:steel_ingot"}, - {"default:steel_ingot","default:mese_crystal","default:steel_ingot"}, - {"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, - } -}) - -minetest.register_craft({ - output = "mesetec:mtp", - recipe = {{"default:steel_ingot","mesecons:wire_00000000_off","default:steel_ingot"}, - {"default:mese_crystal","mesecons_luacontroller:luacontroller0000","default:mese_crystal"}, - {"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, - } -}) - - -minetest.register_craft({ - output = "mesetec:ptp", - recipe = {{"default:steel_ingot","mesecons:wire_00000000_off","default:steel_ingot"}, - {"default:mese_crystal_fragment","mesecons_detector:object_detector_off","default:mese_crystal_fragment"}, - {"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, - } -}) - -minetest.register_craft({ - output = "mesetec:ptptarget", - recipe = {{"default:steel_ingot","mesecons:wire_00000000_off","default:steel_ingot"}, - {"default:mese_crystal_fragment","mesecons_luacontroller:luacontroller0000","default:mese_crystal_fragment"}, - {"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, - } -}) \ No newline at end of file diff --git a/depends.txt b/depends.txt deleted file mode 100644 index b599797..0000000 --- a/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default -mesecons diff --git a/description.txt b/description.txt deleted file mode 100644 index f8af19c..0000000 --- a/description.txt +++ /dev/null @@ -1 +0,0 @@ -Extra and usefull mesecons stuff \ No newline at end of file diff --git a/init.lua b/init.lua index b5755ed..2ea8783 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,5 @@ mesetec={ - maxlight=default.LIGHT_MAX or 15, + maxlight=15, player_teleport={}, mtcuser={}, mtpuser={}, @@ -15,7 +15,6 @@ dofile(minetest.get_modpath("mesetec") .. "/tools.lua") dofile(minetest.get_modpath("mesetec") .. "/teleob.lua") dofile(minetest.get_modpath("mesetec") .. "/misc.lua") -dofile(minetest.get_modpath("mesetec") .. "/craft.lua") mesetec.distance=function(p,o) return math.sqrt((p.x-o.x)*(p.x-o.x) + (p.y-o.y)*(p.y-o.y)+(p.z-o.z)*(p.z-o.z)) diff --git a/misc.lua b/misc.lua index c421cd9..f323956 100644 --- a/misc.lua +++ b/misc.lua @@ -44,10 +44,9 @@ minetest.register_node("mesetec:codelock", { on_rightclick = function(pos, node, player, itemstack, pointed_thing) mesetec.form2(pos,player) end, - tiles = {"default_steel_block.png","default_steel_block.png","default_steel_block.png","default_steel_block.png","default_steel_block.png","mesetec_code.png"}, + tiles = {"steel_block.png","steel_block.png","steel_block.png","steel_block.png","steel_block.png","mesetec_code.png"}, groups = {mesecon_needs_receiver = 1,snappy = 3, not_in_creative_inventory=0}, - sounds = default.node_sound_stone_defaults(), - is_ground_content = false, + is_ground_content = false, mesecons = {receptor = { rules = mesecon.rules.buttonlike_get, state = mesecon.state.off @@ -75,10 +74,9 @@ minetest.register_node("mesetec:dmg", { description = "Mese damage block", tiles = {"mesetec_trap.png^[colorize:#f9570001"}, alpha=1, - inventory_image = "default_lava.png^mesetec_trap2.png", + inventory_image = "lava.png^mesetec_trap2.png", groups = {mesecon=2,snappy = 3, not_in_creative_inventory=0}, - sounds = default.node_sound_stone_defaults(), - is_ground_content = false, + is_ground_content = false, drawtype="glasslike", paramtype = "light", sunlight_propagates = true, @@ -112,10 +110,9 @@ minetest.register_node("mesetec:oxygen", { description = "Mese oxygen block", tiles = {"mesetec_trap.png^[colorize:#00a5a201"}, alpha=1, - inventory_image = "default_river_water.png^mesetec_trap2.png", + inventory_image = "river_water.png^mesetec_trap2.png", groups = {mesecon=2,snappy = 3, not_in_creative_inventory=0}, - sounds = default.node_sound_stone_defaults(), - is_ground_content = false, + is_ground_content = false, drawtype="glasslike", paramtype = "light", sunlight_propagates = true, @@ -149,10 +146,9 @@ minetest.register_node("mesetec:ladder", { description = "Mese ladder block", tiles = {"mesetec_trap.png^[colorize:#87878701"}, alpha=1, - inventory_image = "default_ladder_wood.png^mesetec_trap2.png", + inventory_image = "ladder_wood.png^mesetec_trap2.png", groups = {mesecon=2,snappy = 3, not_in_creative_inventory=0}, - sounds = default.node_sound_stone_defaults(), - is_ground_content = false, + is_ground_content = false, drawtype="glasslike", paramtype = "light", sunlight_propagates = true, @@ -184,20 +180,14 @@ minetest.register_node("mesetec:ladder2", { minetest.register_node("mesetec:delayer", { description = "Delayer (Punch to change time)", - tiles = {"mesetec_delayer.png","default_sandstone_block.png"}, + tiles = {"mesetec_delayer.png","sandstone_block.png"}, groups = {dig_immediate = 2,mesecon=1}, - sounds = default.node_sound_stone_defaults(), - paramtype = "light", + paramtype = "light", sunlight_propagates = true, drawtype="nodebox", node_box = { type="fixed", fixed={-0.5,-0.5,-0.5,0.5,-0.4,0.5}}, - mesecons = {conductor = { - state = mesecon.state.on, - offstate = "mesetec:ladder", - rules = mesetec.rules - }}, on_punch = function(pos, node, player, pointed_thing) if minetest.is_protected(pos, player:get_player_name())==false then local meta = minetest.get_meta(pos) @@ -226,7 +216,8 @@ on_punch = function(pos, node, player, pointed_thing) end return false end, - mesecons = {effector = { + mesecons = { + effector = { action_on = function (pos, node) local meta = minetest.get_meta(pos) if meta:get_int("case")==0 then @@ -240,10 +231,9 @@ on_punch = function(pos, node, player, pointed_thing) minetest.register_node("mesetec:light", { description = "Light check", - tiles = {"jeija_solar_panel.png","default_steel_block.png"}, + tiles = {"mesecons_solarpanel.png","steel_block.png"}, groups = {dig_immediate = 2,mesecon=1}, - sounds = default.node_sound_stone_defaults(), - paramtype = "light", + paramtype = "light", sunlight_propagates = true, drawtype="nodebox", node_box = { @@ -251,7 +241,6 @@ minetest.register_node("mesetec:light", { fixed={-0.5,-0.5,-0.5,0.5,-0.4,0.5}}, is_ground_content = false, mesecons = {receptor = { - rules = mesecon.rules.buttonlike_get, rules = mesetec.rules }}, on_rightclick = function(pos, node, player, itemstack, pointed_thing) diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..db91cb8 --- /dev/null +++ b/mod.conf @@ -0,0 +1,3 @@ +name = mesetec +description = Extra and usefull mesecons stuff +depends = mesecons diff --git a/teleob.lua b/teleob.lua index 611aff0..ba4f6b6 100644 --- a/teleob.lua +++ b/teleob.lua @@ -107,10 +107,9 @@ after_place_node = function(pos, placer) end, - tiles = {"default_steel_block.png"}, + tiles = {"steel_block.png"}, groups = {mesecon=2,snappy = 3, not_in_creative_inventory=0}, - sounds = default.node_sound_stone_defaults(), - is_ground_content = false, + is_ground_content = false, --mesecons = {receptor = {state = "off"}}, mesecons = { @@ -138,10 +137,9 @@ minetest.register_node("mesetec:objdec", { on_rightclick = function(pos, node, player, itemstack, pointed_thing) mesetec.form1(pos,player,"obj") end, - tiles = {"default_steel_block.png","jeija_object_detector_off.png^[transform2"}, + tiles = {"steel_block.png","jeija_object_detector_off.png^[transform2"}, groups = {mesecon=2,snappy = 3, not_in_creative_inventory=0}, - sounds = default.node_sound_stone_defaults(), - is_ground_content = false, + is_ground_content = false, mesecons = {receptor = {state = "off"}}, on_construct = function(pos) if not mesecon then return false end @@ -168,10 +166,9 @@ minetest.register_node("mesetec:objdec2", { on_rightclick = function(pos, node, player, itemstack, pointed_thing) mesetec.form1(pos,player,"obj") end, - tiles = {"default_steel_block.png","jeija_object_detector_on.png^[transform2"}, + tiles = {"steel_block.png","jeija_object_detector_on.png^[transform2"}, groups = {mesecon=2,snappy = 3, not_in_creative_inventory=1}, - sounds = default.node_sound_stone_defaults(), - is_ground_content = false, + is_ground_content = false, mesecons = {receptor = {state = "on"}}, on_timer = function (pos, elapsed) local meta=minetest.get_meta(pos) @@ -199,8 +196,7 @@ on_rightclick = function(pos, node, player, itemstack, pointed_thing) end, tiles = {"mesetec_ttp.png"}, groups = {mesecon=2,snappy = 3, not_in_creative_inventory=0}, - sounds = default.node_sound_stone_defaults(), - is_ground_content = false, + is_ground_content = false, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", @@ -234,8 +230,7 @@ minetest.register_node("mesetec:mtptarget", { description = "Mese teleport target", tiles = {"mesetec_ttp_target.png"}, groups = {mesecon=2,snappy = 3, not_in_creative_inventory=0}, - sounds = default.node_sound_stone_defaults(), - is_ground_content = false, + is_ground_content = false, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", @@ -256,8 +251,7 @@ minetest.register_node("mesetec:ptp", { description = "Player teleport", tiles = {"mesetec_ptp.png"}, groups = {mesecon=2,snappy = 3, not_in_creative_inventory=0}, - sounds = default.node_sound_stone_defaults(), - is_ground_content = false, + is_ground_content = false, mesecons = {effector = { action_on = function (pos, node) local names={} @@ -284,8 +278,7 @@ minetest.register_node("mesetec:ptptarget", { description = "Player teleport target", tiles = {"mesetecptp_target.png"}, groups = {mesecon=2,snappy = 3, not_in_creative_inventory=0}, - sounds = default.node_sound_stone_defaults(), - is_ground_content = false, + is_ground_content = false, walkable = false, mesecons = {effector = { action_on = function (pos, node) diff --git a/textures/ladder_wood.png b/textures/ladder_wood.png new file mode 100644 index 0000000..b8772c5 Binary files /dev/null and b/textures/ladder_wood.png differ diff --git a/textures/lava.png b/textures/lava.png new file mode 100644 index 0000000..384b5b5 Binary files /dev/null and b/textures/lava.png differ diff --git a/textures/river_water.png b/textures/river_water.png new file mode 100644 index 0000000..9123463 Binary files /dev/null and b/textures/river_water.png differ diff --git a/textures/sandstone_block.png b/textures/sandstone_block.png new file mode 100644 index 0000000..5bd0463 Binary files /dev/null and b/textures/sandstone_block.png differ diff --git a/textures/steel_block.png b/textures/steel_block.png new file mode 100644 index 0000000..d6d670c Binary files /dev/null and b/textures/steel_block.png differ