diff --git a/.gitmodules b/.gitmodules index 9e369b3..4cf2636 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,9 @@ [submodule "mods/digilines"] path = mods/digilines url = https://github.com/Jeija/minetest-mod-digilines.git +[submodule "mods/mesecons"] + path = mods/mesecons + url = https://github.com/Jeija/minetest-mod-mesecons.git [submodule "mods/moretrees"] path = mods/moretrees url = https://github.com/VanessaE/moretrees.git @@ -16,6 +19,30 @@ [submodule "mods/moreblocks"] path = mods/moreblocks url = https://github.com/Calinou/moreblocks.git +[submodule "mods/moreores"] + path = mods/moreores + url = https://github.com/Calinou/moreores.git +[submodule "mods/forth_computer"] + path = mods/forth_computer + url = https://github.com/Novatux/forth_computer.git +[submodule "mods/wireless"] + path = mods/wireless + url = https://github.com/lordcirth/minetest-wireless.git [submodule "mods/homedecor"] path = mods/homedecor url = https://github.com/VanessaE/homedecor.git +[submodule "mods/trash_can"] + path = mods/trash_can + url = https://github.com/4Evergreen4/trash_can.git +[submodule "mods/computer"] + path = mods/computer + url = https://github.com/kaeza/minetest-computer.git +[submodule "mods/connected_textures"] + path = mods/connected_textures + url = https://github.com/HybridDog/connected_textures.git +[submodule "mods/gloopblocks"] + path = mods/gloopblocks + url = https://github.com/VanessaE/gloopblocks.git +[submodule "mods/itemframes"] + path = mods/itemframes + url = https://github.com/Zeg9/minetest-itemframes.git diff --git a/mods/computer b/mods/computer new file mode 160000 index 0000000..a08b88f --- /dev/null +++ b/mods/computer @@ -0,0 +1 @@ +Subproject commit a08b88fe1ac34235c8c05e6ab79d5a078aa11df9 diff --git a/mods/computer/CHANGES.txt b/mods/computer/CHANGES.txt deleted file mode 100644 index b9b455c..0000000 --- a/mods/computer/CHANGES.txt +++ /dev/null @@ -1,38 +0,0 @@ -version 0.2.3: - - Added animated router front - - Added all crafts for new items - -version 0.2.2: - - Added printer - - Added server - -version 0.2.1: - - Added modern tower pc - - Added wifi router - - Added flatscreen LCD and keyboard - -Version 0.2.0: - - Added recipes. - - Partly re-written. - - Removed original baby tower (seemed out of place). - - You can now turn devices on and off by right-clicking. - - Mod is now on github. - -Version 0.1.4: - - Added Admiral 64 & 128 (Commodore 64 & 128 lookalikes) - -Version 0.1.3: - - Added SX Spectre (Sinclair ZX Spectrum lookalike) - - Added Pony SlayStation 2 (Sony PlayStation lookalike) - - Minor fixes to textures. - -Version 0.1.2: - - Nodes now use the node box as selection box. - - Added Pony SlayStation (Sony PlayStation lookalike) - - Added Pony Vanio (Sony VAIO lookalike...err...just a generic laptop) - -Version 0.1.1: - - Added SheFriend SOO (Amiga 500 lookalike) - -Version 0.1.0: - - Initial Version only a baby tower. diff --git a/mods/computer/LICENSE.txt b/mods/computer/LICENSE.txt deleted file mode 100644 index 1dc9f2f..0000000 --- a/mods/computer/LICENSE.txt +++ /dev/null @@ -1,15 +0,0 @@ - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2012 Diego Martínez - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - diff --git a/mods/computer/README.txt b/mods/computer/README.txt deleted file mode 100644 index 6d6c7dc..0000000 --- a/mods/computer/README.txt +++ /dev/null @@ -1,61 +0,0 @@ - -Decorative Computers Mod for Minetest -by Diego Martínez - -How to install: -Unzip the archive an place it in minetest-base-directory/mods/minetest/ -if you have a windows client or a linux run-in-place client. If you have -a linux system-wide instalation place it in ~/.minetest/mods/minetest/. -If you want to install this mod only in one world create the folder -worldmods/ in your worlddirectory. -For further information or help see: -http://wiki.minetest.com/wiki/Installing_Mods - -How to use the mod: -For now just use creative mode or the `/give' or `/giveme' chat commands - to get the items. - -These are the items currently defined by this mod: - -computer:printer (printer scanner combo) -computer:server (rack server) -computer:tower (modern type) -computer:monitor (LCD with keyboard) -computer:router (wifi type) -computer:babytower -computer:shefriendSOO -computer:slaystation -computer:vanio -computer:spectre -computer:slaystation2 -computer:admiral64 -computer:admiral128 - -There's also a `computer:computer' alias to `computer:babytower'. - -License: -Sourcecode: WTFPL (see below) -Graphics: WTFPL (see below) - -Thanks to all the people in the forums and the #minetest IRC channel for - their support and suggestions; in no particular order: - OldCoder, Josh, tonyka, VanessaE, davidpace, Jordach, and all the other - sirs/madammes that I forgot to mention (sorry, please remind me if it - was you ;) ). - -See also: -http://minetest.net/ - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2012 Diego Martínez - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/mods/computer/TODO.txt b/mods/computer/TODO.txt deleted file mode 100644 index e1e5752..0000000 --- a/mods/computer/TODO.txt +++ /dev/null @@ -1,29 +0,0 @@ - -TO-DO List: - -- New Nodes: - - - Computers: - - Mainframe (well me have a rackserver now) - - My Computer :P - - - Peripherals: - - Scanner ( well we have a printer/scanner combo now) - - - Consoles: - - NES - - SNES - - DC - - - Handhelds - - GB/C - - GBA - - Calculator - - Smartphone - -- Animated screens - -- Implement some kind of games (take code from `tetris' mod?). [It would be - nice if Minetest provided a "canvas" GUI widget :)]. - -- Get more suggestions :) diff --git a/mods/computer/computers.lua b/mods/computer/computers.lua deleted file mode 100644 index e5101b2..0000000 --- a/mods/computer/computers.lua +++ /dev/null @@ -1,351 +0,0 @@ - --- Amiga 500 lookalike --- Fun fact: "Amiga" is spanish for "female friend" ("Amigo" is for male); --- that's why this computer was named "She Friend". -computer.register("computer:shefriendSOO", { - description = "SheFriendSOO"; - tiles_off = { front=true; }; - node_box = computer.pixelnodebox(32, { - -- X Y Z W H L - { 0, 0, 17, 32, 32, 12 }, -- Monitor Screen - { 3, 3, 29, 26, 26, 3 }, -- Monitor Tube - { 0, 0, 0, 32, 4, 17 }, -- Keyboard - }); -}); - --- Some generic laptop. Sony VAIO came to mind when thinking about a name :) --- Fun fact: "Vanio" sounds like "baño" ("bathroom" in spanish, pronounced --- as something like "bah-nee-oh") -computer.register("computer:vanio", { - description = "Pony Vanio"; - tiles_off = { front=true; top=true; left=true; right=true; back=true; }; - node_box = computer.pixelnodebox(32, { - -- X Y Z W H L - { 0, 0, 4, 32, 3, 24 }, -- Keyboard - { 0, 3, 25, 32, 21, 3 }, -- Screen - }); - node_box_off = computer.pixelnodebox(32, { - -- X Y Z W H L - { 0, 0, 4, 32, 3, 24 }, -- Keyboard - { 0, 3, 4, 32, 3, 24 }, -- Screen - }); -}); - --- Sony PlayStation lookalike --- Fun fact: Swapping the first letters gives valid words :) --- Pony SureiSutteshun!!! -computer.register("computer:slaystation", { - description = "Pony SlayStation"; - tiles_off = { top=true; }; - node_box = computer.pixelnodebox(32, { - -- X Y Z W H L - { 0, 0, 11, 32, 6, 21 }, -- Console - { 1, 0, 1, 4, 2, 9 }, -- Controller 1 L Grip - { 10, 0, 1, 4, 2, 9 }, -- Controller 1 R Grip - { 5, 0, 4, 5, 2, 5 }, -- Controller 1 Center - { 18, 0, 1, 4, 2, 9 }, -- Controller 2 L Grip - { 27, 0, 1, 4, 2, 9 }, -- Controller 2 R Grip - { 22, 0, 4, 5, 2, 5 }, -- Controller 2 Center - }); -}); - --- Sony PlayStation 2 lookalike --- Fun fact: Swapping the first letters gives valid words :) --- Pony SureiSutteshun!!! -computer.register("computer:slaystation2", { - description = "Pony SlayStation 2"; - tiles_off = { front=true; }; - node_box = computer.pixelnodebox(32, { - -- X Y Z W H L - { 2, 2, 11, 28, 3, 19 }, -- Console (Upper part) - { 2, 0, 11, 26, 2, 19 }, -- Console (Lower part) - { 1, 0, 1, 4, 2, 9 }, -- Controller 1 L Grip - { 10, 0, 1, 4, 2, 9 }, -- Controller 1 R Grip - { 5, 0, 1, 5, 2, 8 }, -- Controller 1 Center - { 18, 0, 1, 4, 2, 9 }, -- Controller 2 L Grip - { 27, 0, 1, 4, 2, 9 }, -- Controller 2 R Grip - { 22, 0, 1, 5, 2, 8 }, -- Controller 2 Center - }); -}); - --- Sinclair ZX Spectrum lookalike -computer.register("computer:specter", { - description = "SX Specter"; - tiles_off = { }; - node_box = computer.pixelnodebox(32, { - -- X Y Z W H L - { 3, 0, 0, 26, 4, 17 }, -- Keyboard - { 18, 0, 18, 12, 6, 14 }, -- Tape Player - }); -}); - --- Nintendo Wii lookalike. -computer.register("computer:wee", { - description = "Nientiendo Wee"; - tiles_off = { front=true; }; - node_box = computer.pixelnodebox(32, { - -- X Y Z W H L - { 11, 0, 3, 10, 6, 26 }, -- Base - { 12, 6, 4, 8, 22, 24 }, -- Top - }); -}); - --- Apple iPad lookalike. -computer.register_handheld("computer:piepad", { - description = "Snapple Piepad"; -}); - --- Commodore 64 lookalike -computer.register("computer:admiral64", { - description = "Admiral64"; - tiles_off = { }; - node_box = computer.pixelnodebox(32, { - -- X Y Z W H L - { 0, 0, 0, 32, 4, 18 }, -- Keyboard - }); -}); - --- Commodore 128 lookalike -computer.register("computer:admiral128", { - description = "Admiral128"; - tiles_off = { }; - node_box = computer.pixelnodebox(32, { - -- X Y Z W H L - { 0, 0, 0, 32, 4, 27 }, -- Keyboard - }); -}); - ---------------------------------------------------------------------------------- -----------------------------added by crazyginger72------------------------------- ----------------------------Code cleanup by pitriss------------------------------- ---------------------------------------------------------------------------------- - --- Generic Flat Screen LCD (16x9) with keyboard -computer.register_monitor("computer:monitor_on", { - tiles = {"computer_monitor_t.png","computer_monitor_bt.png", "computer_monitor_l.png","computer_monitor_r.png", "computer_monitor_b.png","computer_monitor_f_desktop.png"}, - swap = "computer:monitor"; -}) - -computer.register_monitor("computer:monitor_bios", { - tiles = {"computer_monitor_t.png", "computer_monitor_bt.png", "computer_monitor_l.png", "computer_monitor_r.png", "computer_monitor_b.png", "computer_monitor_f_bios.png"}, - swap = "computer:monitor_loading"; -}) - -computer.register_monitor("computer:monitor_loading", { - tiles = {"computer_monitor_t.png", "computer_monitor_bt.png", "computer_monitor_l.png", "computer_monitor_r.png", "computer_monitor_b.png", "computer_monitor_f_loading.png"}, - swap = "computer:monitor_login"; -}) - -computer.register_monitor("computer:monitor_login", { - tiles = {"computer_monitor_t.png", "computer_monitor_bt.png", "computer_monitor_l.png", "computer_monitor_r.png", "computer_monitor_b.png", "computer_monitor_f_login.png"}, - swap = "computer:monitor_on"; -}) - -computer.register_monitor("computer:monitor_on", { - tiles = {"computer_monitor_t.png", "computer_monitor_bt.png", "computer_monitor_l.png", "computer_monitor_r.png", "computer_monitor_b.png", "computer_monitor_f_desktop.png"}, - swap = "computer:monitor"; -}) - -computer.register_monitor("computer:monitor", { - tiles = {"computer_monitor_t.png", "computer_monitor_bt.png", "computer_monitor_l.png", "computer_monitor_r.png", "computer_monitor_b.png", "computer_monitor_f_off.png"}, - groups = {crumbly=3}, - swap = "computer:monitor_bios"; -}) - ---WIFI Router (linksys look-a-like) - - minetest.register_node("computer:router", { - description = "WIFI Router", - tiles = {"computer_router_t.png", "computer_router_bt.png", "computer_router_l.png", "computer_router_r.png", "computer_router_b.png",{name="computer_router_f_animated.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.0}},}, - paramtype = "light", - paramtype2 = "facedir", - walkable = false, - is_ground_content = true, - groups = {crumbly=3}, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.25, -0.5, -0.0625, 0.25, -0.375, 0.3125}, - {-0.1875, -0.4375, 0.3125, -0.125, -0.1875, 0.375}, - {0.125, -0.4375, 0.3125, 0.1875, -0.1875, 0.375}, - {-0.0625, -0.4375, 0.3125, 0.0625, -0.25, 0.375}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.25, -0.5, -0.0625, 0.25, -0.375, 0.3125}, - {-0.1875, -0.4375, 0.3125, -0.125, -0.1875, 0.375}, - {0.125, -0.4375, 0.3125, 0.1875, -0.1875, 0.375}, - {-0.0625, -0.4375, 0.3125, 0.0625, -0.25, 0.375}, - }, - }, -}) - ---Modern PC Tower - - minetest.register_node("computer:tower_on", { - description = "Computer Tower", - tiles = {"computer_tower_t.png","computer_tower_bt.png","computer_tower_l.png","computer_tower_r.png","computer_tower_b.png","computer_tower_f_on.png"}, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, - is_ground_content = true, - groups = {crumbly=3,not_in_creative_inventory=1}, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375}, - {-0.1875, -0.5, -0.353774, 0.1875, 0, -0.0625}, - {-0.1875, 0.247641, -0.353774, 0.1875, 0.3125, 0.1875}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375}, - }, - }, - drop = 'computer:tower', - - on_rightclick = function ( pos, node, clicker, itemstack) - node.name = "computer:tower"; - minetest.set_node(pos, node); - nodeupdate(pos) - end -}) - - minetest.register_node("computer:tower", { - description = "Computer Tower", - tiles = {"computer_tower_t.png", "computer_tower_bt.png", "computer_tower_l.png", "computer_tower_r.png", "computer_tower_b.png", "computer_tower_f_off.png"}, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, - is_ground_content = true, - groups = {crumbly=3}, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375}, - {-0.1875, -0.5, -0.353774, 0.1875, 0, -0.0625}, - {-0.1875, 0.247641, -0.353774, 0.1875, 0.3125, 0.1875}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.1875, -0.5, -0.3125, 0.1875, 0.3125, 0.4375}, - }, - }, - on_rightclick = function ( pos, node, clicker, itemstack) - node.name = "computer:tower_on"; - minetest.set_node(pos, node); - nodeupdate(pos) - end -}) - --- Printer/scaner combo - -minetest.register_node("computer:printer", { - description = "Printer Scaner Combo", - tiles = {"computer_printer_t.png", "computer_printer_bt.png", "computer_printer_l.png", "computer_printer_r.png", "computer_printer_b.png", "computer_printer_f.png"}, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, - is_ground_content = true, - groups = {crumbly=3}, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.4375, -0.3125, -0.125, 0.4375, -0.0625, 0.375}, - {-0.4375, -0.5, -0.125, 0.4375, -0.4375, 0.375}, - {-0.4375, -0.5, -0.125, -0.25, -0.0625, 0.375}, - {0.25, -0.5, -0.125, 0.4375, -0.0625, 0.375}, - {-0.4375, -0.5, -0.0625, 0.4375, -0.0625, 0.375}, - {-0.375, -0.4375, 0.25, 0.375, -0.0625, 0.4375}, - {-0.25, -0.25, 0.4375, 0.25, 0.0625, 0.5}, - {-0.25, -0.481132, -0.3125, 0.25, -0.4375, 0}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.4375, -0.3125, -0.125, 0.4375, -0.0625, 0.375}, - {-0.4375, -0.5, -0.125, 0.4375, -0.4375, 0.375}, - {-0.4375, -0.5, -0.125, -0.25, -0.0625, 0.375}, - {0.25, -0.5, -0.125, 0.4375, -0.0625, 0.375}, - {-0.4375, -0.5, -0.0625, 0.4375, -0.0625, 0.375}, - {-0.375, -0.4375, 0.25, 0.375, -0.0625, 0.4375}, - {-0.25, -0.25, 0.4375, 0.25, 0.0625, 0.5}, - {-0.25, -0.481132, -0.3125, 0.25, -0.4375, 0}, - }, - }, -}) - ---Rack Server - -minetest.register_node("computer:server", { - drawtype = "nodebox", - description = "Rack Server", - tiles = {'computer_server_t.png', 'computer_server_bt.png', 'computer_server_l.png', 'computer_server_r.png', 'computer_server_bt.png', 'computer_server_f_off.png'}, - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, - groups = { snappy = 3 }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375}, - }, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375}, - }, - --drop = 'computer:server', - sounds = default.node_sound_wood_defaults(), - on_rightclick = function ( pos, node, clicker, itemstack) - node.name = "computer:server_on"; - minetest.set_node(pos, node); - nodeupdate(pos) - end, - on_place = function(itemstack, placer, pointed_thing) - local pos = pointed_thing.above - if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then - minetest.chat_send_player( placer:get_player_name(), "Not enough vertical space to place a server!" ) - return - end - return minetest.item_place(itemstack, placer, pointed_thing) - end, -}) - -minetest.register_node("computer:server_on", { - drawtype = "nodebox", - description = "Rack Server", - tiles = {'computer_server_t.png', 'computer_server_bt.png', 'computer_server_r.png', 'computer_server_l.png', 'computer_server_bt.png', 'computer_server_f_on.png'}, - - inventory_image = "computer_server_inv.png", - sunlight_propagates = false, - paramtype = "light", - paramtype2 = "facedir", - walkable = true, - groups = { snappy = 3,not_in_creative_inventory=1 }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375}, - }, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375}, - }, - sounds = default.node_sound_wood_defaults(), - drop = 'computer:server', - on_rightclick = function ( pos, node, clicker, itemstack) - node.name = "computer:server"; - minetest.set_node(pos, node); - nodeupdate(pos) - end, -}) diff --git a/mods/computer/depends.txt b/mods/computer/depends.txt deleted file mode 100644 index 4ad96d5..0000000 --- a/mods/computer/depends.txt +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/mods/computer/init.lua b/mods/computer/init.lua deleted file mode 100644 index 5a2d12f..0000000 --- a/mods/computer/init.lua +++ /dev/null @@ -1,147 +0,0 @@ - -computer = { }; - -computer.register = function ( name, def ) - local nodename = name; - if (name:sub(1, 1) == ":") then name = name:sub(2); end - local modname, basename = name:match("^([^:]+):(.*)"); - local TEXPFX = modname.."_"..basename.."_"; - local ONSTATE = modname..":"..basename; - local OFFSTATE = modname..":"..basename.."_off"; - local def = def; - minetest.register_node(ONSTATE, { - drawtype = "nodebox"; - paramtype = "light"; - paramtype2 = "facedir"; - description = def.description; - groups = { snappy=2, choppy=2, oddly_breakable_by_hand=2 }; - tiles = { - TEXPFX.."tp.png", - TEXPFX.."bt.png", - TEXPFX.."rt.png", - TEXPFX.."lt.png", - TEXPFX.."bk.png", - TEXPFX.."ft.png", - }; - node_box = def.node_box; - selection_box = def.node_box; - on_rightclick = function ( pos, node, clicker, itemstack) - if (def.on_turn_off) then - if (def.on_turn_off(pos, node, clicker, itemstack)) then return; end - end - node.name = OFFSTATE; - minetest.env:set_node(pos, node); - nodeupdate(pos); - end; - }); - minetest.register_node(OFFSTATE, { - drawtype = "nodebox"; - paramtype = "light"; - paramtype2 = "facedir"; - groups = { snappy=2, choppy=2, oddly_breakable_by_hand=2, - not_in_creative_inventory=1 }; - tiles = { - (TEXPFX.."tp"..(def.tiles_off.top and "_off" or "")..".png"), - (TEXPFX.."bt"..(def.tiles_off.bottom and "_off" or "")..".png"), - (TEXPFX.."rt"..(def.tiles_off.right and "_off" or "")..".png"), - (TEXPFX.."lt"..(def.tiles_off.left and "_off" or "")..".png"), - (TEXPFX.."bk"..(def.tiles_off.back and "_off" or "")..".png"), - (TEXPFX.."ft"..(def.tiles_off.front and "_off" or "")..".png"), - }; - node_box = def.node_box_off or def.node_box; - selection_box = def.node_box_off or def.node_box; - on_rightclick = function ( pos, node, clicker, itemstack) - if (def.on_turn_on) then - if (def.on_turn_on(pos, node, clicker, itemstack)) then return; end - end - node.name = ONSTATE; - minetest.env:set_node(pos, node); - nodeupdate(pos); - end; - drop = ONSTATE; - }); -end - -computer.register_handheld = function ( name, def ) - local nodename = name; - if (name:sub(1, 1) == ":") then name = name:sub(2); end - local modname, basename = name:match("^([^:]+):(.*)"); - local TEXPFX = modname.."_"..basename.."_inv"; - local ONSTATE = modname..":"..basename; - local OFFSTATE = modname..":"..basename.."_off"; - local on_use = def.on_use; - minetest.register_craftitem(ONSTATE, { - description = def.description; - inventory_image = TEXPFX..".png"; - wield_image = TEXPFX..".png"; - }); -end - -computer.pixelnodebox = function ( size, boxes ) - local fixed = { }; - local i, box; - for i, box in ipairs(boxes) do - local x, y, z, w, h, l = unpack(box); - fixed[#fixed + 1] = { - (x / size) - 0.5, - (y / size) - 0.5, - (z / size) - 0.5, - ((x + w) / size) - 0.5, - ((y + h) / size) - 0.5, - ((z + l) / size) - 0.5, - }; - end - return { - type = "fixed"; - fixed = fixed; - }; -end - -computer.register_monitor = function (name, def) - minetest.register_node(name, { - description = "Monitor and keyboard", - tiles = def.tiles, - paramtype = "light", - light_source = 4, - paramtype2 = "facedir", - walkable = false, - is_ground_content = true, - groups = def.groups or {crumbly=3,not_in_creative_inventory=1}, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116}, - {-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5}, - {-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698}, - {-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125}, - {-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125}, - {-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.3125, 0.1875, 0.5, 0.375, 0.223116}, - {-0.25, -0.5, 0.125, 0.25, -0.466981, 0.5}, - {-0.125, -0.5, 0.3125, 0.125, 0.0283019, 0.346698}, - {-0.375, -0.3125, 0.208965, 0.375, 0.240566, 0.3125}, - {-0.4375, -0.5, -0.4375, 0.4375, -0.4375, -0.125}, - {-0.1875, -0.5, 0.25, 0.1875, -0.410377, 0.375}, - }, - }, - drop = 'computer:monitor', - on_rightclick = function ( pos, node, clicker, itemstack) - node.name = def.swap or "computer:monitor"; - minetest.set_node(pos, node); - nodeupdate(pos) - end - }) -end - -local MODPATH = minetest.get_modpath("computer"); -dofile(MODPATH.."/computers.lua"); -dofile(MODPATH.."/miscitems.lua"); -dofile(MODPATH.."/recipes.lua"); - - diff --git a/mods/computer/locale/es.txt b/mods/computer/locale/es.txt deleted file mode 100644 index db6fdcb..0000000 --- a/mods/computer/locale/es.txt +++ /dev/null @@ -1,6 +0,0 @@ - -# Language: Español -# Author: Diego Martínez - -Plastic sheet = Placa de Plastico -Unprocessed Plastic base = Base de Plastico No Procesada diff --git a/mods/computer/miscitems.lua b/mods/computer/miscitems.lua deleted file mode 100644 index 7ce63de..0000000 --- a/mods/computer/miscitems.lua +++ /dev/null @@ -1,77 +0,0 @@ - --- Copyright (C) 2012-2013 Diego Martínez --- License is WTFPL (see README.txt). - --- This file defines some items in order to not have to depend on other mods. - --- Boilerplate to support localized strings if intllib mod is installed. -local S; -if (minetest.get_modpath("intllib")) then - dofile(minetest.get_modpath("intllib").."/intllib.lua"); - S = intllib.Getter(minetest.get_current_modname()); -else - S = function ( s ) return s; end -end - -if (not minetest.get_modpath("homedecor")) then - - minetest.register_craftitem(":homedecor:plastic_sheeting", { - description = S("Plastic sheet"), - inventory_image = "homedecor_plastic_sheeting.png", - }) - - minetest.register_craftitem(":homedecor:plastic_base", { - description = S("Unprocessed Plastic base"), - wield_image = "homedecor_plastic_base.png", - inventory_image = "homedecor_plastic_base_inv.png", - }) - - minetest.register_craft({ - type = "shapeless", - output = 'homedecor:plastic_base 6', - recipe = { "default:junglegrass", - "default:junglegrass", - "default:junglegrass" - } - }) - - minetest.register_craft({ - type = "shapeless", - output = 'homedecor:plastic_base 3', - recipe = { "default:dry_shrub", - "default:dry_shrub", - "default:dry_shrub" - }, - }) - - minetest.register_craft({ - type = "shapeless", - output = 'homedecor:plastic_base 4', - recipe = { "default:leaves", - "default:leaves", - "default:leaves", - "default:leaves", - "default:leaves", - "default:leaves" - } - }) - - minetest.register_craft({ - type = "cooking", - output = "homedecor:plastic_sheeting", - recipe = "homedecor:plastic_base", - }) - - minetest.register_craft({ - type = 'fuel', - recipe = 'homedecor:plastic_base', - burntime = 30, - }) - - minetest.register_craft({ - type = 'fuel', - recipe = 'homedecor:plastic_sheeting', - burntime = 30, - }) - -end -- not homedecor diff --git a/mods/computer/recipes.lua b/mods/computer/recipes.lua deleted file mode 100644 index 524e955..0000000 --- a/mods/computer/recipes.lua +++ /dev/null @@ -1,117 +0,0 @@ --- Copyright (C) 2012-2013 Diego Martínez --- License is WTFPL (see README.txt). - -minetest.register_craft({ - output = "computer:shefriendSOO", - recipe = { - { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", }, - { "homedecor:plastic_sheeting", "default:glass", "homedecor:plastic_sheeting", }, - { "homedecor:plastic_sheeting", "default:wood", "homedecor:plastic_sheeting", }, - }; -}); - -minetest.register_craft({ - output = "computer:slaystation", - recipe = { - { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", }, - { "homedecor:plastic_sheeting", "default:wood", "homedecor:plastic_sheeting", }, - }; -}); - -minetest.register_craft({ - output = "computer:vanio", - recipe = { - { "homedecor:plastic_sheeting", "", "", }, - { "default:glass", "", "" }, - { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", }, - }; -}); - -minetest.register_craft({ - output = "computer:spectre", - recipe = { - { "", "", "homedecor:plastic_sheeting", }, - { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", }, - { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", }, - }; -}); - -minetest.register_craft({ - output = "computer:slaystation2", - recipe = { - { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", }, - { "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", }, - }; -}); - -minetest.register_craft({ - output = "computer:admiral64", - recipe = { - { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", }, - { "default:wood", "default:wood", "default:wood", }, - }; -}); - -minetest.register_craft({ - output = "computer:admiral128", - recipe = { - { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", }, - { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot", }, - }; -}); - ---new stuff - -minetest.register_craft({ - output = "computer:monitor", - recipe = { - { "homedecor:plastic_sheeting", "default:glass","", }, - { "homedecor:plastic_sheeting", "default:glass","", }, - { "homedecor:plastic_sheeting", "default:mese_crystal_fragment", "homedecor:plastic_sheeting", }, - }; -}); - -minetest.register_craft({ - output = "computer:router", - recipe = { - { "default:steel_ingot","","", }, - { "default:steel_ingot" ,"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", }, - { "default:mese_crystal_fragment","homedecor:plastic_sheeting", "homedecor:plastic_sheeting", }, - }; -}); - -minetest.register_craft({ - output = "computer:tower", - recipe = { - { "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", }, - { "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", }, - { "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting", }, - }; -}); - -minetest.register_craft({ - output = "computer:printer", - recipe = { - { "homedecor:plastic_sheeting", "default:steel_ingot","", }, - { "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", }, - { "homedecor:plastic_sheeting", "default:coal_lump", "homedecor:plastic_sheeting", }, - }; -}); - -minetest.register_craft({ - output = "computer:printer", - recipe = { - { "homedecor:plastic_sheeting", "default:steel_ingot","", }, - { "homedecor:plastic_sheeting", "default:mese_crystal", "homedecor:plastic_sheeting", }, - { "homedecor:plastic_sheeting", "dye:black", "homedecor:plastic_sheeting", }, - }; -}); - -minetest.register_craft({ - output = "computer:server", - recipe = { - { "computer:tower", "computer:tower", "computer:tower", }, - { "computer:tower", "computer:tower", "computer:tower", }, - { "computer:tower", "computer:tower", "computer:tower", }, - }; -}); diff --git a/mods/computer/textures/computer_admiral128_bk.png b/mods/computer/textures/computer_admiral128_bk.png deleted file mode 100644 index 488ec1d..0000000 Binary files a/mods/computer/textures/computer_admiral128_bk.png and /dev/null differ diff --git a/mods/computer/textures/computer_admiral128_bt.png b/mods/computer/textures/computer_admiral128_bt.png deleted file mode 100644 index 73d1f2a..0000000 Binary files a/mods/computer/textures/computer_admiral128_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_admiral128_ft.png b/mods/computer/textures/computer_admiral128_ft.png deleted file mode 100644 index dc6a3bc..0000000 Binary files a/mods/computer/textures/computer_admiral128_ft.png and /dev/null differ diff --git a/mods/computer/textures/computer_admiral128_lt.png b/mods/computer/textures/computer_admiral128_lt.png deleted file mode 100644 index 07f112c..0000000 Binary files a/mods/computer/textures/computer_admiral128_lt.png and /dev/null differ diff --git a/mods/computer/textures/computer_admiral128_rt.png b/mods/computer/textures/computer_admiral128_rt.png deleted file mode 100644 index bf8052d..0000000 Binary files a/mods/computer/textures/computer_admiral128_rt.png and /dev/null differ diff --git a/mods/computer/textures/computer_admiral128_tp.png b/mods/computer/textures/computer_admiral128_tp.png deleted file mode 100644 index e3788a4..0000000 Binary files a/mods/computer/textures/computer_admiral128_tp.png and /dev/null differ diff --git a/mods/computer/textures/computer_admiral64_bk.png b/mods/computer/textures/computer_admiral64_bk.png deleted file mode 100644 index b10bb38..0000000 Binary files a/mods/computer/textures/computer_admiral64_bk.png and /dev/null differ diff --git a/mods/computer/textures/computer_admiral64_bt.png b/mods/computer/textures/computer_admiral64_bt.png deleted file mode 100644 index fc50758..0000000 Binary files a/mods/computer/textures/computer_admiral64_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_admiral64_ft.png b/mods/computer/textures/computer_admiral64_ft.png deleted file mode 100644 index 51f40e6..0000000 Binary files a/mods/computer/textures/computer_admiral64_ft.png and /dev/null differ diff --git a/mods/computer/textures/computer_admiral64_lt.png b/mods/computer/textures/computer_admiral64_lt.png deleted file mode 100644 index 1332a13..0000000 Binary files a/mods/computer/textures/computer_admiral64_lt.png and /dev/null differ diff --git a/mods/computer/textures/computer_admiral64_rt.png b/mods/computer/textures/computer_admiral64_rt.png deleted file mode 100644 index c89353f..0000000 Binary files a/mods/computer/textures/computer_admiral64_rt.png and /dev/null differ diff --git a/mods/computer/textures/computer_admiral64_tp.png b/mods/computer/textures/computer_admiral64_tp.png deleted file mode 100644 index da1fcdd..0000000 Binary files a/mods/computer/textures/computer_admiral64_tp.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_b.png b/mods/computer/textures/computer_monitor_b.png deleted file mode 100644 index a79fb66..0000000 Binary files a/mods/computer/textures/computer_monitor_b.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_bt.png b/mods/computer/textures/computer_monitor_bt.png deleted file mode 100644 index 467f030..0000000 Binary files a/mods/computer/textures/computer_monitor_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_btdl.png b/mods/computer/textures/computer_monitor_btdl.png deleted file mode 100644 index 53e26ea..0000000 Binary files a/mods/computer/textures/computer_monitor_btdl.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_f_bios.png b/mods/computer/textures/computer_monitor_f_bios.png deleted file mode 100644 index c686416..0000000 Binary files a/mods/computer/textures/computer_monitor_f_bios.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_f_desktop.png b/mods/computer/textures/computer_monitor_f_desktop.png deleted file mode 100644 index 4154d75..0000000 Binary files a/mods/computer/textures/computer_monitor_f_desktop.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_f_dl.png b/mods/computer/textures/computer_monitor_f_dl.png deleted file mode 100644 index ce07c83..0000000 Binary files a/mods/computer/textures/computer_monitor_f_dl.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_f_loading.png b/mods/computer/textures/computer_monitor_f_loading.png deleted file mode 100644 index eb1d227..0000000 Binary files a/mods/computer/textures/computer_monitor_f_loading.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_f_login.png b/mods/computer/textures/computer_monitor_f_login.png deleted file mode 100644 index 3006270..0000000 Binary files a/mods/computer/textures/computer_monitor_f_login.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_f_off.png b/mods/computer/textures/computer_monitor_f_off.png deleted file mode 100644 index 5d2a6b5..0000000 Binary files a/mods/computer/textures/computer_monitor_f_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_f_on.png b/mods/computer/textures/computer_monitor_f_on.png deleted file mode 100644 index e5cbf21..0000000 Binary files a/mods/computer/textures/computer_monitor_f_on.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_l.png b/mods/computer/textures/computer_monitor_l.png deleted file mode 100644 index 3541857..0000000 Binary files a/mods/computer/textures/computer_monitor_l.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_r.png b/mods/computer/textures/computer_monitor_r.png deleted file mode 100644 index 9d38ab7..0000000 Binary files a/mods/computer/textures/computer_monitor_r.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_t.png b/mods/computer/textures/computer_monitor_t.png deleted file mode 100644 index fd6286f..0000000 Binary files a/mods/computer/textures/computer_monitor_t.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_t_off.png b/mods/computer/textures/computer_monitor_t_off.png deleted file mode 100644 index 525fd48..0000000 Binary files a/mods/computer/textures/computer_monitor_t_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_monitor_tdl.png b/mods/computer/textures/computer_monitor_tdl.png deleted file mode 100644 index 742f119..0000000 Binary files a/mods/computer/textures/computer_monitor_tdl.png and /dev/null differ diff --git a/mods/computer/textures/computer_piepad_inv.png b/mods/computer/textures/computer_piepad_inv.png deleted file mode 100644 index 21d956a..0000000 Binary files a/mods/computer/textures/computer_piepad_inv.png and /dev/null differ diff --git a/mods/computer/textures/computer_piepad_inv_off.png b/mods/computer/textures/computer_piepad_inv_off.png deleted file mode 100644 index f261b3d..0000000 Binary files a/mods/computer/textures/computer_piepad_inv_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_printer_b.png b/mods/computer/textures/computer_printer_b.png deleted file mode 100644 index 9b45480..0000000 Binary files a/mods/computer/textures/computer_printer_b.png and /dev/null differ diff --git a/mods/computer/textures/computer_printer_bt.png b/mods/computer/textures/computer_printer_bt.png deleted file mode 100644 index a497c4a..0000000 Binary files a/mods/computer/textures/computer_printer_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_printer_f.png b/mods/computer/textures/computer_printer_f.png deleted file mode 100644 index 8623aaa..0000000 Binary files a/mods/computer/textures/computer_printer_f.png and /dev/null differ diff --git a/mods/computer/textures/computer_printer_l.png b/mods/computer/textures/computer_printer_l.png deleted file mode 100644 index 013d5e4..0000000 Binary files a/mods/computer/textures/computer_printer_l.png and /dev/null differ diff --git a/mods/computer/textures/computer_printer_r.png b/mods/computer/textures/computer_printer_r.png deleted file mode 100644 index f73fe7e..0000000 Binary files a/mods/computer/textures/computer_printer_r.png and /dev/null differ diff --git a/mods/computer/textures/computer_printer_t.png b/mods/computer/textures/computer_printer_t.png deleted file mode 100644 index fd59245..0000000 Binary files a/mods/computer/textures/computer_printer_t.png and /dev/null differ diff --git a/mods/computer/textures/computer_router_b.png b/mods/computer/textures/computer_router_b.png deleted file mode 100644 index e21e55c..0000000 Binary files a/mods/computer/textures/computer_router_b.png and /dev/null differ diff --git a/mods/computer/textures/computer_router_bt.png b/mods/computer/textures/computer_router_bt.png deleted file mode 100644 index 39c8aeb..0000000 Binary files a/mods/computer/textures/computer_router_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_router_f.png b/mods/computer/textures/computer_router_f.png deleted file mode 100644 index 5173f1e..0000000 Binary files a/mods/computer/textures/computer_router_f.png and /dev/null differ diff --git a/mods/computer/textures/computer_router_f_animated.png b/mods/computer/textures/computer_router_f_animated.png deleted file mode 100644 index cd78ede..0000000 Binary files a/mods/computer/textures/computer_router_f_animated.png and /dev/null differ diff --git a/mods/computer/textures/computer_router_l.png b/mods/computer/textures/computer_router_l.png deleted file mode 100644 index 82f36d4..0000000 Binary files a/mods/computer/textures/computer_router_l.png and /dev/null differ diff --git a/mods/computer/textures/computer_router_r.png b/mods/computer/textures/computer_router_r.png deleted file mode 100644 index 8a2b3f9..0000000 Binary files a/mods/computer/textures/computer_router_r.png and /dev/null differ diff --git a/mods/computer/textures/computer_router_t.png b/mods/computer/textures/computer_router_t.png deleted file mode 100644 index cf2e16a..0000000 Binary files a/mods/computer/textures/computer_router_t.png and /dev/null differ diff --git a/mods/computer/textures/computer_server_bt.png b/mods/computer/textures/computer_server_bt.png deleted file mode 100644 index 6f83d6f..0000000 Binary files a/mods/computer/textures/computer_server_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_server_f_off.png b/mods/computer/textures/computer_server_f_off.png deleted file mode 100644 index cd93d70..0000000 Binary files a/mods/computer/textures/computer_server_f_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_server_f_on.png b/mods/computer/textures/computer_server_f_on.png deleted file mode 100644 index f976d2d..0000000 Binary files a/mods/computer/textures/computer_server_f_on.png and /dev/null differ diff --git a/mods/computer/textures/computer_server_l.png b/mods/computer/textures/computer_server_l.png deleted file mode 100644 index 6ae29f5..0000000 Binary files a/mods/computer/textures/computer_server_l.png and /dev/null differ diff --git a/mods/computer/textures/computer_server_r.png b/mods/computer/textures/computer_server_r.png deleted file mode 100644 index 60f4aa0..0000000 Binary files a/mods/computer/textures/computer_server_r.png and /dev/null differ diff --git a/mods/computer/textures/computer_server_t.png b/mods/computer/textures/computer_server_t.png deleted file mode 100644 index 1de4499..0000000 Binary files a/mods/computer/textures/computer_server_t.png and /dev/null differ diff --git a/mods/computer/textures/computer_shefriendSOO_bk.png b/mods/computer/textures/computer_shefriendSOO_bk.png deleted file mode 100644 index 4f179b6..0000000 Binary files a/mods/computer/textures/computer_shefriendSOO_bk.png and /dev/null differ diff --git a/mods/computer/textures/computer_shefriendSOO_bt.png b/mods/computer/textures/computer_shefriendSOO_bt.png deleted file mode 100644 index a052328..0000000 Binary files a/mods/computer/textures/computer_shefriendSOO_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_shefriendSOO_ft.png b/mods/computer/textures/computer_shefriendSOO_ft.png deleted file mode 100644 index b4e1f3a..0000000 Binary files a/mods/computer/textures/computer_shefriendSOO_ft.png and /dev/null differ diff --git a/mods/computer/textures/computer_shefriendSOO_ft_off.png b/mods/computer/textures/computer_shefriendSOO_ft_off.png deleted file mode 100644 index 3295bf2..0000000 Binary files a/mods/computer/textures/computer_shefriendSOO_ft_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_shefriendSOO_lt.png b/mods/computer/textures/computer_shefriendSOO_lt.png deleted file mode 100644 index 193850d..0000000 Binary files a/mods/computer/textures/computer_shefriendSOO_lt.png and /dev/null differ diff --git a/mods/computer/textures/computer_shefriendSOO_rt.png b/mods/computer/textures/computer_shefriendSOO_rt.png deleted file mode 100644 index 7fd2f3a..0000000 Binary files a/mods/computer/textures/computer_shefriendSOO_rt.png and /dev/null differ diff --git a/mods/computer/textures/computer_shefriendSOO_tp.png b/mods/computer/textures/computer_shefriendSOO_tp.png deleted file mode 100644 index 0c34c88..0000000 Binary files a/mods/computer/textures/computer_shefriendSOO_tp.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation2_bk.png b/mods/computer/textures/computer_slaystation2_bk.png deleted file mode 100644 index a7af9b8..0000000 Binary files a/mods/computer/textures/computer_slaystation2_bk.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation2_bt.png b/mods/computer/textures/computer_slaystation2_bt.png deleted file mode 100644 index bac0f75..0000000 Binary files a/mods/computer/textures/computer_slaystation2_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation2_ft.png b/mods/computer/textures/computer_slaystation2_ft.png deleted file mode 100644 index 364059a..0000000 Binary files a/mods/computer/textures/computer_slaystation2_ft.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation2_ft_off.png b/mods/computer/textures/computer_slaystation2_ft_off.png deleted file mode 100644 index 6d06d57..0000000 Binary files a/mods/computer/textures/computer_slaystation2_ft_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation2_lt.png b/mods/computer/textures/computer_slaystation2_lt.png deleted file mode 100644 index 5fe035b..0000000 Binary files a/mods/computer/textures/computer_slaystation2_lt.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation2_rt.png b/mods/computer/textures/computer_slaystation2_rt.png deleted file mode 100644 index c0958c8..0000000 Binary files a/mods/computer/textures/computer_slaystation2_rt.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation2_tp.png b/mods/computer/textures/computer_slaystation2_tp.png deleted file mode 100644 index 273ed87..0000000 Binary files a/mods/computer/textures/computer_slaystation2_tp.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation_bk.png b/mods/computer/textures/computer_slaystation_bk.png deleted file mode 100644 index d3da3bf..0000000 Binary files a/mods/computer/textures/computer_slaystation_bk.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation_bt.png b/mods/computer/textures/computer_slaystation_bt.png deleted file mode 100644 index 0bd1a46..0000000 Binary files a/mods/computer/textures/computer_slaystation_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation_ft.png b/mods/computer/textures/computer_slaystation_ft.png deleted file mode 100644 index 0354106..0000000 Binary files a/mods/computer/textures/computer_slaystation_ft.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation_lt.png b/mods/computer/textures/computer_slaystation_lt.png deleted file mode 100644 index ed698ae..0000000 Binary files a/mods/computer/textures/computer_slaystation_lt.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation_rt.png b/mods/computer/textures/computer_slaystation_rt.png deleted file mode 100644 index 06b40cc..0000000 Binary files a/mods/computer/textures/computer_slaystation_rt.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation_tp.png b/mods/computer/textures/computer_slaystation_tp.png deleted file mode 100644 index eace288..0000000 Binary files a/mods/computer/textures/computer_slaystation_tp.png and /dev/null differ diff --git a/mods/computer/textures/computer_slaystation_tp_off.png b/mods/computer/textures/computer_slaystation_tp_off.png deleted file mode 100644 index 6fa3b7e..0000000 Binary files a/mods/computer/textures/computer_slaystation_tp_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_specter_bk.png b/mods/computer/textures/computer_specter_bk.png deleted file mode 100644 index 503a2e3..0000000 Binary files a/mods/computer/textures/computer_specter_bk.png and /dev/null differ diff --git a/mods/computer/textures/computer_specter_bt.png b/mods/computer/textures/computer_specter_bt.png deleted file mode 100644 index c33a0b3..0000000 Binary files a/mods/computer/textures/computer_specter_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_specter_ft.png b/mods/computer/textures/computer_specter_ft.png deleted file mode 100644 index c4ca02e..0000000 Binary files a/mods/computer/textures/computer_specter_ft.png and /dev/null differ diff --git a/mods/computer/textures/computer_specter_lt.png b/mods/computer/textures/computer_specter_lt.png deleted file mode 100644 index 73b8d4d..0000000 Binary files a/mods/computer/textures/computer_specter_lt.png and /dev/null differ diff --git a/mods/computer/textures/computer_specter_rt.png b/mods/computer/textures/computer_specter_rt.png deleted file mode 100644 index 50996af..0000000 Binary files a/mods/computer/textures/computer_specter_rt.png and /dev/null differ diff --git a/mods/computer/textures/computer_specter_tp.png b/mods/computer/textures/computer_specter_tp.png deleted file mode 100644 index 0d5a92d..0000000 Binary files a/mods/computer/textures/computer_specter_tp.png and /dev/null differ diff --git a/mods/computer/textures/computer_tower_b.png b/mods/computer/textures/computer_tower_b.png deleted file mode 100644 index 12b9598..0000000 Binary files a/mods/computer/textures/computer_tower_b.png and /dev/null differ diff --git a/mods/computer/textures/computer_tower_bt.png b/mods/computer/textures/computer_tower_bt.png deleted file mode 100644 index fc9fd02..0000000 Binary files a/mods/computer/textures/computer_tower_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_tower_f_off.png b/mods/computer/textures/computer_tower_f_off.png deleted file mode 100644 index d4f2d75..0000000 Binary files a/mods/computer/textures/computer_tower_f_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_tower_f_on.png b/mods/computer/textures/computer_tower_f_on.png deleted file mode 100644 index a01bc7f..0000000 Binary files a/mods/computer/textures/computer_tower_f_on.png and /dev/null differ diff --git a/mods/computer/textures/computer_tower_l.png b/mods/computer/textures/computer_tower_l.png deleted file mode 100644 index 308fb46..0000000 Binary files a/mods/computer/textures/computer_tower_l.png and /dev/null differ diff --git a/mods/computer/textures/computer_tower_r.png b/mods/computer/textures/computer_tower_r.png deleted file mode 100644 index 95be5fe..0000000 Binary files a/mods/computer/textures/computer_tower_r.png and /dev/null differ diff --git a/mods/computer/textures/computer_tower_t.png b/mods/computer/textures/computer_tower_t.png deleted file mode 100644 index ee97041..0000000 Binary files a/mods/computer/textures/computer_tower_t.png and /dev/null differ diff --git a/mods/computer/textures/computer_vanio_bk.png b/mods/computer/textures/computer_vanio_bk.png deleted file mode 100644 index 50fabf5..0000000 Binary files a/mods/computer/textures/computer_vanio_bk.png and /dev/null differ diff --git a/mods/computer/textures/computer_vanio_bk_off.png b/mods/computer/textures/computer_vanio_bk_off.png deleted file mode 100644 index 8a2d074..0000000 Binary files a/mods/computer/textures/computer_vanio_bk_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_vanio_bt.png b/mods/computer/textures/computer_vanio_bt.png deleted file mode 100644 index 33b630a..0000000 Binary files a/mods/computer/textures/computer_vanio_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_vanio_ft.png b/mods/computer/textures/computer_vanio_ft.png deleted file mode 100644 index bdc943c..0000000 Binary files a/mods/computer/textures/computer_vanio_ft.png and /dev/null differ diff --git a/mods/computer/textures/computer_vanio_ft_off.png b/mods/computer/textures/computer_vanio_ft_off.png deleted file mode 100644 index 8a2d074..0000000 Binary files a/mods/computer/textures/computer_vanio_ft_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_vanio_lt.png b/mods/computer/textures/computer_vanio_lt.png deleted file mode 100644 index 0bc3d68..0000000 Binary files a/mods/computer/textures/computer_vanio_lt.png and /dev/null differ diff --git a/mods/computer/textures/computer_vanio_lt_off.png b/mods/computer/textures/computer_vanio_lt_off.png deleted file mode 100644 index 8a2d074..0000000 Binary files a/mods/computer/textures/computer_vanio_lt_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_vanio_rt.png b/mods/computer/textures/computer_vanio_rt.png deleted file mode 100644 index 014015e..0000000 Binary files a/mods/computer/textures/computer_vanio_rt.png and /dev/null differ diff --git a/mods/computer/textures/computer_vanio_rt_off.png b/mods/computer/textures/computer_vanio_rt_off.png deleted file mode 100644 index 8a2d074..0000000 Binary files a/mods/computer/textures/computer_vanio_rt_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_vanio_tp.png b/mods/computer/textures/computer_vanio_tp.png deleted file mode 100644 index 61144dc..0000000 Binary files a/mods/computer/textures/computer_vanio_tp.png and /dev/null differ diff --git a/mods/computer/textures/computer_vanio_tp_off.png b/mods/computer/textures/computer_vanio_tp_off.png deleted file mode 100644 index 641704f..0000000 Binary files a/mods/computer/textures/computer_vanio_tp_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_wee_bk.png b/mods/computer/textures/computer_wee_bk.png deleted file mode 100644 index 78bca44..0000000 Binary files a/mods/computer/textures/computer_wee_bk.png and /dev/null differ diff --git a/mods/computer/textures/computer_wee_bt.png b/mods/computer/textures/computer_wee_bt.png deleted file mode 100644 index 19f80ee..0000000 Binary files a/mods/computer/textures/computer_wee_bt.png and /dev/null differ diff --git a/mods/computer/textures/computer_wee_ft.png b/mods/computer/textures/computer_wee_ft.png deleted file mode 100644 index ca58d7e..0000000 Binary files a/mods/computer/textures/computer_wee_ft.png and /dev/null differ diff --git a/mods/computer/textures/computer_wee_ft_off.png b/mods/computer/textures/computer_wee_ft_off.png deleted file mode 100644 index 4d50cc0..0000000 Binary files a/mods/computer/textures/computer_wee_ft_off.png and /dev/null differ diff --git a/mods/computer/textures/computer_wee_lt.png b/mods/computer/textures/computer_wee_lt.png deleted file mode 100644 index 5715763..0000000 Binary files a/mods/computer/textures/computer_wee_lt.png and /dev/null differ diff --git a/mods/computer/textures/computer_wee_rt.png b/mods/computer/textures/computer_wee_rt.png deleted file mode 100644 index 5715763..0000000 Binary files a/mods/computer/textures/computer_wee_rt.png and /dev/null differ diff --git a/mods/computer/textures/computer_wee_tp.png b/mods/computer/textures/computer_wee_tp.png deleted file mode 100644 index ae658fc..0000000 Binary files a/mods/computer/textures/computer_wee_tp.png and /dev/null differ diff --git a/mods/computer/textures/homedecor_plastic_base.png b/mods/computer/textures/homedecor_plastic_base.png deleted file mode 100644 index 4d0e3f2..0000000 Binary files a/mods/computer/textures/homedecor_plastic_base.png and /dev/null differ diff --git a/mods/computer/textures/homedecor_plastic_base_inv.png b/mods/computer/textures/homedecor_plastic_base_inv.png deleted file mode 100644 index 3a02005..0000000 Binary files a/mods/computer/textures/homedecor_plastic_base_inv.png and /dev/null differ diff --git a/mods/computer/textures/homedecor_plastic_sheeting.png b/mods/computer/textures/homedecor_plastic_sheeting.png deleted file mode 100644 index 810ea2a..0000000 Binary files a/mods/computer/textures/homedecor_plastic_sheeting.png and /dev/null differ diff --git a/mods/connected_textures b/mods/connected_textures new file mode 160000 index 0000000..f073613 --- /dev/null +++ b/mods/connected_textures @@ -0,0 +1 @@ +Subproject commit f07361317f7509db04f3ee25147ecfaa9bdd8c30 diff --git a/mods/connected_textures/README.txt b/mods/connected_textures/README.txt deleted file mode 100644 index 517fd03..0000000 --- a/mods/connected_textures/README.txt +++ /dev/null @@ -1,3 +0,0 @@ -TODO: -— add titanium glass -— add more glass diff --git a/mods/connected_textures/depends.txt b/mods/connected_textures/depends.txt deleted file mode 100644 index 4ad96d5..0000000 --- a/mods/connected_textures/depends.txt +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/mods/connected_textures/init.lua b/mods/connected_textures/init.lua deleted file mode 100644 index 26ed14b..0000000 --- a/mods/connected_textures/init.lua +++ /dev/null @@ -1,48 +0,0 @@ -local load_time_start = os.clock() -local function connect_glass(node, img) - local tmp = minetest.registered_nodes[node] - if not tmp then - return - end - tmp.tiles = img - tmp.drawtype = "glasslike_framed" - minetest.register_node(":"..node, tmp) -end - - -local d_glass_list = { - {"glass", {"default_glass.png", "connected_textures_glass_stripes.png"}}, - {"obsidian_glass", {"default_obsidian_glass.png", "connected_textures_invisible.png"}} -} - -for _,i in ipairs(d_glass_list) do - connect_glass("default:"..i[1], i[2]) -end - - -if minetest.get_modpath("moreblocks") then - - local m_glass_list = { - {"iron_glass", {"moreblocks_iron_glass.png", "connected_textures_iron_glass_stripes.png"}}, - {"coal_glass", {"moreblocks_coal_glass.png", "connected_textures_coal_glass_stripes.png"}}, - {"clean_glass", {"moreblocks_clean_glass.png", "connected_textures_invisible.png"}}, - {"trap_glass", {"moreblocks_trap_glass.png", "connected_textures_glass_stripes.png"}}, - {"super_glow_glass", {"moreblocks_super_glow_glass.png", "connected_textures_glow_glass_stripes.png"}}, - } - - for _,i in ipairs(m_glass_list) do - connect_glass("moreblocks:"..i[1], i[2]) - end - -end - - -minetest.register_node(":default:ice", { - description = "Ice", - tiles = {"connected_textures_ice.png"}, - is_ground_content = true, - paramtype = "light", - groups = {cracky=3}, - sounds = default.node_sound_glass_defaults(), -}) -print(string.format("[connected_textures] loaded after ca. %.2fs", os.clock() - load_time_start)) diff --git a/mods/connected_textures/textures/connected_textures_coal_glass_stripes.png b/mods/connected_textures/textures/connected_textures_coal_glass_stripes.png deleted file mode 100644 index 38c9525..0000000 Binary files a/mods/connected_textures/textures/connected_textures_coal_glass_stripes.png and /dev/null differ diff --git a/mods/connected_textures/textures/connected_textures_glass_stripes.png b/mods/connected_textures/textures/connected_textures_glass_stripes.png deleted file mode 100644 index 97a9574..0000000 Binary files a/mods/connected_textures/textures/connected_textures_glass_stripes.png and /dev/null differ diff --git a/mods/connected_textures/textures/connected_textures_glow_glass_stripes.png b/mods/connected_textures/textures/connected_textures_glow_glass_stripes.png deleted file mode 100644 index 7147571..0000000 Binary files a/mods/connected_textures/textures/connected_textures_glow_glass_stripes.png and /dev/null differ diff --git a/mods/connected_textures/textures/connected_textures_ice.png b/mods/connected_textures/textures/connected_textures_ice.png deleted file mode 100644 index 72af83e..0000000 Binary files a/mods/connected_textures/textures/connected_textures_ice.png and /dev/null differ diff --git a/mods/connected_textures/textures/connected_textures_invisible.png b/mods/connected_textures/textures/connected_textures_invisible.png deleted file mode 100644 index 3cee891..0000000 Binary files a/mods/connected_textures/textures/connected_textures_invisible.png and /dev/null differ diff --git a/mods/connected_textures/textures/connected_textures_iron_glass_stripes.png b/mods/connected_textures/textures/connected_textures_iron_glass_stripes.png deleted file mode 100644 index 1ac17e5..0000000 Binary files a/mods/connected_textures/textures/connected_textures_iron_glass_stripes.png and /dev/null differ diff --git a/mods/connected_textures/textures/connected_textures_titanium_glass_stripes.png b/mods/connected_textures/textures/connected_textures_titanium_glass_stripes.png deleted file mode 100644 index c03a2b5..0000000 Binary files a/mods/connected_textures/textures/connected_textures_titanium_glass_stripes.png and /dev/null differ diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 4ae8a39..7f9f4c2 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -593,9 +593,7 @@ minetest.register_node("default:sign_wall", { on_receive_fields = function(pos, formname, fields, sender) --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) local meta = minetest.get_meta(pos) - if fields.text == nil then - return - end + fields.text = fields.text or "" print((sender:get_player_name() or "").." wrote \""..fields.text.. "\" to sign at "..minetest.pos_to_string(pos)) meta:set_string("text", fields.text) diff --git a/mods/forth_computer b/mods/forth_computer new file mode 160000 index 0000000..8c68487 --- /dev/null +++ b/mods/forth_computer @@ -0,0 +1 @@ +Subproject commit 8c684870571df8915ce5d6883e5426d817c483e3 diff --git a/mods/gloopblocks b/mods/gloopblocks new file mode 160000 index 0000000..a294892 --- /dev/null +++ b/mods/gloopblocks @@ -0,0 +1 @@ +Subproject commit a2948925e88a76ef72c72ae7340bc4f213ee8790 diff --git a/mods/gloopblocks/.gitignore b/mods/gloopblocks/.gitignore deleted file mode 100644 index b25c15b..0000000 --- a/mods/gloopblocks/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/mods/gloopblocks/LICENSE b/mods/gloopblocks/LICENSE deleted file mode 100644 index 73d9c38..0000000 --- a/mods/gloopblocks/LICENSE +++ /dev/null @@ -1,90 +0,0 @@ -For the code and textures unique to this mod: - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - - This license is also known as "WTFPL". - ----------- - -For the textures that were in some way derived from Minetest's default imagery: - -Creative Commons Legal Code - -Attribution-ShareAlike 2.0 -CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. - -License - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - -1. Definitions - - "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. - "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. - "Licensor" means the individual or entity that offers the Work under the terms of this License. - "Original Author" means the individual or entity who created the Work. - "Work" means the copyrightable work of authorship offered under the terms of this License. - "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. - "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. - -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. - -3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: - - to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - to create and reproduce Derivative Works; - to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; - to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. - - For the avoidance of doubt, where the work is a musical composition: - Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. - Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). - Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). - -The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. - -4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: - - You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. - You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.0 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. - If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination - - This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. - Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - -8. Miscellaneous - - Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. - Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. - If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. - This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. - -Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. - -Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. - -Creative Commons may be contacted at http://creativecommons.org/. - diff --git a/mods/gloopblocks/README b/mods/gloopblocks/README deleted file mode 100644 index 3bbfcc6..0000000 --- a/mods/gloopblocks/README +++ /dev/null @@ -1,74 +0,0 @@ -This mod adds a number of decorative and functional blocks to Minetest, -including cement, rainbow blocks, "evil" blocks and sticks, and the usual -collection of tools of various strengths and speeds made from either cement or -"evil" components. It also supplies a few useful functions - see below. - -Crafting - -(Unless explicitly mentioned, ingredients can go anywhere in the crafting grid -in these recipes). - -* Rainbow Blocks can be crafted by putting one each of red, orange, yellow, - green, blue, and violet dyes plus one stone and one Mese Crystal into the - crafting grid. Yields 1, works with Unified Dyes as well as the game's - default dyes. - -* Three of those can be crafted to form one pop tart cat rainbow, or nine can - be crafted together to form one pop tart cat itself. - -* Wet cement is crafted from a bucket of water and a block of gravel. This - can be cooked into dried cement, which can be crafted into tools or back - into gravel. - -* An "evil" stick can be crafted from one lump of coal, one regular stick, and - one lump of Kalite from the Gloop Ores mod. - -* Four of those can be crafted into an "evil" block, which can also be crafted - back to "evil" sticks. These blocks emit a small amount of light. - -* Cement tools are crafted in the usual manner, using cement blocks for the - tool heads instead of the usual steel, cobble, etc. - -* "Evil" tools can be crafted using the same standard recipes as for other - tools, substitution "evil" sticks for the handles and "evil" blocks for the - tool heads. - -* Regular sticks can be crafted back into wood blocks by placing four of them - in a square. - -* Cement and "evil" blocks can also be crafted into various stairs and slabs, - following the same recipes as with other stairs and slabs. Evil stairs and - slabs emit a small amount of light. - -* Pavement (as for roads or parking lots) can be crafted by placing wet cement - ("W") and basalt ("B") into the crafting grid in a 3x3 checkerboard (yields - 5): - W B W - B W B - W B W - - (you can also swap wet cement and basalt, using five and four portions, - respectively) - -Other useful stuff: -------------------- - -* Cobblestone turns to mossy cobblestone in the presence of water (either - flowing or not). - -* When water and lava come into contact with one another, they will form one - of three materials: Flowing lava coming into contact with standing water - forms basalt, both flowing into one another form pumice, while standing lava - forms obsidian when in contact with flowing or standing water. Note that if - you're using this along with the standard minetest_game repository dated - March 9 or later, this function no longer works, because the game provides a - similar, less capable function. - -Notes: ------- - -The cobblestone and mossy cobblestone road bed textures were derived from: -http://opengameart.org/content/rpg-tiles-cobble-stone-paths-town-objects -...and the default grass texture that comes with minetest_game. - -Version a2948925e88a76ef72c72ae7340bc4f213ee8790 - 2.10 2013 diff --git a/mods/gloopblocks/crafts.lua b/mods/gloopblocks/crafts.lua deleted file mode 100644 index 6cefb32..0000000 --- a/mods/gloopblocks/crafts.lua +++ /dev/null @@ -1,349 +0,0 @@ --- Various crafts - -minetest.register_craft( { - type = "shapeless", - output = "gloopblocks:rainbow_block", - recipe = { - "group:basecolor_red", - "group:excolor_orange", - "group:basecolor_yellow", - "group:basecolor_green", - "group:basecolor_blue", - "group:excolor_violet", - "default:stone", - "default:mese_crystal", - }, -}) - - -minetest.register_craft({ - type = "shapeless", - output = "default:nyancat_rainbow", - recipe = { - "gloopblocks:rainbow_block", - "default:diamondblock", - "default:steelblock", - "default:copperblock", - "default:bronzeblock", - "default:goldblock", - "default:mese", - "moreores:silver_block", - "moreores:mithril_block" - } -}) - -minetest.register_craft({ - output = "default:nyancat", - recipe = { - {"gloopblocks:rainbow_block", "gloopblocks:rainbow_block", "gloopblocks:rainbow_block"}, - {"gloopblocks:rainbow_block", "gloopblocks:rainbow_block", "gloopblocks:rainbow_block"}, - {"gloopblocks:rainbow_block", "gloopblocks:rainbow_block", "gloopblocks:rainbow_block"}, - } -}) - -minetest.register_craft({ - type = "shapeless", - output = "gloopblocks:wet_cement", - recipe = { - "bucket:bucket_water", - "default:gravel", - }, - replacements = {{'bucket:bucket_water', 'bucket:bucket_empty'},}, -}) - -minetest.register_craft({ - type = "cooking", - output = "gloopblocks:cement", - recipe = "gloopblocks:wet_cement", - cooktime = 8 -}) - -minetest.register_craft({ - output = "default:gravel", - recipe = { - {"gloopblocks:cement"}, - }, -}) - - -if minetest.get_modpath("glooptest") then - - minetest.register_craft({ - type = "shapeless", - output = "gloopblocks:evil_stick", - recipe = { - "glooptest:kalite_lump", - "default:gold_ingot", - "default:coal_lump", - "default:stick" - } - }) - -elseif minetest.get_modpath("gloopores") then - - minetest.register_craft({ - type = "shapeless", - output = "gloopblocks:evil_stick", - recipe = { - "gloopores:kalite_lump", - "default:gold_ingot", - "default:coal_lump", - "default:stick" - } - }) -else - minetest.register_craft({ - type = "shapeless", - output = "gloopblocks:evil_stick", - recipe = { - "default:gold_ingot", - "default:gold_ingot", - "default:coal_lump", - "default:stick" - } - }) -end - -minetest.register_craft({ - output = "gloopblocks:evil_block", - recipe = { - {"gloopblocks:evil_stick", "gloopblocks:evil_stick"}, - {"gloopblocks:evil_stick", "gloopblocks:evil_stick"}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:scaffolding 12", - recipe = { - {"default:stick", "group:wood", "default:stick"}, - {"", "default:stick", ""}, - {"default:stick", "group:wood", "default:stick"}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:evil_stick 4", - recipe = { - {"gloopblocks:evil_block"} - } -}) - -minetest.register_craft({ - output = "gloopblocks:pick_cement", - recipe = { - {"gloopblocks:cement", "gloopblocks:cement", "gloopblocks:cement"}, - {"", "default:stick", ""}, - {"", "default:stick", ""}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:axe_cement", - recipe = { - {"gloopblocks:cement", "gloopblocks:cement"}, - {"gloopblocks:cement", "default:stick"}, - {"", "default:stick"}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:axe_cement", - recipe = { - {"gloopblocks:cement", "gloopblocks:cement"}, - {"default:stick", "gloopblocks:cement"}, - {"default:stick", ""}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:shovel_cement", - recipe = { - {"gloopblocks:cement"}, - {"default:stick"}, - {"default:stick"}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:sword_cement", - recipe = { - {"gloopblocks:cement"}, - {"gloopblocks:cement"}, - {"default:stick"}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:pick_evil", - recipe = { - {"gloopblocks:evil_block", "gloopblocks:evil_block", "gloopblocks:evil_block"}, - {"", "gloopblocks:evil_stick", ""}, - {"", "gloopblocks:evil_stick", ""}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:axe_evil", - recipe = { - {"gloopblocks:evil_block", "gloopblocks:evil_block"}, - {"gloopblocks:evil_block", "gloopblocks:evil_stick"}, - {"", "gloopblocks:evil_stick"}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:axe_evil", - recipe = { - {"gloopblocks:evil_block", "gloopblocks:evil_block"}, - {"gloopblocks:evil_stick", "gloopblocks:evil_block"}, - {"gloopblocks:evil_stick", ""}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:shovel_evil", - recipe = { - {"gloopblocks:evil_block"}, - {"gloopblocks:evil_stick"}, - {"gloopblocks:evil_stick"}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:sword_evil", - recipe = { - {"gloopblocks:evil_block"}, - {"gloopblocks:evil_block"}, - {"gloopblocks:evil_stick"}, - } -}) - -minetest.register_craft({ - output = "default:wood", - recipe = { - {"default:stick", "default:stick"}, - {"default:stick", "default:stick"}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:pavement 5", - recipe = { - {"gloopblocks:basalt", "gloopblocks:wet_cement","gloopblocks:basalt"}, - {"gloopblocks:wet_cement","gloopblocks:basalt", "gloopblocks:wet_cement"}, - {"gloopblocks:basalt", "gloopblocks:wet_cement","gloopblocks:basalt"}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:pavement 5", - recipe = { - {"gloopblocks:wet_cement","gloopblocks:basalt", "gloopblocks:wet_cement"}, - {"gloopblocks:basalt", "gloopblocks:wet_cement","gloopblocks:basalt"}, - {"gloopblocks:wet_cement","gloopblocks:basalt", "gloopblocks:wet_cement"}, - } -}) - -minetest.register_craft({ - output = "gloopblocks:oerkki_block 2", - recipe = { - {"default:iron_lump", "default:coal_lump", "default:iron_lump"}, - {"default:coal_lump", "default:bookshelf", "default:coal_lump"}, - {"default:iron_lump", "default:coal_lump", "default:iron_lump"}, - }, - replacements = { { "default:bookshelf", "default:book 3" } } -}) - -minetest.register_craft({ - output = "gloopblocks:oerkki_block 2", - recipe = { - {"default:coal_lump", "default:iron_lump", "default:coal_lump"}, - {"default:iron_lump", "default:bookshelf", "default:iron_lump"}, - {"default:coal_lump", "default:iron_lump", "default:coal_lump"}, - }, - replacements = { { "default:bookshelf", "default:book 3" } } -}) - -minetest.register_craft({ - type = "shapeless", - output = "gloopblocks:stone_brick_mossy 2", - recipe = { - "default:stonebrick", - "default:stonebrick", - "default:junglegrass", - "default:junglegrass" - } -}) - -minetest.register_craft({ - type = "shapeless", - output = "gloopblocks:stone_brick_mossy 2", - recipe = { - "default:stonebrick", - "default:stonebrick", - "default:grass_1", - "default:grass_1", - "default:grass_1", - "default:grass_1" - } -}) - -minetest.register_craft({ - type = "shapeless", - output = "gloopblocks:cobble_road 5", - recipe = { - "default:cobble", - "default:cobble", - "default:cobble", - "default:cobble", - "gloopblocks:pavement" - } -}) - -minetest.register_craft({ - type = "shapeless", - output = "gloopblocks:cobble_road_mossy 2", - recipe = { - "gloopblocks:cobble_road", - "gloopblocks:cobble_road", - "default:junglegrass", - "default:junglegrass" - } -}) - -minetest.register_craft({ - type = "shapeless", - output = "gloopblocks:cobble_road_mossy 2", - recipe = { - "gloopblocks:cobble_road", - "gloopblocks:cobble_road", - "default:grass_1", - "default:grass_1", - "default:grass_1", - "default:grass_1" - } -}) - -minetest.register_craft({ - type = "shapeless", - output = "gloopblocks:stone_mossy 2", - recipe = { - "default:stone", - "default:stone", - "default:junglegrass", - "default:junglegrass" - } -}) - -minetest.register_craft({ - type = "shapeless", - output = "gloopblocks:stone_mossy 2", - recipe = { - "default:stone", - "default:stone", - "default:grass_1", - "default:grass_1", - "default:grass_1", - "default:grass_1" - } -}) diff --git a/mods/gloopblocks/depends.txt b/mods/gloopblocks/depends.txt deleted file mode 100644 index 03f71b3..0000000 --- a/mods/gloopblocks/depends.txt +++ /dev/null @@ -1,4 +0,0 @@ -default -moreblocks? -glooptest? -gloopores? diff --git a/mods/gloopblocks/init.lua b/mods/gloopblocks/init.lua deleted file mode 100644 index f03459d..0000000 --- a/mods/gloopblocks/init.lua +++ /dev/null @@ -1,531 +0,0 @@ ---[[ -GloopBlocks -written by GloopMaster -Licensed under WTFPL. - -Updates by VanessaE. - -2013-04-08 - -the register_gloopblocks_alias function is borrowed from stairsplus. - ---]] - --- Helper functions - -function register_gloopblocks_alias(modname, origname, newmod, newname) - minetest.register_alias(modname .. ":slab_" .. origname, newmod..":slab_" .. newname) - minetest.register_alias(modname .. ":slab_" .. origname .. "_inverted", newmod..":slab_" .. newname .. "_inverted") - minetest.register_alias(modname .. ":slab_" .. origname .. "_wall", newmod..":slab_" .. newname .. "_wall") - minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter", newmod..":slab_" .. newname .. "_quarter") - minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_inverted", newmod..":slab_" .. newname .. "_quarter_inverted") - minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_wall", newmod..":slab_" .. newname .. "_quarter_wall") - minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter", newmod..":slab_" .. newname .. "_three_quarter") - minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_inverted", newmod..":slab_" .. newname .. "_three_quarter_inverted") - minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_wall", newmod..":slab_" .. newname .. "_three_quarter_wall") - minetest.register_alias(modname .. ":stair_" .. origname, newmod..":stair_" .. newname) - minetest.register_alias(modname .. ":stair_" .. origname .. "_inverted", newmod..":stair_" .. newname .. "_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_wall", newmod..":stair_" .. newname .. "_wall") - minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", newmod..":stair_" .. newname .. "_wall_half") - minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", newmod..":stair_" .. newname .. "_wall_half_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_half", newmod..":stair_" .. newname .. "_half") - minetest.register_alias(modname .. ":stair_" .. origname .. "_half_inverted", newmod..":stair_" .. newname .. "_half_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half", newmod..":stair_" .. newname .. "_right_half") - minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half_inverted", newmod..":stair_" .. newname .. "_right_half_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", newmod..":stair_" .. newname .. "_wall_half") - minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", newmod..":stair_" .. newname .. "_wall_half_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_inner", newmod..":stair_" .. newname .. "_inner") - minetest.register_alias(modname .. ":stair_" .. origname .. "_inner_inverted", newmod..":stair_" .. newname .. "_inner_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_outer", newmod..":stair_" .. newname .. "_outer") - minetest.register_alias(modname .. ":stair_" .. origname .. "_outer_inverted", newmod..":stair_" .. newname .. "_outer_inverted") - minetest.register_alias(modname .. ":panel_" .. origname .. "_bottom", newmod..":panel_" .. newname) - minetest.register_alias(modname .. ":panel_" .. origname .. "_top", newmod..":panel_" .. newname .. "_top") - minetest.register_alias(modname .. ":panel_" .. origname .. "_vertical", newmod..":panel_" .. newname .. "_vertical") - minetest.register_alias(modname .. ":micro_" .. origname .. "_bottom", newmod..":micro_" .. newname) - minetest.register_alias(modname .. ":micro_" .. origname .. "_top", newmod..":micro_" .. newname .. "_top") -end - --- Nodes - -minetest.register_node("gloopblocks:rainbow_block", { - description = "Rainbow Block", - tiles = {"gloopblocks_rainbow_block.png"}, - is_ground_content = true, - groups = {cracky=3}, - sounds = default.node_sound_defaults(), -}) - -minetest.register_node("gloopblocks:cement", { - description = "Cement", - tiles = {"gloopblocks_cement.png"}, - is_ground_content = true, - groups = {cracky=2}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("gloopblocks:evil_block", { - description = "Evil Block", - tiles = {"gloopblocks_evil_block.png"}, - light_source = 5, - is_ground_content = true, - groups = {cracky=2}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("gloopblocks:basalt", { - description = "Basalt", - tiles = {"gloopblocks_basalt.png"}, - groups = {cracky=2}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("gloopblocks:pumice", { - description = "Pumice", - tiles = {"gloopblocks_pumice.png"}, - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("gloopblocks:pavement", { - description = "Pavement", - tiles = {"gloopblocks_pavement.png"}, - groups = {cracky=3, oddly_breakable_by_hand=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("gloopblocks:oerkki_block", { - description = "Oerkki Block", - paramtype2 = "facedir", - tiles = { - "gloopblocks_oerkkiblock_tb.png", - "gloopblocks_oerkkiblock_tb.png", - "gloopblocks_oerkkiblock_sides.png", - "gloopblocks_oerkkiblock_sides.png", - "gloopblocks_oerkkiblock_sides.png", - "gloopblocks_oerkkiblock_front.png" - }, - groups = {cracky=3, oddly_breakable_by_hand=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("gloopblocks:stone_brick_mossy", { - description = "Mossy Stone Brick", - tiles = {"gloopblocks_stone_brick_mossy.png"}, - groups = {cracky=3, stone=1}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("gloopblocks:stone_mossy", { - description = "Mossy Stone", - tiles = {"gloopblocks_stone_mossy.png"}, - groups = {cracky=3, stone=1}, - sounds = default.node_sound_stone_defaults(), - drop = "default:mossycobble" -}) - -minetest.register_node("gloopblocks:cobble_road", { - description = "Cobblestone Road Bed", - tiles = {"gloopblocks_cobble_road.png"}, - groups = {cracky=3, stone=1}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("gloopblocks:cobble_road_mossy", { - description = "Mossy Cobblestone Road Bed", - tiles = {"gloopblocks_cobble_road_mossy.png"}, - groups = {cracky=3, stone=1}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("gloopblocks:scaffolding", { - description = "Wooden Scaffold", - drawtype = "allfaces", - paramtype = "light", - sunlight_propagates = true, - tiles = {"gloopblocks_scaffold.png"}, - groups = {choppy=3, oddly_breakable_by_hand=3}, - sounds = default.node_sound_wood_defaults(), - on_rightclick = function(pos, node, clicker, itemstack) - if itemstack and itemstack:get_name() == node.name then - for i = 1,19 do - if minetest.get_node({x=pos.x,y=pos.y-i,z=pos.z}).name == "gloopblocks:scaffolding" and scafffound ~= 0 and scafffound ~= 1 then - local scafffound = 1 - return itemstack - else - break - end - end - for i = 1,19 do - if minetest.get_node({x=pos.x,y=pos.y+i,z=pos.z}).name == "air" and scaffworked ~= 1 and scaffworked ~= 0 then - minetest.set_node({x=pos.x,y=pos.y+i,z=pos.z}, {name="gloopblocks:scaffolding"}) - local scaffworked = 1 - return ItemStack(tostring(itemstack:get_name().." "..tostring(itemstack:get_count()-1))) - elseif minetest.get_node({x=pos.x,y=pos.y+i,z=pos.z}).name == "gloopblocks:scaffolding" then - else - local scaffworked = 0 - end - end - if scaffworked == 1 then - return ItemStack(tostring(itemstack:get_name().." "..tostring(itemstack:get_count()-1))) - else - return itemstack - end - else return itemstack end - end, -}) - - -minetest.register_alias("moreblocks:oerkkiblock", "gloopblocks:oerkki_block") -minetest.register_alias("gloopblocks:obsidian", "default:obsidian") - --- Stairsplus defs - -if minetest.get_modpath("moreblocks") then - - register_gloopblocks_alias("stairsplus", "obsidian", "moreblocks", "obsidian") - - local blocks = { - {"Cement", "cement", "cement"}, - {"Evil Block", "evil", "evil_block"}, - {"Basalt", "basalt","basalt"}, - {"Pumice", "pumice","pumice"}, - {"Pavement", "pavement", "pavement"}, - } - - for i in ipairs(blocks) do - if blocks[i][1] == "Evil Block" then light = 5 else light = 0 end - register_stair_slab_panel_micro("gloopblocks", blocks[i][3], "gloopblocks:"..blocks[i][3], {cracky=2, not_in_creative_inventory=1}, {"gloopblocks_"..blocks[i][3]..".png"}, blocks[i][1], blocks[i][3], light) - register_gloopblocks_alias("gloopblocks", blocks[i][2], "gloopblocks", blocks[i][3]) - register_gloopblocks_alias("moreblocks", blocks[i][3], "gloopblocks", blocks[i][3]) - table.insert(circular_saw.known_stairs, "gloopblocks:"..blocks[i][3]) - end - - register_stair_slab_panel_micro( - "gloopblocks", - "oerkki_block", - "gloopblocks:oerkki_block", - {cracky=2, not_in_creative_inventory=1}, - {"gloopblocks_oerkkiblock_tb.png", - "gloopblocks_oerkkiblock_tb.png", - "gloopblocks_oerkkiblock_sides.png", - "gloopblocks_oerkkiblock_sides.png", - "gloopblocks_oerkkiblock_sides.png", - "gloopblocks_oerkkiblock_front.png"}, - "Oerkki Block", - "oerkki_block", - 0 - ) - register_gloopblocks_alias("moreblocks", "oerkki_block", "gloopblocks", "oerkki_block") - table.insert(circular_saw.known_stairs, "gloopblocks:oerkki_block") - - register_stair_slab_panel_micro( - "gloopblocks", - "stone_brick_mossy", - "gloopblocks:stone_brick_mossy", - {cracky=1, not_in_creative_inventory=1}, - {"gloopblocks_stone_brick_mossy.png"}, - "Mossy Stone Brick", - "stone_brick_mossy", - 0 - ) - table.insert(circular_saw.known_stairs, "gloopblocks:stone_brick_mossy") - - register_stair_slab_panel_micro( - "gloopblocks", - "stone_mossy", - "gloopblocks:stone_mossy", - {cracky=1, not_in_creative_inventory=1}, - {"gloopblocks_stone_mossy.png"}, - "Mossy Stone", - "stone_mossy", - 0 - ) - table.insert(circular_saw.known_stairs, "gloopblocks:stone_mossy") - - register_stair_slab_panel_micro( - "gloopblocks", - "cobble_road", - "gloopblocks:cobble_road", - {cracky=3, stone=1, not_in_creative_inventory=1}, - {"gloopblocks_cobble_road.png"}, - "Cobblestone Roadbed", - "cobble_road", - 0 - ) - table.insert(circular_saw.known_stairs, "gloopblocks:cobble_road") - - register_stair_slab_panel_micro( - "gloopblocks", - "cobble_road_mossy", - "gloopblocks:cobble_road_mossy", - {cracky=3, stone=1, not_in_creative_inventory=1}, - {"gloopblocks_cobble_road_mossy.png"}, - "Mossy Cobblestone Roadbed", - "cobble_road_mossy", - 0 - ) - table.insert(circular_saw.known_stairs, "gloopblocks:cobble_road_mossy") - - local colorlist = { - {"white", "White"}, - {"grey", "Grey"}, - {"black", "Black"}, - {"red", "Red"}, - {"yellow", "Yellow"}, - {"green", "Green"}, - {"cyan", "Cyan"}, - {"blue", "Blue"}, - {"magenta", "Magenta"}, - {"orange", "Orange"}, - {"violet", "Violet"}, - {"brown", "Brown"}, - {"pink", "Pink"}, - {"dark_grey", "Dark Grey"}, - {"dark_green", "Dark Green"}, - } - - for i in ipairs(colorlist) do - local color = colorlist[i][1] - local colordesc = colorlist[i][2] - - register_stair_slab_panel_micro( "wool", color, "wool:"..color, - { snappy=2, choppy=2, oddly_breakable_by_hand=3, flammable=3, wool=1, not_in_creative_inventory=1 }, - { "wool_"..color..".png" }, - colordesc.." Wool", - "wool:"..color, - 0 - ) - table.insert(circular_saw.known_stairs, "wool:"..color) - end -end - - --- Tools - -minetest.register_tool("gloopblocks:pick_cement", { - description = "Cement Pickaxe", - inventory_image = "gloopblocks_cement_pick.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=1, - groupcaps={ - cracky={times={[1]=3.50, [2]=1.40, [3]=0.90}, uses=25, maxlevel=2} - }, - damage_groups = {fleshy=4}, - }, -}) - -minetest.register_tool("gloopblocks:shovel_cement", { - description = "Cement Shovel", - inventory_image = "gloopblocks_cement_shovel.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=1, - groupcaps={ - crumbly={times={[1]=1.50, [2]=0.60, [3]=0.45}, uses=25, maxlevel=2} - }, - damage_groups = {fleshy=4}, - }, -}) - -minetest.register_tool("gloopblocks:axe_cement", { - description = "Cement Axe", - inventory_image = "gloopblocks_cement_axe.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=1, - groupcaps={ - choppy={times={[1]=3.00, [2]=1.30, [3]=0.80}, uses=25, maxlevel=2}, - fleshy={times={[2]=1.20, [3]=0.65}, uses=30, maxlevel=1} - }, - damage_groups = {fleshy=4}, - }, -}) - -minetest.register_tool("gloopblocks:sword_cement", { - description = "Cement Sword", - inventory_image = "gloopblocks_cement_sword.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=1, - groupcaps={ - fleshy={times={[1]=1.60, [2]=0.80, [3]=0.40}, uses=15, maxlevel=2}, - snappy={times={[2]=0.75, [3]=0.35}, uses=30, maxlevel=1}, - choppy={times={[3]=0.80}, uses=30, maxlevel=0} - }, - damage_groups = {fleshy=6}, - } -}) - -minetest.register_tool("gloopblocks:pick_evil", { - description = "Evil Pickaxe", - inventory_image = "gloopblocks_evil_pick.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=3, - groupcaps={ - cracky={times={[1]=0.10, [2]=0.10, [3]=0.10}, uses=10, maxlevel=2} - }, - damage_groups = {fleshy=6}, - }, -}) - -minetest.register_tool("gloopblocks:shovel_evil", { - description = "Evil Shovel", - inventory_image = "gloopblocks_evil_shovel.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=3, - groupcaps={ - crumbly={times={[1]=0.05, [2]=0.05, [3]=0.05}, uses=10, maxlevel=2} - }, - damage_groups = {fleshy=6}, - }, -}) - -minetest.register_tool("gloopblocks:axe_evil", { - description = "Evil Axe", - inventory_image = "gloopblocks_evil_axe.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=3, - groupcaps={ - choppy={times={[1]=0.15, [2]=0.15, [3]=0.15}, uses=10, maxlevel=2}, - fleshy={times={[1]=0.15, [2]=0.15, [3]=0.15}, uses=10, maxlevel=2} - }, - damage_groups = {fleshy=6}, - }, -}) - -minetest.register_tool("gloopblocks:sword_evil", { - description = "Evil Sword", - inventory_image = "gloopblocks_evil_sword.png", - tool_capabilities = { - full_punch_interval = 1.0, - max_drop_level=3, - groupcaps={ - fleshy={times={[1]=0.20, [2]=0.20, [3]=0.20}, uses=10, maxlevel=2}, - snappy={times={[1]=0.20, [2]=0.20, [3]=0.20}, uses=10, maxlevel=2}, - choppy={times={[1]=0.20, [2]=0.20, [3]=0.20}, uses=10, maxlevel=2} - }, - damage_groups = {fleshy=8}, - } -}) - --- Other items - -minetest.register_craftitem("gloopblocks:wet_cement", { - description = "Wet Cement", - inventory_image = "gloopblocks_wet_cement.png", -}) - -minetest.register_craftitem("gloopblocks:evil_stick", { - description = "Evil Stick", - inventory_image = "gloopblocks_evil_stick.png", -}) - --- ABMs for mossy objects - -local mossyobjects={ - { "default:cobble", "default:mossycobble" }, - { "default:stair_cobble", "default:stair_mossycobble" }, - { "default:slab_cobble", "default:slab_mossycobble" }, - { "moreblocks:stair_cobble", "moreblocks:stair_mossycobble" }, - { "moreblocks:stair_cobble_inner", "moreblocks:stair_mossycobble_inner" }, - { "moreblocks:stair_cobble_outer", "moreblocks:stair_mossycobble_outer" }, - { "moreblocks:stair_cobble_half", "moreblocks:stair_mossycobble_half" }, - { "moreblocks:slab_cobble_quarter", "moreblocks:slab_mossycobble_quarter" }, - { "moreblocks:slab_cobble", "moreblocks:slab_mossycobble" }, - { "moreblocks:slab_cobble_three_quarter", "moreblocks:slab_mossycobble_three_quarter" }, - { "moreblocks:panel_cobble", "moreblocks:panel_mossycobble" }, - { "moreblocks:micro_cobble", "moreblocks:micro_mossycobble" }, - { "moreblocks:stair_cobble_alt", "moreblocks:stair_mossycobble_alt" }, - - { "gloopblocks:cobble_road", "gloopblocks:cobble_road_mossy" }, - { "gloopblocks:stair_cobble_road", "gloopblocks:stair_cobble_road_mossy" }, - { "gloopblocks:slab_cobble_road", "gloopblocks:slab_cobble_road_mossy" }, - { "gloopblocks:stair_cobble_road", "gloopblocks:stair_cobble_road_mossy" }, - { "gloopblocks:stair_cobble_road_inner", "gloopblocks:stair_cobble_road_mossy_inner" }, - { "gloopblocks:stair_cobble_road_outer", "gloopblocks:stair_cobble_road_mossy_outer" }, - { "gloopblocks:stair_cobble_road_half", "gloopblocks:stair_cobble_road_mossy_half" }, - { "gloopblocks:slab_cobble_road_quarter", "gloopblocks:slab_cobble_road_mossy_quarter" }, - { "gloopblocks:slab_cobble_road", "gloopblocks:slab_cobble_road_mossy" }, - { "gloopblocks:slab_cobble_road_three_quarter", "gloopblocks:slab_cobble_road_mossy_three_quarter" }, - { "gloopblocks:panel_cobble_road", "gloopblocks:panel_cobble_road_mossy" }, - { "gloopblocks:micro_cobble_road", "gloopblocks:micro_cobble_road_mossy" }, - { "gloopblocks:stair_cobble_road_alt", "gloopblocks:stair_cobble_road_mossy_alt" }, - - { "default:stonebrick", "gloopblocks:stone_brick_mossy" }, - { "default:stair_stonebrick", "gloopblocks:stair_stone_brick_mossy" }, - { "default:slab_stonebrick", "gloopblocks:slab_stone_brick_mossy" }, - { "moreblocks:stair_stonebrick", "gloopblocks:stair_stone_brick_mossy" }, - { "moreblocks:stair_stonebrick_inner", "gloopblocks:stair_stone_brick_mossy_inner" }, - { "moreblocks:stair_stonebrick_outer", "gloopblocks:stair_stone_brick_mossy_outer" }, - { "moreblocks:stair_stonebrick_half", "gloopblocks:stair_stone_brick_mossy_half" }, - { "moreblocks:slab_stonebrick_quarter", "gloopblocks:slab_stone_brick_mossy_quarter" }, - { "moreblocks:slab_stonebrick", "gloopblocks:slab_stone_brick_mossy" }, - { "moreblocks:slab_stonebrick_three_quarter", "gloopblocks:slab_stone_brick_mossy_three_quarter" }, - { "moreblocks:panel_stonebrick", "gloopblocks:panel_stone_brick_mossy" }, - { "moreblocks:micro_stonebrick", "gloopblocks:micro_stone_brick_mossy" }, - { "moreblocks:stair_stonebrick_alt", "gloopblocks:stair_stone_brick_mossy_alt" }, - - { "default:stone", "gloopblocks:stone_mossy" }, - { "default:stair_stone", "gloopblocks:stair_stone_mossy" }, - { "default:slab_stone", "gloopblocks:slab_stone_mossy" }, - { "moreblocks:stair_stone", "gloopblocks:stair_stone_mossy" }, - { "moreblocks:stair_stone_inner", "gloopblocks:stair_stone_mossy_inner" }, - { "moreblocks:stair_stone_outer", "gloopblocks:stair_stone_mossy_outer" }, - { "moreblocks:stair_stone_half", "gloopblocks:stair_stone_mossy_half" }, - { "moreblocks:slab_stone_quarter", "gloopblocks:slab_stone_mossy_quarter" }, - { "moreblocks:slab_stone", "gloopblocks:slab_stone_mossy" }, - { "moreblocks:slab_stone_three_quarter", "gloopblocks:slab_stone_mossy_three_quarter" }, - { "moreblocks:panel_stone", "gloopblocks:panel_stone_mossy" }, - { "moreblocks:micro_stone", "gloopblocks:micro_stone_mossy" }, - { "moreblocks:stair_stone_alt", "gloopblocks:stair_stone_mossy_alt" }, -} - -for i in ipairs(mossyobjects) do - minetest.register_abm({ - nodenames = { mossyobjects[i][1] }, - neighbors = {"default:water_source", "default:water_flowing"}, - interval = 120, - chance = 50, - action = function(pos, node) - if minetest.find_node_near(pos, 2, "air") then - fdir = node.param2 - minetest.add_node(pos, {name = mossyobjects[i][2], param2 = fdir}) - end - end, - }) -end - --- Hook into the default lavacooling function to generate basalt and pumice - -default.cool_lava_source = function(pos) - if gloopblocks_search_nearby_nodes(pos,"default:water_source") - or gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then - minetest.set_node(pos, {name="default:obsidian"}) - end -end - -default.cool_lava_flowing = function(pos) - if gloopblocks_search_nearby_nodes(pos,"default:water_source") then - minetest.set_node(pos, {name="gloopblocks:basalt"}) - elseif gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then - minetest.set_node(pos, {name="gloopblocks:pumice"}) - end -end - -gloopblocks_search_nearby_nodes = function(pos, node) - if minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}).name == node then return true end - if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}).name == node then return true end - if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == node then return true end - if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == node then return true end - if minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}).name == node then return true end - if minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}).name == node then return true end - return false -end - -dofile(minetest.get_modpath("gloopblocks").."/crafts.lua") - -print("Gloopblocks Loaded!") diff --git a/mods/gloopblocks/textures/gloopblocks_basalt.png b/mods/gloopblocks/textures/gloopblocks_basalt.png deleted file mode 100644 index 0bac0ef..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_basalt.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_cement.png b/mods/gloopblocks/textures/gloopblocks_cement.png deleted file mode 100644 index ea7c407..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_cement.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_cement_axe.png b/mods/gloopblocks/textures/gloopblocks_cement_axe.png deleted file mode 100644 index f0ea898..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_cement_axe.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_cement_pick.png b/mods/gloopblocks/textures/gloopblocks_cement_pick.png deleted file mode 100644 index 7aa2879..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_cement_pick.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_cement_shovel.png b/mods/gloopblocks/textures/gloopblocks_cement_shovel.png deleted file mode 100644 index 69b11cc..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_cement_shovel.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_cement_sword.png b/mods/gloopblocks/textures/gloopblocks_cement_sword.png deleted file mode 100644 index faf0710..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_cement_sword.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_cobble_road.png b/mods/gloopblocks/textures/gloopblocks_cobble_road.png deleted file mode 100644 index 45ebdde..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_cobble_road.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_cobble_road_mossy.png b/mods/gloopblocks/textures/gloopblocks_cobble_road_mossy.png deleted file mode 100644 index 10385db..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_cobble_road_mossy.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_evil_axe.png b/mods/gloopblocks/textures/gloopblocks_evil_axe.png deleted file mode 100644 index 8d3a4f3..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_evil_axe.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_evil_block.png b/mods/gloopblocks/textures/gloopblocks_evil_block.png deleted file mode 100644 index 4f3fa19..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_evil_block.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_evil_pick.png b/mods/gloopblocks/textures/gloopblocks_evil_pick.png deleted file mode 100644 index 5f353d3..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_evil_pick.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_evil_shovel.png b/mods/gloopblocks/textures/gloopblocks_evil_shovel.png deleted file mode 100644 index 1eeafe9..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_evil_shovel.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_evil_stick.png b/mods/gloopblocks/textures/gloopblocks_evil_stick.png deleted file mode 100644 index e5f2c23..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_evil_stick.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_evil_sword.png b/mods/gloopblocks/textures/gloopblocks_evil_sword.png deleted file mode 100644 index 398284c..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_evil_sword.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_oerkkiblock_front.png b/mods/gloopblocks/textures/gloopblocks_oerkkiblock_front.png deleted file mode 100644 index 07bf942..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_oerkkiblock_front.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_oerkkiblock_sides.png b/mods/gloopblocks/textures/gloopblocks_oerkkiblock_sides.png deleted file mode 100644 index f3e3061..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_oerkkiblock_sides.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_oerkkiblock_tb.png b/mods/gloopblocks/textures/gloopblocks_oerkkiblock_tb.png deleted file mode 100644 index 2ea3cec..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_oerkkiblock_tb.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_pavement.png b/mods/gloopblocks/textures/gloopblocks_pavement.png deleted file mode 100644 index 4b7a8c9..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_pavement.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_pumice.png b/mods/gloopblocks/textures/gloopblocks_pumice.png deleted file mode 100644 index bc266fd..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_pumice.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_rainbow_block.png b/mods/gloopblocks/textures/gloopblocks_rainbow_block.png deleted file mode 100644 index c3553fc..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_rainbow_block.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_scaffold.png b/mods/gloopblocks/textures/gloopblocks_scaffold.png deleted file mode 100644 index e546432..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_scaffold.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_stone_brick_mossy.png b/mods/gloopblocks/textures/gloopblocks_stone_brick_mossy.png deleted file mode 100644 index 9619603..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_stone_brick_mossy.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_stone_mossy.png b/mods/gloopblocks/textures/gloopblocks_stone_mossy.png deleted file mode 100644 index 3770360..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_stone_mossy.png and /dev/null differ diff --git a/mods/gloopblocks/textures/gloopblocks_wet_cement.png b/mods/gloopblocks/textures/gloopblocks_wet_cement.png deleted file mode 100644 index 6a7fbf1..0000000 Binary files a/mods/gloopblocks/textures/gloopblocks_wet_cement.png and /dev/null differ diff --git a/mods/itemframes b/mods/itemframes new file mode 160000 index 0000000..5a09e72 --- /dev/null +++ b/mods/itemframes @@ -0,0 +1 @@ +Subproject commit 5a09e72c03ec809bbd3ff87ea42ceac7ecb27c76 diff --git a/mods/itemframes/README.md b/mods/itemframes/README.md deleted file mode 100644 index 6649cbe..0000000 --- a/mods/itemframes/README.md +++ /dev/null @@ -1,6 +0,0 @@ -itemframes -========== - -Calinou version of Zeg9's item frames mod - -With pitriss fix: fixed crash when itemframe was rotated by screwdriver \ No newline at end of file diff --git a/mods/itemframes/depends.txt b/mods/itemframes/depends.txt deleted file mode 100644 index 4ad96d5..0000000 --- a/mods/itemframes/depends.txt +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/mods/itemframes/init.lua b/mods/itemframes/init.lua deleted file mode 100644 index 1fd2db8..0000000 --- a/mods/itemframes/init.lua +++ /dev/null @@ -1,227 +0,0 @@ -local tmp = {} - -minetest.register_entity("itemframes:item",{ - hp_max = 1, - visual="wielditem", - visual_size = {x = 0.3333, y = 0.3333}, - collisionbox = {0,0,0,0,0,0}, - physical = false, - textures = {"air"}, - on_activate = function(self, staticdata) - if tmp.nodename ~= nil and tmp.texture ~= nil then - self.nodename = tmp.nodename - tmp.nodename = nil - self.texture = tmp.texture - tmp.texture = nil - else - if staticdata ~= nil and staticdata ~= "" then - local data = staticdata:split(";") - if data and data[1] and data[2] then - self.nodename = data[1] - self.texture = data[2] - end - end - end - if self.texture ~= nil then - self.object:set_properties({textures = {self.texture}}) - end - if self.nodename == "itemframes:pedestal" then - self.object:set_properties({automatic_rotate = 0.5}) - end - end, - get_staticdata = function(self) - if self.nodename ~= nil and self.texture ~= nil then - return self.nodename .. ";" .. self.texture - end - return "" - end, -}) - - -local facedir = {} --- facedir[0] = {x = 0, y = 0, z = 1} --- facedir[1] = {x = 1, y = 0, z = 0} --- facedir[2] = {x = 0, y = 0, z = -1} --- facedir[3] = {x = -1, y = 0, z = 0} - -facedir[0] = {x = 0, y = 0, z = 1} -facedir[1] = {x = 1, y = 0, z = 0} -facedir[2] = {x = 0, y = 0, z = -1} -facedir[3] = {x = -1, y = 0, z = 0} -facedir[4] = {x = 0, y = -1, z = 0} -facedir[5] = {x = -1, y = 0, z = 0} -facedir[6] = {x = 0, y = 1, z = 0} -facedir[7] = {x = 1, y = 0, z = 0} -facedir[8] = {x = 0, y = 1, z = 0} -facedir[9] = {x = 1, y = 0, z = 0} -facedir[10] = {x = 0, y = -1, z = 0} -facedir[11] = {x = -1, y = 0, z = 0} -facedir[12] = {x = 0, y = 0, z = 1} -facedir[13] = {x = 0, y = -1, z = 0} -facedir[14] = {x = 0, y = 0, z = -1} -facedir[15] = {x = 0, y = 1, z = 0} -facedir[16] = {x = 0, y = 0, z = 1} -facedir[17] = {x = 0, y = 1, z = 0} -facedir[18] = {x = 0, y = 0, z = -1} -facedir[19] = {x = 0, y = -1, z = 0} -facedir[20] = {x = 0, y = 0, z = 1} -facedir[21] = {x = -1, y = 0, z = 0} -facedir[22] = {x = 0, y = 0, z = -1} -facedir[23] = {x = 1, y = 0, z = 0} - -local remove_item = function(pos, node) - local objs = nil - if node.name == "itemframes:frame" then - objs = minetest.env:get_objects_inside_radius(pos, 0.5) - elseif node.name == "itemframes:pedestal" then - objs = minetest.env:get_objects_inside_radius({x = pos.x, y = pos.y + 1, z = pos.z}, 0.5) - end - if objs then - for _, obj in ipairs(objs) do - if obj and obj:get_luaentity() and obj:get_luaentity().name == "itemframes:item" then - obj:remove() - end - end - end -end - -local update_item = function(pos, node) - remove_item(pos, node) - local meta = minetest.get_meta(pos) - if meta:get_string("item") ~= "" then - if node.name == "itemframes:frame" then - local posad = facedir[node.param2] - pos.x = pos.x + posad.x * 6.5 / 16 - pos.y = pos.y + posad.y * 6.5 / 16 - pos.z = pos.z + posad.z * 6.5 / 16 - elseif node.name == "itemframes:pedestal" then - pos.y = pos.y + 0.5 + 0.3333 - end - tmp.nodename = node.name - tmp.texture = ItemStack(meta:get_string("item")):get_name() - local e = minetest.add_entity(pos,"itemframes:item") - if node.name == "itemframes:frame" then - local yaw = math.pi*2 - node.param2 * math.pi/2 - e:setyaw(yaw) - end - end -end - -local drop_item = function(pos, node) - local meta = minetest.env:get_meta(pos) - if meta:get_string("item") ~= "" then - if node.name == "itemframes:frame" then - minetest.env:add_item(pos, meta:get_string("item")) - elseif node.name == "itemframes:pedestal" then - minetest.env:add_item({x=pos.x,y=pos.y+1,z=pos.z}, meta:get_string("item")) - end - meta:set_string("item","") - end - remove_item(pos, node) -end - -minetest.register_node("itemframes:frame",{ - description = "Item frame", - drawtype = "nodebox", - node_box = { type = "fixed", fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5} }, - tiles = {"itemframes_frame.png"}, - inventory_image = "itemframes_frame.png", - wield_image = "itemframes_frame.png", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = { choppy = 2, dig_immediate = 2}, - legacy_wallmounted = true, - sounds = default.node_sound_defaults(), - after_place_node = function(pos, placer, itemstack) - local meta = minetest.env:get_meta(pos) - meta:set_string("owner",placer:get_player_name()) - meta:set_string("infotext","Item frame (owned by "..placer:get_player_name()..")") - end, - on_rightclick = function(pos, node, clicker, itemstack) - if not itemstack then return end - local meta = minetest.env:get_meta(pos) - if clicker:get_player_name() == meta:get_string("owner") then - drop_item(pos,node) - local s = itemstack:take_item() - meta:set_string("item",s:to_string()) - update_item(pos,node) - end - return itemstack - end, - on_punch = function(pos,node,puncher) - local meta = minetest.env:get_meta(pos) - if puncher:get_player_name() == meta:get_string("owner") then - drop_item(pos, node) - end - end, - can_dig = function(pos,player) - - local meta = minetest.env:get_meta(pos) - return player:get_player_name() == meta:get_string("owner") - end, -}) - - -minetest.register_node("itemframes:pedestal",{ - description = "Pedestal", - drawtype = "nodebox", - node_box = { type = "fixed", fixed = { - {-7/16, -8/16, -7/16, 7/16, -7/16, 7/16}, -- Bottom plate - {-6/16, -7/16, -6/16, 6/16, -6/16, 6/16}, -- Bottom plate (upper) - {-0.25, -6/16, -0.25, 0.25, 7/16, 0.25}, -- Pillar - {-7/16, 7/16, -7/16, 7/16, 8/16, 7/16}, -- Top plate - } }, - tiles = {"itemframes_pedestal.png"}, - paramtype = "light", - groups = {cracky = 2}, - sounds = default.node_sound_defaults(), - - after_place_node = function(pos, placer, itemstack) - local meta = minetest.env:get_meta(pos) - meta:set_string("owner",placer:get_player_name()) - meta:set_string("infotext","Pedestal (owned by "..placer:get_player_name()..")") - end, - - on_rightclick = function(pos, node, clicker, itemstack) - if not itemstack then return end - local meta = minetest.env:get_meta(pos) - if clicker:get_player_name() == meta:get_string("owner") then - drop_item(pos,node) - local s = itemstack:take_item() - meta:set_string("item",s:to_string()) - update_item(pos,node) - end - return itemstack - end, - - on_punch = function(pos,node,puncher) - local meta = minetest.env:get_meta(pos) - if puncher:get_player_name() == meta:get_string("owner") then - drop_item(pos,node) - end - end, - - can_dig = function(pos,player) - local meta = minetest.env:get_meta(pos) - return player:get_player_name() == meta:get_string("owner") - end, -}) - -minetest.register_craft({ - output = "itemframes:frame", - recipe = { - {"default:stick", "default:stick", "default:stick"}, - {"default:stick", "default:paper", "default:stick"}, - {"default:stick", "default:stick", "default:stick"}, - } -}) - -minetest.register_craft({ - output = "itemframes:pedestal", - recipe = { - {"default:stone", "default:stone", "default:stone"}, - {" ", "default:stone", " "}, - {"default:stone", "default:stone", "default:stone"}, - } -}) diff --git a/mods/itemframes/textures/itemframes_frame.png b/mods/itemframes/textures/itemframes_frame.png deleted file mode 100644 index 9ea9a30..0000000 Binary files a/mods/itemframes/textures/itemframes_frame.png and /dev/null differ diff --git a/mods/itemframes/textures/itemframes_pedestal.png b/mods/itemframes/textures/itemframes_pedestal.png deleted file mode 100644 index e39abd3..0000000 Binary files a/mods/itemframes/textures/itemframes_pedestal.png and /dev/null differ diff --git a/mods/mesecons b/mods/mesecons new file mode 160000 index 0000000..96011bc --- /dev/null +++ b/mods/mesecons @@ -0,0 +1 @@ +Subproject commit 96011bc71816b5e9eb2cc6c86f009198dfb1146c diff --git a/mods/mesecons/LICENSE.txt b/mods/mesecons/LICENSE.txt deleted file mode 100644 index 0d2fd18..0000000 --- a/mods/mesecons/LICENSE.txt +++ /dev/null @@ -1,532 +0,0 @@ -The LGPLv3 applies to all code in this project. -The CC-BY-SA-3.0 license applies to textures and any other content in this project which is not source code. - -================================================================= - -GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - -================================================================= - -Creative Commons Legal Code - -Attribution-ShareAlike 3.0 Unported - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR - DAMAGES RESULTING FROM ITS USE. - -License - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE -COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY -COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS -AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE -TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY -BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND -CONDITIONS. - -1. Definitions - - a. "Adaptation" means a work based upon the Work, or upon the Work and - other pre-existing works, such as a translation, adaptation, - derivative work, arrangement of music or other alterations of a - literary or artistic work, or phonogram or performance and includes - cinematographic adaptations or any other form in which the Work may be - recast, transformed, or adapted including in any form recognizably - derived from the original, except that a work that constitutes a - Collection will not be considered an Adaptation for the purpose of - this License. For the avoidance of doubt, where the Work is a musical - work, performance or phonogram, the synchronization of the Work in - timed-relation with a moving image ("synching") will be considered an - Adaptation for the purpose of this License. - b. "Collection" means a collection of literary or artistic works, such as - encyclopedias and anthologies, or performances, phonograms or - broadcasts, or other works or subject matter other than works listed - in Section 1(f) below, which, by reason of the selection and - arrangement of their contents, constitute intellectual creations, in - which the Work is included in its entirety in unmodified form along - with one or more other contributions, each constituting separate and - independent works in themselves, which together are assembled into a - collective whole. A work that constitutes a Collection will not be - considered an Adaptation (as defined below) for the purposes of this - License. - c. "Creative Commons Compatible License" means a license that is listed - at http://creativecommons.org/compatiblelicenses that has been - approved by Creative Commons as being essentially equivalent to this - License, including, at a minimum, because that license: (i) contains - terms that have the same purpose, meaning and effect as the License - Elements of this License; and, (ii) explicitly permits the relicensing - of adaptations of works made available under that license under this - License or a Creative Commons jurisdiction license with the same - License Elements as this License. - d. "Distribute" means to make available to the public the original and - copies of the Work or Adaptation, as appropriate, through sale or - other transfer of ownership. - e. "License Elements" means the following high-level license attributes - as selected by Licensor and indicated in the title of this License: - Attribution, ShareAlike. - f. "Licensor" means the individual, individuals, entity or entities that - offer(s) the Work under the terms of this License. - g. "Original Author" means, in the case of a literary or artistic work, - the individual, individuals, entity or entities who created the Work - or if no individual or entity can be identified, the publisher; and in - addition (i) in the case of a performance the actors, singers, - musicians, dancers, and other persons who act, sing, deliver, declaim, - play in, interpret or otherwise perform literary or artistic works or - expressions of folklore; (ii) in the case of a phonogram the producer - being the person or legal entity who first fixes the sounds of a - performance or other sounds; and, (iii) in the case of broadcasts, the - organization that transmits the broadcast. - h. "Work" means the literary and/or artistic work offered under the terms - of this License including without limitation any production in the - literary, scientific and artistic domain, whatever may be the mode or - form of its expression including digital form, such as a book, - pamphlet and other writing; a lecture, address, sermon or other work - of the same nature; a dramatic or dramatico-musical work; a - choreographic work or entertainment in dumb show; a musical - composition with or without words; a cinematographic work to which are - assimilated works expressed by a process analogous to cinematography; - a work of drawing, painting, architecture, sculpture, engraving or - lithography; a photographic work to which are assimilated works - expressed by a process analogous to photography; a work of applied - art; an illustration, map, plan, sketch or three-dimensional work - relative to geography, topography, architecture or science; a - performance; a broadcast; a phonogram; a compilation of data to the - extent it is protected as a copyrightable work; or a work performed by - a variety or circus performer to the extent it is not otherwise - considered a literary or artistic work. - i. "You" means an individual or entity exercising rights under this - License who has not previously violated the terms of this License with - respect to the Work, or who has received express permission from the - Licensor to exercise rights under this License despite a previous - violation. - j. "Publicly Perform" means to perform public recitations of the Work and - to communicate to the public those public recitations, by any means or - process, including by wire or wireless means or public digital - performances; to make available to the public Works in such a way that - members of the public may access these Works from a place and at a - place individually chosen by them; to perform the Work to the public - by any means or process and the communication to the public of the - performances of the Work, including by public digital performance; to - broadcast and rebroadcast the Work by any means including signs, - sounds or images. - k. "Reproduce" means to make copies of the Work by any means including - without limitation by sound or visual recordings and the right of - fixation and reproducing fixations of the Work, including storage of a - protected performance or phonogram in digital form or other electronic - medium. - -2. Fair Dealing Rights. Nothing in this License is intended to reduce, -limit, or restrict any uses free from copyright or rights arising from -limitations or exceptions that are provided for in connection with the -copyright protection under copyright law or other applicable laws. - -3. License Grant. Subject to the terms and conditions of this License, -Licensor hereby grants You a worldwide, royalty-free, non-exclusive, -perpetual (for the duration of the applicable copyright) license to -exercise the rights in the Work as stated below: - - a. to Reproduce the Work, to incorporate the Work into one or more - Collections, and to Reproduce the Work as incorporated in the - Collections; - b. to create and Reproduce Adaptations provided that any such Adaptation, - including any translation in any medium, takes reasonable steps to - clearly label, demarcate or otherwise identify that changes were made - to the original Work. For example, a translation could be marked "The - original work was translated from English to Spanish," or a - modification could indicate "The original work has been modified."; - c. to Distribute and Publicly Perform the Work including as incorporated - in Collections; and, - d. to Distribute and Publicly Perform Adaptations. - e. For the avoidance of doubt: - - i. Non-waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme cannot be waived, the Licensor - reserves the exclusive right to collect such royalties for any - exercise by You of the rights granted under this License; - ii. Waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme can be waived, the Licensor waives the - exclusive right to collect such royalties for any exercise by You - of the rights granted under this License; and, - iii. Voluntary License Schemes. The Licensor waives the right to - collect royalties, whether individually or, in the event that the - Licensor is a member of a collecting society that administers - voluntary licensing schemes, via that society, from any exercise - by You of the rights granted under this License. - -The above rights may be exercised in all media and formats whether now -known or hereafter devised. The above rights include the right to make -such modifications as are technically necessary to exercise the rights in -other media and formats. Subject to Section 8(f), all rights not expressly -granted by Licensor are hereby reserved. - -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: - - a. You may Distribute or Publicly Perform the Work only under the terms - of this License. You must include a copy of, or the Uniform Resource - Identifier (URI) for, this License with every copy of the Work You - Distribute or Publicly Perform. You may not offer or impose any terms - on the Work that restrict the terms of this License or the ability of - the recipient of the Work to exercise the rights granted to that - recipient under the terms of the License. You may not sublicense the - Work. You must keep intact all notices that refer to this License and - to the disclaimer of warranties with every copy of the Work You - Distribute or Publicly Perform. When You Distribute or Publicly - Perform the Work, You may not impose any effective technological - measures on the Work that restrict the ability of a recipient of the - Work from You to exercise the rights granted to that recipient under - the terms of the License. This Section 4(a) applies to the Work as - incorporated in a Collection, but this does not require the Collection - apart from the Work itself to be made subject to the terms of this - License. If You create a Collection, upon notice from any Licensor You - must, to the extent practicable, remove from the Collection any credit - as required by Section 4(c), as requested. If You create an - Adaptation, upon notice from any Licensor You must, to the extent - practicable, remove from the Adaptation any credit as required by - Section 4(c), as requested. - b. You may Distribute or Publicly Perform an Adaptation only under the - terms of: (i) this License; (ii) a later version of this License with - the same License Elements as this License; (iii) a Creative Commons - jurisdiction license (either this or a later license version) that - contains the same License Elements as this License (e.g., - Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible - License. If you license the Adaptation under one of the licenses - mentioned in (iv), you must comply with the terms of that license. If - you license the Adaptation under the terms of any of the licenses - mentioned in (i), (ii) or (iii) (the "Applicable License"), you must - comply with the terms of the Applicable License generally and the - following provisions: (I) You must include a copy of, or the URI for, - the Applicable License with every copy of each Adaptation You - Distribute or Publicly Perform; (II) You may not offer or impose any - terms on the Adaptation that restrict the terms of the Applicable - License or the ability of the recipient of the Adaptation to exercise - the rights granted to that recipient under the terms of the Applicable - License; (III) You must keep intact all notices that refer to the - Applicable License and to the disclaimer of warranties with every copy - of the Work as included in the Adaptation You Distribute or Publicly - Perform; (IV) when You Distribute or Publicly Perform the Adaptation, - You may not impose any effective technological measures on the - Adaptation that restrict the ability of a recipient of the Adaptation - from You to exercise the rights granted to that recipient under the - terms of the Applicable License. This Section 4(b) applies to the - Adaptation as incorporated in a Collection, but this does not require - the Collection apart from the Adaptation itself to be made subject to - the terms of the Applicable License. - c. If You Distribute, or Publicly Perform the Work or any Adaptations or - Collections, You must, unless a request has been made pursuant to - Section 4(a), keep intact all copyright notices for the Work and - provide, reasonable to the medium or means You are utilizing: (i) the - name of the Original Author (or pseudonym, if applicable) if supplied, - and/or if the Original Author and/or Licensor designate another party - or parties (e.g., a sponsor institute, publishing entity, journal) for - attribution ("Attribution Parties") in Licensor's copyright notice, - terms of service or by other reasonable means, the name of such party - or parties; (ii) the title of the Work if supplied; (iii) to the - extent reasonably practicable, the URI, if any, that Licensor - specifies to be associated with the Work, unless such URI does not - refer to the copyright notice or licensing information for the Work; - and (iv) , consistent with Ssection 3(b), in the case of an - Adaptation, a credit identifying the use of the Work in the Adaptation - (e.g., "French translation of the Work by Original Author," or - "Screenplay based on original Work by Original Author"). The credit - required by this Section 4(c) may be implemented in any reasonable - manner; provided, however, that in the case of a Adaptation or - Collection, at a minimum such credit will appear, if a credit for all - contributing authors of the Adaptation or Collection appears, then as - part of these credits and in a manner at least as prominent as the - credits for the other contributing authors. For the avoidance of - doubt, You may only use the credit required by this Section for the - purpose of attribution in the manner set out above and, by exercising - Your rights under this License, You may not implicitly or explicitly - assert or imply any connection with, sponsorship or endorsement by the - Original Author, Licensor and/or Attribution Parties, as appropriate, - of You or Your use of the Work, without the separate, express prior - written permission of the Original Author, Licensor and/or Attribution - Parties. - d. Except as otherwise agreed in writing by the Licensor or as may be - otherwise permitted by applicable law, if You Reproduce, Distribute or - Publicly Perform the Work either by itself or as part of any - Adaptations or Collections, You must not distort, mutilate, modify or - take other derogatory action in relation to the Work which would be - prejudicial to the Original Author's honor or reputation. Licensor - agrees that in those jurisdictions (e.g. Japan), in which any exercise - of the right granted in Section 3(b) of this License (the right to - make Adaptations) would be deemed to be a distortion, mutilation, - modification or other derogatory action prejudicial to the Original - Author's honor and reputation, the Licensor will waive or not assert, - as appropriate, this Section, to the fullest extent permitted by the - applicable national law, to enable You to reasonably exercise Your - right under Section 3(b) of this License (right to make Adaptations) - but not otherwise. - -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR -OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY -KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, -INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, -FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF -LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, -WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION -OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE -LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR -ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES -ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS -BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination - - a. This License and the rights granted hereunder will terminate - automatically upon any breach by You of the terms of this License. - Individuals or entities who have received Adaptations or Collections - from You under this License, however, will not have their licenses - terminated provided such individuals or entities remain in full - compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will - survive any termination of this License. - b. Subject to the above terms and conditions, the license granted here is - perpetual (for the duration of the applicable copyright in the Work). - Notwithstanding the above, Licensor reserves the right to release the - Work under different license terms or to stop distributing the Work at - any time; provided, however that any such election will not serve to - withdraw this License (or any other license that has been, or is - required to be, granted under the terms of this License), and this - License will continue in full force and effect unless terminated as - stated above. - -8. Miscellaneous - - a. Each time You Distribute or Publicly Perform the Work or a Collection, - the Licensor offers to the recipient a license to the Work on the same - terms and conditions as the license granted to You under this License. - b. Each time You Distribute or Publicly Perform an Adaptation, Licensor - offers to the recipient a license to the original Work on the same - terms and conditions as the license granted to You under this License. - c. If any provision of this License is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability of - the remainder of the terms of this License, and without further action - by the parties to this agreement, such provision shall be reformed to - the minimum extent necessary to make such provision valid and - enforceable. - d. No term or provision of this License shall be deemed waived and no - breach consented to unless such waiver or consent shall be in writing - and signed by the party to be charged with such waiver or consent. - e. This License constitutes the entire agreement between the parties with - respect to the Work licensed here. There are no understandings, - agreements or representations with respect to the Work not specified - here. Licensor shall not be bound by any additional provisions that - may appear in any communication from You. This License may not be - modified without the mutual written agreement of the Licensor and You. - f. The rights granted under, and the subject matter referenced, in this - License were drafted utilizing the terminology of the Berne Convention - for the Protection of Literary and Artistic Works (as amended on - September 28, 1979), the Rome Convention of 1961, the WIPO Copyright - Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 - and the Universal Copyright Convention (as revised on July 24, 1971). - These rights and subject matter take effect in the relevant - jurisdiction in which the License terms are sought to be enforced - according to the corresponding provisions of the implementation of - those treaty provisions in the applicable national law. If the - standard suite of rights granted under applicable copyright law - includes additional rights not granted under this License, such - additional rights are deemed to be included in the License; this - License is not intended to restrict the license of any rights under - applicable law. - - -Creative Commons Notice - - Creative Commons is not a party to this License, and makes no warranty - whatsoever in connection with the Work. Creative Commons will not be - liable to You or any party on any legal theory for any damages - whatsoever, including without limitation any general, special, - incidental or consequential damages arising in connection to this - license. Notwithstanding the foregoing two (2) sentences, if Creative - Commons has expressly identified itself as the Licensor hereunder, it - shall have all rights and obligations of Licensor. - - Except for the limited purpose of indicating to the public that the - Work is licensed under the CCPL, Creative Commons does not authorize - the use by either party of the trademark "Creative Commons" or any - related trademark or logo of Creative Commons without the prior - written consent of Creative Commons. Any permitted use will be in - compliance with Creative Commons' then-current trademark usage - guidelines, as may be published on its website or otherwise made - available upon request from time to time. For the avoidance of doubt, - this trademark restriction does not form part of the License. - - Creative Commons may be contacted at http://creativecommons.org/. diff --git a/mods/mesecons/README.md b/mods/mesecons/README.md deleted file mode 100644 index 6061eb5..0000000 --- a/mods/mesecons/README.md +++ /dev/null @@ -1,80 +0,0 @@ - ######################################################################## - ## __ __ _____ _____ _____ _____ _____ _ _ _____ ## - ## | \ / | | ___| | ___| | ___| | ___| | _ | | \ | | | ___| ## - ## | \/ | | |___ | |___ | |___ | | | | | | | \| | | |___ ## - ## | |\__/| | | ___| |___ | | ___| | | | | | | | | |___ | ## - ## | | | | | |___ ___| | | |___ | |___ | |_| | | |\ | ___| | ## - ## |_| |_| |_____| |_____| |_____| |_____| |_____| |_| \_| |_____| ## - ## ## - ######################################################################## - -MESECONS by Jeija and contributors - -Mezzee-what? ------------- -[Mesecons](http://mesecons.net/)! They're yellow, they're conductive, and they'll add a whole new dimension to Minetest's gameplay. - -Mesecons is a mod for [Minetest](http://minetest.net/) that implements a ton of items related to digital circuitry, such as wires, buttons, lights, and even programmable controllers. Among other things, there are also pistons, solar panels, pressure plates, and note blocks. - -Mesecons has a similar goal to Redstone in Minecraft, but works in its own way, with different rules and mechanics. - -OK, I want in. --------------- -Go get it! - -[DOWNLOADS PAGE](http://mesecons.net/downloads.php) - -Now go ahead and install it like any other Minetest mod. Don't know how? Check out [the wonderful page about it](http://wiki.minetest.com/wiki/Mods) over at the Minetest Wiki. For your convenience, here's a quick summary: - -1. If Mesecons is still in a ZIP file, extract the folder inside to somewhere on the computer. -2. Make sure that when you open the folder, you can directly find `README.md` in the listing. If you just see another folder, move that folder up one level and delete the old one. -3. Open up the Minetest mods folder - usually `/mods/`. If you see the `minetest` or folder inside of that, that is your mod folder instead. -4. Copy the Mesecons folder into the mods folder. - -Don't like some parts of Mesecons? Open up the Mesecons folder and delete the subfolder containing the mod you don't want. If you didn't want movestones, for example, all you have to do is delete the `mesecons_movestones` folder and they will no longer be available. - -There are no dependencies - it will work right after installing! - -How do I use this thing? ------------------------- -How about a [quick overview video](https://www.youtube.com/watch?v=6kmeQj6iW5k)? - -Or maybe a [comprehensive reference](http://mesecons.net/items.php) is your style? - -An overview for the very newest of new beginners? How does [this one](http://uberi.mesecons.net/projects/MeseconsBasics/index.html) look? - -Want to get more into building? Why not check out the [Mesecons Laboratory](http://uberi.mesecons.net/), a website dedicated to advanced Mesecons builders? - -Want to contribute to Mesecons itself? Check out the [source code](https://github.com/Jeija/minetest-mod-mesecons)! - -Who wrote it anyways? ---------------------- -These awesome people made Mesecons possible! - -| Contributor | Contribution | -| --------------- | -------------------------------- | -| Jat15 | Various tweaks. | -| Jeija | **Main developer! Everything.** | -| Jordach | Noteblock sounds. | -| khonkhortistan | Code, recipes, textures. | -| Kotolegokot | Nodeboxes for items. | -| minerd247 | Textures. | -| Nore/Novatux | Code. | -| RealBadAngel | Fixes, improvements. | -| sfan5 | Code, recipes, textures. | -| suzenako | Piston sounds. | -| Uberi/Temperest | Code, textures, documentation. | -| VanessaE | Code, recipes, textures, design. | -| Whiskers75 | Logic gates implementation. | - -There are also a whole bunch of other people helping with everything from code to testing and feedback. Mesecons would also not be possible without their help! - -Alright, how can I use it? --------------------------- -All textures in this project are licensed under the CC-BY-SA 3.0 (Creative Commons Attribution-ShareAlike 3.0 Generic). That means you can distribute and remix them as much as you want to, under the condition that you give credit to the authors and the project, and that if you remix and release them, they must be under the same or similar license to this one. - -All code in this project is licensed under the LGPL version 3 or later. That means you have unlimited freedom to distribute and modify the work however you see fit, provided that if you decide to distribute it or any modified versions of it, you must also use the same license. The LGPL also grants the additional freedom to write extensions for the software and distribute them without the extensions being subject to the terms of the LGPL, although the software itself retains its license. - -No warranty is provided, express or implied, for any part of the project. - -version based on: https://github.com/Jeija/minetest-mod-mesecons/commit/5e02b3beefd285bf85df059619e8f4190f5c5184 \ No newline at end of file diff --git a/mods/mesecons/mesecons/VERSION b/mods/mesecons/mesecons/VERSION deleted file mode 100644 index 75b9e03..0000000 --- a/mods/mesecons/mesecons/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.41 DEV diff --git a/mods/mesecons/mesecons/depends.txt b/mods/mesecons/mesecons/depends.txt deleted file mode 100644 index 4ad96d5..0000000 --- a/mods/mesecons/mesecons/depends.txt +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/mods/mesecons/mesecons/init.lua b/mods/mesecons/mesecons/init.lua deleted file mode 100644 index 640af4d..0000000 --- a/mods/mesecons/mesecons/init.lua +++ /dev/null @@ -1,156 +0,0 @@ --- |\ /| ____ ____ ____ _____ ____ _____ --- | \ / | | | | | | | |\ | | --- | \/ | |___ ____ |___ | | | | \ | |____ --- | | | | | | | | | \ | | --- | | |___ ____| |___ |____ |____| | \| ____| --- by Jeija, Uberi (Temperest), sfan5, VanessaE --- --- --- --- This mod adds mesecons[=minecraft redstone] and different receptors/effectors to minetest. --- See the documentation on the forum for additional information, especially about crafting --- --- --- For developer documentation see the Developers' section on mesecons.TK --- --- --- ---Quick draft for the mesecons array in the node's definition ---mesecons = ---{ --- receptor = --- { --- state = mesecon.state.on/off --- rules = rules/get_rules --- }, --- effector = --- { --- action_on = function --- action_off = function --- action_change = function --- rules = rules/get_rules --- }, --- conductor = --- { --- state = mesecon.state.on/off --- offstate = opposite state (for state = on only) --- onstate = opposite state (for state = off only) --- rules = rules/get_rules --- } ---} - - --- PUBLIC VARIABLES -mesecon={} -- contains all functions and all global variables -mesecon.actions_on={} -- Saves registered function callbacks for mesecon on | DEPRECATED -mesecon.actions_off={} -- Saves registered function callbacks for mesecon off | DEPRECATED -mesecon.actions_change={} -- Saves registered function callbacks for mesecon change | DEPRECATED -mesecon.receptors={} -- saves all information about receptors | DEPRECATED -mesecon.effectors={} -- saves all information about effectors | DEPRECATED -mesecon.conductors={} -- saves all information about conductors | DEPRECATED - - -local wpath = minetest.get_worldpath() -local function read_file(fn) - local f = io.open(fn, "r") - if f==nil then return {} end - local t = f:read("*all") - f:close() - if t=="" or t==nil then return {} end - return minetest.deserialize(t) -end - -local function write_file(fn, tbl) - local f = io.open(fn, "w") - f:write(minetest.serialize(tbl)) - f:close() -end - -mesecon.to_update = read_file(wpath.."/mesecon_to_update") -mesecon.r_to_update = read_file(wpath.."/mesecon_r_to_update") - -minetest.register_on_shutdown(function() - write_file(wpath.."/mesecon_to_update",mesecon.to_update) - write_file(wpath.."/mesecon_r_to_update",mesecon.r_to_update) -end) - --- Settings -dofile(minetest.get_modpath("mesecons").."/settings.lua") - --- Presets (eg default rules) -dofile(minetest.get_modpath("mesecons").."/presets.lua"); - - --- Utilities like comparing positions, --- adding positions and rules, --- mostly things that make the source look cleaner -dofile(minetest.get_modpath("mesecons").."/util.lua"); - --- Internal stuff --- This is the most important file --- it handles signal transmission and basically everything else --- It is also responsible for managing the nodedef things, --- like calling action_on/off/change -dofile(minetest.get_modpath("mesecons").."/internal.lua"); - --- Deprecated stuff --- To be removed in future releases --- Currently there is nothing here -dofile(minetest.get_modpath("mesecons").."/legacy.lua"); - --- API --- these are the only functions you need to remember - -function mesecon:receptor_on_i(pos, rules) - rules = rules or mesecon.rules.default - - for _, rule in ipairs(mesecon:flattenrules(rules)) do - local np = mesecon:addPosRule(pos, rule) - local rulenames = mesecon:rules_link_rule_all(pos, rule) - for _, rulename in ipairs(rulenames) do - mesecon:turnon(np, rulename) - end - end -end - -function mesecon:receptor_on(pos, rules) - if MESECONS_GLOBALSTEP then - rules = rules or mesecon.rules.default - mesecon.r_to_update[#mesecon.r_to_update+1]={pos=pos, rules=rules, action="on"} - else - mesecon:receptor_on_i(pos, rules) - end -end - -function mesecon:receptor_off_i(pos, rules) - rules = rules or mesecon.rules.default - for _, rule in ipairs(mesecon:flattenrules(rules)) do - local np = mesecon:addPosRule(pos, rule) - local rulenames = mesecon:rules_link_rule_all(pos, rule) - for _, rulename in ipairs(rulenames) do - if not mesecon:connected_to_receptor(np, mesecon:invertRule(rule)) then - mesecon:turnoff(np, rulename) - else - mesecon:changesignal(np, minetest.get_node(np), rulename, mesecon.state.off) - end - end - end -end - -function mesecon:receptor_off(pos, rules) - if MESECONS_GLOBALSTEP then - rules = rules or mesecon.rules.default - mesecon.r_to_update[#mesecon.r_to_update+1]={pos=pos, rules=rules, action="off"} - else - mesecon:receptor_off_i(pos, rules) - end -end - - -print("[OK] Mesecons") - ---The actual wires -dofile(minetest.get_modpath("mesecons").."/wires.lua"); - ---Services like turnoff receptor on dignode and so on -dofile(minetest.get_modpath("mesecons").."/services.lua"); diff --git a/mods/mesecons/mesecons/internal.lua b/mods/mesecons/mesecons/internal.lua deleted file mode 100644 index a958e30..0000000 --- a/mods/mesecons/mesecons/internal.lua +++ /dev/null @@ -1,725 +0,0 @@ --- Internal.lua - The core of mesecons --- --- For more practical developer resources see mesecons.tk --- --- Function overview --- mesecon:get_effector(nodename) --> Returns the mesecons.effector -specifictation in the nodedef by the nodename --- mesecon:get_receptor(nodename) --> Returns the mesecons.receptor -specifictation in the nodedef by the nodename --- mesecon:get_conductor(nodename) --> Returns the mesecons.conductor-specifictation in the nodedef by the nodename --- mesecon:get_any_inputrules (node) --> Returns the rules of a node if it is a conductor or an effector --- mesecon:get_any_outputrules (node) --> Returns the rules of a node if it is a conductor or a receptor - --- RECEPTORS --- mesecon:is_receptor(nodename) --> Returns true if nodename is a receptor --- mesecon:is_receptor_on(nodename) --> Returns true if nodename is an receptor with state = mesecon.state.on --- mesecon:is_receptor_off(nodename) --> Returns true if nodename is an receptor with state = mesecon.state.off --- mesecon:receptor_get_rules(node) --> Returns the rules of the receptor (mesecon.rules.default if none specified) - --- EFFECTORS --- mesecon:is_effector(nodename) --> Returns true if nodename is an effector --- mesecon:is_effector_on(nodename) --> Returns true if nodename is an effector with nodedef.mesecons.effector.action_off --- mesecon:is_effector_off(nodename) --> Returns true if nodename is an effector with nodedef.mesecons.effector.action_on --- mesecon:effector_get_rules(node) --> Returns the input rules of the effector (mesecon.rules.default if none specified) - --- SIGNALS --- mesecon:activate(pos, node) --> Activates the effector node at the specific pos (calls nodedef.mesecons.effector.action_on) --- mesecon:deactivate(pos, node) --> Deactivates the effector node at the specific pos (calls nodedef.mesecons.effector.action_off) --- mesecon:changesignal(pos, node, rulename, newstate) --> Changes the effector node at the specific pos (calls nodedef.mesecons.effector.action_change) - --- RULES --- mesecon:add_rules(name, rules) | deprecated? --> Saves rules table by name --- mesecon:get_rules(name, rules) | deprecated? --> Loads rules table with name - --- CONDUCTORS --- mesecon:is_conductor(nodename) --> Returns true if nodename is a conductor --- mesecon:is_conductor_on(node) --> Returns true if node is a conductor with state = mesecon.state.on --- mesecon:is_conductor_off(node) --> Returns true if node is a conductor with state = mesecon.state.off --- mesecon:get_conductor_on(node_off) --> Returns the onstate nodename of the conductor --- mesecon:get_conductor_off(node_on) --> Returns the offstate nodename of the conductor --- mesecon:conductor_get_rules(node) --> Returns the input+output rules of a conductor (mesecon.rules.default if none specified) - --- HIGH-LEVEL Internals --- mesecon:is_power_on(pos) --> Returns true if pos emits power in any way --- mesecon:is_power_off(pos) --> Returns true if pos does not emit power in any way --- mesecon:turnon(pos, rulename) --> Returns true whatever there is at pos. Calls itself for connected nodes (if pos is a conductor) --> recursive, the rulename is the name of the input rule that caused calling turnon --- mesecon:turnoff(pos, rulename) --> Turns off whatever there is at pos. Calls itself for connected nodes (if pos is a conductor) --> recursive, the rulename is the name of the input rule that caused calling turnoff --- mesecon:connected_to_receptor(pos) --> Returns true if pos is connected to a receptor directly or via conductors; calls itself if pos is a conductor --> recursive --- mesecon:rules_link(output, input, dug_outputrules) --> Returns true if outputposition + outputrules = inputposition and inputposition + inputrules = outputposition (if the two positions connect) --- mesecon:rules_link_anydir(outp., inp., d_outpr.) --> Same as rules mesecon:rules_link but also returns true if output and input are swapped --- mesecon:is_powered(pos) --> Returns true if pos is powered by a receptor or a conductor - --- RULES ROTATION helpsers --- mesecon:rotate_rules_right(rules) --- mesecon:rotate_rules_left(rules) --- mesecon:rotate_rules_up(rules) --- mesecon:rotate_rules_down(rules) --- These functions return rules that have been rotated in the specific direction - --- General -function mesecon:get_effector(nodename) - if minetest.registered_nodes[nodename] - and minetest.registered_nodes[nodename].mesecons - and minetest.registered_nodes[nodename].mesecons.effector then - return minetest.registered_nodes[nodename].mesecons.effector - end -end - -function mesecon:get_receptor(nodename) - if minetest.registered_nodes[nodename] - and minetest.registered_nodes[nodename].mesecons - and minetest.registered_nodes[nodename].mesecons.receptor then - return minetest.registered_nodes[nodename].mesecons.receptor - end -end - -function mesecon:get_conductor(nodename) - if minetest.registered_nodes[nodename] - and minetest.registered_nodes[nodename].mesecons - and minetest.registered_nodes[nodename].mesecons.conductor then - return minetest.registered_nodes[nodename].mesecons.conductor - end -end - -function mesecon:get_any_outputrules (node) - if mesecon:is_conductor(node.name) then - return mesecon:conductor_get_rules(node) - elseif mesecon:is_receptor(node.name) then - return mesecon:receptor_get_rules(node) - end - return false -end - -function mesecon:get_any_inputrules (node) - if mesecon:is_conductor(node.name) then - return mesecon:conductor_get_rules(node) - elseif mesecon:is_effector(node.name) then - return mesecon:effector_get_rules(node) - end - return false -end - --- Receptors --- Nodes that can power mesecons -function mesecon:is_receptor_on(nodename) - local receptor = mesecon:get_receptor(nodename) - if receptor and receptor.state == mesecon.state.on then - return true - end - return false -end - -function mesecon:is_receptor_off(nodename) - local receptor = mesecon:get_receptor(nodename) - if receptor and receptor.state == mesecon.state.off then - return true - end - return false -end - -function mesecon:is_receptor(nodename) - local receptor = mesecon:get_receptor(nodename) - if receptor then - return true - end - return false -end - -function mesecon:receptor_get_rules(node) - local receptor = mesecon:get_receptor(node.name) - if receptor then - local rules = receptor.rules - if type(rules) == 'function' then - return rules(node) - elseif rules then - return rules - end - end - - return mesecon.rules.default -end - --- Effectors --- Nodes that can be powered by mesecons -function mesecon:is_effector_on(nodename) - local effector = mesecon:get_effector(nodename) - if effector and effector.action_off then - return true - end - return false -end - -function mesecon:is_effector_off(nodename) - local effector = mesecon:get_effector(nodename) - if effector and effector.action_on then - return true - end - return false -end - -function mesecon:is_effector(nodename) - local effector = mesecon:get_effector(nodename) - if effector then - return true - end - return false -end - -function mesecon:effector_get_rules(node) - local effector = mesecon:get_effector(node.name) - if effector then - local rules = effector.rules - if type(rules) == 'function' then - return rules(node) - elseif rules then - return rules - end - end - return mesecon.rules.default -end - ---Signals - -function mesecon:activate(pos, node, rulename) - if MESECONS_GLOBALSTEP then - if rulename == nil then - for _,rule in ipairs(mesecon:effector_get_rules(node)) do - mesecon:activate(pos, node, rule) - end - return - end - add_action(pos, "on", rulename) - else - local effector = mesecon:get_effector(node.name) - if effector and effector.action_on then - effector.action_on (pos, node, rulename) - end - end -end - -function mesecon:deactivate(pos, node, rulename) - if MESECONS_GLOBALSTEP then - if rulename == nil then - for _,rule in ipairs(mesecon:effector_get_rules(node)) do - mesecon:deactivate(pos, node, rule) - end - return - end - add_action(pos, "off", rulename) - else - local effector = mesecon:get_effector(node.name) - if effector and effector.action_off then - effector.action_off (pos, node, rulename) - end - end -end - -function mesecon:changesignal(pos, node, rulename, newstate) - - newstate = newstate or "on" - --rulename = rulename or mesecon.rules.default - if MESECONS_GLOBALSTEP then - if rulename == nil then - for _,rule in ipairs(mesecon:effector_get_rules(node)) do - mesecon:changesignal(pos, node, rule, newstate) - end - return - end - add_action(pos, "c"..newstate, rulename) - else - local effector = mesecon:get_effector(node.name) - if effector and effector.action_change then - effector.action_change (pos, node, rulename, newstate) - end - end -end - -function execute_actions(dtime) - local nactions = mesecon.to_update - mesecon.to_update = {} - for _,i in ipairs(nactions) do - node = minetest.get_node(i.pos) - if node.name=="ignore" then - add_action(i.pos, i.action, i.rname) - else - effector = mesecon:get_effector(node.name) - if i.action == "on" then - if effector and effector.action_on then - effector.action_on(i.pos, node, i.rname) - end - elseif i.action == "off" then - if effector and effector.action_off then - effector.action_off(i.pos, node, i.rname) - end - elseif i.action == "con" then - if effector and effector.action_change then - effector.action_change(i.pos, node, i.rname, "on") - end - elseif i.action == "coff" then - if effector and effector.action_change then - effector.action_change(i.pos, node, i.rname, "off") - end - end - end - end - local nactions = mesecon.r_to_update - mesecon.r_to_update = {} - for _,i in ipairs(nactions) do - if i.action == "on" then - mesecon:receptor_on_i(i.pos, i.rules) - else - mesecon:receptor_off_i(i.pos,i.rules) - end - end -end - -minetest.register_globalstep(execute_actions) - -function add_action(pos, action, rname) - for _,i in ipairs(mesecon.to_update) do - if i.pos.x == pos.x and i.pos.y == pos.y and i.pos.z == pos.z and i.rname.x == rname.x and i.rname.y == rname.y and i.rname.z == rname.z then - if (i.action == "on" and action == "on") or (i.action == "off" and action == "off") then - --nothing - elseif i.action == "coff" and action == "on" then i.action = "on" - elseif i.action == "con" and action == "off" then i.action = "off" - else - if action == "on" or action == "con" then i.action = "con" end - if action == "off" or action == "coff" then i.action = "coff" end - end - break - end - end - mesecon.to_update[#mesecon.to_update+1] = {pos = pos, action = action, rname = rname} -end - ---Rules - -function mesecon:add_rules(name, rules) - mesecon.rules[name] = rules -end - -function mesecon:get_rules(name) - return mesecon.rules[name] -end - --- Conductors - -function mesecon:is_conductor_on(node, rulename) - local conductor = mesecon:get_conductor(node.name) - if conductor then - if conductor.state then - return conductor.state == mesecon.state.on - end - if conductor.states then - if not rulename then - return mesecon:getstate(node.name, conductor.states) ~= 1 - end - local bit = mesecon:rule2bit(rulename, mesecon:conductor_get_rules(node)) - local binstate = mesecon:getbinstate(node.name, conductor.states) - return mesecon:get_bit(binstate, bit) - end - end - return false -end - -function mesecon:is_conductor_off(node, rulename) - local conductor = mesecon:get_conductor(node.name) - if conductor then - if conductor.state then - return conductor.state == mesecon.state.off - end - if conductor.states then - if not rulename then - return mesecon:getstate(node.name, conductor.states) == 1 - end - local bit = mesecon:rule2bit(rulename, mesecon:conductor_get_rules(node)) - local binstate = mesecon:getbinstate(node.name, conductor.states) - return not mesecon:get_bit(binstate, bit) - end - end - return false -end - -function mesecon:is_conductor(nodename) - local conductor = mesecon:get_conductor(nodename) - if conductor then - return true - end - return false -end - -function mesecon:get_conductor_on(node_off, rulename) - local conductor = mesecon:get_conductor(node_off.name) - if conductor then - if conductor.onstate then - return conductor.onstate - end - if conductor.states then - local bit = mesecon:rule2bit(rulename, mesecon:conductor_get_rules(node_off)) - local binstate = mesecon:getbinstate(node_off.name, conductor.states) - binstate = mesecon:set_bit(binstate, bit, "1") - return conductor.states[tonumber(binstate,2)+1] - end - end - return offstate -end - -function mesecon:get_conductor_off(node_on, rulename) - local conductor = mesecon:get_conductor(node_on.name) - if conductor then - if conductor.offstate then - return conductor.offstate - end - if conductor.states then - local bit = mesecon:rule2bit(rulename, mesecon:conductor_get_rules(node_on)) - local binstate = mesecon:getbinstate(node_on.name, conductor.states) - binstate = mesecon:set_bit(binstate, bit, "0") - return conductor.states[tonumber(binstate,2)+1] - end - end - return onstate -end - -function mesecon:conductor_get_rules(node) - local conductor = mesecon:get_conductor(node.name) - if conductor then - local rules = conductor.rules - if type(rules) == 'function' then - return rules(node) - elseif rules then - return rules - end - end - return mesecon.rules.default -end - --- some more general high-level stuff - -function mesecon:is_power_on(pos, rulename) - local node = minetest.get_node(pos) - if mesecon:is_conductor_on(node, rulename) or mesecon:is_receptor_on(node.name) then - return true - end - return false -end - -function mesecon:is_power_off(pos, rulename) - local node = minetest.get_node(pos) - if mesecon:is_conductor_off(node, rulename) or mesecon:is_receptor_off(node.name) then - return true - end - return false -end - -function mesecon:turnon(pos, rulename) - local node = minetest.get_node(pos) - - if mesecon:is_conductor_off(node, rulename) then - local rules = mesecon:conductor_get_rules(node) - - if not rulename then - for _, rule in ipairs(mesecon:flattenrules(rules)) do - if mesecon:connected_to_receptor(pos, rule) then - mesecon:turnon(pos, rule) - end - end - return - end - - minetest.swap_node(pos, {name = mesecon:get_conductor_on(node, rulename), param2 = node.param2}) - - for _, rule in ipairs(mesecon:rule2meta(rulename, rules)) do - local np = mesecon:addPosRule(pos, rule) - local rulenames = mesecon:rules_link_rule_all(pos, rule) - - for _, rulename in ipairs(rulenames) do - mesecon:turnon(np, rulename) - end - end - elseif mesecon:is_effector(node.name) then - mesecon:changesignal(pos, node, rulename, mesecon.state.on) - if mesecon:is_effector_off(node.name) then - mesecon:activate(pos, node, rulename) - end - end -end - -function mesecon:turnoff(pos, rulename) - local node = minetest.get_node(pos) - - if mesecon:is_conductor_on(node, rulename) then - local rules = mesecon:conductor_get_rules(node) - --[[ - if not rulename then - for _, rule in ipairs(mesecon:flattenrules(rules)) do - if mesecon:is_powered(pos, rule) then - mesecon:turnoff(pos, rule) - end - end - return - end - --]] - minetest.swap_node(pos, {name = mesecon:get_conductor_off(node, rulename), param2 = node.param2}) - - for _, rule in ipairs(mesecon:rule2meta(rulename, rules)) do - local np = mesecon:addPosRule(pos, rule) - local rulenames = mesecon:rules_link_rule_all(pos, rule) - - for _, rulename in ipairs(rulenames) do - mesecon:turnoff(np, rulename) - end - end - elseif mesecon:is_effector(node.name) then - mesecon:changesignal(pos, node, rulename, mesecon.state.off) - if mesecon:is_effector_on(node.name) - and not mesecon:is_powered(pos) then - mesecon:deactivate(pos, node, rulename) - end - end -end - - -function mesecon:connected_to_receptor(pos, rulename) - local node = minetest.get_node(pos) - - -- Check if conductors around are connected - local rules = mesecon:get_any_inputrules(node) - if not rules then return false end - - for _, rule in ipairs(mesecon:rule2meta(rulename, rules)) do - local rulenames = mesecon:rules_link_rule_all_inverted(pos, rule) - for _, rname in ipairs(rulenames) do - local np = mesecon:addPosRule(pos, rname) - if mesecon:find_receptor_on(np, {}, mesecon:invertRule(rname)) then - return true - end - end - end - - return false -end - -function mesecon:find_receptor_on(pos, checked, rulename) - local node = minetest.get_node(pos) - - if mesecon:is_receptor_on(node.name) then - -- add current position to checked - table.insert(checked, {x=pos.x, y=pos.y, z=pos.z}) - return true - end - - if mesecon:is_conductor(node.name) then - local rules = mesecon:conductor_get_rules(node) - local metaindex = mesecon:rule2metaindex(rulename, rules) - -- find out if node has already been checked (to prevent from endless loop) - for _, cp in ipairs(checked) do - if mesecon:cmpPos(cp, pos) and cp.metaindex == metaindex then - return false, checked - end - end - -- add current position to checked - table.insert(checked, {x=pos.x, y=pos.y, z=pos.z, metaindex = metaindex}) - for _, rule in ipairs(mesecon:rule2meta(rulename, rules)) do - local rulenames = mesecon:rules_link_rule_all_inverted(pos, rule) - for _, rname in ipairs(rulenames) do - local np = mesecon:addPosRule(pos, rname) - if mesecon:find_receptor_on(np, checked, mesecon:invertRule(rname)) then - return true - end - end - end - else - -- find out if node has already been checked (to prevent from endless loop) - for _, cp in ipairs(checked) do - if mesecon:cmpPos(cp, pos) then - return false, checked - end - end - table.insert(checked, {x=pos.x, y=pos.y, z=pos.z}) - end - - return false -end - -function mesecon:rules_link(output, input, dug_outputrules) --output/input are positions (outputrules optional, used if node has been dug), second return value: the name of the affected input rule - local outputnode = minetest.get_node(output) - local inputnode = minetest.get_node(input) - local outputrules = dug_outputrules or mesecon:get_any_outputrules (outputnode) - local inputrules = mesecon:get_any_inputrules (inputnode) - if not outputrules or not inputrules then - return - end - - for _, outputrule in ipairs(mesecon:flattenrules(outputrules)) do - -- Check if output sends to input - if mesecon:cmpPos(mesecon:addPosRule(output, outputrule), input) then - for _, inputrule in ipairs(mesecon:flattenrules(inputrules)) do - -- Check if input accepts from output - if mesecon:cmpPos(mesecon:addPosRule(input, inputrule), output) then - if inputrule.sx == nil or outputrule.sx == nil or mesecon:cmpSpecial(inputrule, outputrule) then - return true, inputrule - end - end - end - end - end - return false -end - -function mesecon:rules_link_rule_all(output, rule) --output/input are positions (outputrules optional, used if node has been dug), second return value: affected input rules - local input = mesecon:addPosRule(output, rule) - local inputnode = minetest.get_node(input) - local inputrules = mesecon:get_any_inputrules (inputnode) - if not inputrules then - return {} - end - local rules = {} - - for _, inputrule in ipairs(mesecon:flattenrules(inputrules)) do - -- Check if input accepts from output - if mesecon:cmpPos(mesecon:addPosRule(input, inputrule), output) then - if inputrule.sx == nil or rule.sx == nil or mesecon:cmpSpecial(inputrule, rule) then - rules[#rules+1] = inputrule - end - end - end - return rules -end - -function mesecon:rules_link_rule_all_inverted(input, rule) - --local irule = mesecon:invertRule(rule) - local output = mesecon:addPosRule(input, rule) - local outputnode = minetest.get_node(output) - local outputrules = mesecon:get_any_outputrules (outputnode) - if not outputrules then - return {} - end - local rules = {} - - for _, outputrule in ipairs(mesecon:flattenrules(outputrules)) do - if mesecon:cmpPos(mesecon:addPosRule(output, outputrule), input) then - if outputrule.sx == nil or rule.sx == nil or mesecon:cmpSpecial(outputrule, rule) then - rules[#rules+1] = mesecon:invertRule(outputrule) - end - end - end - return rules -end - -function mesecon:rules_link_anydir(pos1, pos2) - return mesecon:rules_link(pos1, pos2) or mesecon:rules_link(pos2, pos1) -end - -function mesecon:is_powered(pos, rule) - local node = minetest.get_node(pos) - local rules = mesecon:get_any_inputrules(node) - if not rules then return false end - - if not rule then - for _, rule in ipairs(mesecon:flattenrules(rules)) do - local rulenames = mesecon:rules_link_rule_all_inverted(pos, rule) - for _, rname in ipairs(rulenames) do - local np = mesecon:addPosRule(pos, rname) - local nn = minetest.get_node(np) - if (mesecon:is_conductor_on (nn, mesecon:invertRule(rname)) or mesecon:is_receptor_on (nn.name)) then - return true - end - end - end - else - local rulenames = mesecon:rules_link_rule_all_inverted(pos, rule) - for _, rname in ipairs(rulenames) do - local np = mesecon:addPosRule(pos, rname) - local nn = minetest.get_node(np) - if (mesecon:is_conductor_on (nn, mesecon:invertRule(rname)) or mesecon:is_receptor_on (nn.name)) then - return true - end - end - end - - return false -end - ---Rules rotation Functions: -function mesecon:rotate_rules_right(rules) - local nr = {} - for i, rule in ipairs(rules) do - if rule.sx then - table.insert(nr, { - x = -rule.z, - y = rule.y, - z = rule.x, - sx = -rule.sz, - sy = rule.sy, - sz = rule.sx}) - else - table.insert(nr, { - x = -rule.z, - y = rule.y, - z = rule.x}) - end - end - return nr -end - -function mesecon:rotate_rules_left(rules) - local nr = {} - for i, rule in ipairs(rules) do - if rule.sx then - table.insert(nr, { - x = rule.z, - y = rule.y, - z = -rule.x, - sx = rule.sz, - sy = rule.sy, - sz = -rule.sx}) - else - table.insert(nr, { - x = rule.z, - y = rule.y, - z = -rule.x}) - end - end - return nr -end - -function mesecon:rotate_rules_down(rules) - local nr = {} - for i, rule in ipairs(rules) do - if rule.sx then - table.insert(nr, { - x = -rule.y, - y = rule.x, - z = rule.z, - sx = -rule.sy, - sy = rule.sx, - sz = rule.sz}) - else - table.insert(nr, { - x = -rule.y, - y = rule.x, - z = rule.z}) - end - end - return nr -end - -function mesecon:rotate_rules_up(rules) - local nr = {} - for i, rule in ipairs(rules) do - if rule.sx then - table.insert(nr, { - x = rule.y, - y = -rule.x, - z = rule.z, - sx = rule.sy, - sy = -rule.sx, - sz = rule.sz}) - else - table.insert(nr, { - x = rule.y, - y = -rule.x, - z = rule.z}) - end - end - return nr -end diff --git a/mods/mesecons/mesecons/legacy.lua b/mods/mesecons/mesecons/legacy.lua deleted file mode 100644 index 3572a6f..0000000 --- a/mods/mesecons/mesecons/legacy.lua +++ /dev/null @@ -1,5 +0,0 @@ -minetest.swap_node = minetest.swap_node or function(pos, node) - local data = minetest.get_meta(pos):to_table() - minetest.add_node(pos, node) - minetest.get_meta(pos):from_table(data) -end diff --git a/mods/mesecons/mesecons/oldwires.lua b/mods/mesecons/mesecons/oldwires.lua deleted file mode 100644 index 9e54b1b..0000000 --- a/mods/mesecons/mesecons/oldwires.lua +++ /dev/null @@ -1,38 +0,0 @@ -minetest.register_node("mesecons:mesecon_off", { - drawtype = "raillike", - tiles = {"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, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}, - }, - groups = {dig_immediate=3, mesecon=1, mesecon_conductor_craftable=1}, - description="Mesecons", - mesecons = {conductor={ - state = mesecon.state.off, - onstate = "mesecons:mesecon_on" - }} -}) - -minetest.register_node("mesecons:mesecon_on", { - drawtype = "raillike", - tiles = {"jeija_mesecon_on.png", "jeija_mesecon_curved_on.png", "jeija_mesecon_t_junction_on.png", "jeija_mesecon_crossing_on.png"}, - paramtype = "light", - is_ground_content = true, - walkable = false, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}, - }, - groups = {dig_immediate=3, not_in_creaive_inventory=1, mesecon=1}, - drop = "mesecons:mesecon_off 1", - light_source = LIGHT_MAX-11, - mesecons = {conductor={ - state = mesecon.state.on, - offstate = "mesecons:mesecon_off" - }} -}) diff --git a/mods/mesecons/mesecons/presets.lua b/mods/mesecons/mesecons/presets.lua deleted file mode 100644 index 6c8d3ea..0000000 --- a/mods/mesecons/mesecons/presets.lua +++ /dev/null @@ -1,45 +0,0 @@ -mesecon.rules = {} -mesecon.state = {} - -mesecon.rules.default = -{{x=0, y=0, z=-1}, - {x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=0, y=0, z=1}, - {x=1, y=1, z=0}, - {x=1, y=-1, z=0}, - {x=-1, y=1, z=0}, - {x=-1, y=-1, z=0}, - {x=0, y=1, z=1}, - {x=0, y=-1, z=1}, - {x=0, y=1, z=-1}, - {x=0, y=-1, z=-1}} - -mesecon.rules.buttonlike = -{{x = 1, y = 0, z = 0}, - {x = 1, y = 1, z = 0}, - {x = 1, y =-1, z = 0}, - {x = 1, y =-1, z = 1}, - {x = 1, y =-1, z =-1}, - {x = 2, y = 0, z = 0}} - -mesecon.rules.flat = -{{x = 1, y = 0, z = 0}, - {x =-1, y = 0, z = 0}, - {x = 0, y = 0, z = 1}, - {x = 0, y = 0, z =-1}} - -mesecon.rules.buttonlike_get = function(node) - local rules = mesecon.rules.buttonlike - if node.param2 == 2 then - rules=mesecon:rotate_rules_left(rules) - elseif node.param2 == 3 then - rules=mesecon:rotate_rules_right(mesecon:rotate_rules_right(rules)) - elseif node.param2 == 0 then - rules=mesecon:rotate_rules_right(rules) - end - return rules -end - -mesecon.state.on = "on" -mesecon.state.off = "off" diff --git a/mods/mesecons/mesecons/services.lua b/mods/mesecons/mesecons/services.lua deleted file mode 100644 index 9d192ae..0000000 --- a/mods/mesecons/mesecons/services.lua +++ /dev/null @@ -1,38 +0,0 @@ -mesecon.on_placenode = function (pos, node) - if mesecon:is_receptor_on(node.name) then - mesecon:receptor_on(pos, mesecon:receptor_get_rules(node)) - elseif mesecon:is_powered(pos) then - if mesecon:is_conductor(node.name) then - mesecon:turnon (pos) - --mesecon:receptor_on (pos, mesecon:conductor_get_rules(node)) - else - mesecon:changesignal(pos, node, mesecon:effector_get_rules(node), "on") - mesecon:activate(pos, node) - end - elseif mesecon:is_conductor_on(node) then - minetest.swap_node(pos, {name = mesecon:get_conductor_off(node)}) - elseif mesecon:is_effector_on (node.name) then - mesecon:deactivate(pos, node) - end -end - -mesecon.on_dignode = function (pos, node) - if mesecon:is_conductor_on(node) then - mesecon:receptor_off_i(pos, mesecon:conductor_get_rules(node)) - elseif mesecon:is_receptor_on(node.name) then - mesecon:receptor_off(pos, mesecon:receptor_get_rules(node)) - end -end - -minetest.register_abm({ - nodenames = {"group:overheat"}, - interval = 1.0, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local meta = minetest.get_meta(pos) - meta:set_int("heat",0) - end, -}) - -minetest.register_on_placenode(mesecon.on_placenode) -minetest.register_on_dignode(mesecon.on_dignode) diff --git a/mods/mesecons/mesecons/settings.lua b/mods/mesecons/mesecons/settings.lua deleted file mode 100644 index 0d0b500..0000000 --- a/mods/mesecons/mesecons/settings.lua +++ /dev/null @@ -1,9 +0,0 @@ --- SETTINGS -BLINKY_PLANT_INTERVAL = 3 -NEW_STYLE_WIRES = true -- true = new nodebox wires, false = old raillike wires -PRESSURE_PLATE_INTERVAL = 0.1 -OBJECT_DETECTOR_RADIUS = 6 -PISTON_MAXIMUM_PUSH = 15 -MOVESTONE_MAXIMUM_PUSH = 100 -MESECONS_GLOBALSTEP = true -- true = receptors/effectors won't be updated - -- until next globalstep, decreases server load diff --git a/mods/mesecons/mesecons/textures/jeija_fiber.png b/mods/mesecons/mesecons/textures/jeija_fiber.png deleted file mode 100644 index e8c7b08..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_fiber.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_glue.png b/mods/mesecons/mesecons/textures/jeija_glue.png deleted file mode 100644 index 2f351d1..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_glue.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_crossing_off.png b/mods/mesecons/mesecons/textures/jeija_mesecon_crossing_off.png deleted file mode 100644 index 4e3ca03..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_crossing_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_crossing_on.png b/mods/mesecons/mesecons/textures/jeija_mesecon_crossing_on.png deleted file mode 100644 index 4518fa7..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_crossing_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_curved_off.png b/mods/mesecons/mesecons/textures/jeija_mesecon_curved_off.png deleted file mode 100644 index b34335f..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_curved_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_curved_on.png b/mods/mesecons/mesecons/textures/jeija_mesecon_curved_on.png deleted file mode 100644 index fa882e4..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_curved_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_inverter_off.png b/mods/mesecons/mesecons/textures/jeija_mesecon_inverter_off.png deleted file mode 100644 index bd4de1b..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_inverter_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_inverter_on.png b/mods/mesecons/mesecons/textures/jeija_mesecon_inverter_on.png deleted file mode 100644 index be41599..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_inverter_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_off.png b/mods/mesecons/mesecons/textures/jeija_mesecon_off.png deleted file mode 100644 index a3930cb..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_on.png b/mods/mesecons/mesecons/textures/jeija_mesecon_on.png deleted file mode 100644 index d7ebeec..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_plug.png b/mods/mesecons/mesecons/textures/jeija_mesecon_plug.png deleted file mode 100644 index 8a4d281..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_plug.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_socket_off.png b/mods/mesecons/mesecons/textures/jeija_mesecon_socket_off.png deleted file mode 100644 index ad3f601..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_socket_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_socket_on.png b/mods/mesecons/mesecons/textures/jeija_mesecon_socket_on.png deleted file mode 100644 index 6a9c480..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_socket_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_switch_off.png b/mods/mesecons/mesecons/textures/jeija_mesecon_switch_off.png deleted file mode 100644 index 2a75ef3..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_switch_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_switch_on.png b/mods/mesecons/mesecons/textures/jeija_mesecon_switch_on.png deleted file mode 100644 index 9df3450..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_switch_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_switch_side.png b/mods/mesecons/mesecons/textures/jeija_mesecon_switch_side.png deleted file mode 100644 index fb5db33..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_switch_side.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_t_junction_off.png b/mods/mesecons/mesecons/textures/jeija_mesecon_t_junction_off.png deleted file mode 100644 index 7131846..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_t_junction_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_mesecon_t_junction_on.png b/mods/mesecons/mesecons/textures/jeija_mesecon_t_junction_on.png deleted file mode 100644 index a6609ee..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_mesecon_t_junction_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/jeija_silicon.png b/mods/mesecons/mesecons/textures/jeija_silicon.png deleted file mode 100644 index a7b0d52..0000000 Binary files a/mods/mesecons/mesecons/textures/jeija_silicon.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/wires_bump_off.png b/mods/mesecons/mesecons/textures/wires_bump_off.png deleted file mode 100644 index 1e0bd74..0000000 Binary files a/mods/mesecons/mesecons/textures/wires_bump_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/wires_bump_on.png b/mods/mesecons/mesecons/textures/wires_bump_on.png deleted file mode 100644 index da9a661..0000000 Binary files a/mods/mesecons/mesecons/textures/wires_bump_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/wires_full_off.png b/mods/mesecons/mesecons/textures/wires_full_off.png deleted file mode 100644 index 58164fa..0000000 Binary files a/mods/mesecons/mesecons/textures/wires_full_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/wires_full_on.png b/mods/mesecons/mesecons/textures/wires_full_on.png deleted file mode 100644 index 98a86c8..0000000 Binary files a/mods/mesecons/mesecons/textures/wires_full_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/wires_inv.png b/mods/mesecons/mesecons/textures/wires_inv.png deleted file mode 100644 index 626f8d4..0000000 Binary files a/mods/mesecons/mesecons/textures/wires_inv.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/wires_off.png b/mods/mesecons/mesecons/textures/wires_off.png deleted file mode 100644 index 757d339..0000000 Binary files a/mods/mesecons/mesecons/textures/wires_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/wires_on.png b/mods/mesecons/mesecons/textures/wires_on.png deleted file mode 100644 index 57bb82d..0000000 Binary files a/mods/mesecons/mesecons/textures/wires_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/wires_vertical_off.png b/mods/mesecons/mesecons/textures/wires_vertical_off.png deleted file mode 100644 index ba8d472..0000000 Binary files a/mods/mesecons/mesecons/textures/wires_vertical_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons/textures/wires_vertical_on.png b/mods/mesecons/mesecons/textures/wires_vertical_on.png deleted file mode 100644 index 172fa65..0000000 Binary files a/mods/mesecons/mesecons/textures/wires_vertical_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons/util.lua b/mods/mesecons/mesecons/util.lua deleted file mode 100644 index b3ca7a0..0000000 --- a/mods/mesecons/mesecons/util.lua +++ /dev/null @@ -1,183 +0,0 @@ -function mesecon:move_node(pos, newpos) - local node = minetest.get_node(pos) - local meta = minetest.get_meta(pos):to_table() - minetest.remove_node(pos) - minetest.add_node(newpos, node) - minetest.get_meta(pos):from_table(meta) -end - ---[[ new functions: -mesecon:flattenrules(allrules) -mesecon:rule2bit(findrule, allrules) -mesecon:rule2meta(findrule, allrules) -dec2bin(n) -mesecon:getstate(nodename, states) -mesecon:getbinstate(nodename, states) -mesecon:get_bit(binary, bit) -mesecon:set_bit(binary, bit, value) -mesecon:invertRule(r) ---]] - -function mesecon:flattenrules(allrules) ---[[ - { - { - {xyz}, - {xyz}, - }, - { - {xyz}, - {xyz}, - }, - } ---]] - if allrules[1] and - allrules[1].x then - return allrules - end - - local shallowrules = {} - for _, metarule in ipairs( allrules) do - for _, rule in ipairs(metarule ) do - table.insert(shallowrules, rule) - end - end - return shallowrules ---[[ - { - {xyz}, - {xyz}, - {xyz}, - {xyz}, - } ---]] -end - -function mesecon:rule2bit(findrule, allrules) - --get the bit of the metarule the rule is in, or bit 1 - if (allrules[1] and - allrules[1].x) or - not findrule then - return 1 - end - for m,metarule in ipairs( allrules) do - for _, rule in ipairs(metarule ) do - if mesecon:cmpPos(findrule, rule) and mesecon:cmpSpecial(findrule, rule) then - return m - end - end - end -end - -function mesecon:rule2metaindex(findrule, allrules) - --get the metarule the rule is in, or allrules - - if allrules[1].x then - return nil - end - - if not(findrule) then - return mesecon:flattenrules(allrules) - end - - for m, metarule in ipairs( allrules) do - for _, rule in ipairs(metarule ) do - if mesecon:cmpPos(findrule, rule) and mesecon:cmpSpecial(findrule, rule) then - return m - end - end - end -end - -function mesecon:rule2meta(findrule, allrules) - local index = mesecon:rule2metaindex(findrule, allrules) - if index == nil then - if allrules[1].x then - return allrules - else - return {} - end - end - return allrules[index] -end - -if convert_base then - print( - "base2dec is tonumber(num,base1)\n".. - "commonlib needs dec2base(num,base2)\n".. - "and it needs base2base(num,base1,base2),\n".. - "which is dec2base(tonumber(num,base1),base2)" - ) -else - function dec2bin(n) - local x, y = math.floor(n / 2), n % 2 - if (n > 1) then - return dec2bin(x)..y - else - return ""..y - end - end -end - -function mesecon:getstate(nodename, states) - for state, name in ipairs(states) do - if name == nodename then - return state - end - end - error(nodename.." doesn't mention itself in "..dump(states)) -end - -function mesecon:getbinstate(nodename, states) - return dec2bin(mesecon:getstate(nodename, states)-1) -end - -function mesecon:get_bit(binary,bit) - bit = bit or 1 - local c = binary:len()-(bit-1) - return binary:sub(c,c) == "1" -end - -function mesecon:set_bit(binary,bit,value) - if value == "1" then - if not mesecon:get_bit(binary,bit) then - return dec2bin(tonumber(binary,2)+math.pow(2,bit-1)) - end - elseif value == "0" then - if mesecon:get_bit(binary,bit) then - return dec2bin(tonumber(binary,2)-math.pow(2,bit-1)) - end - end - return binary - -end - -function mesecon:invertRule(r) - return {x = -r.x, y = -r.y, z = -r.z, sx = r.sx, sy = r.sy, sz = r.sz} -end - -function mesecon:addPosRule(p, r) - return {x = p.x + r.x, y = p.y + r.y, z = p.z + r.z} -end - -function mesecon:cmpPos(p1, p2) - return (p1.x == p2.x and p1.y == p2.y and p1.z == p2.z) -end - -function mesecon:cmpSpecial(r1, r2) - return (r1.sx == r2.sx and r1.sy == r2.sy and r1.sz == r2.sz) -end - -function mesecon:tablecopy(table) -- deep table copy - local newtable = {} - - for idx, item in pairs(table) do - if type(item) == "table" then - newtable[idx] = mesecon:tablecopy(item) - else - newtable[idx] = item - end - end - - return newtable -end diff --git a/mods/mesecons/mesecons/wires.lua b/mods/mesecons/mesecons/wires.lua deleted file mode 100644 index 499c781..0000000 --- a/mods/mesecons/mesecons/wires.lua +++ /dev/null @@ -1,280 +0,0 @@ --- naming scheme: wire:(xp)(zp)(xm)(zm)_on/off --- The conditions in brackets define whether there is a mesecon at that place or not --- 1 = there is one; 0 = there is none --- y always means y+ - -box_center = {-1/16, -.5, -1/16, 1/16, -.5+1/16, 1/16} -box_bump1 = { -2/16, -8/16, -2/16, 2/16, -13/32, 2/16 } - -box_xp = {1/16, -.5, -1/16, 8/16, -.5+1/16, 1/16} -box_zp = {-1/16, -.5, 1/16, 1/16, -.5+1/16, 8/16} -box_xm = {-8/16, -.5, -1/16, -1/16, -.5+1/16, 1/16} -box_zm = {-1/16, -.5, -8/16, 1/16, -.5+1/16, -1/16} - -box_xpy = {.5-1/16, -.5+1/16, -1/16, .5, .4999+1/16, 1/16} -box_zpy = {-1/16, -.5+1/16, .5-1/16, 1/16, .4999+1/16, .5} -box_xmy = {-.5, -.5+1/16, -1/16, -.5+1/16, .4999+1/16, 1/16} -box_zmy = {-1/16, -.5+1/16, -.5, 1/16, .4999+1/16, -.5+1/16} - --- Registering the wires - -for xp=0, 1 do -for zp=0, 1 do -for xm=0, 1 do -for zm=0, 1 do -for xpy=0, 1 do -for zpy=0, 1 do -for xmy=0, 1 do -for zmy=0, 1 do - if (xpy == 1 and xp == 0) or (zpy == 1 and zp == 0) - or (xmy == 1 and xm == 0) or (zmy == 1 and zm == 0) then break end - - local groups - local nodeid = tostring(xp )..tostring(zp )..tostring(xm )..tostring(zm ).. - tostring(xpy)..tostring(zpy)..tostring(xmy)..tostring(zmy) - - if nodeid == "00000000" then - groups = {dig_immediate = 3, mesecon_conductor_craftable=1} - wiredesc = "Mesecon" - else - groups = {dig_immediate = 3, not_in_creative_inventory = 1} - wiredesc = "Mesecons Wire (ID: "..nodeid..")" - end - - local nodebox = {} - local adjx = false - local adjz = false - if xp == 1 then table.insert(nodebox, box_xp) adjx = true end - if zp == 1 then table.insert(nodebox, box_zp) adjz = true end - if xm == 1 then table.insert(nodebox, box_xm) adjx = true end - if zm == 1 then table.insert(nodebox, box_zm) adjz = true end - if xpy == 1 then table.insert(nodebox, box_xpy) end - if zpy == 1 then table.insert(nodebox, box_zpy) end - if xmy == 1 then table.insert(nodebox, box_xmy) end - if zmy == 1 then table.insert(nodebox, box_zmy) end - - if adjx and adjz and (xp + zp + xm + zm > 2) then - table.insert(nodebox, box_bump1) - tiles_off = { - "wires_bump_off.png", - "wires_bump_off.png", - "wires_vertical_off.png", - "wires_vertical_off.png", - "wires_vertical_off.png", - "wires_vertical_off.png" - } - tiles_on = { - "wires_bump_on.png", - "wires_bump_on.png", - "wires_vertical_on.png", - "wires_vertical_on.png", - "wires_vertical_on.png", - "wires_vertical_on.png" - } - else - table.insert(nodebox, box_center) - tiles_off = { - "wires_off.png", - "wires_off.png", - "wires_vertical_off.png", - "wires_vertical_off.png", - "wires_vertical_off.png", - "wires_vertical_off.png" - } - tiles_on = { - "wires_on.png", - "wires_on.png", - "wires_vertical_on.png", - "wires_vertical_on.png", - "wires_vertical_on.png", - "wires_vertical_on.png" - } - end - - if nodeid == "00000000" then - nodebox = {-8/16, -.5, -1/16, 8/16, -.5+1/16, 1/16} - end - - minetest.register_node("mesecons:wire_"..nodeid.."_off", { - description = wiredesc, - drawtype = "nodebox", - tiles = tiles_off, --- inventory_image = "wires_inv.png", --- wield_image = "wires_inv.png", - inventory_image = "jeija_mesecon_off.png", - wield_image = "jeija_mesecon_off.png", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - selection_box = { - type = "fixed", - fixed = {-.5, -.5, -.5, .5, -.5+4/16, .5} - }, - node_box = { - type = "fixed", - fixed = nodebox - }, - groups = groups, - walkable = false, - stack_max = 99, - drop = "mesecons:wire_00000000_off", - mesecons = {conductor={ - state = mesecon.state.off, - onstate = "mesecons:wire_"..nodeid.."_on" - }} - }) - - minetest.register_node("mesecons:wire_"..nodeid.."_on", { - description = "Wire ID:"..nodeid, - drawtype = "nodebox", - tiles = tiles_on, --- inventory_image = "wires_inv.png", --- wield_image = "wires_inv.png", - inventory_image = "jeija_mesecon_off.png", - wield_image = "jeija_mesecon_off.png", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - selection_box = { - type = "fixed", - fixed = {-.5, -.5, -.5, .5, -.5+4/16, .5} - }, - node_box = { - type = "fixed", - fixed = nodebox - }, - groups = {dig_immediate = 3, mesecon = 2, not_in_creative_inventory = 1}, - walkable = false, - stack_max = 99, - drop = "mesecons:wire_00000000_off", - mesecons = {conductor={ - state = mesecon.state.on, - offstate = "mesecons:wire_"..nodeid.."_off" - }} - }) -end -end -end -end -end -end -end -end - --- Updating the wires: --- Place the right connection wire - -local update_on_place_dig = function (pos, node) - if minetest.registered_nodes[node.name] - and minetest.registered_nodes[node.name].mesecons then - mesecon:update_autoconnect(pos) - end -end - -minetest.register_on_placenode(update_on_place_dig) -minetest.register_on_dignode(update_on_place_dig) - -function mesecon:update_autoconnect(pos, secondcall, replace_old) - local xppos = {x=pos.x+1, y=pos.y, z=pos.z} - local zppos = {x=pos.x, y=pos.y, z=pos.z+1} - local xmpos = {x=pos.x-1, y=pos.y, z=pos.z} - local zmpos = {x=pos.x, y=pos.y, z=pos.z-1} - - local xpympos = {x=pos.x+1, y=pos.y-1, z=pos.z} - local zpympos = {x=pos.x, y=pos.y-1, z=pos.z+1} - local xmympos = {x=pos.x-1, y=pos.y-1, z=pos.z} - local zmympos = {x=pos.x, y=pos.y-1, z=pos.z-1} - - local xpypos = {x=pos.x+1, y=pos.y+1, z=pos.z} - local zpypos = {x=pos.x, y=pos.y+1, z=pos.z+1} - local xmypos = {x=pos.x-1, y=pos.y+1, z=pos.z} - local zmypos = {x=pos.x, y=pos.y+1, z=pos.z-1} - - if secondcall == nil then - mesecon:update_autoconnect(xppos, true) - mesecon:update_autoconnect(zppos, true) - mesecon:update_autoconnect(xmpos, true) - mesecon:update_autoconnect(zmpos, true) - - mesecon:update_autoconnect(xpypos, true) - mesecon:update_autoconnect(zpypos, true) - mesecon:update_autoconnect(xmypos, true) - mesecon:update_autoconnect(zmypos, true) - - mesecon:update_autoconnect(xpympos, true) - mesecon:update_autoconnect(zpympos, true) - mesecon:update_autoconnect(xmympos, true) - mesecon:update_autoconnect(zmympos, true) - end - - nodename = minetest.get_node(pos).name - if string.find(nodename, "mesecons:wire_") == nil and not replace_old then return nil end - - if mesecon:rules_link_anydir(pos, xppos) then xp = 1 else xp = 0 end - if mesecon:rules_link_anydir(pos, xmpos) then xm = 1 else xm = 0 end - if mesecon:rules_link_anydir(pos, zppos) then zp = 1 else zp = 0 end - if mesecon:rules_link_anydir(pos, zmpos) then zm = 1 else zm = 0 end - - if mesecon:rules_link_anydir(pos, xpympos) then xp = 1 end - if mesecon:rules_link_anydir(pos, xmympos) then xm = 1 end - if mesecon:rules_link_anydir(pos, zpympos) then zp = 1 end - if mesecon:rules_link_anydir(pos, zmympos) then zm = 1 end - - if mesecon:rules_link_anydir(pos, xpypos) then xpy = 1 else xpy = 0 end - if mesecon:rules_link_anydir(pos, zpypos) then zpy = 1 else zpy = 0 end - if mesecon:rules_link_anydir(pos, xmypos) then xmy = 1 else xmy = 0 end - if mesecon:rules_link_anydir(pos, zmypos) then zmy = 1 else zmy = 0 end - - if xpy == 1 then xp = 1 end - if zpy == 1 then zp = 1 end - if xmy == 1 then xm = 1 end - if zmy == 1 then zm = 1 end - - local nodeid = tostring(xp )..tostring(zp )..tostring(xm )..tostring(zm ).. - tostring(xpy)..tostring(zpy)..tostring(xmy)..tostring(zmy) - - - if string.find(nodename, "_off") ~= nil then - minetest.set_node(pos, {name = "mesecons:wire_"..nodeid.."_off"}) - else - minetest.set_node(pos, {name = "mesecons:wire_"..nodeid.."_on" }) - end -end - -if not minetest.registered_nodes["default:stone_with_mese"] then --before MESE update, use old recipes - 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", - output = "mesecons:wire_00000000_off 16", - recipe = "default:mese_crystal", -}) diff --git a/mods/mesecons/mesecons_alias/depends.txt b/mods/mesecons/mesecons_alias/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_alias/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_alias/init.lua b/mods/mesecons/mesecons_alias/init.lua deleted file mode 100644 index 0458756..0000000 --- a/mods/mesecons/mesecons_alias/init.lua +++ /dev/null @@ -1,40 +0,0 @@ --- This file registers aliases for the /give /giveme commands. - -minetest.register_alias("mesecons:removestone", "mesecons_random:removestone") -minetest.register_alias("mesecons:power_plant", "mesecons_powerplant:power_plant") -minetest.register_alias("mesecons:powerplant", "mesecons_powerplant:power_plant") -minetest.register_alias("mesecons:meselamp", "mesecons_lamp:lamp_off") -minetest.register_alias("mesecons:mesecon", "mesecons:wire_00000000_off") -minetest.register_alias("mesecons:object_detector", "mesecons_detector:object_detector_off") -minetest.register_alias("mesecons:wireless_inverter", "mesecons_wireless:wireless_inverter_on") -minetest.register_alias("mesecons:wireless_receiver", "mesecons_wireless:wireless_receiver_off") -minetest.register_alias("mesecons:wireless_transmitter", "mesecons_wireless:wireless_transmitter_off") -minetest.register_alias("mesecons:switch", "mesecons_switch:mesecon_switch_off") -minetest.register_alias("mesecons:button", "mesecons_button:button_off") -minetest.register_alias("mesecons:piston", "mesecons_pistons:piston_normal_off") -minetest.register_alias("mesecons:blinky_plant", "mesecons_blinkyplant:blinky_plant_off") -minetest.register_alias("mesecons:mesecon_torch", "mesecons_torch:mesecon_torch_on") -minetest.register_alias("mesecons:torch", "mesecons_torch:mesecon_torch_on") -minetest.register_alias("mesecons:hydro_turbine", "mesecons_hydroturbine:hydro_turbine_off") -minetest.register_alias("mesecons:pressure_plate_stone", "mesecons_pressureplates:pressure_plate_stone_off") -minetest.register_alias("mesecons:pressure_plate_wood", "mesecons_pressureplates:pressure_plate_wood_off") -minetest.register_alias("mesecons:mesecon_socket", "mesecons_temperest:mesecon_socket_off") -minetest.register_alias("mesecons:mesecon_inverter", "mesecons_temperest:mesecon_inverter_on") -minetest.register_alias("mesecons:movestone", "mesecons_movestones:movestone") -minetest.register_alias("mesecons:sticky_movestone", "mesecons_movestones:sticky_movestone") -minetest.register_alias("mesecons:noteblock", "mesecons_noteblock:noteblock") -minetest.register_alias("mesecons:microcontroller", "mesecons_microcontroller:microcontroller0000") -minetest.register_alias("mesecons:delayer", "mesecons_delayer:delayer_off_1") -minetest.register_alias("mesecons:solarpanel", "mesecons_solarpanel:solar_panel_off") - - ---Backwards compatibility -minetest.register_alias("mesecons:mesecon_off", "mesecons:wire_00000000_off") -minetest.register_alias("mesecons_pistons:piston_sticky", "mesecons_pistons:piston_sticky_on") -minetest.register_alias("mesecons_pistons:piston_normal", "mesecons_pistons:piston_normal_on") -minetest.register_alias("mesecons_pistons:piston_up_normal", "mesecons_pistons:piston_up_normal_on") -minetest.register_alias("mesecons_pistons:piston_down_normal", "mesecons_pistons:piston_down_normal_on") -minetest.register_alias("mesecons_pistons:piston_up_sticky", "mesecons_pistons:piston_up_sticky_on") -minetest.register_alias("mesecons_pistons:piston_down_sticky", "mesecons_pistons:piston_down_sticky_on") -minetest.register_alias("mesecons_detector:object_detector_off", "mesecons_detector:player_detector_off") -minetest.register_alias("mesecons_detector:object_detector_on", "mesecons_detector:player_detector_on") diff --git a/mods/mesecons/mesecons_blinkyplant/depends.txt b/mods/mesecons/mesecons_blinkyplant/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_blinkyplant/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_blinkyplant/init.lua b/mods/mesecons/mesecons_blinkyplant/init.lua deleted file mode 100644 index 475d953..0000000 --- a/mods/mesecons/mesecons_blinkyplant/init.lua +++ /dev/null @@ -1,102 +0,0 @@ --- The BLINKY_PLANT -minetest.register_node("mesecons_blinkyplant:blinky_plant", { - drawtype = "plantlike", - visual_scale = 1, - tiles = {"jeija_blinky_plant_off.png"}, - inventory_image = "jeija_blinky_plant_off.png", - walkable = false, - groups = {dig_immediate=3, not_in_creative_inventory=1}, - drop="mesecons_blinkyplant:blinky_plant_off 1", - description="Deactivated Blinky Plant", - sounds = default.node_sound_leaves_defaults(), - selection_box = { - type = "fixed", - fixed = {-0.3, -0.5, -0.3, 0.3, -0.5+0.7, 0.3}, - }, - mesecons = {receptor = { - state = mesecon.state.off - }}, - on_rightclick = function(pos, node, clicker) - minetest.set_node(pos, {name="mesecons_blinkyplant:blinky_plant_off"}) - end -}) - -minetest.register_node("mesecons_blinkyplant:blinky_plant_off", { - drawtype = "plantlike", - visual_scale = 1, - tiles = {"jeija_blinky_plant_off.png"}, - inventory_image = "jeija_blinky_plant_off.png", - paramtype = "light", - walkable = false, - groups = {dig_immediate=3, mesecon=2}, - description="Blinky Plant", - sounds = default.node_sound_leaves_defaults(), - selection_box = { - type = "fixed", - fixed = {-0.3, -0.5, -0.3, 0.3, -0.5+0.7, 0.3}, - }, - mesecons = {receptor = { - state = mesecon.state.off - }}, - on_rightclick = function(pos, node, clicker) - minetest.set_node(pos, {name="mesecons_blinkyplant:blinky_plant"}) - end -}) - -minetest.register_node("mesecons_blinkyplant:blinky_plant_on", { - drawtype = "plantlike", - visual_scale = 1, - tiles = {"jeija_blinky_plant_on.png"}, - inventory_image = "jeija_blinky_plant_off.png", - paramtype = "light", - walkable = false, - groups = {dig_immediate=3, not_in_creative_inventory=1, mesecon=2}, - drop="mesecons_blinkyplant:blinky_plant_off 1", - light_source = LIGHT_MAX-7, - description = "Blinky Plant", - sounds = default.node_sound_leaves_defaults(), - selection_box = { - type = "fixed", - fixed = {-0.3, -0.5, -0.3, 0.3, -0.5+0.7, 0.3}, - }, - mesecons = {receptor = { - state = mesecon.state.on - }}, - on_rightclick = function(pos, node, clicker) - minetest.set_node(pos, {name = "mesecons_blinkyplant:blinky_plant"}) - mesecon:receptor_off(pos) - end -}) - -minetest.register_craft({ - output = "mesecons_blinkyplant:blinky_plant_off 1", - recipe = { - {"","group:mesecon_conductor_craftable",""}, - {"","group:mesecon_conductor_craftable",""}, - {"default:sapling","default:sapling","default:sapling"}, - } -}) - -minetest.register_abm( - {nodenames = {"mesecons_blinkyplant:blinky_plant_off"}, - interval = BLINKY_PLANT_INTERVAL, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - --minetest.remove_node(pos) - minetest.add_node(pos, {name="mesecons_blinkyplant:blinky_plant_on"}) - nodeupdate(pos) - mesecon:receptor_on(pos) - end, -}) - -minetest.register_abm({ - nodenames = {"mesecons_blinkyplant:blinky_plant_on"}, - interval = BLINKY_PLANT_INTERVAL, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - --minetest.remove_node(pos) - minetest.add_node(pos, {name="mesecons_blinkyplant:blinky_plant_off"}) - nodeupdate(pos) - mesecon:receptor_off(pos) - end, -}) diff --git a/mods/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_off.png b/mods/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_off.png deleted file mode 100644 index 4f507da..0000000 Binary files a/mods/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_on.png b/mods/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_on.png deleted file mode 100644 index f77a134..0000000 Binary files a/mods/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_button/depends.txt b/mods/mesecons/mesecons_button/depends.txt deleted file mode 100644 index 19c798c..0000000 --- a/mods/mesecons/mesecons_button/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -mesecons_receiver diff --git a/mods/mesecons/mesecons_button/init.lua b/mods/mesecons/mesecons_button/init.lua deleted file mode 100644 index f4a9198..0000000 --- a/mods/mesecons/mesecons_button/init.lua +++ /dev/null @@ -1,98 +0,0 @@ --- WALL BUTTON --- A button that when pressed emits power for 1 second --- and then turns off again - -mesecon.button_turnoff = function (pos) - local node = minetest.get_node(pos) - if node.name=="mesecons_button:button_on" then --has not been dug - minetest.swap_node(pos, {name = "mesecons_button:button_off", param2=node.param2}) - minetest.sound_play("mesecons_button_pop", {pos=pos}) - local rules = mesecon.rules.buttonlike_get(node) - mesecon:receptor_off(pos, rules) - end -end - -minetest.register_node("mesecons_button:button_off", { - drawtype = "nodebox", - tiles = { - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_off.png" - }, - paramtype = "light", - paramtype2 = "facedir", - legacy_wallmounted = true, - walkable = false, - sunlight_propagates = true, - selection_box = { - type = "fixed", - fixed = { -6/16, -6/16, 5/16, 6/16, 6/16, 8/16 } - }, - node_box = { - type = "fixed", - fixed = { - { -6/16, -6/16, 6/16, 6/16, 6/16, 8/16 }, -- the thin plate behind the button - { -4/16, -2/16, 4/16, 4/16, 2/16, 6/16 } -- the button itself - } - }, - groups = {dig_immediate=2, mesecon_needs_receiver = 1}, - description = "Button", - on_punch = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_button:button_on", param2=node.param2}) - mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node)) - minetest.sound_play("mesecons_button_push", {pos=pos}) - minetest.after(1, mesecon.button_turnoff, pos) - end, - sounds = default.node_sound_stone_defaults(), - mesecons = {receptor = { - state = mesecon.state.off, - rules = mesecon.rules.buttonlike_get - }} -}) - -minetest.register_node("mesecons_button:button_on", { - drawtype = "nodebox", - tiles = { - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_on.png" - }, - paramtype = "light", - paramtype2 = "facedir", - legacy_wallmounted = true, - walkable = false, - light_source = LIGHT_MAX-7, - sunlight_propagates = true, - selection_box = { - type = "fixed", - fixed = { -6/16, -6/16, 5/16, 6/16, 6/16, 8/16 } - }, - node_box = { - type = "fixed", - fixed = { - { -6/16, -6/16, 6/16, 6/16, 6/16, 8/16 }, - { -4/16, -2/16, 11/32, 4/16, 2/16, 6/16 } - } - }, - groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon_needs_receiver = 1}, - drop = 'mesecons_button:button_off', - description = "Button", - sounds = default.node_sound_stone_defaults(), - mesecons = {receptor = { - state = mesecon.state.on, - rules = mesecon.rules.buttonlike_get - }} -}) - -minetest.register_craft({ - output = "mesecons_button:button_off 2", - recipe = { - {"group:mesecon_conductor_craftable","default:stone"}, - } -}) diff --git a/mods/mesecons/mesecons_button/sounds/mesecons_button_pop.ogg b/mods/mesecons/mesecons_button/sounds/mesecons_button_pop.ogg deleted file mode 100644 index 9d56bb8..0000000 Binary files a/mods/mesecons/mesecons_button/sounds/mesecons_button_pop.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_button/sounds/mesecons_button_push.ogg b/mods/mesecons/mesecons_button/sounds/mesecons_button_push.ogg deleted file mode 100644 index 53d45c1..0000000 Binary files a/mods/mesecons/mesecons_button/sounds/mesecons_button_push.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_button/textures/jeija_wall_button_off.png b/mods/mesecons/mesecons_button/textures/jeija_wall_button_off.png deleted file mode 100644 index 0e3ff25..0000000 Binary files a/mods/mesecons/mesecons_button/textures/jeija_wall_button_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_button/textures/jeija_wall_button_on.png b/mods/mesecons/mesecons_button/textures/jeija_wall_button_on.png deleted file mode 100644 index 1d97464..0000000 Binary files a/mods/mesecons/mesecons_button/textures/jeija_wall_button_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_button/textures/jeija_wall_button_sides.png b/mods/mesecons/mesecons_button/textures/jeija_wall_button_sides.png deleted file mode 100644 index 9b79b57..0000000 Binary files a/mods/mesecons/mesecons_button/textures/jeija_wall_button_sides.png and /dev/null differ diff --git a/mods/mesecons/mesecons_commandblock/depends.txt b/mods/mesecons/mesecons_commandblock/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_commandblock/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_commandblock/init.lua b/mods/mesecons/mesecons_commandblock/init.lua deleted file mode 100644 index bd799eb..0000000 --- a/mods/mesecons/mesecons_commandblock/init.lua +++ /dev/null @@ -1,210 +0,0 @@ -minetest.register_chatcommand("say", { - params = "", - description = "Say as the server", - privs = {server=true}, - func = function(name, param) - minetest.chat_send_all(name .. ": " .. param) - end -}) - -minetest.register_chatcommand("tell", { - params = " ", - description = "Say to 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 - if not minetest.get_player_by_name(target) then - minetest.chat_send_player(name, "Invalid target: " .. target) - end - minetest.chat_send_player(target, name .. " whispers: " .. message, false) - end -}) - -minetest.register_chatcommand("tellme", { - params = "", - description = "Say to yourself", - func = function(name, param) - minetest.chat_send_player(name, param, false) - end -}) - -minetest.register_chatcommand("hp", { - params = " ", - description = "Set health of to hitpoints", - privs = {ban=true}, - func = function(name, param) - local found, _, target, value = param:find("^([^%s]+)%s+(%d+)$") - if found == nil then - minetest.chat_send_player(name, "Invalid usage: " .. param) - return - end - local player = minetest.get_player_by_name(target) - if player then - player:set_hp(value) - else - minetest.chat_send_player(name, "Invalid target: " .. target) - end - end -}) - -local initialize_data = function(meta, player, command, param) - meta:set_string("formspec", - "invsize[9,6;]" .. - "field[1,1;7.5,1;player;Player;" .. player .. "]" .. - "button[1.3,2;2,1;nearest;Nearest]" .. - "button[3.3,2;2,1;farthest;Farthest]" .. - "button[5.3,2;2,1;random;Random]" .. - "field[1,4;2,1;command;Command;" .. command .. "]" .. - "field[3,4;5.5,1;param;Parameter;" .. param .. "]" .. - "button_exit[3.3,5;2,1;submit;Submit]") - local owner = meta:get_string("owner") - if owner == "" then - owner = "not owned" - else - owner = "owned by " .. owner - end - meta:set_string("infotext", "Command Block\n" .. - "(" .. owner .. ")\n" .. - "Command: /" .. command .. " " .. param) -end - -local construct = function(pos) - local meta = minetest.get_meta(pos) - - meta:set_string("player", "@nearest") - meta:set_string("command", "time") - meta:set_string("param", "7000") - - meta:set_string("owner", "") - - initialize_data(meta, "@nearest", "time", "7000") -end - -local after_place = function(pos, placer) - if placer then - local meta = minetest.get_meta(pos) - meta:set_string("owner", placer:get_player_name()) - initialize_data(meta, "@nearest", "time", "7000") - end -end - -local receive_fields = function(pos, formname, fields, sender) - if fields.quit then - return - end - local meta = minetest.get_meta(pos) - if fields.nearest then - initialize_data(meta, "@nearest", fields.command, fields.param) - elseif fields.farthest then - initialize_data(meta, "@farthest", fields.command, fields.param) - elseif fields.random then - initialize_data(meta, "@random", fields.command, fields.param) - else --fields.submit or pressed enter - meta:set_string("player", fields.player) - meta:set_string("command", fields.command) - meta:set_string("param", fields.param) - - initialize_data(meta, fields.player, fields.command, fields.param) - end -end - -local resolve_player = function(name, pos) - local get_distance = function(pos1, pos2) - return math.sqrt((pos1.x - pos2.x) ^ 2 + (pos1.y - pos2.y) ^ 2 + (pos1.z - pos2.z) ^ 2) - end - - if name == "@nearest" then - local min_distance = math.huge - for index, player in ipairs(minetest.get_connected_players()) do - local distance = get_distance(pos, player:getpos()) - if distance < min_distance then - min_distance = distance - name = player:get_player_name() - end - end - elseif name == "@farthest" then - local max_distance = -1 - for index, player in ipairs(minetest.get_connected_players()) do - local distance = get_distance(pos, player:getpos()) - if distance > max_distance then - max_distance = distance - name = player:get_player_name() - end - end - elseif name == "@random" then - local players = minetest.get_connected_players() - local player = players[math.random(#players)] - name = player:get_player_name() - end - return name -end - -local commandblock_action_on = function(pos, node) - if node.name ~= "mesecons_commandblock:commandblock_off" then - return - end - - minetest.swap_node(pos, {name = "mesecons_commandblock:commandblock_on"}) - - local meta = minetest.get_meta(pos) - local command = minetest.chatcommands[meta:get_string("command")] - if command == nil then - return - end - local owner = meta:get_string("owner") - if owner == "" then - return - end - local has_privs, missing_privs = minetest.check_player_privs(owner, command.privs) - if not has_privs then - minetest.chat_send_player(owner, "You don't have permission to run this command (missing privileges: "..table.concat(missing_privs, ", ")..")") - return - end - local player = resolve_player(meta:get_string("player"), pos) - command.func(player, meta:get_string("param")) -end - -local commandblock_action_off = function(pos, node) - if node.name == "mesecons_commandblock:commandblock_on" then - minetest.swap_node(pos, {name = "mesecons_commandblock:commandblock_off"}) - end -end - -minetest.register_node("mesecons_commandblock:commandblock_off", { - description = "Command Block", - tiles = {"jeija_commandblock_off.png"}, - inventory_image = minetest.inventorycube("jeija_commandblock_off.png"), - groups = {cracky=2, mesecon_effector_off=1}, - on_construct = construct, - after_place_node = after_place, - on_receive_fields = receive_fields, - can_dig = function(pos,player) - local owner = minetest.get_meta(pos):get_string("owner") - return owner == "" or owner == player:get_player_name() - end, - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - action_on = commandblock_action_on - }} -}) - -minetest.register_node("mesecons_commandblock:commandblock_on", { - tiles = {"jeija_commandblock_on.png"}, - groups = {cracky=2, mesecon_effector_on=1, not_in_creative_inventory=1}, - light_source = 10, - drop = "mesecons_commandblock:commandblock_off", - on_construct = construct, - after_place_node = after_place, - on_receive_fields = receive_fields, - can_dig = function(pos,player) - local owner = minetest.get_meta(pos):get_string("owner") - return owner == "" or owner == player:get_player_name() - end, - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - action_off = commandblock_action_off - }} -}) diff --git a/mods/mesecons/mesecons_commandblock/textures/jeija_close_window.png b/mods/mesecons/mesecons_commandblock/textures/jeija_close_window.png deleted file mode 100644 index 5c27c6c..0000000 Binary files a/mods/mesecons/mesecons_commandblock/textures/jeija_close_window.png and /dev/null differ diff --git a/mods/mesecons/mesecons_commandblock/textures/jeija_commandblock_off.png b/mods/mesecons/mesecons_commandblock/textures/jeija_commandblock_off.png deleted file mode 100644 index c05b616..0000000 Binary files a/mods/mesecons/mesecons_commandblock/textures/jeija_commandblock_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_commandblock/textures/jeija_commandblock_on.png b/mods/mesecons/mesecons_commandblock/textures/jeija_commandblock_on.png deleted file mode 100644 index 7fc35b6..0000000 Binary files a/mods/mesecons/mesecons_commandblock/textures/jeija_commandblock_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_compatibility/depends.txt b/mods/mesecons/mesecons_compatibility/depends.txt deleted file mode 100644 index ed2fcd8..0000000 --- a/mods/mesecons/mesecons_compatibility/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -doors diff --git a/mods/mesecons/mesecons_compatibility/init.lua b/mods/mesecons/mesecons_compatibility/init.lua deleted file mode 100644 index 5bdce27..0000000 --- a/mods/mesecons/mesecons_compatibility/init.lua +++ /dev/null @@ -1,167 +0,0 @@ -doors = {} - --- Registers a door - REDEFINITION ONLY | DOORS MOD MUST HAVE BEEN LOADED BEFORE --- name: The name of the door --- def: a table with the folowing fields: --- description --- inventory_image --- groups --- tiles_bottom: the tiles of the bottom part of the door {front, side} --- tiles_top: the tiles of the bottom part of the door {front, side} --- If the following fields are not defined the default values are used --- node_box_bottom --- node_box_top --- selection_box_bottom --- selection_box_top --- only_placer_can_open: if true only the player who placed the door can --- open it - -function doors:register_door(name, def) - def.groups.not_in_creative_inventory = 1 - - local box = {{-0.5, -0.5, -0.5, 0.5, 0.5, -0.5+1.5/16}} - - if not def.node_box_bottom then - def.node_box_bottom = box - end - if not def.node_box_top then - def.node_box_top = box - end - if not def.selection_box_bottom then - def.selection_box_bottom= box - end - if not def.selection_box_top then - def.selection_box_top = box - end - - local tt = def.tiles_top - local tb = def.tiles_bottom - - local function after_dig_node(pos, name) - if minetest.get_node(pos).name == name then - minetest.remove_node(pos) - end - end - - local function on_rightclick(pos, dir, check_name, replace, replace_dir, params) - pos.y = pos.y+dir - if not minetest.get_node(pos).name == check_name then - return - end - local p2 = minetest.get_node(pos).param2 - p2 = params[p2+1] - - local meta = minetest.get_meta(pos):to_table() - minetest.set_node(pos, {name=replace_dir, param2=p2}) - minetest.get_meta(pos):from_table(meta) - - pos.y = pos.y-dir - meta = minetest.get_meta(pos):to_table() - minetest.set_node(pos, {name=replace, param2=p2}) - minetest.get_meta(pos):from_table(meta) - end - - local function on_mesecons_signal_open (pos, node) - on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0}) - end - - local function on_mesecons_signal_close (pos, node) - on_rightclick(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2}) - end - - local function check_player_priv(pos, player) - if not def.only_placer_can_open then - return true - end - local meta = minetest.get_meta(pos) - local pn = player:get_player_name() - return meta:get_string("doors_owner") == pn - end - - minetest.register_node(":"..name.."_b_1", { - tiles = {tb[2], tb[2], tb[2], tb[2], tb[1], tb[1].."^[transformfx"}, - paramtype = "light", - paramtype2 = "facedir", - drop = name, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = def.node_box_bottom - }, - selection_box = { - type = "fixed", - fixed = def.selection_box_bottom - }, - groups = def.groups, - - after_dig_node = function(pos, oldnode, oldmetadata, digger) - pos.y = pos.y+1 - after_dig_node(pos, name.."_t_1") - end, - - on_rightclick = function(pos, node, puncher) - if check_player_priv(pos, puncher) then - on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0}) - end - end, - - mesecons = {effector = { - action_on = on_mesecons_signal_open - }}, - - can_dig = check_player_priv, - }) - - minetest.register_node(":"..name.."_b_2", { - tiles = {tb[2], tb[2], tb[2], tb[2], tb[1].."^[transformfx", tb[1]}, - paramtype = "light", - paramtype2 = "facedir", - drop = name, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = def.node_box_bottom - }, - selection_box = { - type = "fixed", - fixed = def.selection_box_bottom - }, - groups = def.groups, - - after_dig_node = function(pos, oldnode, oldmetadata, digger) - pos.y = pos.y+1 - after_dig_node(pos, name.."_t_2") - end, - - on_rightclick = function(pos, node, puncher) - if check_player_priv(pos, puncher) then - on_rightclick(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2}) - end - end, - - mesecons = {effector = { - action_off = on_mesecons_signal_close - }}, - - can_dig = check_player_priv, - }) -end - -doors:register_door("doors:door_wood", { - description = "Wooden Door", - inventory_image = "door_wood.png", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1}, - tiles_bottom = {"door_wood_b.png", "door_brown.png"}, - tiles_top = {"door_wood_a.png", "door_brown.png"}, - sounds = default.node_sound_wood_defaults(), -}) - -doors:register_door("doors:door_steel", { - description = "Steel Door", - inventory_image = "door_steel.png", - groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2,door=1}, - tiles_bottom = {"door_steel_b.png", "door_grey.png"}, - tiles_top = {"door_steel_a.png", "door_grey.png"}, - only_placer_can_open = true, - sounds = default.node_sound_stone_defaults(), -}) diff --git a/mods/mesecons/mesecons_delayer/depends.txt b/mods/mesecons/mesecons_delayer/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_delayer/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_delayer/init.lua b/mods/mesecons/mesecons_delayer/init.lua deleted file mode 100644 index a03737c..0000000 --- a/mods/mesecons/mesecons_delayer/init.lua +++ /dev/null @@ -1,189 +0,0 @@ --- Function that get the input/output rules of the delayer -local delayer_get_output_rules = function(node) - local rules = {{x = 0, y = 0, z = 1}} - for i = 0, node.param2 do - rules = mesecon:rotate_rules_left(rules) - end - return rules -end - -local delayer_get_input_rules = function(node) - local rules = {{x = 0, y = 0, z = -1}} - for i = 0, node.param2 do - rules = mesecon:rotate_rules_left(rules) - end - return rules -end - --- Functions that are called after the delay time - -local delayer_turnon = function(params) - local rules = delayer_get_output_rules(params.node) - mesecon:receptor_on(params.pos, rules) -end - -local delayer_turnoff = function(params) - local rules = delayer_get_output_rules(params.node) - mesecon:receptor_off(params.pos, rules) -end - -local delayer_activate = function(pos, node) - local def = minetest.registered_nodes[node.name] - local time = def.delayer_time - minetest.swap_node(pos, {name = def.delayer_onstate, param2=node.param2}) - minetest.after(time, delayer_turnon , {pos = pos, node = node}) -end - -local delayer_deactivate = function(pos, node) - local def = minetest.registered_nodes[node.name] - local time = def.delayer_time - minetest.swap_node(pos, {name = def.delayer_offstate, param2=node.param2}) - minetest.after(time, delayer_turnoff, {pos = pos, node = node}) -end - --- Register the 2 (states) x 4 (delay times) delayers - -for i = 1, 4 do -local groups = {} -if i == 1 then - groups = {bendy=2,snappy=1,dig_immediate=2} -else - groups = {bendy=2,snappy=1,dig_immediate=2, not_in_creative_inventory=1} -end - -local delaytime -if i == 1 then delaytime = 0.1 -elseif i == 2 then delaytime = 0.3 -elseif i == 3 then delaytime = 0.5 -elseif i == 4 then delaytime = 1.0 end - -boxes = {{ -6/16, -8/16, -6/16, 6/16, -7/16, 6/16 }, -- the main slab - - { -2/16, -7/16, -4/16, 2/16, -26/64, -3/16 }, -- the jeweled "on" indicator - { -3/16, -7/16, -3/16, 3/16, -26/64, -2/16 }, - { -4/16, -7/16, -2/16, 4/16, -26/64, 2/16 }, - { -3/16, -7/16, 2/16, 3/16, -26/64, 3/16 }, - { -2/16, -7/16, 3/16, 2/16, -26/64, 4/16 }, - - { -6/16, -7/16, -6/16, -4/16, -27/64, -4/16 }, -- the timer indicator - { -8/16, -8/16, -1/16, -6/16, -7/16, 1/16 }, -- the two wire stubs - { 6/16, -8/16, -1/16, 8/16, -7/16, 1/16 }} - -minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), { - description = "Delayer", - drawtype = "nodebox", - tiles = { - "mesecons_delayer_off_"..tostring(i)..".png", - "mesecons_delayer_bottom.png", - "mesecons_delayer_ends_off.png", - "mesecons_delayer_ends_off.png", - "mesecons_delayer_sides_off.png", - "mesecons_delayer_sides_off.png" - }, - inventory_image = "mesecons_delayer_off_1.png", - wield_image = "mesecons_delayer_off_1.png", - walkable = true, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = boxes - }, - groups = groups, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - drop = 'mesecons_delayer:delayer_off_1', - on_punch = function (pos, node) - if node.name=="mesecons_delayer:delayer_off_1" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_off_2", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_off_2" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_off_3", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_off_3" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_off_4", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_off_4" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_off_1", param2=node.param2}) - end - end, - delayer_time = delaytime, - delayer_onstate = "mesecons_delayer:delayer_on_"..tostring(i), - sounds = default.node_sound_stone_defaults(), - mesecons = { - receptor = - { - state = mesecon.state.off, - rules = delayer_get_output_rules - }, - effector = - { - rules = delayer_get_input_rules, - action_on = delayer_activate - } - } -}) - - -minetest.register_node("mesecons_delayer:delayer_on_"..tostring(i), { - description = "You hacker you", - drawtype = "nodebox", - tiles = { - "mesecons_delayer_on_"..tostring(i)..".png", - "mesecons_delayer_bottom.png", - "mesecons_delayer_ends_on.png", - "mesecons_delayer_ends_on.png", - "mesecons_delayer_sides_on.png", - "mesecons_delayer_sides_on.png" - }, - walkable = true, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = boxes - }, - groups = {bendy = 2, snappy = 1, dig_immediate = 2, not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - drop = 'mesecons_delayer:delayer_off_1', - on_punch = function (pos, node) - if node.name=="mesecons_delayer:delayer_on_1" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_on_2", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_on_2" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_on_3", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_on_3" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_on_4", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_on_4" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_on_1", param2=node.param2}) - end - end, - delayer_time = delaytime, - delayer_offstate = "mesecons_delayer:delayer_off_"..tostring(i), - mesecons = { - receptor = - { - state = mesecon.state.on, - rules = delayer_get_output_rules - }, - effector = - { - rules = delayer_get_input_rules, - action_off = delayer_deactivate - } - } -}) -end - -minetest.register_craft({ - output = "mesecons_delayer:delayer_off_1", - recipe = { - {"mesecons_torch:mesecon_torch_on", "group:mesecon_conductor_craftable", "mesecons_torch:mesecon_torch_on"}, - {"default:cobble","default:cobble", "default:cobble"}, - } -}) diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_bottom.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_bottom.png deleted file mode 100644 index 2e49d31..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_bottom.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_off.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_off.png deleted file mode 100644 index 0242deb..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_on.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_on.png deleted file mode 100644 index 19ae0cb..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_1.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_1.png deleted file mode 100644 index 7372b37..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_1.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_2.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_2.png deleted file mode 100644 index e34f0ac..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_2.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_3.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_3.png deleted file mode 100644 index 091adbc..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_3.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_4.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_4.png deleted file mode 100644 index 7ecc9b6..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_off_4.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_1.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_1.png deleted file mode 100644 index 61f52f2..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_1.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_2.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_2.png deleted file mode 100644 index 7bd363f..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_2.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_3.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_3.png deleted file mode 100644 index b93f725..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_3.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_4.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_4.png deleted file mode 100644 index ca90a1e..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_on_4.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_off.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_off.png deleted file mode 100644 index 79f3d59..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_on.png b/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_on.png deleted file mode 100644 index 1c8edaa..0000000 Binary files a/mods/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_detector/depends.txt b/mods/mesecons/mesecons_detector/depends.txt deleted file mode 100644 index bc7b062..0000000 --- a/mods/mesecons/mesecons_detector/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -mesecons_materials diff --git a/mods/mesecons/mesecons_detector/init.lua b/mods/mesecons/mesecons_detector/init.lua deleted file mode 100644 index 3c3ca8c..0000000 --- a/mods/mesecons/mesecons_detector/init.lua +++ /dev/null @@ -1,222 +0,0 @@ --- Player detector --- Detects players in a certain radius --- The radius can be specified in mesecons/settings.lua - -local player_detector_RADIUS = OBJECT_DETECTOR_RADIUS - -local player_detector_make_formspec = function (pos) - local meta = minetest.get_meta(pos) - meta:set_string("formspec", "size[9,2.5]" .. - "field[0.3, 0;9,2;scanname;Name of player to scan for (empty for any):;${scanname}]".. - "field[0.3,1.5;4,2;digiline_channel;Digiline Channel (optional):;${digiline_channel}]".. - "button_exit[7,0.75;2,3;;Save]") -end - -local player_detector_on_receive_fields = function(pos, formname, fields) - if not fields.scanname or not fields.digiline_channel then - return - end - local meta = minetest.get_meta(pos) - meta:set_string("scanname", fields.scanname) - meta:set_string("digiline_channel", fields.digiline_channel) - player_detector_make_formspec(pos) -end - --- returns true if player was found, false if not -local player_detector_scan = function (pos) - local objs = minetest.get_objects_inside_radius(pos, player_detector_RADIUS) - for k, obj in pairs(objs) do - local isname = obj:get_player_name() -- "" is returned if it is not a player; "" ~= nil! - local scanname = minetest.get_meta(pos):get_string("scanname") - if (isname == scanname and isname ~= "") or (isname ~= "" and scanname == "") then -- player with scanname found or not scanname specified - return true - end - end - return false -end - --- set player name when receiving a digiline signal on a specific channel -player_detector_digiline = { - effector = { - action = function (pos, node, channel, msg) - local meta = minetest.get_meta(pos) - local active_channel = meta:get_string("digiline_channel") - if channel == active_channel then - meta:set_string("scanname", msg) - player_detector_make_formspec(pos) - end - end, - } -} - -minetest.register_node("mesecons_detector:player_detector_off", { - tiles = {"default_steel_block.png", "default_steel_block.png", "jeija_player_detector_off.png", "jeija_player_detector_off.png", "jeija_player_detector_off.png", "jeija_player_detector_off.png"}, - paramtype = "light", - walkable = true, - groups = {cracky=3}, - description="Player Detector", - mesecons = {receptor = { - state = mesecon.state.off - }}, - on_construct = player_detector_make_formspec, - on_receive_fields = player_detector_on_receive_fields, - sounds = default.node_sound_stone_defaults(), - digiline = player_detector_digiline -}) - -minetest.register_node("mesecons_detector:player_detector_on", { - tiles = {"default_steel_block.png", "default_steel_block.png", "jeija_player_detector_on.png", "jeija_player_detector_on.png", "jeija_player_detector_on.png", "jeija_player_detector_on.png"}, - paramtype = "light", - walkable = true, - groups = {cracky=3,not_in_creative_inventory=1}, - drop = 'mesecons_detector:player_detector_off', - mesecons = {receptor = { - state = mesecon.state.on - }}, - on_construct = player_detector_make_formspec, - on_receive_fields = player_detector_on_receive_fields, - sounds = default.node_sound_stone_defaults(), - digiline = player_detector_digiline -}) - -minetest.register_craft({ - output = 'mesecons_detector:player_detector_off', - recipe = { - {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, - {"default:steel_ingot", "mesecons_luacontroller:luacontroller0000", "default:steel_ingot"}, - {"default:steel_ingot", "group:mesecon_conductor_craftable", "default:steel_ingot"}, - } -}) - -minetest.register_abm( - {nodenames = {"mesecons_detector:player_detector_off"}, - interval = 1.0, - chance = 1, - action = function(pos) - if player_detector_scan(pos) then - minetest.swap_node(pos, {name = "mesecons_detector:player_detector_on"}) - mesecon:receptor_on(pos) - end - end, -}) - -minetest.register_abm( - {nodenames = {"mesecons_detector:player_detector_on"}, - interval = 1.0, - chance = 1, - action = function(pos) - if not player_detector_scan(pos) then - minetest.swap_node(pos, {name = "mesecons_detector:player_detector_off"}) - mesecon:receptor_off(pos) - end - end, -}) - --- Node detector --- Detects objects in front of it - -local node_detector_make_formspec = function (pos) - local meta = minetest.get_meta(pos) - meta:set_string("formspec", "size[9,2.5]" .. - "field[0.3, 0;9,2;scanname;Name of node to scan for (empty for any):;${scanname}]".. - "field[0.3,1.5;4,2;digiline_channel;Digiline Channel (optional):;${digiline_channel}]".. - "button_exit[7,0.75;2,3;;Save]") -end - -local node_detector_on_receive_fields = function(pos, formname, fields) - if not fields.scanname or not fields.digiline_channel then - return - end - local meta = minetest.get_meta(pos) - meta:set_string("scanname", fields.scanname) - meta:set_string("digiline_channel", fields.digiline_channel) - node_detector_make_formspec(pos) -end - --- returns true if object was found, false if not -local node_detector_scan = function (pos) - local node = minetest.get_node(pos) - local frontpos = vector.subtract(pos, minetest.facedir_to_dir(node.param2)) - local frontnode = minetest.get_node(frontpos) - local meta = minetest.get_meta(pos) - return (frontnode.name == meta:get_string("scanname")) or - (frontnode.name ~= "air" and frontnode.name ~= "ignore" and meta:get_string("scanname") == "") -end - --- set object name when receiving a digiline signal on a specific channel -node_detector_digiline = { - effector = { - action = function (pos, node, channel, msg) - local meta = minetest.get_meta(pos) - local active_channel = meta:get_string("digiline_channel") - if channel == active_channel then - meta:set_string("scanname", msg) - node_detector_make_formspec(pos) - end - end, - } -} - -minetest.register_node("mesecons_detector:node_detector_off", { - tiles = {"default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "jeija_node_detector_off.png"}, - paramtype = "light", - walkable = true, - groups = {cracky=3}, - description="Node Detector", - mesecons = {receptor = { - state = mesecon.state.off - }}, - on_construct = node_detector_make_formspec, - on_receive_fields = node_detector_on_receive_fields, - sounds = default.node_sound_stone_defaults(), - digiline = node_detector_digiline -}) - -minetest.register_node("mesecons_detector:node_detector_on", { - tiles = {"default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "jeija_node_detector_on.png"}, - paramtype = "light", - walkable = true, - groups = {cracky=3,not_in_creative_inventory=1}, - drop = 'mesecons_detector:node_detector_off', - mesecons = {receptor = { - state = mesecon.state.on - }}, - on_construct = node_detector_make_formspec, - on_receive_fields = node_detector_on_receive_fields, - sounds = default.node_sound_stone_defaults(), - digiline = node_detector_digiline -}) - -minetest.register_craft({ - output = 'mesecons_detector:node_detector_off', - recipe = { - {"default:steel_ingot", "group:mesecon_conductor_craftable", "default:steel_ingot"}, - {"default:steel_ingot", "mesecons_luacontroller:luacontroller0000", "default:steel_ingot"}, - {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, - } -}) - -minetest.register_abm( - {nodenames = {"mesecons_detector:node_detector_off"}, - interval = 1.0, - chance = 1, - action = function(pos) - if node_detector_scan(pos) then - minetest.swap_node(pos, {name = "mesecons_detector:node_detector_on"}) - mesecon:receptor_on(pos) - end - end, -}) - -minetest.register_abm( - {nodenames = {"mesecons_detector:node_detector_on"}, - interval = 1.0, - chance = 1, - action = function(pos) - if not node_detector_scan(pos) then - minetest.swap_node(pos, {name = "mesecons_detector:node_detector_off"}) - mesecon:receptor_off(pos) - end - end, -}) - diff --git a/mods/mesecons/mesecons_detector/textures/jeija_node_detector_off.png b/mods/mesecons/mesecons_detector/textures/jeija_node_detector_off.png deleted file mode 100644 index 6d130ad..0000000 Binary files a/mods/mesecons/mesecons_detector/textures/jeija_node_detector_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_detector/textures/jeija_node_detector_on.png b/mods/mesecons/mesecons_detector/textures/jeija_node_detector_on.png deleted file mode 100644 index 926a9d1..0000000 Binary files a/mods/mesecons/mesecons_detector/textures/jeija_node_detector_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_detector/textures/jeija_player_detector_off.png b/mods/mesecons/mesecons_detector/textures/jeija_player_detector_off.png deleted file mode 100644 index 825d78f..0000000 Binary files a/mods/mesecons/mesecons_detector/textures/jeija_player_detector_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_detector/textures/jeija_player_detector_on.png b/mods/mesecons/mesecons_detector/textures/jeija_player_detector_on.png deleted file mode 100644 index 96f8ba3..0000000 Binary files a/mods/mesecons/mesecons_detector/textures/jeija_player_detector_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_extrawires/corner.lua b/mods/mesecons/mesecons_extrawires/corner.lua deleted file mode 100644 index d7f7a02..0000000 --- a/mods/mesecons/mesecons_extrawires/corner.lua +++ /dev/null @@ -1,83 +0,0 @@ -local corner_nodebox = { - type = "fixed", - fixed = {{ -16/32-0.001, -17/32, -3/32, 0, -13/32, 3/32 }, - { -3/32, -17/32, -16/32+0.001, 3/32, -13/32, 3/32}} -} - -local corner_selectionbox = { - type = "fixed", - fixed = { -16/32-0.001, -18/32, -16/32, 5/32, -12/32, 5/32 }, -} - -local corner_get_rules = function (node) - local rules = - {{x = 1, y = 0, z = 0}, - {x = 0, y = 0, z = -1}} - - for i = 0, node.param2 do - rules = mesecon:rotate_rules_left(rules) - end - - return rules -end - -minetest.register_node("mesecons_extrawires:corner_on", { - drawtype = "nodebox", - tiles = { - "jeija_insulated_wire_curved_tb_on.png", - "jeija_insulated_wire_curved_tb_on.png^[transformR270", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_ends_on.png" - }, - paramtype = "light", - paramtype2 = "facedir", - walkable = false, - sunlight_propagates = true, - selection_box = corner_selectionbox, - node_box = corner_nodebox, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons_extrawires:corner_off", - mesecons = {conductor = - { - state = mesecon.state.on, - rules = corner_get_rules, - offstate = "mesecons_extrawires:corner_off" - }} -}) - -minetest.register_node("mesecons_extrawires:corner_off", { - drawtype = "nodebox", - description = "Mesecon Corner", - tiles = { - "jeija_insulated_wire_curved_tb_off.png", - "jeija_insulated_wire_curved_tb_off.png^[transformR270", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_ends_off.png" - }, - paramtype = "light", - paramtype2 = "facedir", - walkable = false, - sunlight_propagates = true, - selection_box = corner_selectionbox, - node_box = corner_nodebox, - groups = {dig_immediate = 3}, - mesecons = {conductor = - { - state = mesecon.state.off, - rules = corner_get_rules, - onstate = "mesecons_extrawires:corner_on" - }} -}) - -minetest.register_craft({ - output = "mesecons_extrawires:corner_off 3", - recipe = { - {"", "", ""}, - {"mesecons_insulated:insulated_off", "mesecons_insulated:insulated_off", ""}, - {"", "mesecons_insulated:insulated_off", ""}, - } -}) diff --git a/mods/mesecons/mesecons_extrawires/crossover.lua b/mods/mesecons/mesecons_extrawires/crossover.lua deleted file mode 100644 index 9cdf3c2..0000000 --- a/mods/mesecons/mesecons_extrawires/crossover.lua +++ /dev/null @@ -1,176 +0,0 @@ -function crossover_get_rules(node) - return { - {--first wire - {x=-1,y=0,z=0}, - {x=1,y=0,z=0}, - }, - {--second wire - {x=0,y=0,z=-1}, - {x=0,y=0,z=1}, - }, - } -end - -local crossover_states = { - "mesecons_extrawires:crossover_off", - "mesecons_extrawires:crossover_01", - "mesecons_extrawires:crossover_10", - "mesecons_extrawires:crossover_on", -} - -minetest.register_node("mesecons_extrawires:crossover_off", { - description = "Insulated Crossover", - drawtype = "nodebox", - tiles = { - "jeija_insulated_wire_crossing_tb_off.png", - "jeija_insulated_wire_crossing_tb_off.png", - "jeija_insulated_wire_ends_off.png" - }, - paramtype = "light", - walkable = false, - stack_max = 99, - selection_box = {type="fixed", fixed={-16/32-0.0001, -18/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}}, - node_box = { - type = "fixed", - fixed = { - { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }, - { -3/32, -17/32, -16/32-0.001, 3/32, -13/32, -6/32 }, - { -3/32, -13/32, -9/32, 3/32, -6/32, -6/32 }, - { -3/32, -9/32, -9/32, 3/32, -6/32, 9/32 }, - { -3/32, -13/32, 6/32, 3/32, -6/32, 9/32 }, - { -3/32, -17/32, 6/32, 3/32, -13/32, 16/32+0.001 }, - }, - }, - groups = {dig_immediate=3, mesecon=3, mesecon_conductor_craftable=1}, - mesecons = { - conductor = { - states = crossover_states, - rules = crossover_get_rules(), - } - }, -}) - -minetest.register_node("mesecons_extrawires:crossover_01", { - description = "You hacker you!", - drop = "mesecons_extrawires:crossover_off", - drawtype = "nodebox", - tiles = { - "jeija_insulated_wire_crossing_tb_01.png", - "jeija_insulated_wire_crossing_tb_01.png", - "jeija_insulated_wire_ends_01x.png", - "jeija_insulated_wire_ends_01x.png", - "jeija_insulated_wire_ends_01z.png", - "jeija_insulated_wire_ends_01z.png" - }, - paramtype = "light", - walkable = false, - stack_max = 99, - selection_box = {type="fixed", fixed={-16/32-0.0001, -18/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}}, - node_box = { - type = "fixed", - fixed = { - { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }, - { -3/32, -17/32, -16/32-0.001, 3/32, -13/32, -6/32 }, - { -3/32, -13/32, -9/32, 3/32, -6/32, -6/32 }, - { -3/32, -9/32, -9/32, 3/32, -6/32, 9/32 }, - { -3/32, -13/32, 6/32, 3/32, -6/32, 9/32 }, - { -3/32, -17/32, 6/32, 3/32, -13/32, 16/32+0.001 }, - }, - }, - groups = {dig_immediate=3, mesecon=3, mesecon_conductor_craftable=1, not_in_creative_inventory=1}, - mesecons = { - conductor = { - states = crossover_states, - rules = crossover_get_rules(), - } - }, -}) - -minetest.register_node("mesecons_extrawires:crossover_10", { - description = "You hacker you!", - drop = "mesecons_extrawires:crossover_off", - drawtype = "nodebox", - tiles = { - "jeija_insulated_wire_crossing_tb_10.png", - "jeija_insulated_wire_crossing_tb_10.png", - "jeija_insulated_wire_ends_10x.png", - "jeija_insulated_wire_ends_10x.png", - "jeija_insulated_wire_ends_10z.png", - "jeija_insulated_wire_ends_10z.png" - }, - paramtype = "light", - walkable = false, - stack_max = 99, - selection_box = {type="fixed", fixed={-16/32-0.0001, -18/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}}, - node_box = { - type = "fixed", - fixed = { - { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }, - { -3/32, -17/32, -16/32-0.001, 3/32, -13/32, -6/32 }, - { -3/32, -13/32, -9/32, 3/32, -6/32, -6/32 }, - { -3/32, -9/32, -9/32, 3/32, -6/32, 9/32 }, - { -3/32, -13/32, 6/32, 3/32, -6/32, 9/32 }, - { -3/32, -17/32, 6/32, 3/32, -13/32, 16/32+0.001 }, - }, - }, - groups = {dig_immediate=3, mesecon=3, mesecon_conductor_craftable=1, not_in_creative_inventory=1}, - mesecons = { - conductor = { - states = crossover_states, - rules = crossover_get_rules(), - } - }, -}) - -minetest.register_node("mesecons_extrawires:crossover_on", { - description = "You hacker you!", - drop = "mesecons_extrawires:crossover_off", - drawtype = "nodebox", - tiles = { - "jeija_insulated_wire_crossing_tb_on.png", - "jeija_insulated_wire_crossing_tb_on.png", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_ends_on.png" - }, - paramtype = "light", - walkable = false, - stack_max = 99, - selection_box = {type="fixed", fixed={-16/32-0.0001, -18/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}}, - node_box = { - type = "fixed", - fixed = { - { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }, - { -3/32, -17/32, -16/32-0.001, 3/32, -13/32, -6/32 }, - { -3/32, -13/32, -9/32, 3/32, -6/32, -6/32 }, - { -3/32, -9/32, -9/32, 3/32, -6/32, 9/32 }, - { -3/32, -13/32, 6/32, 3/32, -6/32, 9/32 }, - { -3/32, -17/32, 6/32, 3/32, -13/32, 16/32+0.001 }, - }, - }, - groups = {dig_immediate=3, mesecon=3, mesecon_conductor_craftable=1, not_in_creative_inventory=1}, - mesecons = { - conductor = { - states = crossover_states, - rules = crossover_get_rules(), - } - }, -}) - -minetest.register_craft({ - type = "shapeless", - output = "mesecons_extrawires:crossover_off", - recipe = { - "mesecons_insulated:insulated_off", - "mesecons_insulated:insulated_off", - }, -}) - -minetest.register_craft({ - type = "shapeless", - output = "mesecons_insulated:insulated_off 2", - recipe = { - "mesecons_extrawires:crossover_off", - }, -}) diff --git a/mods/mesecons/mesecons_extrawires/depends.txt b/mods/mesecons/mesecons_extrawires/depends.txt deleted file mode 100644 index aca967d..0000000 --- a/mods/mesecons/mesecons_extrawires/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default -mesecons diff --git a/mods/mesecons/mesecons_extrawires/init.lua b/mods/mesecons/mesecons_extrawires/init.lua deleted file mode 100644 index b22f2e5..0000000 --- a/mods/mesecons/mesecons_extrawires/init.lua +++ /dev/null @@ -1,5 +0,0 @@ -dofile(minetest.get_modpath("mesecons_extrawires").."/crossover.lua"); -dofile(minetest.get_modpath("mesecons_extrawires").."/tjunction.lua"); -dofile(minetest.get_modpath("mesecons_extrawires").."/corner.lua"); -dofile(minetest.get_modpath("mesecons_extrawires").."/vertical.lua"); -dofile(minetest.get_modpath("mesecons_extrawires").."/mesewire.lua"); diff --git a/mods/mesecons/mesecons_extrawires/mesewire.lua b/mods/mesecons/mesecons_extrawires/mesewire.lua deleted file mode 100644 index cbb882e..0000000 --- a/mods/mesecons/mesecons_extrawires/mesewire.lua +++ /dev/null @@ -1,35 +0,0 @@ -local mesewire_rules = -{ - {x = 1, y = 0, z = 0}, - {x =-1, y = 0, z = 0}, - {x = 0, y = 1, z = 0}, - {x = 0, y =-1, z = 0}, - {x = 0, y = 0, z = 1}, - {x = 0, y = 0, z =-1}, -} - -minetest.register_node(":default:mese", { - description = "Mese Block", - tiles = {minetest.registered_nodes["default:mese"].tiles[1]}, - is_ground_content = true, - groups = {cracky=1}, - sounds = default.node_sound_stone_defaults(), - mesecons = {conductor = { - state = mesecon.state.off, - onstate = "mesecons_extrawires:mese_powered", - rules = mesewire_rules - }} -}) - -minetest.register_node("mesecons_extrawires:mese_powered", { - tiles = {minetest.registered_nodes["default:mese"].tiles[1].."^[brighten"}, - is_ground_content = true, - groups = {cracky=1, not_in_creative_inventory = 1}, - sounds = default.node_sound_stone_defaults(), - mesecons = {conductor = { - state = mesecon.state.on, - offstate = "default:mese", - rules = mesewire_rules - }}, - drop = "default:mese" -}) diff --git a/mods/mesecons/mesecons_extrawires/tjunction.lua b/mods/mesecons/mesecons_extrawires/tjunction.lua deleted file mode 100644 index 4a569a0..0000000 --- a/mods/mesecons/mesecons_extrawires/tjunction.lua +++ /dev/null @@ -1,84 +0,0 @@ -local tjunction_nodebox = { - type = "fixed", - fixed = {{ -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }, - { -3/32, -17/32, -16/32+0.001, 3/32, -13/32, -3/32},} -} - -local tjunction_selectionbox = { - type = "fixed", - fixed = { -16/32-0.001, -18/32, -16/32, 16/32+0.001, -12/32, 7/32 }, -} - -local tjunction_get_rules = function (node) - local rules = - {{x = 0, y = 0, z = 1}, - {x = 1, y = 0, z = 0}, - {x = 0, y = 0, z = -1}} - - for i = 0, node.param2 do - rules = mesecon:rotate_rules_left(rules) - end - - return rules -end - -minetest.register_node("mesecons_extrawires:tjunction_on", { - drawtype = "nodebox", - tiles = { - "jeija_insulated_wire_tjunction_tb_on.png", - "jeija_insulated_wire_tjunction_tb_on.png^[transformR180", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_ends_on.png" - }, - paramtype = "light", - paramtype2 = "facedir", - walkable = false, - sunlight_propagates = true, - selection_box = tjunction_selectionbox, - node_box = tjunction_nodebox, - groups = {dig_immediate = 3, mesecon_conductor_craftable=1, not_in_creative_inventory = 1}, - drop = "mesecons_extrawires:tjunction_off", - mesecons = {conductor = - { - state = mesecon.state.on, - rules = tjunction_get_rules, - offstate = "mesecons_extrawires:tjunction_off" - }} -}) - -minetest.register_node("mesecons_extrawires:tjunction_off", { - drawtype = "nodebox", - description = "T-junction", - tiles = { - "jeija_insulated_wire_tjunction_tb_off.png", - "jeija_insulated_wire_tjunction_tb_off.png^[transformR180", - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_ends_off.png" - }, - paramtype = "light", - paramtype2 = "facedir", - walkable = false, - sunlight_propagates = true, - selection_box = tjunction_selectionbox, - node_box = tjunction_nodebox, - groups = {dig_immediate = 3, mesecon_conductor_craftable=1}, - mesecons = {conductor = - { - state = mesecon.state.off, - rules = tjunction_get_rules, - onstate = "mesecons_extrawires:tjunction_on" - }} -}) - -minetest.register_craft({ - output = "mesecons_extrawires:tjunction_off 3", - recipe = { - {"", "", ""}, - {"mesecons_insulated:insulated_off", "mesecons_insulated:insulated_off", "mesecons_insulated:insulated_off"}, - {"", "mesecons_insulated:insulated_off", ""}, - } -}) diff --git a/mods/mesecons/mesecons_extrawires/vertical.lua b/mods/mesecons/mesecons_extrawires/vertical.lua deleted file mode 100644 index 16de55e..0000000 --- a/mods/mesecons/mesecons_extrawires/vertical.lua +++ /dev/null @@ -1,213 +0,0 @@ -local vertical_box = { - type = "fixed", - fixed = {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16} -} - -local top_box = { - type = "fixed", - fixed = {{-8/16, -8/16, -8/16, 8/16, -7/16, 8/16}} -} - -local bottom_box = { - type = "fixed", - fixed = { - {-8/16, -8/16, -8/16, 8/16, -7/16, 8/16}, - {-1/16, -7/16, -1/16, 1/16, 8/16, 1/16}, - } -} - -local vertical_rules = { - {x=0, y=1, z=0}, - {x=0, y=-1, z=0}, -} - -local top_rules = { - {x=1,y=0, z=0}, - {x=-1,y=0, z=0}, - {x=0,y=0, z=1}, - {x=0,y=0, z=-1}, - {x=0,y=-1, z=0}, -} - -local bottom_rules = { - {x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=0, y=0, z=1}, - {x=0, y=0, z=-1}, - {x=0, y=1, z=0}, -} - -local vertical_updatepos = function (pos) - local node = minetest.get_node(pos) - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].is_vertical_conductor then - local node_above = minetest.get_node(mesecon:addPosRule(pos, vertical_rules[1])) - local node_below = minetest.get_node(mesecon:addPosRule(pos, vertical_rules[2])) - local namestate = minetest.registered_nodes[node.name].vertical_conductor_state - - local above = minetest.registered_nodes[node_above.name] and minetest.registered_nodes[node_above.name].is_vertical_conductor - local below = minetest.registered_nodes[node_below.name] and minetest.registered_nodes[node_below.name].is_vertical_conductor - - if above and below then -- above and below: vertical mesecon - minetest.add_node(pos, {name = "mesecons_extrawires:vertical_" .. namestate}) - elseif above and not below then -- above only: bottom - minetest.add_node(pos, {name = "mesecons_extrawires:vertical_bottom_" .. namestate}) - elseif not above and below then -- below only: top - minetest.add_node(pos, {name = "mesecons_extrawires:vertical_top_" .. namestate}) - else -- no vertical wire above, no vertical wire below: use default wire - minetest.add_node(pos, {name = "mesecons_extrawires:vertical_" .. namestate}) - end - end -end - -local vertical_update = function (pos, node) - vertical_updatepos(pos) -- this one - vertical_updatepos(mesecon:addPosRule(pos, vertical_rules[1])) -- above - vertical_updatepos(mesecon:addPosRule(pos, vertical_rules[2])) -- below -end - --- Vertical wire -minetest.register_node("mesecons_extrawires:vertical_on", { - description = "Vertical mesecon", - drawtype = "nodebox", - tiles = {"wires_vertical_on.png"}, - walkable = false, - paramtype = "light", - sunlight_propagates = true, - groups = {dig_immediate=3, not_in_creative_inventory=1}, - selection_box = vertical_box, - node_box = vertical_box, - is_vertical_conductor = true, - vertical_conductor_state = "on", - mesecons = {conductor = { - state = mesecon.state.on, - offstate = "mesecons_extrawires:vertical_off", - rules = vertical_rules, - }}, - drop = "mesecons_extrawires:vertical_off", - after_place_node = vertical_update, - after_dig_node = vertical_update, -}) - -minetest.register_node("mesecons_extrawires:vertical_off", { - description = "Vertical mesecon", - drawtype = "nodebox", - tiles = {"wires_vertical_off.png"}, - walkable = false, - paramtype = "light", - sunlight_propagates = true, - groups = {dig_immediate=3}, - selection_box = vertical_box, - node_box = vertical_box, - is_vertical_conductor = true, - vertical_conductor_state = "off", - mesecons = {conductor = { - state = mesecon.state.off, - onstate = "mesecons_extrawires:vertical_on", - rules = vertical_rules, - }}, - after_place_node = vertical_update, - after_dig_node = vertical_update, -}) - --- Vertical wire top -minetest.register_node("mesecons_extrawires:vertical_top_on", { - description = "Vertical mesecon", - drawtype = "nodebox", - tiles = {"wires_full_on.png","wires_full_on.png","wires_vertical_on.png"}, - walkable = false, - paramtype = "light", - sunlight_propagates = true, - groups = {dig_immediate=3, not_in_creative_inventory=1}, - selection_box = top_box, - node_box = top_box, - is_vertical_conductor = true, - vertical_conductor_state = "on", - mesecons = {conductor = { - state = mesecon.state.on, - offstate = "mesecons_extrawires:vertical_top_off", - rules = top_rules, - }}, - drop = "mesecons_extrawires:vertical_off", - after_place_node = vertical_update, - after_dig_node = vertical_update, -}) - -minetest.register_node("mesecons_extrawires:vertical_top_off", { - description = "Vertical mesecon", - drawtype = "nodebox", - tiles = {"wires_full_off.png","wires_full_off.png","wires_vertical_off.png"}, - walkable = false, - paramtype = "light", - sunlight_propagates = true, - groups = {dig_immediate=3, not_in_creative_inventory=1}, - selection_box = top_box, - node_box = top_box, - is_vertical_conductor = true, - vertical_conductor_state = "off", - mesecons = {conductor = { - state = mesecon.state.off, - onstate = "mesecons_extrawires:vertical_top_on", - rules = top_rules, - }}, - drop = "mesecons_extrawires:vertical_off", - after_place_node = vertical_update, - after_dig_node = vertical_update, -}) - --- Vertical wire bottom -minetest.register_node("mesecons_extrawires:vertical_bottom_on", { - description = "Vertical mesecon", - drawtype = "nodebox", - tiles = {"wires_full_on.png","wires_full_on.png","wires_vertical_on.png"}, - walkable = false, - paramtype = "light", - sunlight_propagates = true, - vertical_conductor_state = "on", - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - selection_box = bottom_box, - node_box = bottom_box, - mesecons = {conductor = { - state = mesecon.state.on, - offstate = "mesecons_extrawires:vertical_bottom_off", - rules = bottom_rules, - }}, - drop = "mesecons_extrawires:vertical_off", - after_place_node = vertical_update, - after_dig_node = vertical_update, -}) - -minetest.register_node("mesecons_extrawires:vertical_bottom_off", { - description = "Vertical mesecon", - drawtype = "nodebox", - tiles = {"wires_full_off.png","wires_full_off.png","wires_vertical_off.png"}, - walkable = false, - paramtype = "light", - sunlight_propagates = true, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - selection_box = bottom_box, - node_box = bottom_box, - is_vertical_conductor = true, - vertical_conductor_state = "off", - mesecons = {conductor = { - state = mesecon.state.off, - onstate = "mesecons_extrawires:vertical_bottom_on", - rules = bottom_rules, - }}, - drop = "mesecons_extrawires:vertical_off", - after_place_node = vertical_update, - after_dig_node = vertical_update, -}) - -minetest.register_craft({ - output = "mesecons_extrawires:vertical_off 3", - recipe = { - {"mesecons:wire_00000000_off"}, - {"mesecons:wire_00000000_off"}, - {"mesecons:wire_00000000_off"} - } -}) - -minetest.register_craft({ - output = "mesecons:wire_00000000_off", - recipe = {{"mesecons_extrawires:vertical_off"}} -}) diff --git a/mods/mesecons/mesecons_gates/depends.txt b/mods/mesecons/mesecons_gates/depends.txt deleted file mode 100644 index f3e0392..0000000 --- a/mods/mesecons/mesecons_gates/depends.txt +++ /dev/null @@ -1,6 +0,0 @@ -mesecons -mesecons_microcontroller -mesecons_delayer - -mesecons_torch -mesecons_materials diff --git a/mods/mesecons/mesecons_gates/init.lua b/mods/mesecons/mesecons_gates/init.lua deleted file mode 100644 index 1a9ee83..0000000 --- a/mods/mesecons/mesecons_gates/init.lua +++ /dev/null @@ -1,223 +0,0 @@ -function gate_rotate_rules(node) - for rotations = 0, node.param2 - 1 do - rules = mesecon:rotate_rules_left(rules) - end - return rules -end - -function gate_get_output_rules(node) - rules = {{x=1, y=0, z=0}} - return gate_rotate_rules(node) -end - -function gate_get_input_rules_oneinput(node) - rules = {{x=-1, y=0, z=0}, {x=1, y=0, z=0}} - return gate_rotate_rules(node) -end - -function gate_get_input_rules_twoinputs(node) - rules = { - {x=0, y=0, z=1}, - {x=0, y=0, z=-1}, - {x=1, y=0, z=0}} - return gate_rotate_rules(node) -end - -function update_gate(pos) - gate = get_gate(pos) - L = rotate_ports( - yc_get_real_portstates(pos), - minetest.get_node(pos).param2 - ) - if gate == "diode" then - set_gate(pos, L.a) - elseif gate == "not" then - set_gate(pos, not L.a) - elseif gate == "nand" then - set_gate(pos, not(L.b and L.d)) - elseif gate == "and" then - set_gate(pos, L.b and L.d) - elseif gate == "xor" then - set_gate(pos, (L.b and not L.d) or (not L.b and L.d)) - end -end - -function set_gate(pos, on) - gate = get_gate(pos) - local meta = minetest.get_meta(pos) - if on ~= gate_state(pos) then - yc_heat(meta) - --minetest.after(0.5, yc_cool, meta) - if yc_overheat(meta) then - pop_gate(pos) - else - local node = minetest.get_node(pos) - if on then - minetest.swap_node(pos, {name = "mesecons_gates:"..gate.."_on", param2=node.param2}) - mesecon:receptor_on(pos, - gate_get_output_rules(node)) - else - minetest.swap_node(pos, {name = "mesecons_gates:"..gate.."_off", param2=node.param2}) - mesecon:receptor_off(pos, - gate_get_output_rules(node)) - end - end - end -end - -function get_gate(pos) - return minetest.registered_nodes[minetest.get_node(pos).name].mesecons_gate -end - -function gate_state(pos) - name = minetest.get_node(pos).name - return string.find(name, "_on") ~= nil -end - -function pop_gate(pos) - gate = get_gate(pos) - minetest.remove_node(pos) - minetest.after(0.2, yc_overheat_off, pos) - minetest.add_item(pos, "mesecons_gates:"..gate.."_off") -end - -function rotate_ports(L, param2) - for rotations=0, param2-1 do - port = L.a - L.a = L.b - L.b = L.c - L.c = L.d - L.d = port - end - return L -end - -gates = { -{name = "diode", inputnumber = 1}, -{name = "not" , inputnumber = 1}, -{name = "nand" , inputnumber = 2}, -{name = "and" , inputnumber = 2}, -{name = "xor" , inputnumber = 2}} - -local onoff, drop, nodename, description, groups -for _, gate in ipairs(gates) do - if gate.inputnumber == 1 then - get_rules = gate_get_input_rules_oneinput - elseif gate.inputnumber == 2 then - get_rules = gate_get_input_rules_twoinputs - end - for on = 0, 1 do - nodename = "mesecons_gates:"..gate.name - if on == 1 then - onoff = "on" - drop = nodename.."_off" - nodename = nodename.."_"..onoff - description = "You hacker you!" - groups = {dig_immediate=2, not_in_creative_inventory=1, overheat = 1} - else - onoff = "off" - drop = nil - nodename = nodename.."_"..onoff - description = gate.name.." Gate" - groups = {dig_immediate=2, overheat = 1} - end - - tiles = "jeija_microcontroller_bottom.png^".. - "jeija_gate_"..onoff..".png^".. - "jeija_gate_"..gate.name..".png" - - node_box = { - type = "fixed", - fixed = { - {-8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - } - - local mesecon_state - if on == 1 then - mesecon_state = mesecon.state.on - else - mesecon_state = mesecon.state.off - end - - minetest.register_node(nodename, { - description = description, - paramtype = "light", - paramtype2 = "facedir", - drawtype = "nodebox", - tiles = {tiles}, - inventory_image = tiles, - selection_box = node_box, - node_box = node_box, - walkable = true, - on_construct = function(pos) - local meta = minetest.get_meta(pos) - meta:set_int("heat", 0) - update_gate(pos) - end, - groups = groups, - drop = drop, - sounds = default.node_sound_stone_defaults(), - mesecons_gate = gate.name, - mesecons = - { - receptor = - { - state = mesecon_state, - rules = gate_get_output_rules - }, - effector = - { - rules = get_rules, - action_change = update_gate - } - } - }) - end -end - -minetest.register_craft({ - output = 'mesecons_gates:diode_off', - recipe = { - {'', '', ''}, - {'mesecons:mesecon', 'mesecons_torch:mesecon_torch_on', 'mesecons_torch:mesecon_torch_on'}, - {'', '', ''}, - }, -}) - -minetest.register_craft({ - output = 'mesecons_gates:not_off', - recipe = { - {'', '', ''}, - {'mesecons:mesecon', 'mesecons_torch:mesecon_torch_on', 'mesecons:mesecon'}, - {'', '', ''}, - }, -}) - -minetest.register_craft({ - output = 'mesecons_gates:and_off', - recipe = { - {'mesecons:mesecon', '', ''}, - {'', 'mesecons_materials:silicon', 'mesecons:mesecon'}, - {'mesecons:mesecon', '', ''}, - }, -}) - -minetest.register_craft({ - output = 'mesecons_gates:nand_off', - recipe = { - {'mesecons:mesecon', '', ''}, - {'', 'mesecons_materials:silicon', 'mesecons_torch:mesecon_torch_on'}, - {'mesecons:mesecon', '', ''}, - }, -}) - -minetest.register_craft({ - output = 'mesecons_gates:xor_off', - recipe = { - {'mesecons:mesecon', '', ''}, - {'', 'mesecons_materials:silicon', 'mesecons_materials:silicon'}, - {'mesecons:mesecon', '', ''}, - }, -}) - diff --git a/mods/mesecons/mesecons_gates/textures/jeija_gate_and.png b/mods/mesecons/mesecons_gates/textures/jeija_gate_and.png deleted file mode 100644 index 0ddc043..0000000 Binary files a/mods/mesecons/mesecons_gates/textures/jeija_gate_and.png and /dev/null differ diff --git a/mods/mesecons/mesecons_gates/textures/jeija_gate_diode.png b/mods/mesecons/mesecons_gates/textures/jeija_gate_diode.png deleted file mode 100644 index ffa403f..0000000 Binary files a/mods/mesecons/mesecons_gates/textures/jeija_gate_diode.png and /dev/null differ diff --git a/mods/mesecons/mesecons_gates/textures/jeija_gate_nand.png b/mods/mesecons/mesecons_gates/textures/jeija_gate_nand.png deleted file mode 100644 index 0e4294e..0000000 Binary files a/mods/mesecons/mesecons_gates/textures/jeija_gate_nand.png and /dev/null differ diff --git a/mods/mesecons/mesecons_gates/textures/jeija_gate_not.png b/mods/mesecons/mesecons_gates/textures/jeija_gate_not.png deleted file mode 100644 index 939fb76..0000000 Binary files a/mods/mesecons/mesecons_gates/textures/jeija_gate_not.png and /dev/null differ diff --git a/mods/mesecons/mesecons_gates/textures/jeija_gate_off.png b/mods/mesecons/mesecons_gates/textures/jeija_gate_off.png deleted file mode 100644 index 44017b0..0000000 Binary files a/mods/mesecons/mesecons_gates/textures/jeija_gate_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_gates/textures/jeija_gate_on.png b/mods/mesecons/mesecons_gates/textures/jeija_gate_on.png deleted file mode 100644 index 47028a8..0000000 Binary files a/mods/mesecons/mesecons_gates/textures/jeija_gate_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_gates/textures/jeija_gate_xor.png b/mods/mesecons/mesecons_gates/textures/jeija_gate_xor.png deleted file mode 100644 index afbd6ab..0000000 Binary files a/mods/mesecons/mesecons_gates/textures/jeija_gate_xor.png and /dev/null differ diff --git a/mods/mesecons/mesecons_hydroturbine/depends.txt b/mods/mesecons/mesecons_hydroturbine/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_hydroturbine/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_hydroturbine/init.lua b/mods/mesecons/mesecons_hydroturbine/init.lua deleted file mode 100644 index ef5ccae..0000000 --- a/mods/mesecons/mesecons_hydroturbine/init.lua +++ /dev/null @@ -1,96 +0,0 @@ --- HYDRO_TURBINE --- Water turbine: --- Active if flowing >water< above it --- (does not work with other liquids) - -minetest.register_node("mesecons_hydroturbine:hydro_turbine_off", { - drawtype = "nodebox", - tiles = {"jeija_hydro_turbine_off.png"}, - groups = {dig_immediate=2}, - description="Water Turbine", - paramtype = "light", - selection_box = { - type = "fixed", - fixed = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - {-0.15, 0.5, -0.15, 0.15, 1.45, 0.15}, - {-0.45, 1.15, -0.1, 0.45, 1.45, 0.1}, - {-0.1, 1.15, -0.45, 0.1, 1.45, 0.45}}, - }, - node_box = { - type = "fixed", - fixed = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - {-0.15, 0.5, -0.15, 0.15, 1.45, 0.15}, - {-0.45, 1.15, -0.1, 0.45, 1.45, 0.1}, - {-0.1, 1.15, -0.45, 0.1, 1.45, 0.45}}, - }, - sounds = default.node_sound_stone_defaults(), - mesecons = {receptor = { - state = mesecon.state.off - }} -}) - -minetest.register_node("mesecons_hydroturbine:hydro_turbine_on", { - drawtype = "nodebox", - tiles = {"jeija_hydro_turbine_on.png"}, - drop = "mesecons_hydroturbine:hydro_turbine_off 1", - groups = {dig_immediate=2,not_in_creative_inventory=1}, - description="Water Turbine", - paramtype = "light", - selection_box = { - type = "fixed", - fixed = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - {-0.15, 0.5, -0.15, 0.15, 1.45, 0.15}, - {-0.5, 1.15, -0.1, 0.5, 1.45, 0.1}, - {-0.1, 1.15, -0.5, 0.1, 1.45, 0.5}}, - }, - node_box = { - type = "fixed", - fixed = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - {-0.15, 0.5, -0.15, 0.15, 1.45, 0.15}, - {-0.5, 1.15, -0.1, 0.5, 1.45, 0.1}, - {-0.1, 1.15, -0.5, 0.1, 1.45, 0.5}}, - }, - sounds = default.node_sound_stone_defaults(), - mesecons = {receptor = { - state = mesecon.state.on - }} -}) - - -minetest.register_abm({ -nodenames = {"mesecons_hydroturbine:hydro_turbine_off"}, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local waterpos={x=pos.x, y=pos.y+1, z=pos.z} - if minetest.get_node(waterpos).name=="default:water_flowing" then - minetest.add_node(pos, {name="mesecons_hydroturbine:hydro_turbine_on"}) - nodeupdate(pos) - mesecon:receptor_on(pos) - end - end, -}) - -minetest.register_abm({ -nodenames = {"mesecons_hydroturbine:hydro_turbine_on"}, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local waterpos={x=pos.x, y=pos.y+1, z=pos.z} - if minetest.get_node(waterpos).name~="default:water_flowing" then - minetest.add_node(pos, {name="mesecons_hydroturbine:hydro_turbine_off"}) - nodeupdate(pos) - mesecon:receptor_off(pos) - end - end, -}) - -minetest.register_craft({ - output = "mesecons_hydroturbine:hydro_turbine_off 2", - recipe = { - {"","default:stick", ""}, - {"default:stick", "default:steel_ingot", "default:stick"}, - {"","default:stick", ""}, - } -}) - diff --git a/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_off.png b/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_off.png deleted file mode 100644 index 5ca1a12..0000000 Binary files a/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_on.png b/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_on.png deleted file mode 100644 index 28eb0c9..0000000 Binary files a/mods/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/depends.txt b/mods/mesecons/mesecons_insulated/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_insulated/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_insulated/init.lua b/mods/mesecons/mesecons_insulated/init.lua deleted file mode 100644 index 9fdf494..0000000 --- a/mods/mesecons/mesecons_insulated/init.lua +++ /dev/null @@ -1,84 +0,0 @@ -function insulated_wire_get_rules(node) - local rules = {{x = 1, y = 0, z = 0}, - {x =-1, y = 0, z = 0}} - if node.param2 == 1 or node.param2 == 3 then - return mesecon:rotate_rules_right(rules) - end - return rules -end - -minetest.register_node("mesecons_insulated:insulated_on", { - drawtype = "nodebox", - description = "Insulated Mesecon", - tiles = { - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_sides_on.png" - }, - paramtype = "light", - paramtype2 = "facedir", - walkable = false, - sunlight_propagates = true, - selection_box = { - type = "fixed", - fixed = { -16/32-0.001, -18/32, -7/32, 16/32+0.001, -12/32, 7/32 } - }, - node_box = { - type = "fixed", - fixed = { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 } - }, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons_insulated:insulated_off", - mesecons = {conductor = { - state = mesecon.state.on, - offstate = "mesecons_insulated:insulated_off", - rules = insulated_wire_get_rules - }} -}) - -minetest.register_node("mesecons_insulated:insulated_off", { - drawtype = "nodebox", - description = "insulated mesecons", - tiles = { - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_sides_off.png" - }, - paramtype = "light", - paramtype2 = "facedir", - walkable = false, - sunlight_propagates = true, - selection_box = { - type = "fixed", - fixed = { -16/32-0.001, -18/32, -7/32, 16/32+0.001, -12/32, 7/32 } - }, - node_box = { - type = "fixed", - fixed = { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 } - }, - groups = {dig_immediate = 3}, - mesecons = {conductor = { - state = mesecon.state.off, - onstate = "mesecons_insulated:insulated_on", - rules = insulated_wire_get_rules - }} -}) - -minetest.register_craft({ - output = "mesecons_insulated:insulated_off 3", - recipe = { - {"mesecons_materials:fiber", "mesecons_materials:fiber", "mesecons_materials:fiber"}, - {"mesecons:wire_00000000_off", "mesecons:wire_00000000_off", "mesecons:wire_00000000_off"}, - {"mesecons_materials:fiber", "mesecons_materials:fiber", "mesecons_materials:fiber"}, - } -}) - -mesecon:add_rules("insulated", { -{x = 1, y = 0, z = 0}, -{x =-1, y = 0, z = 0}}) diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_01.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_01.png deleted file mode 100644 index d872b2b..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_01.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_10.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_10.png deleted file mode 100644 index ae06dea..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_10.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_off.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_off.png deleted file mode 100644 index 41b5ff4..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_on.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_on.png deleted file mode 100644 index 154288b..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_off.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_off.png deleted file mode 100644 index 85ca90b..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_on.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_on.png deleted file mode 100644 index 772d9a6..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_01x.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_01x.png deleted file mode 100644 index b742152..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_01x.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_01z.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_01z.png deleted file mode 100644 index 497a467..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_01z.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_10x.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_10x.png deleted file mode 100644 index d407cff..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_10x.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_10z.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_10z.png deleted file mode 100644 index 830d390..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_10z.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_off.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_off.png deleted file mode 100644 index 89a8385..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_on.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_on.png deleted file mode 100644 index 75cf435..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_off.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_off.png deleted file mode 100644 index db33f14..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_on.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_on.png deleted file mode 100644 index f76e9a8..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_off.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_off.png deleted file mode 100644 index a897b29..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_on.png b/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_on.png deleted file mode 100644 index 8fc312b..0000000 Binary files a/mods/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lamp/depends.txt b/mods/mesecons/mesecons_lamp/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_lamp/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_lamp/init.lua b/mods/mesecons/mesecons_lamp/init.lua deleted file mode 100644 index 6cdae2d..0000000 --- a/mods/mesecons/mesecons_lamp/init.lua +++ /dev/null @@ -1,61 +0,0 @@ --- MESELAMPS --- A lamp is "is an electrical device used to create artificial light" (wikipedia) --- guess what? - -mesecon_lamp_box = { - type = "wallmounted", - wall_top = {-0.3125,0.375,-0.3125,0.3125,0.5,0.3125}, - wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125}, - wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125}, -} - -minetest.register_node("mesecons_lamp:lamp_on", { - drawtype = "nodebox", - tiles = {"jeija_meselamp_on.png"}, - paramtype = "light", - paramtype2 = "wallmounted", - legacy_wallmounted = true, - sunlight_propagates = true, - walkable = true, - light_source = LIGHT_MAX, - node_box = mesecon_lamp_box, - selection_box = mesecon_lamp_box, - groups = {dig_immediate=3,not_in_creative_inventory=1, mesecon_effector_on = 1}, - drop="mesecons_lamp:lamp_off 1", - sounds = default.node_sound_glass_defaults(), - mesecons = {effector = { - action_off = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_lamp:lamp_off", param2 = node.param2}) - end - }} -}) - -minetest.register_node("mesecons_lamp:lamp_off", { - drawtype = "nodebox", - tiles = {"jeija_meselamp_off.png"}, - inventory_image = "jeija_meselamp.png", - wield_image = "jeija_meselamp.png", - paramtype = "light", - paramtype2 = "wallmounted", - sunlight_propagates = true, - walkable = true, - node_box = mesecon_lamp_box, - selection_box = mesecon_lamp_box, - groups = {dig_immediate=3, mesecon_receptor_off = 1, mesecon_effector_off = 1}, - description="Meselamp", - sounds = default.node_sound_glass_defaults(), - mesecons = {effector = { - action_on = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_lamp:lamp_on", param2 = node.param2}) - end - }} -}) - -minetest.register_craft({ - output = "mesecons_lamp:lamp_off 1", - recipe = { - {"", "default:glass", ""}, - {"group:mesecon_conductor_craftable", "default:steel_ingot", "group:mesecon_conductor_craftable"}, - {"", "default:glass", ""}, - } -}) diff --git a/mods/mesecons/mesecons_lamp/textures/jeija_meselamp.png b/mods/mesecons/mesecons_lamp/textures/jeija_meselamp.png deleted file mode 100644 index 5456ee9..0000000 Binary files a/mods/mesecons/mesecons_lamp/textures/jeija_meselamp.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lamp/textures/jeija_meselamp_off.png b/mods/mesecons/mesecons_lamp/textures/jeija_meselamp_off.png deleted file mode 100644 index 67bd7fd..0000000 Binary files a/mods/mesecons/mesecons_lamp/textures/jeija_meselamp_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lamp/textures/jeija_meselamp_on.png b/mods/mesecons/mesecons_lamp/textures/jeija_meselamp_on.png deleted file mode 100644 index 2316e00..0000000 Binary files a/mods/mesecons/mesecons_lamp/textures/jeija_meselamp_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/depends.txt b/mods/mesecons/mesecons_lightstone/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_lightstone/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_lightstone/init.lua b/mods/mesecons/mesecons_lightstone/init.lua deleted file mode 100644 index 7bb550d..0000000 --- a/mods/mesecons/mesecons_lightstone/init.lua +++ /dev/null @@ -1,60 +0,0 @@ -local lightstone_rules = { - {x=0, y=0, z=-1}, - {x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=0, y=0, z=1}, - {x=1, y=1, z=0}, - {x=1, y=-1, z=0}, - {x=-1, y=1, z=0}, - {x=-1, y=-1, z=0}, - {x=0, y=1, z=1}, - {x=0, y=-1, z=1}, - {x=0, y=1, z=-1}, - {x=0, y=-1, z=-1}, - {x=0, y=-1, z=0}, -} - -function mesecon:lightstone_add(name, base_item, texture_off, texture_on) - minetest.register_node("mesecons_lightstone:lightstone_" .. name .. "_off", { - tiles = {texture_off}, - groups = {cracky=2, mesecon_effector_off = 1, mesecon = 2}, - description=name.." Lightstone", - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - rules = lightstone_rules, - action_on = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_lightstone:lightstone_" .. name .. "_on", param2 = node.param2}) - end, - }} - }) - minetest.register_node("mesecons_lightstone:lightstone_" .. name .. "_on", { - tiles = {texture_on}, - groups = {cracky=2,not_in_creative_inventory=1, mesecon = 2}, - drop = "mesecons_lightstone:lightstone_" .. name .. "_off", - light_source = LIGHT_MAX-2, - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - rules = lightstone_rules, - action_off = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_lightstone:lightstone_" .. name .. "_off", param2 = node.param2}) - end, - }} - }) - - minetest.register_craft({ - output = "mesecons_lightstone:lightstone_" .. name .. "_off", - recipe = { - {"",base_item,""}, - {base_item,"default:torch",base_item}, - {"","group:mesecon_conductor_craftable",""} - } - }) -end - - -mesecon:lightstone_add("red", "default:clay_brick", "jeija_lightstone_red_off.png", "jeija_lightstone_red_on.png") -mesecon:lightstone_add("green", "default:cactus", "jeija_lightstone_green_off.png", "jeija_lightstone_green_on.png") -mesecon:lightstone_add("blue", "mesecons_materials:fiber", "jeija_lightstone_blue_off.png", "jeija_lightstone_blue_on.png") -mesecon:lightstone_add("gray", "default:cobble", "jeija_lightstone_gray_off.png", "jeija_lightstone_gray_on.png") -mesecon:lightstone_add("darkgray", "default:gravel", "jeija_lightstone_darkgray_off.png", "jeija_lightstone_darkgray_on.png") -mesecon:lightstone_add("yellow", "default:mese_crystal_fragment", "jeija_lightstone_yellow_off.png", "jeija_lightstone_yellow_on.png") diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_off.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_off.png deleted file mode 100644 index 09acc22..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_on.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_on.png deleted file mode 100644 index 93c8638..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_off.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_off.png deleted file mode 100644 index 7e5aae7..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_on.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_on.png deleted file mode 100644 index e6d4d00..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_off.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_off.png deleted file mode 100644 index f168fc2..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_on.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_on.png deleted file mode 100644 index 24c5470..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_off.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_off.png deleted file mode 100644 index 2f214fa..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_on.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_on.png deleted file mode 100644 index 225bf4e..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_off.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_off.png deleted file mode 100644 index 3c828b2..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_on.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_on.png deleted file mode 100644 index 512b0fe..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_off.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_off.png deleted file mode 100644 index 2e7fed0..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_on.png b/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_on.png deleted file mode 100644 index 8943aca..0000000 Binary files a/mods/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_luacontroller/depends.txt b/mods/mesecons/mesecons_luacontroller/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_luacontroller/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_luacontroller/init.lua b/mods/mesecons/mesecons_luacontroller/init.lua deleted file mode 100644 index 5aea239..0000000 --- a/mods/mesecons/mesecons_luacontroller/init.lua +++ /dev/null @@ -1,562 +0,0 @@ --- Reference --- ports = get_real_portstates(pos): gets if inputs are powered from outside --- newport = merge_portstates(state1, state2): just does result = state1 or state2 for every port --- action_setports(pos, rule, state): activates/deactivates the mesecons according to the portstates (helper for action) --- action(pos, ports): Applies new portstates to a luacontroller at pos --- lc_update(pos): updates the controller at pos by executing the code --- reset_meta (pos, code, errmsg): performs a software-reset, installs new code and prints error messages --- reset (pos): performs a hardware reset, turns off all ports --- --- The Sandbox --- The whole code of the controller runs in a sandbox, --- a very restricted environment. --- However, as this does not prevent you from using e.g. loops, --- we need to check for these prohibited commands first. --- Actually the only way to damage the server is to --- use too much memory from the sandbox. --- You can add more functions to the environment --- (see where local env is defined) --- Something nice to play is is appending minetest.env to it. - -local BASENAME = "mesecons_luacontroller:luacontroller" - -local rules = {} -rules.a = {x = -1, y = 0, z = 0, name="A"} -rules.b = {x = 0, y = 0, z = 1, name="B"} -rules.c = {x = 1, y = 0, z = 0, name="C"} -rules.d = {x = 0, y = 0, z = -1, name="D"} - ------------------- --- Action stuff -- ------------------- --- These helpers are required to set the portstates of the luacontroller - -local get_real_portstates = function(pos) -- determine if ports are powered (by itself or from outside) - ports = { - a = mesecon:is_power_on(mesecon:addPosRule(pos, rules.a), mesecon:invertRule(rules.a)) - and mesecon:rules_link(mesecon:addPosRule(pos, rules.a), pos), - b = mesecon:is_power_on(mesecon:addPosRule(pos, rules.b), mesecon:invertRule(rules.b)) - and mesecon:rules_link(mesecon:addPosRule(pos, rules.b), pos), - c = mesecon:is_power_on(mesecon:addPosRule(pos, rules.c), mesecon:invertRule(rules.c)) - and mesecon:rules_link(mesecon:addPosRule(pos, rules.c), pos), - d = mesecon:is_power_on(mesecon:addPosRule(pos, rules.d), mesecon:invertRule(rules.d)) - and mesecon:rules_link(mesecon:addPosRule(pos, rules.d), pos), - } - return ports -end - -local merge_portstates = function (ports, vports) - local npo = {a=false, b=false, c=false, d=false} - npo.a = vports.a or ports.a - npo.b = vports.b or ports.b - npo.c = vports.c or ports.c - npo.d = vports.d or ports.d - return npo -end - -local generate_name = function (ports) - local overwrite = overwrite or {} - local d = ports.d and 1 or 0 - local c = ports.c and 1 or 0 - local b = ports.b and 1 or 0 - local a = ports.a and 1 or 0 - return BASENAME..d..c..b..a -end - -local setport = function (pos, rule, state) - if state then - mesecon:receptor_on(pos, {rule}) - else - mesecon:receptor_off(pos, {rule}) - end -end - -local action = function (pos, ports) - local node = minetest.get_node(pos) - local name = node.name - local vports = minetest.registered_nodes[name].virtual_portstates - local newname = generate_name(ports) - - if name ~= newname and vports then - local rules_on = {} - local rules_off = {} - - minetest.swap_node(pos, {name = newname, param2 = node.param2}) - - if ports.a ~= vports.a then setport(pos, rules.a, ports.a) end - if ports.b ~= vports.b then setport(pos, rules.b, ports.b) end - if ports.c ~= vports.c then setport(pos, rules.c, ports.c) end - if ports.d ~= vports.d then setport(pos, rules.d, ports.d) end - end -end - --------------------- --- Overheat stuff -- --------------------- - -local heat = function (meta) -- warm up - h = meta:get_int("heat") - if h ~= nil then - meta:set_int("heat", h + 1) - end -end - ---local cool = function (meta) -- cool down after a while --- h = meta:get_int("heat") --- if h ~= nil then --- meta:set_int("heat", h - 1) --- end ---end - -local overheat = function (meta) -- determine if too hot - h = meta:get_int("heat") - if h == nil then return true end -- if nil then overheat - if h > 40 then - return true - else - return false - end -end - -local overheat_off = function(pos) - mesecon:receptor_off(pos, mesecon.rules.flat) -end - -------------------- --- Parsing stuff -- -------------------- - -local code_prohibited = function(code) - -- Clean code - local prohibited = {"while", "for", "repeat", "until", "function", "goto"} - for _, p in ipairs(prohibited) do - if string.find(code, p) then - return "Prohibited command: "..p - end - end -end - -local safe_print = function(param) - print(dump(param)) -end - -deep_copy = function(original, visited) --deep copy that removes functions - visited = visited or {} - if visited[original] ~= nil then --already visited this node - return visited[original] - end - if type(original) == 'table' then --nested table - local copy = {} - visited[original] = copy - for key, value in next, original, nil do - copy[deep_copy(key, visited)] = deep_copy(value, visited) - end - setmetatable(copy, deep_copy(getmetatable(original), visited)) - return copy - elseif type(original) == 'function' then --ignore functions - return nil - else --by-value type - return original - end -end - -local safe_serialize = function(value) - return minetest.serialize(deep_copy(value)) -end - -local interrupt = function(params) - lc_update(params.pos, {type="interrupt", iid = params.iid}) -end - -local getinterrupt = function(pos) - local interrupt = function (time, iid) -- iid = interrupt id - if type(time) ~= "number" then return end - local iid = iid or math.random() - local meta = minetest.get_meta(pos) - local interrupts = minetest.deserialize(meta:get_string("lc_interrupts")) or {} - local found = false - local search = safe_serialize(iid) - for _, i in ipairs(interrupts) do - if safe_serialize(i) == search then - found = true - break - end - end - if not found then - table.insert(interrupts, iid) - meta:set_string("lc_interrupts", safe_serialize(interrupts)) - end - minetest.after(time, interrupt, {pos=pos, iid = iid}) - end - return interrupt -end - -local getdigiline_send = function (pos) - local digiline_send = function (channel, msg) - if digiline then - digiline:receptor_send(pos, digiline.rules.default, channel, msg) - end - end - return digiline_send -end - -local create_environment = function(pos, mem, event) - -- Gather variables for the environment - local vports = minetest.registered_nodes[minetest.get_node(pos).name].virtual_portstates - vports = {a = vports.a, b = vports.b, c = vports.c, d = vports.d} - local rports = get_real_portstates(pos) - - return { - print = safe_print, - pin = merge_portstates(vports, rports), - port = vports, - interrupt = getinterrupt(pos), - digiline_send = getdigiline_send(pos), - mem = mem, - tostring = tostring, - tonumber = tonumber, - string = { - byte = string.byte, - char = string.char, - find = string.find, - format = string.format, - gmatch = string.gmatch, - gsub = string.gsub, - len = string.len, - lower = string.lower, - match = string.match, - rep = string.rep, - reverse = string.reverse, - sub = string.sub, - }, - math = { - abs = math.abs, - acos = math.acos, - asin = math.asin, - atan = math.atan, - atan2 = math.atan2, - ceil = math.ceil, - cos = math.cos, - cosh = math.cosh, - deg = math.deg, - exp = math.exp, - floor = math.floor, - fmod = math.fmod, - frexp = math.frexp, - huge = math.huge, - ldexp = math.ldexp, - log = math.log, - log10 = math.log10, - max = math.max, - min = math.min, - modf = math.modf, - pi = math.pi, - pow = math.pow, - rad = math.rad, - random = math.random, - sin = math.sin, - sinh = math.sinh, - sqrt = math.sqrt, - tan = math.tan, - tanh = math.tanh, - }, - table = { - insert = table.insert, - maxn = table.maxn, - remove = table.remove, - sort = table.sort - }, - event = event, - } -end - -local create_sandbox = function (code, env) - -- Create Sandbox - if code:byte(1) == 27 then - return _, "You Hacker You! Don't use binary code!" - end - f, msg = loadstring(code) - if not f then return _, msg end - setfenv(f, env) - return f -end - -local do_overheat = function (pos, meta) - -- Overheat protection - heat(meta) - --minetest.after(0.5, cool, meta) - if overheat(meta) then - local node = minetest.get_node(pos) - minetest.swap_node(pos, {name = BASENAME.."_burnt", param2 = node.param2}) - minetest.get_meta(pos):set_string("lc_interrupts", "") - minetest.after(0.2, overheat_off, pos) -- wait for pending operations - return true - end -end - -local load_memory = function(meta) - return minetest.deserialize(meta:get_string("lc_memory")) or {} -end - -local save_memory = function(meta, mem) - meta:set_string("lc_memory", safe_serialize(mem)) -end - -local interrupt_allow = function (meta, event) - if event.type ~= "interrupt" then return true end - - local interrupts = minetest.deserialize(meta:get_string("lc_interrupts")) or {} - local search = safe_serialize(event.iid) - for _, i in ipairs(interrupts) do - if safe_serialize(i) == search then - return true - end - end - - return false -end - -local ports_invalid = function (var) - if type(var) == "table" then - return false - end - return "The ports you set are invalid" -end - ----------------------- --- Parsing function -- ----------------------- - -lc_update = function (pos, event) - local meta = minetest.get_meta(pos) - if not interrupt_allow(meta, event) then return end - if do_overheat(pos, meta) then return end - - -- load code & mem from memory - local mem = load_memory(meta) - local code = meta:get_string("code") - - -- make sure code is ok and create environment - local prohibited = code_prohibited(code) - if prohibited then return prohibited end - local env = create_environment(pos, mem, event) - - -- create the sandbox and execute code - local chunk, msg = create_sandbox (code, env) - if not chunk then return msg end - local success, msg = pcall(f) - if not success then return msg end - if ports_invalid(env.port) then return ports_invalid(env.port) end - - save_memory(meta, mem) - - -- Actually set the ports - minetest.after(0, action, pos, env.port) -end - -local reset_meta = function(pos, code, errmsg) - local meta = minetest.get_meta(pos) - meta:set_string("code", code) - code = minetest.formspec_escape(code or "") - errmsg = minetest.formspec_escape(errmsg or "") - meta:set_string("formspec", "size[10,8]".. - "background[-0.2,-0.25;10.4,8.75;jeija_luac_background.png]".. - "textarea[0.2,0.6;10.2,5;code;;"..code.."]".. - "image_button[3.75,6;2.5,1;jeija_luac_runbutton.png;program;]".. - "image_button_exit[9.72,-0.25;0.425,0.4;jeija_close_window.png;exit;]".. - "label[0.1,5;"..errmsg.."]") - meta:set_int("heat", 0) -end - -local reset = function (pos) - minetest.get_meta(pos):set_string("lc_interrupts", "") - action(pos, {a=false, b=false, c=false, d=false}, true) -end - --- ______ --- | --- | --- | __ ___ _ __ _ _ --- | | | | | |\ | | |_| | | | | |_ |_| --- |___| |______ |__| | \| | | \ |__| |_ |_ |_ |\ --- | --- | --- - ------------------------ --- Node Registration -- ------------------------ - -local output_rules={} -local input_rules={} - -local nodebox = { - type = "fixed", - fixed = { - { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, -- bottom slab - { -5/16, -7/16, -5/16, 5/16, -6/16, 5/16 }, -- circuit board - { -3/16, -6/16, -3/16, 3/16, -5/16, 3/16 }, -- IC - } - } - -local selectionbox = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -5/16, 8/16 }, - } - -local digiline = { - receptor = {}, - effector = { - action = function (pos, node, channel, msg) - lc_update (pos, {type = "digiline", channel = channel, msg = msg}) - end - } -} - -for a = 0, 1 do -- 0 = off; 1 = on -for b = 0, 1 do -for c = 0, 1 do -for d = 0, 1 do - -local cid = tostring(d)..tostring(c)..tostring(b)..tostring(a) -local nodename = BASENAME..cid -local top = "jeija_luacontroller_top.png" -if a == 1 then - top = top.."^jeija_luacontroller_LED_A.png" -end -if b == 1 then - top = top.."^jeija_luacontroller_LED_B.png" -end -if c == 1 then - top = top.."^jeija_luacontroller_LED_C.png" -end -if d == 1 then - top = top.."^jeija_luacontroller_LED_D.png" -end - -if a + b + c + d ~= 0 then - groups = {dig_immediate=2, not_in_creative_inventory=1, overheat = 1} -else - groups = {dig_immediate=2, overheat = 1} -end - -output_rules[cid] = {} -input_rules[cid] = {} -if (a == 1) then table.insert(output_rules[cid], rules.a) end -if (b == 1) then table.insert(output_rules[cid], rules.b) end -if (c == 1) then table.insert(output_rules[cid], rules.c) end -if (d == 1) then table.insert(output_rules[cid], rules.d) end - -if (a == 0) then table.insert(input_rules[cid], rules.a) end -if (b == 0) then table.insert(input_rules[cid], rules.b) end -if (c == 0) then table.insert(input_rules[cid], rules.c) end -if (d == 0) then table.insert(input_rules[cid], rules.d) end - -local mesecons = { - effector = - { - rules = input_rules[cid], - action_change = function (pos, _, rulename, newstate) - lc_update(pos, {type=newstate, pin=rulename}) - end, - }, - receptor = - { - state = mesecon.state.on, - rules = output_rules[cid] - } -} - -minetest.register_node(nodename, { - description = "Luacontroller", - drawtype = "nodebox", - tiles = { - top, - "jeija_microcontroller_bottom.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png" - }, - - inventory_image = top, - paramtype = "light", - groups = groups, - drop = BASENAME.."0000", - sunlight_propagates = true, - selection_box = selectionbox, - node_box = nodebox, - on_construct = reset_meta, - on_receive_fields = function(pos, formname, fields) - if not fields.program then - return - end - reset(pos) - reset_meta(pos, fields.code) - local err = lc_update(pos, {type="program"}) - if err then print(err) end - reset_meta(pos, fields.code, err) - end, - sounds = default.node_sound_stone_defaults(), - mesecons = mesecons, - digiline = digiline, - is_luacontroller = true, - virtual_portstates = { a = a == 1, -- virtual portstates are - b = b == 1, -- the ports the the - c = c == 1, -- controller powers itself - d = d == 1},-- so those that light up - after_dig_node = function (pos, node) - mesecon:receptor_off(pos, output_rules) - end, -}) -end -end -end -end - ---overheated luacontroller -minetest.register_node(BASENAME .. "_burnt", { - drawtype = "nodebox", - tiles = { - "jeija_luacontroller_burnt_top.png", - "jeija_microcontroller_bottom.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png" - }, - inventory_image = "jeija_luacontroller_burnt_top.png", - paramtype = "light", - groups = {dig_immediate=2, not_in_creative_inventory=1}, - drop = BASENAME.."0000", - sunlight_propagates = true, - selection_box = selectionbox, - node_box = nodebox, - on_construct = reset_meta, - on_receive_fields = function(pos, formname, fields) - if fields.quit then - return - end - reset(pos) - reset_meta(pos, fields.code) - local err = lc_update(pos, {type="program"}) - if err then print(err) end - reset_meta(pos, fields.code, err) - end, - sounds = default.node_sound_stone_defaults(), - is_luacontroller = true, - virtual_portstates = {a = false, b = false, c = false, d = false}, -}) - ------------------------- --- Craft Registration -- ------------------------- - -minetest.register_craft({ - output = BASENAME.."0000 2", - recipe = { - {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'}, - {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'}, - {'group:mesecon_conductor_craftable', 'group:mesecon_conductor_craftable', ''}, - } -}) diff --git a/mods/mesecons/mesecons_luacontroller/textures/jeija_luac_background.png b/mods/mesecons/mesecons_luacontroller/textures/jeija_luac_background.png deleted file mode 100644 index cf6d5d9..0000000 Binary files a/mods/mesecons/mesecons_luacontroller/textures/jeija_luac_background.png and /dev/null differ diff --git a/mods/mesecons/mesecons_luacontroller/textures/jeija_luac_background.xcf b/mods/mesecons/mesecons_luacontroller/textures/jeija_luac_background.xcf deleted file mode 100644 index e410b21..0000000 Binary files a/mods/mesecons/mesecons_luacontroller/textures/jeija_luac_background.xcf and /dev/null differ diff --git a/mods/mesecons/mesecons_luacontroller/textures/jeija_luac_runbutton.png b/mods/mesecons/mesecons_luacontroller/textures/jeija_luac_runbutton.png deleted file mode 100644 index 157507f..0000000 Binary files a/mods/mesecons/mesecons_luacontroller/textures/jeija_luac_runbutton.png and /dev/null differ diff --git a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_A.png b/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_A.png deleted file mode 100644 index a187e8e..0000000 Binary files a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_A.png and /dev/null differ diff --git a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_B.png b/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_B.png deleted file mode 100644 index 738ba96..0000000 Binary files a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_B.png and /dev/null differ diff --git a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_C.png b/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_C.png deleted file mode 100644 index abe0fe6..0000000 Binary files a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_C.png and /dev/null differ diff --git a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_D.png b/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_D.png deleted file mode 100644 index cc10170..0000000 Binary files a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_D.png and /dev/null differ diff --git a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_burnt_top.png b/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_burnt_top.png deleted file mode 100644 index d1a17af..0000000 Binary files a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_burnt_top.png and /dev/null differ diff --git a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_top.png b/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_top.png deleted file mode 100644 index 3128230..0000000 Binary files a/mods/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_top.png and /dev/null differ diff --git a/mods/mesecons/mesecons_materials/depends.txt b/mods/mesecons/mesecons_materials/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_materials/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_materials/init.lua b/mods/mesecons/mesecons_materials/init.lua deleted file mode 100644 index f95373c..0000000 --- a/mods/mesecons/mesecons_materials/init.lua +++ /dev/null @@ -1,41 +0,0 @@ ---GLUE -minetest.register_craftitem("mesecons_materials:glue", { - image = "jeija_glue.png", - on_place_on_ground = minetest.craftitem_place_item, - description="Glue", -}) - -minetest.register_craftitem("mesecons_materials:fiber", { - image = "jeija_fiber.png", - on_place_on_ground = minetest.craftitem_place_item, - description="Fiber", -}) - -minetest.register_craft({ - output = "mesecons_materials:glue 2", - type = "cooking", - recipe = "default:sapling", - cooktime = 2 -}) - -minetest.register_craft({ - output = "mesecons_materials:fiber 6", - type = "cooking", - recipe = "mesecons_materials:glue", - cooktime = 4 -}) - --- Silicon -minetest.register_craftitem("mesecons_materials:silicon", { - image = "jeija_silicon.png", - on_place_on_ground = minetest.craftitem_place_item, - description="Silicon", -}) - -minetest.register_craft({ - output = "mesecons_materials:silicon 4", - recipe = { - {"default:sand", "default:sand"}, - {"default:sand", "default:steel_ingot"}, - } -}) diff --git a/mods/mesecons/mesecons_microcontroller/MeseconMicro.odt b/mods/mesecons/mesecons_microcontroller/MeseconMicro.odt deleted file mode 100644 index be82d1b..0000000 Binary files a/mods/mesecons/mesecons_microcontroller/MeseconMicro.odt and /dev/null differ diff --git a/mods/mesecons/mesecons_microcontroller/MeseconMicro.pdf b/mods/mesecons/mesecons_microcontroller/MeseconMicro.pdf deleted file mode 100644 index 7ab7484..0000000 Binary files a/mods/mesecons/mesecons_microcontroller/MeseconMicro.pdf and /dev/null differ diff --git a/mods/mesecons/mesecons_microcontroller/depends.txt b/mods/mesecons/mesecons_microcontroller/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_microcontroller/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_microcontroller/init.lua b/mods/mesecons/mesecons_microcontroller/init.lua deleted file mode 100644 index 09fd0b9..0000000 --- a/mods/mesecons/mesecons_microcontroller/init.lua +++ /dev/null @@ -1,717 +0,0 @@ -local BASENAME = "mesecons_microcontroller:microcontroller" -EEPROM_SIZE = 255 - -for a = 0, 1 do -for b = 0, 1 do -for c = 0, 1 do -for d = 0, 1 do -local nodename = "mesecons_microcontroller:microcontroller"..tostring(d)..tostring(c)..tostring(b)..tostring(a) -local top = "jeija_microcontroller_top.png" -if tostring(a) == "1" then - top = top.."^jeija_microcontroller_LED_A.png" -end -if tostring(b) == "1" then - top = top.."^jeija_microcontroller_LED_B.png" -end -if tostring(c) == "1" then - top = top.."^jeija_microcontroller_LED_C.png" -end -if tostring(d) == "1" then - top = top.."^jeija_microcontroller_LED_D.png" -end -if tostring(d)..tostring(c)..tostring(b)..tostring(a) ~= "0000" then - groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon = 3, overheat = 1} -else - groups = {dig_immediate=2, mesecon = 3, overheat = 1} -end -local rules={} -if (a == 1) then table.insert(rules, {x = -1, y = 0, z = 0}) end -if (b == 1) then table.insert(rules, {x = 0, y = 0, z = 1}) end -if (c == 1) then table.insert(rules, {x = 1, y = 0, z = 0}) end -if (d == 1) then table.insert(rules, {x = 0, y = 0, z = -1}) end - -local input_rules={} -if (a == 0) then table.insert(input_rules, {x = -1, y = 0, z = 0, name = "A"}) end -if (b == 0) then table.insert(input_rules, {x = 0, y = 0, z = 1, name = "B"}) end -if (c == 0) then table.insert(input_rules, {x = 1, y = 0, z = 0, name = "C"}) end -if (d == 0) then table.insert(input_rules, {x = 0, y = 0, z = -1, name = "D"}) end -mesecon:add_rules(nodename, rules) - -local mesecons = {effector = -{ - rules = input_rules, - action_change = function (pos, node, rulename) - update_yc(pos) - end -}} -if nodename ~= "mesecons_microcontroller:microcontroller0000" then - mesecons.receptor = { - state = mesecon.state.on, - rules = rules - } -end - -minetest.register_node(nodename, { - description = "Microcontroller", - drawtype = "nodebox", - tiles = { - top, - "jeija_microcontroller_bottom.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png" - }, - - sunlight_propagates = true, - paramtype = "light", - walkable = true, - groups = groups, - drop = "mesecons_microcontroller:microcontroller0000 1", - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -5/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = { - { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, -- bottom slab - { -5/16, -7/16, -5/16, 5/16, -6/16, 5/16 }, -- circuit board - { -3/16, -6/16, -3/16, 3/16, -5/16, 3/16 }, -- IC - } - }, - on_construct = function(pos) - local meta = minetest.get_meta(pos) - meta:set_string("code", "") - meta:set_string("formspec", "size[9,2.5]".. - "field[0.256,-0.2;9,2;code;Code:;]".. - "button[0 ,0.2;1.5,3;band;AND]".. - "button[1.5,0.2;1.5,3;bxor;XOR]".. - "button[3 ,0.2;1.5,3;bnot;NOT]".. - "button[4.5,0.2;1.5,3;bnand;NAND]".. - "button[6 ,0.2;1.5,3;btflop;T-Flop]".. - "button[7.5,0.2;1.5,3;brsflop;RS-Flop]".. - "button_exit[3.5,1;2,3;program;Program]") - meta:set_string("infotext", "Unprogrammed Microcontroller") - meta:set_int("heat", 0) - local r = "" - for i=1, EEPROM_SIZE+1 do r=r.."0" end --Generate a string with EEPROM_SIZE*"0" - meta:set_string("eeprom", r) - end, - on_receive_fields = function(pos, formanme, fields, sender) - local meta = minetest.get_meta(pos) - if fields.band then - fields.code = "sbi(C, A&B) :A and B are inputs, C is output" - elseif fields.bxor then - fields.code = "sbi(C, A~B) :A and B are inputs, C is output" - elseif fields.bnot then - fields.code = "sbi(B, !A) :A is input, B is output" - elseif fields.bnand then - fields.code = "sbi(C, !A|!B) :A and B are inputs, C is output" - elseif fields.btflop then - fields.code = "if(A)sbi(1,1);if(!A)sbi(B,!B)sbi(1,0); if(C)off(B,1); :A is input, B is output (Q), C is reset, toggles with falling edge" - elseif fields.brsflop then - fields.code = "if(A)on(C);if(B)off(C); :A is S (Set), B is R (Reset), C is output (R dominates)" - end - if fields.code == nil then return end - - meta:set_string("code", fields.code) - meta:set_string("formspec", "size[9,2.5]".. - "field[0.256,-0.2;9,2;code;Code:;"..minetest.formspec_escape(fields.code).."]".. - "button[0 ,0.2;1.5,3;band;AND]".. - "button[1.5,0.2;1.5,3;bxor;XOR]".. - "button[3 ,0.2;1.5,3;bnot;NOT]".. - "button[4.5,0.2;1.5,3;bnand;NAND]".. - "button[6 ,0.2;1.5,3;btflop;T-Flop]".. - "button[7.5,0.2;1.5,3;brsflop;RS-Flop]".. - "button_exit[3.5,1;2,3;program;Program]") - meta:set_string("infotext", "Programmed Microcontroller") - yc_reset (pos) - update_yc(pos) - end, - sounds = default.node_sound_stone_defaults(), - mesecons = mesecons, - after_dig_node = function (pos, node) - rules = mesecon:get_rules(node.name) - mesecon:receptor_off(pos, rules) - end, -}) -end -end -end -end - -minetest.register_craft({ - output = 'craft "mesecons_microcontroller:microcontroller0000" 2', - recipe = { - {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'}, - {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'}, - {'group:mesecon_conductor_craftable', 'group:mesecon_conductor_craftable', ''}, - } -}) - -function yc_reset(pos) - yc_action(pos, {a=false, b=false, c=false, d=false}) - local meta = minetest.get_meta(pos) - meta:set_int("heat", 0) - meta:set_int("afterid", 0) - local r = "" - for i=1, EEPROM_SIZE+1 do r=r.."0" end --Generate a string with EEPROM_SIZE*"0" - meta:set_string("eeprom", r) -end - -function update_yc(pos) - local meta = minetest.get_meta(pos) - yc_heat(meta) - --minetest.after(0.5, yc_cool, meta) - if (yc_overheat(meta)) then - minetest.remove_node(pos) - minetest.after(0.2, yc_overheat_off, pos) --wait for pending parsings - minetest.add_item(pos, "mesecons_microcontroller:microcontroller0000") - end - - local code = meta:get_string("code") - code = yc_code_remove_commentary(code) - code = string.gsub(code, " ", "") --Remove all spaces - code = string.gsub(code, " ", "") --Remove all tabs - if yc_parsecode(code, pos) == nil then - meta:set_string("infotext", "Code not valid!\n"..code) - else - meta:set_string("infotext", "Working Microcontroller\n"..code) - end -end - - ---Code Parsing -function yc_code_remove_commentary(code) - is_string = false - for i = 1, #code do - if code:sub(i, i) == '"' then - is_string = not is_string --toggle is_string - elseif code:sub(i, i) == ":" and not is_string then - return code:sub(1, i-1) - end - end - return code -end - -function yc_parsecode(code, pos) - local meta = minetest.get_meta(pos) - local endi = 1 - local Lreal = yc_get_real_portstates(pos) - local Lvirtual = yc_get_virtual_portstates(pos) - if Lvirtual == nil then return nil end - local c - local eeprom = meta:get_string("eeprom") - while true do - command, endi = parse_get_command(code, endi) - if command == nil then return nil end - if command == true then break end --end of code - if command == "if" then - r, endi = yc_command_if(code, endi, yc_merge_portstates(Lreal, Lvirtual), eeprom) - if r == nil then return nil end - if r == true then -- nothing - elseif r == false then - endi_new = yc_skip_to_else (code, endi) - if endi_new == nil then --else > not found - endi = yc_skip_to_endif(code, endi) - else - endi = endi_new - end - if endi == nil then return nil end - end - else - params, endi = parse_get_params(code, endi) - if params == nil then return nil end - end - if command == "on" then - L = yc_command_on (params, Lvirtual) - elseif command == "off" then - L = yc_command_off(params, Lvirtual) - elseif command == "print" then - local su = yc_command_print(params, eeprom, yc_merge_portstates(Lreal, Lvirtual)) - if su ~= true then return nil end - elseif command == "after" then - local su = yc_command_after(params, pos) - if su == nil then return nil end - elseif command == "sbi" then - new_eeprom, Lvirtual = yc_command_sbi (params, eeprom, yc_merge_portstates(Lreal, Lvirtual), Lvirtual) - if new_eeprom == nil then return nil - else eeprom = new_eeprom end - elseif command == "if" then --nothing - else - return nil - end - if Lvirtual == nil then return nil end - if eeprom == nil then return nil else - minetest.get_meta(pos):set_string("eeprom", eeprom) end - end - yc_action(pos, Lvirtual) - return true -end - -function parse_get_command(code, starti) - i = starti - s = nil - while s ~= "" do - s = string.sub(code, i, i) - if s == "(" then - return string.sub(code, starti, i-1), i + 1 -- i: ( i+1 after ( - end - if s == ";" and starti == i then - starti = starti + 1 - i = starti - elseif s == ">" then - starti = yc_skip_to_endif(code, starti) - if starti == nil then return nil end - i = starti - else - i = i + 1 - end - end - - if starti == i-1 then - return true, true - end - return nil, nil -end - -function parse_get_params(code, starti) - i = starti - s = nil - local params = {} - local is_string = false - while s ~= "" do - s = string.sub(code, i, i) - if code:sub(i, i) == '"' then - is_string = (is_string==false) --toggle is_string - end - if s == ")" and is_string == false then - table.insert(params, string.sub(code, starti, i-1)) -- i: ) i+1 after ) - return params, i + 1 - end - if s == "," and is_string == false then - table.insert(params, string.sub(code, starti, i-1)) -- i: ) i+1 after ) - starti = i + 1 - end - i = i + 1 - end - return nil, nil -end - -function yc_parse_get_eeprom_param(cond, starti) - i = starti - s = nil - local addr - while s ~= "" do - s = string.sub(cond, i, i) - if string.find("0123456789", s) == nil or s == "" then - addr = string.sub(cond, starti, i-1) -- i: last number i+1 after last number - return addr, i - end - if s == "," then return nil, nil end - i = i + 1 - end - return nil, nil -end - -function yc_skip_to_endif(code, starti) - local i = starti - local s = false - local open_ifs = 1 - while s ~= nil and s~= "" do - s = code:sub(i, i) - if s == "i" and code:sub(i+1, i+1) == "f" then --if in µCScript - open_ifs = open_ifs + 1 - end - if s == ";" then - open_ifs = open_ifs - 1 - end - if open_ifs == 0 then - return i + 1 - end - i = i + 1 - end - return nil -end - -function yc_skip_to_else(code, starti) - local i = starti - local s = false - local open_ifs = 1 - while s ~= nil and s~= "" do - s = code:sub(i, i) - if s == "i" and code:sub(i+1, i+1) == "f" then --if in µCScript - open_ifs = open_ifs + 1 - end - if s == ";" then - open_ifs = open_ifs - 1 - end - if open_ifs == 1 and s == ">" then - return i + 1 - end - i = i + 1 - end - return nil -end - ---Commands -function yc_command_on(params, L) - local rules = {} - for i, port in ipairs(params) do - L = yc_set_portstate (port, true, L) - end - return L -end - -function yc_command_off(params, L) - local rules = {} - for i, port in ipairs(params) do - L = yc_set_portstate (port, false, L) - end - return L -end - -function yc_command_print(params, eeprom, L) - local s = "" - for i, param in ipairs(params) do - if param:sub(1,1) == '"' and param:sub(#param, #param) == '"' then - s = s..param:sub(2, #param-1) - else - r = yc_command_parsecondition(param, L, eeprom) - if r == "1" or r == "0" then - s = s..r - else return nil end - end - end - print(s) --don't remove - return true -end - -function yc_command_sbi(params, eeprom, L, Lv) - if params[1]==nil or params[2]==nil or params[3] ~=nil then return nil end - local status = yc_command_parsecondition(params[2], L, eeprom) - - if status == nil then return nil, nil end - - if string.find("ABCD", params[1])~=nil and #params[1]==1 then --is a port - if status == "1" then - Lv = yc_set_portstate (params[1], true, Lv) - else - Lv = yc_set_portstate (params[1], false, Lv) - end - return eeprom, Lv; - end - - --is an eeprom address - new_eeprom = ""; - for i=1, #eeprom do - if tonumber(params[1])==i then - new_eeprom = new_eeprom..status - else - new_eeprom = new_eeprom..eeprom:sub(i, i) - end - end - return new_eeprom, Lv -end - --- after (delay) -function yc_command_after(params, pos) - if params[1] == nil or params[2] == nil or params[3] ~= nil then return nil end - - --get time (maximum time is 200) - local time = tonumber(params[1]) - if time == nil or time > 200 then - return nil - end - - --get code in quotes "code" - if string.sub(params[2], 1, 1) ~= '"' or string.sub(params[2], #params[2], #params[2]) ~= '"' then return nil end - local code = string.sub(params[2], 2, #params[2] - 1) - - local afterid = math.random(10000) - local meta = minetest.get_meta(pos) - meta:set_int("afterid", afterid) - minetest.after(time, yc_command_after_execute, {pos = pos, code = code, afterid = afterid}) - return true -end - -function yc_command_after_execute(params) - local meta = minetest.get_meta(params.pos) - if meta:get_int("afterid") == params.afterid then --make sure the node has not been changed - if yc_parsecode(params.code, params.pos) == nil then - meta:set_string("infotext", "Code in after() not valid!") - else - if code ~= nil then - meta:set_string("infotext", "Working Microcontroller\n"..code) - else - meta:set_string("infotext", "Working Microcontroller") - end - end - end -end - ---If -function yc_command_if(code, starti, L, eeprom) - local cond, endi = yc_command_if_getcondition(code, starti) - if cond == nil then return nil end - - cond = yc_command_parsecondition(cond, L, eeprom) - - if cond == "0" then result = false - elseif cond == "1" then result = true - else result = nil end - if result == nil then end - return result, endi --endi from local cond, endi = yc_command_if_getcondition(code, starti) -end - ---Condition parsing -function yc_command_if_getcondition(code, starti) - i = starti - s = nil - local brackets = 1 --1 Bracket to close - while s ~= "" do - s = string.sub(code, i, i) - - if s == ")" then - brackets = brackets - 1 - end - - if s == "(" then - brackets = brackets + 1 - end - - if brackets == 0 then - return string.sub(code, starti, i-1), i + 1 -- i: ( i+1 after ( - end - - i = i + 1 - end - return nil, nil -end - -function yc_command_parsecondition(cond, L, eeprom) - cond = string.gsub(cond, "A", tonumber(L.a and 1 or 0)) - cond = string.gsub(cond, "B", tonumber(L.b and 1 or 0)) - cond = string.gsub(cond, "C", tonumber(L.c and 1 or 0)) - cond = string.gsub(cond, "D", tonumber(L.d and 1 or 0)) - - - local i = 1 - local l = string.len(cond) - while i<=l do - local s = cond:sub(i,i) - if s == "#" then - addr, endi = yc_parse_get_eeprom_param(cond, i+1) - buf = yc_eeprom_read(tonumber(addr), eeprom) - if buf == nil then return nil end - local call = cond:sub(i, endi-1) - cond = string.gsub(cond, call, buf) - i = 0 - l = string.len(cond) - end - i = i + 1 - end - - cond = string.gsub(cond, "!0", "1") - cond = string.gsub(cond, "!1", "0") - - local i = 2 - local l = string.len(cond) - while i<=l do - local s = cond:sub(i,i) - local b = tonumber(cond:sub(i-1, i-1)) - local a = tonumber(cond:sub(i+1, i+1)) - if cond:sub(i+1, i+1) == nil then break end - if s == "=" then - if a==nil then return nil end - if b==nil then return nil end - if a == b then buf = "1" end - if a ~= b then buf = "0" end - cond = string.gsub(cond, b..s..a, buf) - i = 1 - l = string.len(cond) - end - i = i + 1 - end - - local i = 2 - local l = string.len(cond) - while i<=l do - local s = cond:sub(i,i) - local b = tonumber(cond:sub(i-1, i-1)) - local a = tonumber(cond:sub(i+1, i+1)) - if cond:sub(i+1, i+1) == nil then break end - if s == "&" then - if a==nil then return nil end - local buf = ((a==1) and (b==1)) - if buf == true then buf = "1" end - if buf == false then buf = "0" end - cond = string.gsub(cond, b..s..a, buf) - i = 1 - l = string.len(cond) - end - if s == "|" then - if a==nil then return nil end - local buf = ((a == 1) or (b == 1)) - if buf == true then buf = "1" end - if buf == false then buf = "0" end - cond = string.gsub(cond, b..s..a, buf) - i = 1 - l = string.len(cond) - end - if s == "~" then - if a==nil then return nil end - local buf = (((a == 1) or (b == 1)) and not((a==1) and (b==1))) - if buf == true then buf = "1" end - if buf == false then buf = "0" end - cond = string.gsub(cond, b..s..a, buf) - i = 1 - l = string.len(cond) - end - i = i + 1 - end - - return cond -end - ---Virtual-Hardware functions -function yc_eeprom_read(number, eeprom) - if number == nil then return nil, nil end - value = eeprom:sub(number, number) - if value == nil then return nil, nil end - return value, endi -end - ---Real I/O functions -function yc_action(pos, L) --L-->Lvirtual - local Lv = yc_get_virtual_portstates(pos) - local name = "mesecons_microcontroller:microcontroller" - ..tonumber(L.d and 1 or 0) - ..tonumber(L.c and 1 or 0) - ..tonumber(L.b and 1 or 0) - ..tonumber(L.a and 1 or 0) - local node = minetest.get_node(pos) - minetest.swap_node(pos, {name = name, param2 = node.param2}) - - yc_action_setports(pos, L, Lv) -end - -function yc_action_setports(pos, L, Lv) - local name = "mesecons_microcontroller:microcontroller" - local rules - if Lv.a ~= L.a then - rules = mesecon:get_rules(name.."0001") - if L.a == true then mesecon:receptor_on(pos, rules) - else mesecon:receptor_off(pos, rules) end - end - if Lv.b ~= L.b then - rules = mesecon:get_rules(name.."0010") - if L.b == true then mesecon:receptor_on(pos, rules) - else mesecon:receptor_off(pos, rules) end - end - if Lv.c ~= L.c then - rules = mesecon:get_rules(name.."0100") - if L.c == true then mesecon:receptor_on(pos, rules) - else mesecon:receptor_off(pos, rules) end - end - if Lv.d ~= L.d then - rules = mesecon:get_rules(name.."1000") - if L.d == true then mesecon:receptor_on(pos, rules) - else mesecon:receptor_off(pos, rules) end - end -end - -function yc_set_portstate(port, state, L) - if port == "A" then L.a = state - elseif port == "B" then L.b = state - elseif port == "C" then L.c = state - elseif port == "D" then L.d = state - else return nil end - return L -end - -function yc_get_real_portstates(pos) -- port powered or not (by itself or from outside)? - rulesA = mesecon:get_rules("mesecons_microcontroller:microcontroller0001") - rulesB = mesecon:get_rules("mesecons_microcontroller:microcontroller0010") - rulesC = mesecon:get_rules("mesecons_microcontroller:microcontroller0100") - rulesD = mesecon:get_rules("mesecons_microcontroller:microcontroller1000") - L = { - a = mesecon:is_power_on(mesecon:addPosRule(pos, rulesA[1]), - mesecon:invertRule(rulesA[1])) and - mesecon:rules_link(mesecon:addPosRule(pos, rulesA[1]), pos), - b = mesecon:is_power_on(mesecon:addPosRule(pos, rulesB[1]), - mesecon:invertRule(rulesB[1])) and - mesecon:rules_link(mesecon:addPosRule(pos, rulesB[1]), pos), - c = mesecon:is_power_on(mesecon:addPosRule(pos, rulesC[1]), - mesecon:invertRule(rulesC[1])) and - mesecon:rules_link(mesecon:addPosRule(pos, rulesC[1]), pos), - d = mesecon:is_power_on(mesecon:addPosRule(pos, rulesD[1]), - mesecon:invertRule(rulesD[1])) and - mesecon:rules_link(mesecon:addPosRule(pos, rulesD[1]), pos), - } - return L -end - -function yc_get_virtual_portstates(pos) -- portstates according to the name - name = minetest.get_node(pos).name - b, a = string.find(name, ":microcontroller") - if a == nil then return nil end - a = a + 1 - - Lvirtual = {a=false, b=false, c=false, d=false} - if name:sub(a , a ) == "1" then Lvirtual.d = true end - if name:sub(a+1, a+1) == "1" then Lvirtual.c = true end - if name:sub(a+2, a+2) == "1" then Lvirtual.b = true end - if name:sub(a+3, a+3) == "1" then Lvirtual.a = true end - return Lvirtual -end - -function yc_merge_portstates(Lreal, Lvirtual) - local L = {a=false, b=false, c=false, d=false} - if Lvirtual.a or Lreal.a then L.a = true end - if Lvirtual.b or Lreal.b then L.b = true end - if Lvirtual.c or Lreal.c then L.c = true end - if Lvirtual.d or Lreal.d then L.d = true end - return L -end - ---"Overheat" protection -function yc_heat(meta) - h = meta:get_int("heat") - if h ~= nil then - meta:set_int("heat", h + 1) - end -end - ---function yc_cool(meta) --- h = meta:get_int("heat") --- if h ~= nil then --- meta:set_int("heat", h - 1) --- end ---end - -function yc_overheat(meta) - if MESECONS_GLOBALSTEP then return false end - h = meta:get_int("heat") - if h == nil then return true end -- if nil the overheat - if h>60 then - return true - else - return false - end -end - -function yc_overheat_off(pos) - rules = mesecon:get_rules("mesecons_microcontroller:microcontroller1111") - mesecon:receptor_off(pos, rules) -end - -minetest.register_craft({ - output = BASENAME.."0000 2", - recipe = { - {'group:mesecon_conductor_craftable', 'mesecons_materials:silicon', 'mesecons_materials:silicon'}, - {'group:mesecon_conductor_craftable', 'mesecons_materials:silicon', 'mesecons_materials:silicon'}, - {'', 'group:mesecon_conductor_craftable', 'group:mesecon_conductor_craftable'}, - } -}) diff --git a/mods/mesecons/mesecons_microcontroller/textures/jeija_microc_background.png b/mods/mesecons/mesecons_microcontroller/textures/jeija_microc_background.png deleted file mode 100644 index bb68a0c..0000000 Binary files a/mods/mesecons/mesecons_microcontroller/textures/jeija_microc_background.png and /dev/null differ diff --git a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_A.png b/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_A.png deleted file mode 100644 index 64526cf..0000000 Binary files a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_A.png and /dev/null differ diff --git a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_B.png b/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_B.png deleted file mode 100644 index 1f7b451..0000000 Binary files a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_B.png and /dev/null differ diff --git a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_C.png b/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_C.png deleted file mode 100644 index 399cc2c..0000000 Binary files a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_C.png and /dev/null differ diff --git a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_D.png b/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_D.png deleted file mode 100644 index 506389c..0000000 Binary files a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_LED_D.png and /dev/null differ diff --git a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_bottom.png b/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_bottom.png deleted file mode 100644 index 3a9161e..0000000 Binary files a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_bottom.png and /dev/null differ diff --git a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_sides.png b/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_sides.png deleted file mode 100644 index b367644..0000000 Binary files a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_sides.png and /dev/null differ diff --git a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_top.png b/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_top.png deleted file mode 100644 index 438c934..0000000 Binary files a/mods/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_top.png and /dev/null differ diff --git a/mods/mesecons/mesecons_movestones/depends.txt b/mods/mesecons/mesecons_movestones/depends.txt deleted file mode 100644 index a596cf8..0000000 --- a/mods/mesecons/mesecons_movestones/depends.txt +++ /dev/null @@ -1,3 +0,0 @@ -mesecons -mesecons_materials -mesecons_mvps diff --git a/mods/mesecons/mesecons_movestones/init.lua b/mods/mesecons/mesecons_movestones/init.lua deleted file mode 100644 index e31f2d2..0000000 --- a/mods/mesecons/mesecons_movestones/init.lua +++ /dev/null @@ -1,216 +0,0 @@ --- MOVESTONE --- Non-sticky: --- Moves along mesecon lines --- Pushes all blocks in front of it --- --- Sticky one --- Moves along mesecon lines --- Pushes all block in front of it --- Pull all blocks in its back - -function mesecon:get_movestone_direction(pos) - getactivated = 0 - local lpos - local getactivated = 0 - local rules = { - {x=0, y=1, z=-1}, - {x=0, y=0, z=-1}, - {x=0, y=-1, z=-1}, - {x=0, y=1, z=1}, - {x=0, y=-1, z=1}, - {x=0, y=0, z=1}, - {x=1, y=0, z=0}, - {x=1, y=1, z=0}, - {x=1, y=-1, z=0}, - {x=-1, y=1, z=0}, - {x=-1, y=-1, z=0}, - {x=-1, y=0, z=0}} - - lpos = {x=pos.x+1, y=pos.y, z=pos.z} - for n = 1, 3 do - if mesecon:is_power_on(lpos, rules[n].x, rules[n].y, rules[n].z) then - return {x=0, y=0, z=-1} - end - end - - lpos = {x = pos.x-1, y = pos.y, z = pos.z} - for n=4, 6 do - if mesecon:is_power_on(lpos, rules[n].x, rules[n].y, rules[n].z) then - return {x=0, y=0, z=1} - end - end - - lpos = {x = pos.x, y = pos.y, z = pos.z+1} - for n=7, 9 do - if mesecon:is_power_on(lpos, rules[n].x, rules[n].y, rules[n].z) then - return {x=-1, y=0, z=0} - end - end - - lpos = {x = pos.x, y = pos.y, z = pos.z-1} - for n=10, 12 do - if mesecon:is_power_on(lpos, rules[n].x, rules[n].y, rules[n].z) then - return {x=1, y=0, z=0} - end - end -end - -minetest.register_node("mesecons_movestones:movestone", { - tiles = {"jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_arrows.png", "jeija_movestone_arrows.png"}, - paramtype2 = "facedir", - legacy_facedir_simple = true, - groups = {cracky=3}, - description="Movestone", - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - action_on = function (pos, node) - local direction=mesecon:get_movestone_direction(pos) - if not direction then return end - minetest.remove_node(pos) - mesecon:update_autoconnect(pos) - minetest.add_entity(pos, "mesecons_movestones:movestone_entity") - end - }} -}) - -minetest.register_entity("mesecons_movestones:movestone_entity", { - physical = false, - visual = "sprite", - textures = {"jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_arrows.png", "jeija_movestone_arrows.png"}, - collisionbox = {-0.5,-0.5,-0.5, 0.5, 0.5, 0.5}, - visual = "cube", - lastdir = {x=0, y=0, z=0}, - - on_punch = function(self, hitter) - self.object:remove() - hitter:get_inventory():add_item("main", "mesecons_movestones:movestone") - end, - - on_step = function(self, dtime) - local pos = self.object:getpos() - pos.x, pos.y, pos.z = math.floor(pos.x+0.5), math.floor(pos.y+0.5), math.floor(pos.z+0.5) - local direction = mesecon:get_movestone_direction(pos) - - if not direction then -- no mesecon power - --push only solid nodes - local name = minetest.get_node(pos).name - if name ~= "air" and name ~= "ignore" - and ((not minetest.registered_nodes[name]) - or minetest.registered_nodes[name].liquidtype == "none") then - mesecon:mvps_push(pos, self.lastdir, MOVESTONE_MAXIMUM_PUSH) - end - minetest.add_node(pos, {name="mesecons_movestones:movestone"}) - self.object:remove() - return - end - - local success, stack, oldstack = - mesecon:mvps_push(pos, direction, MOVESTONE_MAXIMUM_PUSH) - if not success then -- Too large stack/stopper in the way - minetest.add_node(pos, {name="mesecons_movestones:movestone"}) - self.object:remove() - return - else - mesecon:mvps_process_stack (stack) - mesecon:mvps_move_objects (pos, direction, oldstack) - self.lastdir = direction - end - - self.object:setvelocity({x=direction.x*2, y=direction.y*2, z=direction.z*2}) - end, -}) - -minetest.register_craft({ - output = "mesecons_movestones:movestone 2", - recipe = { - {"default:stone", "default:stone", "default:stone"}, - {"group:mesecon_conductor_craftable", "group:mesecon_conductor_craftable", "group:mesecon_conductor_craftable"}, - {"default:stone", "default:stone", "default:stone"}, - } -}) - - - --- STICKY_MOVESTONE - -minetest.register_node("mesecons_movestones:sticky_movestone", { - tiles = {"jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_sticky_movestone.png", "jeija_sticky_movestone.png"}, - inventory_image = minetest.inventorycube("jeija_sticky_movestone.png", "jeija_movestone_side.png", "jeija_movestone_side.png"), - paramtype2 = "facedir", - legacy_facedir_simple = true, - groups = {cracky=3}, - description="Sticky Movestone", - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - action_on = function (pos, node) - local direction=mesecon:get_movestone_direction(pos) - if not direction then return end - minetest.remove_node(pos) - mesecon:update_autoconnect(pos) - minetest.add_entity(pos, "mesecons_movestones:sticky_movestone_entity") - end - }} -}) - -minetest.register_craft({ - output = "mesecons_movestones:sticky_movestone 2", - recipe = { - {"mesecons_materials:glue", "mesecons_movestones:movestone", "mesecons_materials:glue"}, - } -}) - -minetest.register_entity("mesecons_movestones:sticky_movestone_entity", { - physical = false, - visual = "sprite", - textures = {"jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_sticky_movestone.png", "jeija_sticky_movestone.png"}, - collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - visual = "cube", - lastdir = {x=0, y=0, z=0}, - - on_punch = function(self, hitter) - self.object:remove() - hitter:get_inventory():add_item("main", 'mesecons_movestones:sticky_movestone') - end, - - on_step = function(self, dtime) - local pos = self.object:getpos() - pos.x, pos.y, pos.z = math.floor(pos.x+0.5), math.floor(pos.y+0.5), math.floor(pos.z+0.5) - local direction = mesecon:get_movestone_direction(pos) - - if not direction then -- no mesecon power - --push only solid nodes - local name = minetest.get_node(pos).name - if name ~= "air" and name ~= "ignore" - and ((not minetest.registered_nodes[name]) - or minetest.registered_nodes[name].liquidtype == "none") then - mesecon:mvps_push(pos, self.lastdir, MOVESTONE_MAXIMUM_PUSH) - --STICKY - mesecon:mvps_pull_all(pos, self.lastdir) - end - minetest.add_node(pos, {name="mesecons_movestones:sticky_movestone"}) - self.object:remove() - return - end - - local success, stack, oldstack = - mesecon:mvps_push(pos, direction, MOVESTONE_MAXIMUM_PUSH) - if not success then -- Too large stack/stopper in the way - minetest.add_node(pos, {name="mesecons_movestones:sticky_movestone"}) - self.object:remove() - return - else - mesecon:mvps_process_stack (stack) - mesecon:mvps_move_objects (pos, direction, oldstack) - self.lastdir = direction - end - - self.object:setvelocity({x=direction.x*2, y=direction.y*2, z=direction.z*2}) - - --STICKY - mesecon:mvps_pull_all(pos, direction) - end, -}) - - -mesecon:register_mvps_unmov("mesecons_movestones:movestone_entity") -mesecon:register_mvps_unmov("mesecons_movestones:sticky_movestone_entity") diff --git a/mods/mesecons/mesecons_movestones/textures/jeija_movestone_arrows.png b/mods/mesecons/mesecons_movestones/textures/jeija_movestone_arrows.png deleted file mode 100644 index 358c357..0000000 Binary files a/mods/mesecons/mesecons_movestones/textures/jeija_movestone_arrows.png and /dev/null differ diff --git a/mods/mesecons/mesecons_movestones/textures/jeija_movestone_side.png b/mods/mesecons/mesecons_movestones/textures/jeija_movestone_side.png deleted file mode 100644 index de753ef..0000000 Binary files a/mods/mesecons/mesecons_movestones/textures/jeija_movestone_side.png and /dev/null differ diff --git a/mods/mesecons/mesecons_movestones/textures/jeija_sticky_movestone.png b/mods/mesecons/mesecons_movestones/textures/jeija_sticky_movestone.png deleted file mode 100644 index 8953cf1..0000000 Binary files a/mods/mesecons/mesecons_movestones/textures/jeija_sticky_movestone.png and /dev/null differ diff --git a/mods/mesecons/mesecons_mvps/depends.txt b/mods/mesecons/mesecons_mvps/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_mvps/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_mvps/init.lua b/mods/mesecons/mesecons_mvps/init.lua deleted file mode 100644 index 00fabbe..0000000 --- a/mods/mesecons/mesecons_mvps/init.lua +++ /dev/null @@ -1,238 +0,0 @@ ---register stoppers for movestones/pistons - -mesecon.mvps_stoppers = {} -mesecon.mvps_unmov = {} -mesecon.on_mvps_move = {} - -function mesecon:is_mvps_stopper(node, pushdir, stack, stackid) - local get_stopper = mesecon.mvps_stoppers[node.name] - if type (get_stopper) == "function" then - get_stopper = get_stopper(node, pushdir, stack, stackid) - end - return get_stopper -end - -function mesecon:register_mvps_stopper(nodename, get_stopper) - if get_stopper == nil then - get_stopper = true - end - mesecon.mvps_stoppers[nodename] = get_stopper -end - --- Objects that cannot be moved (e.g. movestones) -function mesecon:register_mvps_unmov(objectname) - mesecon.mvps_unmov[objectname] = true; -end - -function mesecon:is_mvps_unmov(objectname) - return mesecon.mvps_unmov[objectname] -end - --- Functions to be called on mvps movement -function mesecon:register_on_mvps_move(callback) - mesecon.on_mvps_move[#mesecon.on_mvps_move+1] = callback -end - -local function on_mvps_move(moved_nodes) - for _, callback in ipairs(mesecon.on_mvps_move) do - callback(moved_nodes) - end -end - -function mesecon:mvps_process_stack(stack) - -- update mesecons for placed nodes ( has to be done after all nodes have been added ) - for _, n in ipairs(stack) do - nodeupdate(n.pos) - mesecon.on_placenode(n.pos, minetest.get_node(n.pos)) - mesecon:update_autoconnect(n.pos) - end -end - -function mesecon:mvps_get_stack(pos, dir, maximum) - -- determine the number of nodes to be pushed - local np = {x = pos.x, y = pos.y, z = pos.z} - local nodes = {} - while true do - local nn = minetest.get_node_or_nil(np) - if not nn or #nodes > maximum then - -- don't push at all, something is in the way (unloaded map or too many nodes) - return nil - end - - if nn.name == "air" - or (minetest.registered_nodes[nn.name] - and minetest.registered_nodes[nn.name].liquidtype ~= "none") then --is liquid - break - end - - table.insert (nodes, {node = nn, pos = np}) - - np = mesecon:addPosRule(np, dir) - end - return nodes -end - -function mesecon:mvps_push(pos, dir, maximum) -- pos: pos of mvps; dir: direction of push; maximum: maximum nodes to be pushed - local nodes = mesecon:mvps_get_stack(pos, dir, maximum) - - if not nodes then return end - -- determine if one of the nodes blocks the push - for id, n in ipairs(nodes) do - if mesecon:is_mvps_stopper(n.node, dir, nodes, id) then - return - end - end - - -- remove all nodes - for _, n in ipairs(nodes) do - n.meta = minetest.get_meta(n.pos):to_table() - minetest.remove_node(n.pos) - end - - -- update mesecons for removed nodes ( has to be done after all nodes have been removed ) - for _, n in ipairs(nodes) do - mesecon.on_dignode(n.pos, n.node) - mesecon:update_autoconnect(n.pos) - end - - -- add nodes - for _, n in ipairs(nodes) do - np = mesecon:addPosRule(n.pos, dir) - minetest.add_node(np, n.node) - minetest.get_meta(np):from_table(n.meta) - end - - local moved_nodes = {} - local oldstack = mesecon:tablecopy(nodes) - for i in ipairs(nodes) do - moved_nodes[i] = {} - moved_nodes[i].oldpos = nodes[i].pos - nodes[i].pos = mesecon:addPosRule(nodes[i].pos, dir) - moved_nodes[i].pos = nodes[i].pos - moved_nodes[i].node = nodes[i].node - moved_nodes[i].meta = nodes[i].meta - end - - on_mvps_move(moved_nodes) - - return true, nodes, oldstack -end - -mesecon:register_on_mvps_move(function(moved_nodes) - for _, n in ipairs(moved_nodes) do - mesecon.on_placenode(n.pos, n.node) - mesecon:update_autoconnect(n.pos) - end -end) - -function mesecon:mvps_pull_single(pos, dir) -- pos: pos of mvps; direction: direction of pull (matches push direction for sticky pistons) - np = mesecon:addPosRule(pos, dir) - nn = minetest.get_node(np) - - if ((not minetest.registered_nodes[nn.name]) --unregistered node - or minetest.registered_nodes[nn.name].liquidtype == "none") --non-liquid node - and not mesecon:is_mvps_stopper(nn, {x = -dir.x, y = -dir.y, z = -dir.z}, {{pos = np, node = nn}}, 1) then --non-stopper node - local meta = minetest.get_meta(np):to_table() - minetest.remove_node(np) - minetest.add_node(pos, nn) - minetest.get_meta(pos):from_table(meta) - - nodeupdate(np) - nodeupdate(pos) - mesecon.on_dignode(np, nn) - mesecon:update_autoconnect(np) - on_mvps_move({{pos = pos, oldpos = np, node = nn, meta = meta}}) - end - return {{pos = np, node = {param2 = 0, name = "air"}}, {pos = pos, node = nn}} -end - -function mesecon:mvps_pull_all(pos, direction) -- pos: pos of mvps; direction: direction of pull - local lpos = {x=pos.x-direction.x, y=pos.y-direction.y, z=pos.z-direction.z} -- 1 away - local lnode = minetest.get_node(lpos) - local lpos2 = {x=pos.x-direction.x*2, y=pos.y-direction.y*2, z=pos.z-direction.z*2} -- 2 away - local lnode2 = minetest.get_node(lpos2) - - --avoid pulling solid nodes - if lnode.name ~= "ignore" - and lnode.name ~= "air" - and ((not minetest.registered_nodes[lnode.name]) - or minetest.registered_nodes[lnode.name].liquidtype == "none") then - return - end - - --avoid pulling empty or liquid nodes - if lnode2.name == "ignore" - or lnode2.name == "air" - or (minetest.registered_nodes[lnode2.name] - and minetest.registered_nodes[lnode2.name].liquidtype ~= "none") then - return - end - - local moved_nodes = {} - local oldpos = {x=lpos2.x + direction.x, y=lpos2.y + direction.y, z=lpos2.z + direction.z} - repeat - lnode2 = minetest.get_node(lpos2) - local meta = minetest.get_meta(lnode2):to_table() - minetest.add_node(oldpos, lnode2) - minetest.get_meta(oldpos):from_table(meta) - moved_nodes[#moved_nodes+1] = {pos = oldpos, oldpos = lpos2, node = lnode2, meta = meta} - nodeupdate(oldpos) - oldpos = {x=lpos2.x, y=lpos2.y, z=lpos2.z} - lpos2.x = lpos2.x-direction.x - lpos2.y = lpos2.y-direction.y - lpos2.z = lpos2.z-direction.z - lnode = minetest.get_node(lpos2) - until lnode.name == "air" - or lnode.name == "ignore" - or (minetest.registered_nodes[lnode.name] - and minetest.registered_nodes[lnode.name].liquidtype ~= "none") - minetest.remove_node(oldpos) - mesecon.on_dignode(oldpos, lnode2) - mesecon:update_autoconnect(oldpos) - on_mvps_move(moved_nodes) -end - -function mesecon:mvps_move_objects(pos, dir, nodestack) - local objects_to_move = {} - - -- Move object at tip of stack - local pushpos = mesecon:addPosRule(pos, -- get pos at tip of stack - {x = dir.x * #nodestack, - y = dir.y * #nodestack, - z = dir.z * #nodestack}) - - - local objects = minetest.get_objects_inside_radius(pushpos, 1) - for _, obj in ipairs(objects) do - table.insert(objects_to_move, obj) - end - - -- Move objects lying/standing on the stack (before it was pushed - oldstack) - if tonumber(minetest.setting_get("movement_gravity")) > 0 and dir.y == 0 then - -- If gravity positive and dir horizontal, push players standing on the stack - for _, n in ipairs(nodestack) do - local p_above = mesecon:addPosRule(n.pos, {x=0, y=1, z=0}) - local objects = minetest.get_objects_inside_radius(p_above, 1) - for _, obj in ipairs(objects) do - table.insert(objects_to_move, obj) - end - end - end - - for _, obj in ipairs(objects_to_move) do - local entity = obj:get_luaentity() - if not entity or not mesecon:is_mvps_unmov(entity.name) then - local np = mesecon:addPosRule(obj:getpos(), dir) - - --move only if destination is not solid - local nn = minetest.get_node(np) - if not ((not minetest.registered_nodes[nn.name]) - or minetest.registered_nodes[nn.name].walkable) then - obj:setpos(np) - end - end - end -end - -mesecon:register_mvps_stopper("default:chest_locked") -mesecon:register_mvps_stopper("default:furnace") diff --git a/mods/mesecons/mesecons_noteblock/depends.txt b/mods/mesecons/mesecons_noteblock/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_noteblock/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_noteblock/init.lua b/mods/mesecons/mesecons_noteblock/init.lua deleted file mode 100644 index 3971076..0000000 --- a/mods/mesecons/mesecons_noteblock/init.lua +++ /dev/null @@ -1,79 +0,0 @@ -minetest.register_node("mesecons_noteblock:noteblock", { - description = "Noteblock", - tiles = {"mesecons_noteblock.png"}, - groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, - drawtype = "allfaces_optional", - visual_scale = 1.3, - paramtype="light", - after_place_node = function(pos) - minetest.add_node(pos, {name="mesecons_noteblock:noteblock", param2=0}) - end, - on_punch = function (pos, node) -- change sound when punched - local param2 = node.param2+1 - if param2==12 then param2=0 end - minetest.add_node(pos, {name = node.name, param2 = param2}) - mesecon.noteblock_play(pos, param2) - end, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector = { -- play sound when activated - action_on = function (pos, node) - mesecon.noteblock_play(pos, node.param2) - end - }} -}) - -minetest.register_craft({ - output = "mesecons_noteblock:noteblock 1", - recipe = { - {"group:wood", "group:wood", "group:wood"}, - {"group:mesecon_conductor_craftable", "default:steel_ingot", "group:mesecon_conductor_craftable"}, - {"group:wood", "group:wood", "group:wood"}, - } -}) - -mesecon.noteblock_play = function (pos, param2) - local soundname - if param2==8 then - soundname="mesecons_noteblock_a" - elseif param2==9 then - soundname="mesecons_noteblock_asharp" - elseif param2==10 then - soundname="mesecons_noteblock_b" - elseif param2==11 then - soundname="mesecons_noteblock_c" - elseif param2==0 then - soundname="mesecons_noteblock_csharp" - elseif param2==1 then - soundname="mesecons_noteblock_d" - elseif param2==2 then - soundname="mesecons_noteblock_dsharp" - elseif param2==3 then - soundname="mesecons_noteblock_e" - elseif param2==4 then - soundname="mesecons_noteblock_f" - elseif param2==5 then - soundname="mesecons_noteblock_fsharp" - elseif param2==6 then - soundname="mesecons_noteblock_g" - elseif param2==7 then - soundname="mesecons_noteblock_gsharp" - end - local block_below_name = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name - if block_below_name == "default:glass" then - soundname="mesecons_noteblock_hihat" - end - if block_below_name == "default:stone" then - soundname="mesecons_noteblock_kick" - end - if block_below_name == "default:chest" then - soundname="mesecons_noteblock_snare" - end - if block_below_name == "default:tree" then - soundname="mesecons_noteblock_crash" - end - if block_below_name == "default:wood" then - soundname="mesecons_noteblock_litecrash" - end - minetest.sound_play(soundname, - {pos = pos, gain = 1.0, max_hear_distance = 32,}) -end diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_a.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_a.ogg deleted file mode 100644 index 5668a8a..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_a.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_asharp.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_asharp.ogg deleted file mode 100644 index 4cd2dcc..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_asharp.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_b.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_b.ogg deleted file mode 100644 index 621a6b5..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_b.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_c.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_c.ogg deleted file mode 100644 index e235978..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_c.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_crash.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_crash.ogg deleted file mode 100644 index d33027a..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_crash.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_csharp.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_csharp.ogg deleted file mode 100644 index 50ba835..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_csharp.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_d.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_d.ogg deleted file mode 100644 index f1227ba..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_d.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_dsharp.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_dsharp.ogg deleted file mode 100644 index 817728e..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_dsharp.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_e.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_e.ogg deleted file mode 100644 index c91d1a6..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_e.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_f.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_f.ogg deleted file mode 100644 index 3f1eaea..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_f.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_fsharp.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_fsharp.ogg deleted file mode 100644 index 9f13797..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_fsharp.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_g.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_g.ogg deleted file mode 100644 index d2a90dd..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_g.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_gsharp.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_gsharp.ogg deleted file mode 100644 index 6177b8c..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_gsharp.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_hihat.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_hihat.ogg deleted file mode 100644 index d05a870..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_hihat.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg deleted file mode 100644 index 108e89e..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_litecrash.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_litecrash.ogg deleted file mode 100644 index 21aecfa..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_litecrash.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_snare.ogg b/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_snare.ogg deleted file mode 100644 index 25d7b78..0000000 Binary files a/mods/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_snare.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_noteblock/textures/mesecons_noteblock.png b/mods/mesecons/mesecons_noteblock/textures/mesecons_noteblock.png deleted file mode 100644 index d13e61b..0000000 Binary files a/mods/mesecons/mesecons_noteblock/textures/mesecons_noteblock.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/depends.txt b/mods/mesecons/mesecons_pistons/depends.txt deleted file mode 100644 index 01f085b..0000000 --- a/mods/mesecons/mesecons_pistons/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -mesecons_mvps diff --git a/mods/mesecons/mesecons_pistons/init.lua b/mods/mesecons/mesecons_pistons/init.lua deleted file mode 100644 index 7780fc9..0000000 --- a/mods/mesecons/mesecons_pistons/init.lua +++ /dev/null @@ -1,758 +0,0 @@ --- Get mesecon rules of pistons -piston_rules = -{{x=0, y=0, z=1}, --everything apart from z- (pusher side) - {x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=1, y=1, z=0}, - {x=1, y=-1, z=0}, - {x=-1, y=1, z=0}, - {x=-1, y=-1, z=0}, - {x=0, y=1, z=1}, - {x=0, y=-1, z=1}} - -local piston_up_rules = -{{x=0, y=0, z=-1}, --everything apart from y+ (pusher side) - {x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=0, y=0, z=1}, - {x=1, y=-1, z=0}, - {x=-1, y=-1, z=0}, - {x=0, y=-1, z=1}, - {x=0, y=-1, z=-1}} - -local piston_down_rules = -{{x=0, y=0, z=-1}, --everything apart from y- (pusher side) - {x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=0, y=0, z=1}, - {x=1, y=1, z=0}, - {x=-1, y=1, z=0}, - {x=0, y=1, z=1}, - {x=0, y=1, z=-1}} - -local piston_get_rules = function (node) - local rules = piston_rules - for i = 1, node.param2 do - rules = mesecon:rotate_rules_left(rules) - end - return rules -end - -piston_facedir_direction = function (node) - local rules = {{x = 0, y = 0, z = -1}} - for i = 1, node.param2 do - rules = mesecon:rotate_rules_left(rules) - end - return rules[1] -end - -piston_get_direction = function(dir, node) - if type(dir) == "function" then - return dir(node) - else - return dir - end -end - -local piston_remove_pusher = function(pos, node) - pistonspec = minetest.registered_nodes[node.name].mesecons_piston - if pushername == pistonspec.pusher then --make sure there actually is a pusher (for compatibility reasons mainly) - return - end - - dir = piston_get_direction(pistonspec.dir, node) - local pusherpos = mesecon:addPosRule(pos, dir) - local pushername = minetest.get_node(pusherpos).name - - minetest.remove_node(pusherpos) - minetest.sound_play("piston_retract", { - pos = pos, - max_hear_distance = 20, - gain = 0.3, - }) - nodeupdate(pusherpos) -end - -local piston_on = function(pos, node) - local pistonspec = minetest.registered_nodes[node.name].mesecons_piston - - local dir = piston_get_direction(pistonspec.dir, node) - local np = mesecon:addPosRule(pos, dir) - local success, stack, oldstack = mesecon:mvps_push(np, dir, PISTON_MAXIMUM_PUSH) - if success then - minetest.add_node(pos, {param2 = node.param2, name = pistonspec.onname}) - minetest.add_node(np, {param2 = node.param2, name = pistonspec.pusher}) - minetest.sound_play("piston_extend", { - pos = pos, - max_hear_distance = 20, - gain = 0.3, - }) - mesecon:mvps_process_stack (stack) - mesecon:mvps_move_objects (np, dir, oldstack) - end -end - -local piston_off = function(pos, node) - local pistonspec = minetest.registered_nodes[node.name].mesecons_piston - minetest.add_node(pos, {param2 = node.param2, name = pistonspec.offname}) - piston_remove_pusher(pos, node) - - if pistonspec.sticky then - dir = piston_get_direction(pistonspec.dir, node) - pullpos = mesecon:addPosRule(pos, dir) - stack = mesecon:mvps_pull_single(pullpos, dir) - mesecon:mvps_process_stack(pos, dir, stack) - end -end - -local piston_orientate = function(pos, placer) - -- not placed by player - if not placer then return end - - -- placer pitch in degrees - local pitch = placer:get_look_pitch() * (180 / math.pi) - - local node = minetest.get_node(pos) - local pistonspec = minetest.registered_nodes[node.name].mesecons_piston - if pitch > 55 then --looking upwards - minetest.add_node(pos, {name=pistonspec.piston_down}) - elseif pitch < -55 then --looking downwards - minetest.add_node(pos, {name=pistonspec.piston_up}) - end -end - - --- Horizontal pistons - -local pt = 3/16 -- pusher thickness - -local piston_pusher_box = { - type = "fixed", - fixed = { - {-2/16, -2/16, -.5 + pt, 2/16, 2/16, .5 + pt}, - {-.5 , -.5 , -.5 , .5 , .5 , -.5 + pt}, - } -} - -local piston_on_box = { - type = "fixed", - fixed = { - {-.5, -.5, -.5 + pt, .5, .5, .5} - } -} - - --- Normal (non-sticky) ones: - -local pistonspec_normal = { - offname = "mesecons_pistons:piston_normal_off", - onname = "mesecons_pistons:piston_normal_on", - dir = piston_facedir_direction, - pusher = "mesecons_pistons:piston_pusher_normal", - piston_down = "mesecons_pistons:piston_down_normal_off", - piston_up = "mesecons_pistons:piston_up_normal_off", -} - --- offstate -minetest.register_node("mesecons_pistons:piston_normal_off", { - description = "Piston", - tiles = { - "mesecons_piston_top.png", - "mesecons_piston_bottom.png", - "mesecons_piston_left.png", - "mesecons_piston_right.png", - "mesecons_piston_back.png", - "mesecons_piston_pusher_front.png" - }, - groups = {cracky = 3}, - paramtype2 = "facedir", - after_place_node = piston_orientate, - mesecons_piston = pistonspec_normal, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_on = piston_on, - rules = piston_get_rules - }} -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_normal_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_top.png", - "mesecons_piston_bottom.png", - "mesecons_piston_left.png", - "mesecons_piston_right.png", - "mesecons_piston_back.png", - "mesecons_piston_on_front.png" - }, - inventory_image = "mesecons_piston_top.png", - wield_image = "mesecons_piston_top.png", - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - drop = "mesecons_pistons:piston_normal_off", - after_dig_node = piston_remove_pusher, - node_box = piston_on_box, - selection_box = piston_on_box, - mesecons_piston = pistonspec_normal, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_off = piston_off, - rules = piston_get_rules - }} -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_pusher_normal", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_top.png", - "mesecons_piston_pusher_bottom.png", - "mesecons_piston_pusher_left.png", - "mesecons_piston_pusher_right.png", - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_front.png" - }, - paramtype = "light", - paramtype2 = "facedir", - diggable = false, - corresponding_piston = "mesecons_pistons:piston_normal_on", - selection_box = piston_pusher_box, - node_box = piston_pusher_box, -}) - --- Sticky ones - -local pistonspec_sticky = { - offname = "mesecons_pistons:piston_sticky_off", - onname = "mesecons_pistons:piston_sticky_on", - dir = piston_facedir_direction, - pusher = "mesecons_pistons:piston_pusher_sticky", - sticky = true, - piston_down = "mesecons_pistons:piston_down_sticky_off", - piston_up = "mesecons_pistons:piston_up_sticky_off", -} - --- offstate -minetest.register_node("mesecons_pistons:piston_sticky_off", { - description = "Sticky Piston", - tiles = { - "mesecons_piston_top.png", - "mesecons_piston_bottom.png", - "mesecons_piston_left.png", - "mesecons_piston_right.png", - "mesecons_piston_back.png", - "mesecons_piston_pusher_front_sticky.png" - }, - groups = {cracky = 3}, - paramtype2 = "facedir", - after_place_node = piston_orientate, - mesecons_piston = pistonspec_sticky, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_on = piston_on, - rules = piston_get_rules - }} -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_sticky_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_top.png", - "mesecons_piston_bottom.png", - "mesecons_piston_left.png", - "mesecons_piston_right.png", - "mesecons_piston_back.png", - "mesecons_piston_on_front.png" - }, - inventory_image = "mesecons_piston_top.png", - wield_image = "mesecons_piston_top.png", - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - drop = "mesecons_pistons:piston_normal_off", - after_dig_node = piston_remove_pusher, - node_box = piston_on_box, - selection_box = piston_on_box, - mesecons_piston = pistonspec_sticky, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_off = piston_off, - rules = piston_get_rules - }} -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_pusher_sticky", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_top.png", - "mesecons_piston_pusher_bottom.png", - "mesecons_piston_pusher_left.png", - "mesecons_piston_pusher_right.png", - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_front_sticky.png" - }, - paramtype = "light", - paramtype2 = "facedir", - diggable = false, - corresponding_piston = "mesecons_pistons:piston_sticky_on", - selection_box = piston_pusher_box, - node_box = piston_pusher_box, -}) - --- --- --- UP --- --- - -local piston_up_pusher_box = { - type = "fixed", - fixed = { - {-2/16, -.5 - pt, -2/16, 2/16, .5 - pt, 2/16}, - {-.5 , .5 - pt, -.5 , .5 , .5 , .5}, - } -} - -local piston_up_on_box = { - type = "fixed", - fixed = { - {-.5, -.5, -.5 , .5, .5-pt, .5} - } -} - --- Normal - -local pistonspec_normal_up = { - offname = "mesecons_pistons:piston_up_normal_off", - onname = "mesecons_pistons:piston_up_normal_on", - dir = {x = 0, y = 1, z = 0}, - pusher = "mesecons_pistons:piston_up_pusher_normal" -} - --- offstate -minetest.register_node("mesecons_pistons:piston_up_normal_off", { - tiles = { - "mesecons_piston_pusher_front.png", - "mesecons_piston_back.png", - "mesecons_piston_left.png^[transformR270", - "mesecons_piston_right.png^[transformR90", - "mesecons_piston_bottom.png", - "mesecons_piston_top.png^[transformR180", - }, - inventory_image = "mesecons_piston_top.png", - wield_image = "mesecons_piston_top.png", - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype2 = "facedir", - drop = "mesecons_pistons:piston_normal_off", - mesecons_piston = pistonspec_normal_up, - mesecons = {effector={ - action_on = piston_on, - rules = piston_up_rules, - }} -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_up_normal_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_on_front.png", - "mesecons_piston_back.png", - "mesecons_piston_left.png^[transformR270", - "mesecons_piston_right.png^[transformR90", - "mesecons_piston_bottom.png", - "mesecons_piston_top.png^[transformR180", - }, - inventory_image = "mesecons_piston_top.png", - wield_image = "mesecons_piston_top.png", - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - drop = "mesecons_pistons:piston_normal_off", - after_dig_node = piston_remove_pusher, - node_box = piston_up_on_box, - selection_box = piston_up_on_box, - mesecons_piston = pistonspec_normal_up, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_off = piston_off, - rules = piston_up_rules, - }} -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_up_pusher_normal", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_front.png", - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_left.png^[transformR270", - "mesecons_piston_pusher_right.png^[transformR90", - "mesecons_piston_pusher_bottom.png", - "mesecons_piston_pusher_top.png^[transformR180", - }, - paramtype = "light", - paramtype2 = "facedir", - diggable = false, - corresponding_piston = "mesecons_pistons:piston_up_normal_on", - selection_box = piston_up_pusher_box, - node_box = piston_up_pusher_box, -}) - - - --- Sticky - - -local pistonspec_sticky_up = { - offname = "mesecons_pistons:piston_up_sticky_off", - onname = "mesecons_pistons:piston_up_sticky_on", - dir = {x = 0, y = 1, z = 0}, - pusher = "mesecons_pistons:piston_up_pusher_sticky", - sticky = true -} - --- offstate -minetest.register_node("mesecons_pistons:piston_up_sticky_off", { - tiles = { - "mesecons_piston_pusher_front_sticky.png", - "mesecons_piston_back.png", - "mesecons_piston_left.png^[transformR270", - "mesecons_piston_right.png^[transformR90", - "mesecons_piston_bottom.png", - "mesecons_piston_top.png^[transformR180", - "mesecons_piston_tb.png" - }, - inventory_image = "mesecons_piston_top.png", - wield_image = "mesecons_piston_top.png", - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype2 = "facedir", - drop = "mesecons_pistons:piston_sticky_off", - mesecons_piston = pistonspec_sticky_up, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_on = piston_on, - rules = piston_up_rules, - }} -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_up_sticky_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_on_front.png", - "mesecons_piston_back.png", - "mesecons_piston_left.png^[transformR270", - "mesecons_piston_right.png^[transformR90", - "mesecons_piston_bottom.png", - "mesecons_piston_top.png^[transformR180", - }, - inventory_image = "mesecons_piston_top.png", - wield_image = "mesecons_piston_top.png", - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - drop = "mesecons_pistons:piston_normal_off", - after_dig_node = piston_remove_pusher, - node_box = piston_up_on_box, - selection_box = piston_up_on_box, - mesecons_piston = pistonspec_sticky_up, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_off = piston_off, - rules = piston_up_rules, - }} -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_up_pusher_sticky", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_front_sticky.png", - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_left.png^[transformR270", - "mesecons_piston_pusher_right.png^[transformR90", - "mesecons_piston_pusher_bottom.png", - "mesecons_piston_pusher_top.png^[transformR180", - }, - paramtype = "light", - paramtype2 = "facedir", - diggable = false, - corresponding_piston = "mesecons_pistons:piston_up_sticky_on", - selection_box = piston_up_pusher_box, - node_box = piston_up_pusher_box, -}) - --- --- --- DOWN --- --- - -local piston_down_pusher_box = { - type = "fixed", - fixed = { - {-2/16, -.5 + pt, -2/16, 2/16, .5 + pt, 2/16}, - {-.5 , -.5 , -.5 , .5 , -.5 + pt, .5}, - } -} - -local piston_down_on_box = { - type = "fixed", - fixed = { - {-.5, -.5+pt, -.5 , .5, .5, .5} - } -} - - - --- Normal - -local pistonspec_normal_down = { - offname = "mesecons_pistons:piston_down_normal_off", - onname = "mesecons_pistons:piston_down_normal_on", - dir = {x = 0, y = -1, z = 0}, - pusher = "mesecons_pistons:piston_down_pusher_normal", -} - --- offstate -minetest.register_node("mesecons_pistons:piston_down_normal_off", { - tiles = { - "mesecons_piston_back.png", - "mesecons_piston_pusher_front.png", - "mesecons_piston_left.png^[transformR90", - "mesecons_piston_right.png^[transformR270", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_top.png", - }, - inventory_image = "mesecons_piston_top.png", - wield_image = "mesecons_piston_top.png", - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype2 = "facedir", - drop = "mesecons_pistons:piston_normal_off", - mesecons_piston = pistonspec_normal_down, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_on = piston_on, - rules = piston_down_rules, - }} -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_down_normal_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_back.png", - "mesecons_piston_on_front.png", - "mesecons_piston_left.png^[transformR90", - "mesecons_piston_right.png^[transformR270", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_top.png", - }, - inventory_image = "mesecons_piston_top.png", - wield_image = "mesecons_piston_top.png", - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - drop = "mesecons_pistons:piston_normal_off", - after_dig_node = piston_remove_pusher, - node_box = piston_down_on_box, - selection_box = piston_down_on_box, - mesecons_piston = pistonspec_normal_down, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_off = piston_off, - rules = piston_down_rules, - }} -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_down_pusher_normal", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_front.png", - "mesecons_piston_pusher_left.png^[transformR90", - "mesecons_piston_pusher_right.png^[transformR270", - "mesecons_piston_pusher_bottom.png^[transformR180", - "mesecons_piston_pusher_top.png", - }, - paramtype = "light", - paramtype2 = "facedir", - diggable = false, - corresponding_piston = "mesecons_pistons:piston_down_normal_on", - selection_box = piston_down_pusher_box, - node_box = piston_down_pusher_box, -}) - --- Sticky - -local pistonspec_sticky_down = { - onname = "mesecons_pistons:piston_down_sticky_on", - offname = "mesecons_pistons:piston_down_sticky_off", - dir = {x = 0, y = -1, z = 0}, - pusher = "mesecons_pistons:piston_down_pusher_sticky", - sticky = true -} - --- offstate -minetest.register_node("mesecons_pistons:piston_down_sticky_off", { - tiles = { - "mesecons_piston_back.png", - "mesecons_piston_pusher_front_sticky.png", - "mesecons_piston_left.png^[transformR90", - "mesecons_piston_right.png^[transformR270", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_top.png", - }, - inventory_image = "mesecons_piston_top.png", - wield_image = "mesecons_piston_top.png", - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype2 = "facedir", - drop = "mesecons_pistons:piston_sticky_off", - mesecons_piston = pistonspec_sticky_down, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_on = piston_on, - rules = piston_down_rules, - }} -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_down_sticky_on", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_back.png", - "mesecons_piston_on_front.png", - "mesecons_piston_left.png^[transformR90", - "mesecons_piston_right.png^[transformR270", - "mesecons_piston_bottom.png^[transformR180", - "mesecons_piston_top.png", - }, - inventory_image = "mesecons_piston_top.png", - wield_image = "mesecons_piston_top.png", - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - drop = "mesecons_pistons:piston_sticky_off", - after_dig_node = piston_remove_pusher, - node_box = piston_down_on_box, - selection_box = piston_down_on_box, - mesecons_piston = pistonspec_sticky_down, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_off = piston_off, - rules = piston_down_rules, - }} -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_down_pusher_sticky", { - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_front_sticky.png", - "mesecons_piston_pusher_left.png^[transformR90", - "mesecons_piston_pusher_right.png^[transformR270", - "mesecons_piston_pusher_bottom.png^[transformR180", - "mesecons_piston_pusher_top.png", - }, - paramtype = "light", - paramtype2 = "facedir", - diggable = false, - corresponding_piston = "mesecons_pistons:piston_down_sticky_on", - selection_box = piston_down_pusher_box, - node_box = piston_down_pusher_box, -}) - - --- Register pushers as stoppers if they would be seperated from the piston -local piston_pusher_get_stopper = function (node, dir, stack, stackid) - if (stack[stackid + 1] - and stack[stackid + 1].node.name == minetest.registered_nodes[node.name].corresponding_piston - and stack[stackid + 1].node.param2 == node.param2) - or (stack[stackid - 1] - and stack[stackid - 1].node.name == minetest.registered_nodes[node.name].corresponding_piston - and stack[stackid - 1].node.param2 == node.param2) then - return false - end - return true -end - -local piston_pusher_up_down_get_stopper = function (node, dir, stack, stackid) - if (stack[stackid + 1] - and stack[stackid + 1].node.name == minetest.registered_nodes[node.name].corresponding_piston) - or (stack[stackid - 1] - and stack[stackid - 1].node.name == minetest.registered_nodes[node.name].corresponding_piston) then - return false - end - return true -end - -mesecon:register_mvps_stopper("mesecons_pistons:piston_pusher_normal", piston_pusher_get_stopper) -mesecon:register_mvps_stopper("mesecons_pistons:piston_pusher_sticky", piston_pusher_get_stopper) - -mesecon:register_mvps_stopper("mesecons_pistons:piston_up_pusher_normal", piston_pusher_up_down_get_stopper) -mesecon:register_mvps_stopper("mesecons_pistons:piston_up_pusher_sticky", piston_pusher_up_down_get_stopper) - -mesecon:register_mvps_stopper("mesecons_pistons:piston_down_pusher_normal", piston_pusher_up_down_get_stopper) -mesecon:register_mvps_stopper("mesecons_pistons:piston_down_pusher_sticky", piston_pusher_up_down_get_stopper) - - --- Register pistons as stoppers if they would be seperated from the stopper -local piston_up_down_get_stopper = function (node, dir, stack, stackid) - if (stack[stackid + 1] - and stack[stackid + 1].node.name == minetest.registered_nodes[node.name].mesecons_piston.pusher) - or (stack[stackid - 1] - and stack[stackid - 1].node.name == minetest.registered_nodes[node.name].mesecons_piston.pusher) then - return false - end - return true -end - -local piston_get_stopper = function (node, dir, stack, stackid) - pistonspec = minetest.registered_nodes[node.name].mesecons_piston - dir = piston_get_direction(pistonspec.dir, node) - local pusherpos = mesecon:addPosRule(stack[stackid].pos, dir) - local pushernode = minetest.get_node(pusherpos) - - if minetest.registered_nodes[node.name].mesecons_piston.pusher == pushernode.name then - for _, s in ipairs(stack) do - if mesecon:cmpPos(s.pos, pusherpos) -- pusher is also to be pushed - and s.node.param2 == node.param2 then - return false - end - end - end - return true -end - -mesecon:register_mvps_stopper("mesecons_pistons:piston_normal_on", piston_get_stopper) -mesecon:register_mvps_stopper("mesecons_pistons:piston_sticky_on", piston_get_stopper) - -mesecon:register_mvps_stopper("mesecons_pistons:piston_up_normal_on", piston_up_down_get_stopper) -mesecon:register_mvps_stopper("mesecons_pistons:piston_up_sticky_on", piston_up_down_get_stopper) - -mesecon:register_mvps_stopper("mesecons_pistons:piston_down_normal_on", piston_up_down_get_stopper) -mesecon:register_mvps_stopper("mesecons_pistons:piston_down_sticky_on", piston_up_down_get_stopper) - ---craft recipes -minetest.register_craft({ - output = "mesecons_pistons:piston_normal_off 2", - recipe = { - {"group:wood", "group:wood", "group:wood"}, - {"default:cobble", "default:steel_ingot", "default:cobble"}, - {"default:cobble", "group:mesecon_conductor_craftable", "default:cobble"}, - } -}) - -minetest.register_craft({ - output = "mesecons_pistons:piston_sticky_off", - recipe = { - {"mesecons_materials:glue"}, - {"mesecons_pistons:piston_normal_off"}, - } -}) diff --git a/mods/mesecons/mesecons_pistons/sounds/piston_extend.ogg b/mods/mesecons/mesecons_pistons/sounds/piston_extend.ogg deleted file mode 100644 index e234ad9..0000000 Binary files a/mods/mesecons/mesecons_pistons/sounds/piston_extend.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/sounds/piston_retract.ogg b/mods/mesecons/mesecons_pistons/sounds/piston_retract.ogg deleted file mode 100644 index feb9f04..0000000 Binary files a/mods/mesecons/mesecons_pistons/sounds/piston_retract.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_back.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_back.png deleted file mode 100644 index 6a57dce..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_back.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_bottom.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_bottom.png deleted file mode 100644 index 5a3af9b..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_bottom.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_left.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_left.png deleted file mode 100644 index 215dd73..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_left.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_on_front.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_on_front.png deleted file mode 100644 index 0ade67e..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_on_front.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_back.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_back.png deleted file mode 100644 index fe87943..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_back.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_bottom.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_bottom.png deleted file mode 100644 index 87c4e81..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_bottom.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front.png deleted file mode 100644 index 8ec9dc6..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front_sticky.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front_sticky.png deleted file mode 100644 index e38b4e6..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front_sticky.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_left.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_left.png deleted file mode 100644 index bc5495b..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_left.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_right.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_right.png deleted file mode 100644 index 32ee32f..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_right.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_top.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_top.png deleted file mode 100644 index 72f04e9..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_top.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_right.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_right.png deleted file mode 100644 index 176463c..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_right.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_top.png b/mods/mesecons/mesecons_pistons/textures/mesecons_piston_top.png deleted file mode 100644 index 5c8bace..0000000 Binary files a/mods/mesecons/mesecons_pistons/textures/mesecons_piston_top.png and /dev/null differ diff --git a/mods/mesecons/mesecons_powerplant/depends.txt b/mods/mesecons/mesecons_powerplant/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_powerplant/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_powerplant/init.lua b/mods/mesecons/mesecons_powerplant/init.lua deleted file mode 100644 index 9429487..0000000 --- a/mods/mesecons/mesecons_powerplant/init.lua +++ /dev/null @@ -1,31 +0,0 @@ --- The POWER_PLANT --- Just emits power. always. - -minetest.register_node("mesecons_powerplant:power_plant", { - drawtype = "plantlike", - visual_scale = 1, - tiles = {"jeija_power_plant.png"}, - inventory_image = "jeija_power_plant.png", - paramtype = "light", - walkable = false, - groups = {dig_immediate=3, mesecon = 2}, - light_source = LIGHT_MAX-9, - description="Power Plant", - selection_box = { - type = "fixed", - fixed = {-0.3, -0.5, -0.3, 0.3, -0.5+0.7, 0.3}, - }, - sounds = default.node_sound_leaves_defaults(), - mesecons = {receptor = { - state = mesecon.state.on - }} -}) - -minetest.register_craft({ - output = "mesecons_powerplant:power_plant 1", - recipe = { - {"group:mesecon_conductor_craftable"}, - {"group:mesecon_conductor_craftable"}, - {"default:sapling"}, - } -}) diff --git a/mods/mesecons/mesecons_powerplant/textures/jeija_power_plant.png b/mods/mesecons/mesecons_powerplant/textures/jeija_power_plant.png deleted file mode 100644 index edc8891..0000000 Binary files a/mods/mesecons/mesecons_powerplant/textures/jeija_power_plant.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/depends.txt b/mods/mesecons/mesecons_pressureplates/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_pressureplates/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_pressureplates/init.lua b/mods/mesecons/mesecons_pressureplates/init.lua deleted file mode 100644 index ec8d789..0000000 --- a/mods/mesecons/mesecons_pressureplates/init.lua +++ /dev/null @@ -1,127 +0,0 @@ -local pp_box_off = { - type = "fixed", - fixed = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, -} - -local pp_box_on = { - type = "fixed", - fixed = { -7/16, -8/16, -7/16, 7/16, -7.5/16, 7/16 }, -} - -pp_on_timer = function (pos, elapsed) - local node = minetest.get_node(pos) - local ppspec = minetest.registered_nodes[node.name].pressureplate - - -- This is a workaround for a strange bug that occurs when the server is started - -- For some reason the first time on_timer is called, the pos is wrong - if not ppspec then return end - - local objs = minetest.get_objects_inside_radius(pos, 1) - local two_below = mesecon:addPosRule(pos, {x = 0, y = -2, z = 0}) - - if objs[1] == nil and node.name == ppspec.onstate then - minetest.add_node(pos, {name = ppspec.offstate}) - mesecon:receptor_off(pos) - -- force deactivation of mesecon two blocks below (hacky) - if not mesecon:connected_to_receptor(two_below) then - mesecon:turnoff(two_below) - end - else - for k, obj in pairs(objs) do - local objpos = obj:getpos() - if objpos.y > pos.y-1 and objpos.y < pos.y then - minetest.add_node(pos, {name=ppspec.onstate}) - mesecon:receptor_on(pos) - -- force activation of mesecon two blocks below (hacky) - mesecon:turnon(two_below) - end - end - end - return true -end - --- Register a Pressure Plate --- offstate: name of the pressure plate when inactive --- onstate: name of the pressure plate when active --- description: description displayed in the player's inventory --- tiles_off: textures of the pressure plate when inactive --- tiles_on: textures of the pressure plate when active --- image: inventory and wield image of the pressure plate --- recipe: crafting recipe of the pressure plate - -function mesecon:register_pressure_plate(offstate, onstate, description, textures_off, textures_on, image_w, image_i, recipe) - local ppspec = { - offstate = offstate, - onstate = onstate - } - - minetest.register_node(offstate, { - drawtype = "nodebox", - tiles = textures_off, - inventory_image = image_i, - wield_image = image_w, - paramtype = "light", - selection_box = pp_box_off, - node_box = pp_box_off, - groups = {snappy = 2, oddly_breakable_by_hand = 3}, - description = description, - pressureplate = ppspec, - on_timer = pp_on_timer, - mesecons = {receptor = { - state = mesecon.state.off - }}, - on_construct = function(pos) - minetest.get_node_timer(pos):start(PRESSURE_PLATE_INTERVAL) - end, - }) - - minetest.register_node(onstate, { - drawtype = "nodebox", - tiles = textures_on, - paramtype = "light", - selection_box = pp_box_on, - node_box = pp_box_on, - groups = {snappy = 2, oddly_breakable_by_hand = 3, not_in_creative_inventory = 1}, - drop = offstate, - pressureplate = ppspec, - on_timer = pp_on_timer, - sounds = default.node_sound_wood_defaults(), - mesecons = {receptor = { - state = mesecon.state.on - }}, - on_construct = function(pos) - minetest.get_node_timer(pos):start(PRESSURE_PLATE_INTERVAL) - end, - after_dig_node = function(pos) - local two_below = mesecon:addPosRule(pos, {x = 0, y = -2, z = 0}) - if not mesecon:connected_to_receptor(two_below) then - mesecon:turnoff(two_below) - end - end - }) - - minetest.register_craft({ - output = offstate, - recipe = recipe, - }) -end - -mesecon:register_pressure_plate( - "mesecons_pressureplates:pressure_plate_wood_off", - "mesecons_pressureplates:pressure_plate_wood_on", - "Wooden Pressure Plate", - {"jeija_pressure_plate_wood_off.png","jeija_pressure_plate_wood_off.png","jeija_pressure_plate_wood_off_edges.png"}, - {"jeija_pressure_plate_wood_on.png","jeija_pressure_plate_wood_on.png","jeija_pressure_plate_wood_on_edges.png"}, - "jeija_pressure_plate_wood_wield.png", - "jeija_pressure_plate_wood_inv.png", - {{"group:wood", "group:wood"}}) - -mesecon:register_pressure_plate( - "mesecons_pressureplates:pressure_plate_stone_off", - "mesecons_pressureplates:pressure_plate_stone_on", - "Stone Pressure Plate", - {"jeija_pressure_plate_stone_off.png","jeija_pressure_plate_stone_off.png","jeija_pressure_plate_stone_off_edges.png"}, - {"jeija_pressure_plate_stone_on.png","jeija_pressure_plate_stone_on.png","jeija_pressure_plate_stone_on_edges.png"}, - "jeija_pressure_plate_stone_wield.png", - "jeija_pressure_plate_stone_inv.png", - {{"default:cobble", "default:cobble"}}) diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_inv.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_inv.png deleted file mode 100644 index bfe5a1d..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_inv.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off.png deleted file mode 100644 index 46140da..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off_edges.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off_edges.png deleted file mode 100644 index 2ad9acc..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off_edges.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on.png deleted file mode 100644 index dc64931..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on_edges.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on_edges.png deleted file mode 100644 index 51add95..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on_edges.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_wield.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_wield.png deleted file mode 100644 index c533567..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_wield.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_inv.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_inv.png deleted file mode 100644 index 36dacd0..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_inv.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off.png deleted file mode 100644 index ca98757..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off_edges.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off_edges.png deleted file mode 100644 index 665ae97..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off_edges.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on.png deleted file mode 100644 index e1a7d8e..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on_edges.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on_edges.png deleted file mode 100644 index 358f2ea..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on_edges.png and /dev/null differ diff --git a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_wield.png b/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_wield.png deleted file mode 100644 index 50b321d..0000000 Binary files a/mods/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_wield.png and /dev/null differ diff --git a/mods/mesecons/mesecons_random/depends.txt b/mods/mesecons/mesecons_random/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_random/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_random/init.lua b/mods/mesecons/mesecons_random/init.lua deleted file mode 100644 index 670bea4..0000000 --- a/mods/mesecons/mesecons_random/init.lua +++ /dev/null @@ -1,85 +0,0 @@ --- REMOVESTONE - -minetest.register_node("mesecons_random:removestone", { - tiles = {"jeija_removestone.png"}, - inventory_image = minetest.inventorycube("jeija_removestone_inv.png"), - groups = {cracky=3}, - description="Removestone", - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - action_on = function (pos, node) - minetest.remove_node(pos) - mesecon:update_autoconnect(pos) - end - }} -}) - -minetest.register_craft({ - output = 'mesecons_random:removestone 4', - recipe = { - {"", "default:cobble", ""}, - {"default:cobble", "group:mesecon_conductor_craftable", "default:cobble"}, - {"", "default:cobble", ""}, - } -}) - --- GHOSTSTONE - -minetest.register_node("mesecons_random:ghoststone", { - description="ghoststone", - tiles = {"jeija_ghoststone.png"}, - is_ground_content = true, - inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"), - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), - mesecons = {conductor = { - state = mesecon.state.off, - rules = { --axes - {x = -1, y = 0, z = 0}, - {x = 1, y = 0, z = 0}, - {x = 0, y = -1, z = 0}, - {x = 0, y = 1, z = 0}, - {x = 0, y = 0, z = -1}, - {x = 0, y = 0, z = 1}, - }, - onstate = "mesecons_random:ghoststone_active" - }} -}) - -minetest.register_node("mesecons_random:ghoststone_active", { - drawtype = "airlike", - pointable = false, - walkable = false, - diggable = false, - sunlight_propagates = true, - paramtype = "light", - mesecons = {conductor = { - state = mesecon.state.on, - rules = { - {x = -1, y = 0, z = 0}, - {x = 1, y = 0, z = 0}, - {x = 0, y = -1, z = 0}, - {x = 0, y = 1, z = 0}, - {x = 0, y = 0, z = -1}, - {x = 0, y = 0, z = 1}, - }, - offstate = "mesecons_random:ghoststone" - }}, - on_construct = function(pos) - --remove shadow - pos2 = {x = pos.x, y = pos.y + 1, z = pos.z} - if ( minetest.get_node(pos2).name == "air" ) then - minetest.dig_node(pos2) - end - end -}) - - -minetest.register_craft({ - output = 'mesecons_random:ghoststone 4', - recipe = { - {"default:steel_ingot", "default:cobble", "default:steel_ingot"}, - {"default:cobble", "group:mesecon_conductor_craftable", "default:cobble"}, - {"default:steel_ingot", "default:cobble", "default:steel_ingot"}, - } -}) diff --git a/mods/mesecons/mesecons_random/textures/jeija_ghoststone.png b/mods/mesecons/mesecons_random/textures/jeija_ghoststone.png deleted file mode 100644 index 1917b7c..0000000 Binary files a/mods/mesecons/mesecons_random/textures/jeija_ghoststone.png and /dev/null differ diff --git a/mods/mesecons/mesecons_random/textures/jeija_ghoststone_inv.png b/mods/mesecons/mesecons_random/textures/jeija_ghoststone_inv.png deleted file mode 100644 index c715d7f..0000000 Binary files a/mods/mesecons/mesecons_random/textures/jeija_ghoststone_inv.png and /dev/null differ diff --git a/mods/mesecons/mesecons_random/textures/jeija_removestone.png b/mods/mesecons/mesecons_random/textures/jeija_removestone.png deleted file mode 100644 index 1917b7c..0000000 Binary files a/mods/mesecons/mesecons_random/textures/jeija_removestone.png and /dev/null differ diff --git a/mods/mesecons/mesecons_random/textures/jeija_removestone_inv.png b/mods/mesecons/mesecons_random/textures/jeija_removestone_inv.png deleted file mode 100644 index c715d7f..0000000 Binary files a/mods/mesecons/mesecons_random/textures/jeija_removestone_inv.png and /dev/null differ diff --git a/mods/mesecons/mesecons_receiver/depends.txt b/mods/mesecons/mesecons_receiver/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_receiver/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_receiver/init.lua b/mods/mesecons/mesecons_receiver/init.lua deleted file mode 100644 index 3b1108e..0000000 --- a/mods/mesecons/mesecons_receiver/init.lua +++ /dev/null @@ -1,165 +0,0 @@ -rcvboxes = { - { -3/16, -3/16 , -8/16 , 3/16, 3/16, -13/32 }, -- the smaller bump - { -1/32, -1/32 , -3/2 , 1/32, 1/32, -1/2 }, -- the wire through the block - { -2/32, -.5-1/32, -.5 , 2/32, 0 , -.5002+3/32 }, -- the vertical wire bit - { -2/32, -17/32 , -7/16+0.002 , 2/32, -14/32, 16/32+0.001 } -- the horizontal wire -} - -local receiver_get_rules = function (node) - local rules = { {x = 1, y = 0, z = 0}, - {x = -2, y = 0, z = 0}} - if node.param2 == 2 then - rules = mesecon:rotate_rules_left(rules) - elseif node.param2 == 3 then - rules = mesecon:rotate_rules_right(mesecon:rotate_rules_right(rules)) - elseif node.param2 == 0 then - rules = mesecon:rotate_rules_right(rules) - end - return rules -end - -minetest.register_node("mesecons_receiver:receiver_on", { - drawtype = "nodebox", - tiles = { - "receiver_top_on.png", - "receiver_bottom_on.png", - "receiver_lr_on.png", - "receiver_lr_on.png", - "receiver_fb_on.png", - "receiver_fb_on.png", - }, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "fixed", - fixed = { -3/16, -8/16, -8/16, 3/16, 3/16, 8/16 } - }, - node_box = { - type = "fixed", - fixed = rcvboxes - }, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons:wire_00000000_off", - mesecons = {conductor = { - state = mesecon.state.on, - rules = receiver_get_rules, - offstate = "mesecons_receiver:receiver_off" - }} -}) - -minetest.register_node("mesecons_receiver:receiver_off", { - drawtype = "nodebox", - description = "You hacker you", - tiles = { - "receiver_top_off.png", - "receiver_bottom_off.png", - "receiver_lr_off.png", - "receiver_lr_off.png", - "receiver_fb_off.png", - "receiver_fb_off.png", - }, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "fixed", - fixed = { -3/16, -8/16, -8/16, 3/16, 3/16, 8/16 } - }, - node_box = { - type = "fixed", - fixed = rcvboxes - }, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons:wire_00000000_off", - mesecons = {conductor = { - state = mesecon.state.off, - rules = receiver_get_rules, - onstate = "mesecons_receiver:receiver_on" - }} -}) - -mesecon:add_rules("receiver_pos", {{x = 2, y = 0, z = 0}}) - -mesecon:add_rules("receiver_pos_all", { -{x = 2, y = 0, z = 0}, -{x =-2, y = 0, z = 0}, -{x = 0, y = 0, z = 2}, -{x = 0, y = 0, z =-2}}) - -function mesecon:receiver_get_pos_from_rcpt(pos, param2) - local rules = mesecon:get_rules("receiver_pos") - if param2 == nil then param2 = minetest.get_node(pos).param2 end - if param2 == 2 then - rules = mesecon:rotate_rules_left(rules) - elseif param2 == 3 then - rules = mesecon:rotate_rules_right(mesecon:rotate_rules_right(rules)) - elseif param2 == 0 then - rules = mesecon:rotate_rules_right(rules) - end - np = { - x = pos.x + rules[1].x, - y = pos.y + rules[1].y, - z = pos.z + rules[1].z} - return np -end - -function mesecon:receiver_place(rcpt_pos) - local node = minetest.get_node(rcpt_pos) - local pos = mesecon:receiver_get_pos_from_rcpt(rcpt_pos, node.param2) - local nn = minetest.get_node(pos) - - if string.find(nn.name, "mesecons:wire_") ~= nil then - minetest.dig_node(pos) - if mesecon:is_power_on(rcpt_pos) then - minetest.add_node(pos, {name = "mesecons_receiver:receiver_on", param2 = node.param2}) - mesecon:receptor_on(pos, receiver_get_rules(node)) - else - minetest.add_node(pos, {name = "mesecons_receiver:receiver_off", param2 = node.param2}) - end - mesecon:update_autoconnect(pos) - end -end - -function mesecon:receiver_remove(rcpt_pos, dugnode) - local pos = mesecon:receiver_get_pos_from_rcpt(rcpt_pos, dugnode.param2) - local nn = minetest.get_node(pos) - if string.find(nn.name, "mesecons_receiver:receiver_") ~=nil then - minetest.dig_node(pos) - local node = {name = "mesecons:wire_00000000_off"} - minetest.add_node(pos, node) - mesecon:update_autoconnect(pos) - mesecon.on_placenode(pos, node) - end -end - -minetest.register_on_placenode(function (pos, node) - if minetest.get_item_group(node.name, "mesecon_needs_receiver") == 1 then - mesecon:receiver_place(pos) - end -end) - -minetest.register_on_dignode(function(pos, node) - if minetest.get_item_group(node.name, "mesecon_needs_receiver") == 1 then - mesecon:receiver_remove(pos, node) - end -end) - -minetest.register_on_placenode(function (pos, node) - if string.find(node.name, "mesecons:wire_") ~=nil then - rules = mesecon:get_rules("receiver_pos_all") - local i = 1 - while rules[i] ~= nil do - np = { - x = pos.x + rules[i].x, - y = pos.y + rules[i].y, - z = pos.z + rules[i].z} - if minetest.get_item_group(minetest.get_node(np).name, "mesecon_needs_receiver") == 1 then - mesecon:receiver_place(np) - end - i = i + 1 - end - end -end) diff --git a/mods/mesecons/mesecons_receiver/textures/receiver_bottom_off.png b/mods/mesecons/mesecons_receiver/textures/receiver_bottom_off.png deleted file mode 100644 index b95903e..0000000 Binary files a/mods/mesecons/mesecons_receiver/textures/receiver_bottom_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_receiver/textures/receiver_bottom_on.png b/mods/mesecons/mesecons_receiver/textures/receiver_bottom_on.png deleted file mode 100644 index d0b7006..0000000 Binary files a/mods/mesecons/mesecons_receiver/textures/receiver_bottom_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_receiver/textures/receiver_fb_off.png b/mods/mesecons/mesecons_receiver/textures/receiver_fb_off.png deleted file mode 100644 index aed3008..0000000 Binary files a/mods/mesecons/mesecons_receiver/textures/receiver_fb_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_receiver/textures/receiver_fb_on.png b/mods/mesecons/mesecons_receiver/textures/receiver_fb_on.png deleted file mode 100644 index 0916736..0000000 Binary files a/mods/mesecons/mesecons_receiver/textures/receiver_fb_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_receiver/textures/receiver_lr_off.png b/mods/mesecons/mesecons_receiver/textures/receiver_lr_off.png deleted file mode 100644 index 1fb2b3a..0000000 Binary files a/mods/mesecons/mesecons_receiver/textures/receiver_lr_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_receiver/textures/receiver_lr_on.png b/mods/mesecons/mesecons_receiver/textures/receiver_lr_on.png deleted file mode 100644 index 087c0b4..0000000 Binary files a/mods/mesecons/mesecons_receiver/textures/receiver_lr_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_receiver/textures/receiver_top_off.png b/mods/mesecons/mesecons_receiver/textures/receiver_top_off.png deleted file mode 100644 index ae50106..0000000 Binary files a/mods/mesecons/mesecons_receiver/textures/receiver_top_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_receiver/textures/receiver_top_on.png b/mods/mesecons/mesecons_receiver/textures/receiver_top_on.png deleted file mode 100644 index 5b48cac..0000000 Binary files a/mods/mesecons/mesecons_receiver/textures/receiver_top_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_solarpanel/depends.txt b/mods/mesecons/mesecons_solarpanel/depends.txt deleted file mode 100644 index bc7b062..0000000 --- a/mods/mesecons/mesecons_solarpanel/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -mesecons_materials diff --git a/mods/mesecons/mesecons_solarpanel/init.lua b/mods/mesecons/mesecons_solarpanel/init.lua deleted file mode 100644 index c30fe12..0000000 --- a/mods/mesecons/mesecons_solarpanel/init.lua +++ /dev/null @@ -1,95 +0,0 @@ --- Solar Panel -minetest.register_node("mesecons_solarpanel:solar_panel_on", { - drawtype = "nodebox", - tiles = { "jeija_solar_panel.png", }, - inventory_image = "jeija_solar_panel.png", - wield_image = "jeija_solar_panel.png", - paramtype = "light", - paramtype2 = "wallmounted", - walkable = false, - is_ground_content = true, - node_box = { - type = "wallmounted", - wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, - wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, - wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, - }, - selection_box = { - type = "wallmounted", - wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, - wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, - wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, - }, - drop = "mesecons_solarpanel:solar_panel_off", - groups = {dig_immediate=3, not_in_creative_inventory = 1}, - sounds = default.node_sound_glass_defaults(), - mesecons = {receptor = { - state = mesecon.state.on - }} -}) - --- Solar Panel -minetest.register_node("mesecons_solarpanel:solar_panel_off", { - drawtype = "nodebox", - tiles = { "jeija_solar_panel.png", }, - inventory_image = "jeija_solar_panel.png", - wield_image = "jeija_solar_panel.png", - paramtype = "light", - paramtype2 = "wallmounted", - walkable = false, - is_ground_content = true, - node_box = { - type = "wallmounted", - wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, - wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, - wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, - }, - selection_box = { - type = "wallmounted", - wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, - wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, - wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, - }, - groups = {dig_immediate=3}, - description="Solar Panel", - sounds = default.node_sound_glass_defaults(), - mesecons = {receptor = { - state = mesecon.state.off - }} -}) - -minetest.register_craft({ - output = "mesecons_solarpanel:solar_panel_off 1", - recipe = { - {"mesecons_materials:silicon", "mesecons_materials:silicon"}, - {"mesecons_materials:silicon", "mesecons_materials:silicon"}, - } -}) - -minetest.register_abm( - {nodenames = {"mesecons_solarpanel:solar_panel_off"}, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local light = minetest.get_node_light(pos, nil) - - if light >= 12 then - minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_on", param2=node.param2}) - mesecon:receptor_on(pos) - end - end, -}) - -minetest.register_abm( - {nodenames = {"mesecons_solarpanel:solar_panel_on"}, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local light = minetest.get_node_light(pos, nil) - - if light < 12 then - minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_off", param2=node.param2}) - mesecon:receptor_off(pos) - end - end, -}) diff --git a/mods/mesecons/mesecons_solarpanel/textures/jeija_solar_panel.png b/mods/mesecons/mesecons_solarpanel/textures/jeija_solar_panel.png deleted file mode 100644 index a7b0f75..0000000 Binary files a/mods/mesecons/mesecons_solarpanel/textures/jeija_solar_panel.png and /dev/null differ diff --git a/mods/mesecons/mesecons_switch/depends.txt b/mods/mesecons/mesecons_switch/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_switch/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_switch/init.lua b/mods/mesecons/mesecons_switch/init.lua deleted file mode 100644 index 1b7f478..0000000 --- a/mods/mesecons/mesecons_switch/init.lua +++ /dev/null @@ -1,41 +0,0 @@ --- MESECON_SWITCH - -minetest.register_node("mesecons_switch:mesecon_switch_off", { - tiles = {"jeija_mesecon_switch_side.png", "jeija_mesecon_switch_side.png", "jeija_mesecon_switch_side.png", "jeija_mesecon_switch_side.png", "jeija_mesecon_switch_side.png", "jeija_mesecon_switch_off.png"}, - paramtype2="facedir", - groups = {dig_immediate=2}, - description="Switch", - sounds = default.node_sound_stone_defaults(), - mesecons = {receptor = { - state = mesecon.state.off - }}, - on_punch = function(pos, node) - minetest.swap_node(pos, {name = "mesecons_switch:mesecon_switch_on", param2 = node.param2}) - mesecon:receptor_on(pos) - minetest.sound_play("mesecons_switch", {pos=pos}) - end -}) - -minetest.register_node("mesecons_switch:mesecon_switch_on", { - tiles = {"jeija_mesecon_switch_side.png", "jeija_mesecon_switch_side.png", "jeija_mesecon_switch_side.png", "jeija_mesecon_switch_side.png", "jeija_mesecon_switch_side.png", "jeija_mesecon_switch_on.png"}, - paramtype2="facedir", - groups = {dig_immediate=2,not_in_creative_inventory=1}, - drop="mesecons_switch:mesecon_switch_off 1", - sounds = default.node_sound_stone_defaults(), - mesecons = {receptor = { - state = mesecon.state.on - }}, - on_punch = function(pos, node) - minetest.swap_node(pos, {name = "mesecons_switch:mesecon_switch_off", param2 = node.param2}) - mesecon:receptor_off(pos) - minetest.sound_play("mesecons_switch", {pos=pos}) - end -}) - -minetest.register_craft({ - output = "mesecons_switch:mesecon_switch_off 2", - recipe = { - {"default:steel_ingot", "default:cobble", "default:steel_ingot"}, - {"group:mesecon_conductor_craftable","", "group:mesecon_conductor_craftable"}, - } -}) diff --git a/mods/mesecons/mesecons_switch/sounds/mesecons_switch.ogg b/mods/mesecons/mesecons_switch/sounds/mesecons_switch.ogg deleted file mode 100644 index 53d45c1..0000000 Binary files a/mods/mesecons/mesecons_switch/sounds/mesecons_switch.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_torch/depends.txt b/mods/mesecons/mesecons_torch/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mods/mesecons/mesecons_torch/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mods/mesecons/mesecons_torch/init.lua b/mods/mesecons/mesecons_torch/init.lua deleted file mode 100644 index 97a2991..0000000 --- a/mods/mesecons/mesecons_torch/init.lua +++ /dev/null @@ -1,118 +0,0 @@ ---MESECON TORCHES - -local rotate_torch_rules = function (rules, param2) - if param2 == 5 then - return mesecon:rotate_rules_right(rules) - elseif param2 == 2 then - return mesecon:rotate_rules_right(mesecon:rotate_rules_right(rules)) --180 degrees - elseif param2 == 4 then - return mesecon:rotate_rules_left(rules) - elseif param2 == 1 then - return mesecon:rotate_rules_down(rules) - elseif param2 == 0 then - return mesecon:rotate_rules_up(rules) - else - return rules - end -end - -local torch_get_output_rules = function(node) - local rules = { - {x = 1, y = 0, z = 0}, - {x = 0, y = 0, z = 1}, - {x = 0, y = 0, z =-1}, - {x = 0, y = 1, z = 0}, - {x = 0, y =-1, z = 0}} - - return rotate_torch_rules(rules, node.param2) -end - -local torch_get_input_rules = function(node) - local rules = {{x = -2, y = 0, z = 0}, - {x = -1, y = 1, z = 0}} - - return rotate_torch_rules(rules, node.param2) -end - -minetest.register_craft({ - output = "mesecons_torch:mesecon_torch_on 4", - recipe = { - {"group:mesecon_conductor_craftable"}, - {"default:stick"},} -}) - -local torch_selectionbox = -{ - type = "wallmounted", - wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1}, - wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1}, - wall_side = {-0.5, -0.1, -0.1, -0.5+0.6, 0.1, 0.1}, -} - -minetest.register_node("mesecons_torch:mesecon_torch_off", { - drawtype = "torchlike", - tiles = {"jeija_torches_off.png", "jeija_torches_off_ceiling.png", "jeija_torches_off_side.png"}, - inventory_image = "jeija_torches_off.png", - paramtype = "light", - walkable = false, - paramtype2 = "wallmounted", - selection_box = torch_selectionbox, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons_torch:mesecon_torch_on", - mesecons = {receptor = { - state = mesecon.state.off, - rules = torch_get_output_rules - }} -}) - -minetest.register_node("mesecons_torch:mesecon_torch_on", { - drawtype = "torchlike", - tiles = {"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, - paramtype2 = "wallmounted", - selection_box = torch_selectionbox, - groups = {dig_immediate=3}, - light_source = LIGHT_MAX-5, - description="Mesecon Torch", - mesecons = {receptor = { - state = mesecon.state.on, - rules = torch_get_output_rules - }}, -}) - -minetest.register_abm({ - nodenames = {"mesecons_torch:mesecon_torch_off","mesecons_torch:mesecon_torch_on"}, - interval = 1, - chance = 1, - action = function(pos, node) - local is_powered = false - for _, rule in ipairs(torch_get_input_rules(node)) do - local src = mesecon:addPosRule(pos, rule) - if mesecon:is_power_on(src) then - is_powered = true - end - end - - if is_powered then - if node.name == "mesecons_torch:mesecon_torch_on" then - minetest.swap_node(pos, {name = "mesecons_torch:mesecon_torch_off", param2 = node.param2}) - mesecon:receptor_off(pos, torch_get_output_rules(node)) - end - elseif node.name == "mesecons_torch:mesecon_torch_off" then - minetest.swap_node(pos, {name = "mesecons_torch:mesecon_torch_on", param2 = node.param2}) - mesecon:receptor_on(pos, torch_get_output_rules(node)) - end - end -}) - --- Param2 Table (Block Attached To) --- 5 = z-1 --- 3 = x-1 --- 4 = z+1 --- 2 = x+1 --- 0 = y+1 --- 1 = y-1 diff --git a/mods/mesecons/mesecons_torch/textures/jeija_torches_off.png b/mods/mesecons/mesecons_torch/textures/jeija_torches_off.png deleted file mode 100644 index 537920c..0000000 Binary files a/mods/mesecons/mesecons_torch/textures/jeija_torches_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_torch/textures/jeija_torches_off_ceiling.png b/mods/mesecons/mesecons_torch/textures/jeija_torches_off_ceiling.png deleted file mode 100644 index 3934e6e..0000000 Binary files a/mods/mesecons/mesecons_torch/textures/jeija_torches_off_ceiling.png and /dev/null differ diff --git a/mods/mesecons/mesecons_torch/textures/jeija_torches_off_side.png b/mods/mesecons/mesecons_torch/textures/jeija_torches_off_side.png deleted file mode 100644 index ecb2951..0000000 Binary files a/mods/mesecons/mesecons_torch/textures/jeija_torches_off_side.png and /dev/null differ diff --git a/mods/mesecons/mesecons_torch/textures/jeija_torches_on.png b/mods/mesecons/mesecons_torch/textures/jeija_torches_on.png deleted file mode 100644 index a93dcc2..0000000 Binary files a/mods/mesecons/mesecons_torch/textures/jeija_torches_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_torch/textures/jeija_torches_on_ceiling.png b/mods/mesecons/mesecons_torch/textures/jeija_torches_on_ceiling.png deleted file mode 100644 index 24fe201..0000000 Binary files a/mods/mesecons/mesecons_torch/textures/jeija_torches_on_ceiling.png and /dev/null differ diff --git a/mods/mesecons/mesecons_torch/textures/jeija_torches_on_side.png b/mods/mesecons/mesecons_torch/textures/jeija_torches_on_side.png deleted file mode 100644 index fe7dfd2..0000000 Binary files a/mods/mesecons/mesecons_torch/textures/jeija_torches_on_side.png and /dev/null differ diff --git a/mods/mesecons/mesecons_walllever/depends.txt b/mods/mesecons/mesecons_walllever/depends.txt deleted file mode 100644 index 19c798c..0000000 --- a/mods/mesecons/mesecons_walllever/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -mesecons_receiver diff --git a/mods/mesecons/mesecons_walllever/init.lua b/mods/mesecons/mesecons_walllever/init.lua deleted file mode 100644 index a35d9f1..0000000 --- a/mods/mesecons/mesecons_walllever/init.lua +++ /dev/null @@ -1,95 +0,0 @@ --- WALL LEVER --- Basically a switch that can be attached to a wall --- Powers the block 2 nodes behind (using a receiver) -minetest.register_node("mesecons_walllever:wall_lever_off", { - drawtype = "nodebox", - tiles = { - "jeija_wall_lever_tb.png", - "jeija_wall_lever_bottom.png", - "jeija_wall_lever_sides.png", - "jeija_wall_lever_sides.png", - "jeija_wall_lever_back.png", - "jeija_wall_lever_off.png", - }, - inventory_image = "jeija_wall_lever_off.png", - wield_image = "jeija_wall_lever_off.png", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, 3/16, 8/16, 8/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = {{ -6/16, -6/16, 6/16, 6/16, 6/16, 8/16 }, -- the base "slab" - { -5/16, -3/16, 5/16, 5/16, 3/16, 6/16 }, -- the lighted ring area - { -4/16, -2/16, 4/16, 4/16, 2/16, 5/16 }, -- the raised bit that the lever "sits" on - { -2/16, -1/16, 3/16, 2/16, 1/16, 4/16 }, -- the lever "hinge" - { -1/16, -8/16, 4/16, 1/16, 0, 6/16 }} -- the lever itself. - }, - groups = {dig_immediate=2, mesecon_needs_receiver = 1}, - description="Lever", - on_punch = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_walllever:wall_lever_on", param2 = node.param2}) - mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node)) - minetest.sound_play("mesecons_lever", {pos=pos}) - end, - sounds = default.node_sound_wood_defaults(), - mesecons = {receptor = { - rules = mesecon.rules.buttonlike_get, - state = mesecon.state.off - }} -}) -minetest.register_node("mesecons_walllever:wall_lever_on", { - drawtype = "nodebox", - tiles = { - "jeija_wall_lever_top.png", - "jeija_wall_lever_tb.png", - "jeija_wall_lever_sides.png", - "jeija_wall_lever_sides.png", - "jeija_wall_lever_back.png", - "jeija_wall_lever_on.png", - }, - inventory_image = "jeija_wall_lever_on.png", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - walkable = false, - light_source = LIGHT_MAX-7, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, 3/16, 8/16, 8/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = {{ -6/16, -6/16, 6/16, 6/16, 6/16, 8/16 }, -- the base "slab" - { -5/16, -3/16, 5/16, 5/16, 3/16, 6/16 }, -- the lighted ring area - { -4/16, -2/16, 4/16, 4/16, 2/16, 5/16 }, -- the raised bit that the lever "sits" on - { -2/16, -1/16, 3/16, 2/16, 1/16, 4/16 }, -- the lever "hinge" - { -1/16, 0, 4/16, 1/16, 8/16, 6/16 }} -- the lever itself. - }, - groups = {dig_immediate = 2, not_in_creative_inventory = 1, mesecon_needs_receiver = 1}, - drop = "mesecons_walllever:wall_lever_off 1", - description="Lever", - on_punch = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_walllever:wall_lever_off", param2 = node.param2}) - mesecon:receptor_off(pos, mesecon.rules.buttonlike_get(node)) - minetest.sound_play("mesecons_lever", {pos=pos}) - end, - sounds = default.node_sound_wood_defaults(), - mesecons = {receptor = { - rules = mesecon.rules.buttonlike_get, - state = mesecon.state.on - }} -}) - -minetest.register_craft({ - output = "mesecons_walllever:wall_lever_off 2", - recipe = { - {"group:mesecon_conductor_craftable"}, - {"default:stone"}, - {"default:stick"}, - } -}) diff --git a/mods/mesecons/mesecons_walllever/sounds/mesecons_lever.ogg b/mods/mesecons/mesecons_walllever/sounds/mesecons_lever.ogg deleted file mode 100644 index 53d45c1..0000000 Binary files a/mods/mesecons/mesecons_walllever/sounds/mesecons_lever.ogg and /dev/null differ diff --git a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_back.png b/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_back.png deleted file mode 100644 index 9047e70..0000000 Binary files a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_back.png and /dev/null differ diff --git a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_bottom.png b/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_bottom.png deleted file mode 100644 index 041da96..0000000 Binary files a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_bottom.png and /dev/null differ diff --git a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_off.png b/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_off.png deleted file mode 100644 index 474f8c1..0000000 Binary files a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_off.png and /dev/null differ diff --git a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_on.png b/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_on.png deleted file mode 100644 index 01cbc24..0000000 Binary files a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_on.png and /dev/null differ diff --git a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_sides.png b/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_sides.png deleted file mode 100644 index 5864f26..0000000 Binary files a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_sides.png and /dev/null differ diff --git a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_tb.png b/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_tb.png deleted file mode 100644 index 50348d3..0000000 Binary files a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_tb.png and /dev/null differ diff --git a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_top.png b/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_top.png deleted file mode 100644 index 31161ec..0000000 Binary files a/mods/mesecons/mesecons_walllever/textures/jeija_wall_lever_top.png and /dev/null differ diff --git a/mods/mesecons/modpack.txt b/mods/mesecons/modpack.txt deleted file mode 100644 index 33d91f5..0000000 --- a/mods/mesecons/modpack.txt +++ /dev/null @@ -1 +0,0 @@ -The presence of this file indicates that the current folder is a modpack. \ No newline at end of file diff --git a/mods/mesecons_wireless/init.lua b/mods/mesecons_wireless/init.lua index a8cda3b..f63cd36 100644 --- a/mods/mesecons_wireless/init.lua +++ b/mods/mesecons_wireless/init.lua @@ -1,30 +1,19 @@ + local wireless_filename=minetest.get_worldpath() .. "/wireless" -local formspec = "size[9,1.5]" .. - "field[0.3,0;9,2;channel;Channel;${channel}]".. - "button_exit[7,0;2,3;save;Save]" - -local function formspec_handling (fields) - if fields.save == nil then - return true - else - return false - end -end - local function read_file() local f = io.open(wireless_filename, "r") if f==nil then return {} end - local t = f:read("*all") - f:close() + local t = f:read("*all") + f:close() if t=="" or t==nil then return {} end return minetest.deserialize(t) end local function write_file(tbl) local f = io.open(wireless_filename, "w") - f:write(minetest.serialize(tbl)) - f:close() + f:write(minetest.serialize(tbl)) + f:close() end local function add_wireless_receiver(pos,channel) @@ -75,12 +64,11 @@ minetest.register_node("mesecons_wireless:emitter", { tiles = {"mesecons_wireless_emitter.png"}, walkable = true, on_construct = function(pos) - local meta = minetest.get_meta(pos) + local meta = minetest.env:get_meta(pos) meta:set_string("channel","") - meta:set_string("formspec", formspec) + meta:set_string("formspec","size[9,1;]field[0,0.5;9,1;channel;Channel:;${channel}]") end, on_receive_fields = function(pos,formname,fields,sender) - if formspec_handling(fields) == true then return end local meta = minetest.env:get_meta(pos) meta:set_string("channel",fields.channel) end, @@ -91,21 +79,21 @@ minetest.register_node("mesecons_wireless:emitter", { effector = { action_on = function(pos) - local meta = minetest.get_meta(pos) + local meta = minetest.env:get_meta(pos) local channel = meta:get_string("channel") local w = get_wireless_receivers(channel) for _,i in ipairs(w) do mesecon:receptor_on(i) - minetest.swap_node(i, {name = "mesecons_wireless:receiver_on"}) + mesecon:swap_node(i, "mesecons_wireless:receiver_on") end end, action_off = function(pos) - local meta = minetest.get_meta(pos) + local meta = minetest.env:get_meta(pos) local channel = meta:get_string("channel") local w = get_wireless_receivers(channel) for _,i in ipairs(w) do mesecon:receptor_off(i) - minetest.swap_node(i, {name = "mesecons_wireless:receiver"}) + mesecon:swap_node(i, "mesecons_wireless:receiver") end end, } @@ -119,14 +107,13 @@ minetest.register_node("mesecons_wireless:receiver", { tiles = {"mesecons_wireless_receiver.png"}, walkable = true, on_construct = function(pos) - local meta = minetest.get_meta(pos) + local meta = minetest.env:get_meta(pos) meta:set_string("channel","") - meta:set_string("formspec", formspec) + meta:set_string("formspec","size[9,1;]field[0,0.5;9,1;channel;Channel:;${channel}]") add_wireless_receiver(pos,"") end, on_receive_fields = function(pos,formname,fields,sender) - if formspec_handling(fields) == true then return end - local meta = minetest.get_meta(pos) + local meta = minetest.env:get_meta(pos) meta:set_string("channel",fields.channel) remove_wireless_receiver(pos) add_wireless_receiver(pos,fields.channel) @@ -152,14 +139,13 @@ minetest.register_node("mesecons_wireless:receiver_on", { tiles = {"mesecons_wireless_receiver_on.png"}, walkable = true, on_construct = function(pos) - local meta = minetest.get_meta(pos) + local meta = minetest.env:get_meta(pos) meta:set_string("channel","") - meta:set_string("formspec", formspec) + meta:set_string("formspec","size[9,1;]field[0,0.5;9,1;channel;Channel:;${channel}]") add_wireless_receiver(pos,"") end, on_receive_fields = function(pos,formname,fields,sender) - if formspec_handling(fields) == true then return end - local meta = minetest.get_meta(pos) + local meta = minetest.env:get_meta(pos) meta:set_string("channel",fields.channel) remove_wireless_receiver(pos) add_wireless_receiver(pos,fields.channel) diff --git a/mods/moreblocks b/mods/moreblocks new file mode 160000 index 0000000..524dcb1 --- /dev/null +++ b/mods/moreblocks @@ -0,0 +1 @@ +Subproject commit 524dcb1396aa9df0f60c6f74d91c2e24c19e9ad6 diff --git a/mods/moreblocks/LICENSE.txt b/mods/moreblocks/LICENSE.txt deleted file mode 100644 index f42bd64..0000000 --- a/mods/moreblocks/LICENSE.txt +++ /dev/null @@ -1,13 +0,0 @@ -+---- zlib/libpng license ----+ - -Copyright (c) 2013 Calinou - -This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. diff --git a/mods/moreblocks/README.txt b/mods/moreblocks/README.txt deleted file mode 100644 index 4c15581..0000000 --- a/mods/moreblocks/README.txt +++ /dev/null @@ -1,22 +0,0 @@ -Calinou's Minetest Mods -===================== - -Calinou's Mods for Minetest [http://minetest.net], a free and opensource Minecraft-like game. - -This Git repository is mostly made for servers; it allows easy updating. - -To install, just clone this repository somewhere, then copy the "calinou_mods" folder in the "mods/minetest" folder of Minetest's installation folder. - - - -Misc stuff -===================== - -All these mods' source codes, except More Ores are under the zlib/libpng license. More Ores is under the GNU GPLv3; the mods' textures are under the CC BY-SA 3.0 Unported. - -Mods' forum threads: -More Blocks: http://minetest.net/forum/viewtopic.php?id=509 -More Ores: http://minetest.net/forum/viewtopic.php?id=549 -Map Tools: http://minetest.net/forum/viewtopic.php?id=1882 -Doors+: http://minetest.net/forum/viewtopic.php?id=2059 -Stairs+: http://minetest.net/forum/viewtopic.php?id=2092 diff --git a/mods/moreblocks/_config.txt b/mods/moreblocks/_config.txt deleted file mode 100644 index a7e6fcd..0000000 --- a/mods/moreblocks/_config.txt +++ /dev/null @@ -1,17 +0,0 @@ ------------------------------------------------------------------------------- ------------------------------- CONFIGURATION --------------------------------- ------------------------------------------------------------------------------- - ------------------------------------------------------------------------------- --------- Change settings by changing the values after the "=". --------------- ------------------------------------------------------------------------------- - - --- Whether to direct wood based on player yaw when placing the block (true or false) -wood_facedir = true - --- Allow stair/slab crafting without a circular saw or not (true or false) -allow_stair_slab_crafting = true - --- Show stairs/slabs/panels/microblocks in creative inventory (true or false) -show_stairsplus_creative_inv = false diff --git a/mods/moreblocks/aliases.lua b/mods/moreblocks/aliases.lua deleted file mode 100644 index 5df0a33..0000000 --- a/mods/moreblocks/aliases.lua +++ /dev/null @@ -1,188 +0,0 @@ --- Aliases (some of them are about the default mod, some about moreblocks) - --- Additional default aliases - -minetest.register_alias("woodpick", "default:pick_wood") -minetest.register_alias("woodenpick", "default:pick_wood") -minetest.register_alias("stonepick", "default:pick_stone") -minetest.register_alias("steelpick", "default:pick_steel") -minetest.register_alias("ironpick", "default:pick_steel") -minetest.register_alias("mesepick", "default:pick_mese") - -minetest.register_alias("woodaxe", "default:axe_wood") -minetest.register_alias("woodenaxe", "default:axe_wood") -minetest.register_alias("stoneaxe", "default:axe_stone") -minetest.register_alias("steelaxe", "default:axe_steel") -minetest.register_alias("ironaxe", "default:axe_steel") - -minetest.register_alias("woodshovel", "default:shovel_wood") -minetest.register_alias("woodenshovel", "default:shovel_wood") -minetest.register_alias("stoneshovel", "default:shovel_stone") -minetest.register_alias("steelshovel", "default:shovel_steel") -minetest.register_alias("ironshovel", "default:shovel_steel") - -minetest.register_alias("woodsword", "default:sword_wood") -minetest.register_alias("woodensword", "default:sword_wood") -minetest.register_alias("stonesword", "default:sword_stone") -minetest.register_alias("steelsword", "default:sword_steel") -minetest.register_alias("ironsword", "default:sword_steel") - -minetest.register_alias("grass", "default:dirt_with_grass") -minetest.register_alias("grassblock", "default:dirt_with_grass") -minetest.register_alias("grass_block", "default:dirt_with_grass") - -minetest.register_alias("grassfootsteps", "default:dirt_with_grass_footsteps") -minetest.register_alias("grass_footsteps", "default:dirt_with_grass_footsteps") - -minetest.register_alias("jungle_tree", "default:jungletree") - -minetest.register_alias("stick", "default:stick") -minetest.register_alias("sign", "default:sign_wall") -minetest.register_alias("fence", "default:fence_wood") -minetest.register_alias("coal", "default:coal_lump") -minetest.register_alias("iron", "default:iron_lump") -minetest.register_alias("clay", "default:clay_lump") -minetest.register_alias("steel", "default:steel_ingot") -minetest.register_alias("steel_block", "default:steelblock") - -minetest.register_alias("stonebrick", "default:stonebrick") -minetest.register_alias("stonebricks", "default:stonebrick") -minetest.register_alias("stone_brick", "default:stonebrick") -minetest.register_alias("stone_bricks", "default:stonebrick") - -minetest.register_alias("screwdriver", "screwdriver:screwdriver") -minetest.register_alias("screw_driver", "screwdriver:screw_driver") -minetest.register_alias("screwdrive", "screwdriver:screw_driver") -minetest.register_alias("screw_drive", "screwdriver:screw_driver") -minetest.register_alias("sd", "screwdriver:screw_driver") - - -minetest.register_alias("obsidian", "default:obsidian") -minetest.register_alias("obsidianglass", "default:obsidian_glass") -minetest.register_alias("obsidian_glass", "default:obsidian_glass") - --- More Blocks aliases - -minetest.register_alias("circlestonebrick", "moreblocks:circle_stone_bricks") -minetest.register_alias("circlestonebricks", "moreblocks:circle_stone_bricks") -minetest.register_alias("circlestone_brick", "moreblocks:circle_stone_bricks") -minetest.register_alias("circlestone_bricks", "moreblocks:circle_stone_bricks") -minetest.register_alias("circle_stonebrick", "moreblocks:circle_stone_bricks") -minetest.register_alias("circle_stonebricks", "moreblocks:circle_stone_bricks") -minetest.register_alias("circle_stone_brick", "moreblocks:circle_stone_bricks") -minetest.register_alias("circle_stone_bricks", "moreblocks:circle_stone_bricks") - -minetest.register_alias("sweeper", "moreblocks:sweeper") -minetest.register_alias("circularsaw", "moreblocks:circular_saw") -minetest.register_alias("circular_saw", "moreblocks:circular_saw") -minetest.register_alias("cs", "moreblocks:circular_saw") - -minetest.register_alias("sweep", "moreblocks:sweeper") -minetest.register_alias("junglestick", "moreblocks:jungle_stick") -minetest.register_alias("jungle_stick", "moreblocks:jungle_stick") - -minetest.register_alias("stonesquare", "moreblocks:stone_tile") -minetest.register_alias("stonesquares", "moreblocks:stone_tile") -minetest.register_alias("stone_square", "moreblocks:stone_tile") -minetest.register_alias("stone_squares", "moreblocks:stone_tile") -minetest.register_alias("stonetile", "moreblocks:stone_tile") -minetest.register_alias("stonetiles", "moreblocks:stone_tile") -minetest.register_alias("stone_tile", "moreblocks:stone_tile") -minetest.register_alias("stone_tiles", "moreblocks:stone_tile") - -minetest.register_alias("splitstonesquare", "moreblocks:split_stone_tile") -minetest.register_alias("splitstonesquares", "moreblocks:split_stone_tile") -minetest.register_alias("split_stone_square", "moreblocks:split_stone_tile") -minetest.register_alias("split_stone_squares", "moreblocks:split_stone_tile") -minetest.register_alias("split_stonesquare", "moreblocks:split_stone_tile") -minetest.register_alias("split_stonesquares", "moreblocks:split_stone_tile") - -minetest.register_alias("coalstone", "moreblocks:coal_stone") -minetest.register_alias("coal_stone", "moreblocks:coal_stone") - -minetest.register_alias("ironstone", "moreblocks:iron_stone") -minetest.register_alias("iron_stone", "moreblocks:iron_stone") - -minetest.register_alias("coalglass", "moreblocks:coal_glass") -minetest.register_alias("coal_glass", "moreblocks:coal_glass") - -minetest.register_alias("ironglass", "moreblocks:iron_glass") -minetest.register_alias("iron_glass", "moreblocks:iron_glass") - -minetest.register_alias("glowglass", "moreblocks:glow_glass") -minetest.register_alias("glow_glass", "moreblocks:glow_glass") - -minetest.register_alias("superglowglass", "moreblocks:super_glow_glass") -minetest.register_alias("super_glowglass", "moreblocks:super_glow_glass") -minetest.register_alias("super_glow_glass", "moreblocks:super_glow_glass") - -minetest.register_alias("plankstone", "moreblocks:plankstone") - -minetest.register_alias("cactusbrick", "moreblocks:cactus_brick") -minetest.register_alias("cactus_brick", "moreblocks:cactus_brick") - -minetest.register_alias("cactuschecker", "moreblocks:cactus_checker") -minetest.register_alias("cactus_checker", "moreblocks:cactus_checker") - -minetest.register_alias("coalchecker", "moreblocks:coal_checker") -minetest.register_alias("coal_checker", "moreblocks:coal_checker") - -minetest.register_alias("ironchecker", "moreblocks:iron_checker") -minetest.register_alias("iron_checker", "moreblocks:iron_checker") - -minetest.register_alias("woodtile", "moreblocks:wood_tile") -minetest.register_alias("woodentile", "moreblocks:wood_tile") -minetest.register_alias("wood_tile", "moreblocks:wood_tile") -minetest.register_alias("wooden_tile", "moreblocks:wood_tile") - -minetest.register_alias("woodtile_full", "moreblocks:wood_tile_full") -minetest.register_alias("woodentile_full", "moreblocks:wood_tile_full") -minetest.register_alias("wood_tile_full", "moreblocks:wood_tile_full") -minetest.register_alias("wooden_tile_full", "moreblocks:wood_tile_full") -minetest.register_alias("full_woodtile", "moreblocks:wood_tile_full") -minetest.register_alias("full_woodentile", "moreblocks:wood_tile_full") -minetest.register_alias("full_wood_tile", "moreblocks:wood_tile_full") -minetest.register_alias("full_wooden_tile", "moreblocks:wood_tile_full") - --- Old block/item replacement - -minetest.register_alias("moreblocks:oerkkiblock", "default:mossycobble") -minetest.register_alias("moreblocks:screwdriver", "screwdriver:screwdriver") - --- Node and item renaming - -minetest.register_alias("moreblocks:stone_bricks", "default:stonebrick") -minetest.register_alias("moreblocks:stonebrick", "default:stonebrick") -minetest.register_alias("moreblocks:junglewood", "default:junglewood") -minetest.register_alias("moreblocks:jungle_wood", "default:junglewood") - -minetest.register_alias("moreblocks:horizontaltree", "moreblocks:horizontal_tree") -minetest.register_alias("moreblocks:horizontaljungletree", "moreblocks:horizontal_jungle_tree") -minetest.register_alias("moreblocks:stonesquare", "moreblocks:stone_tile") -minetest.register_alias("moreblocks:circlestonebrick", "moreblocks:circle_stone_bricks") -minetest.register_alias("moreblocks:ironstonebrick", "moreblocks:iron_stone_bricks") -minetest.register_alias("moreblocks:fence_junglewood", "moreblocks:fence_jungle_wood") -minetest.register_alias("moreblocks:coalstone", "moreblocks:coal_stone") -minetest.register_alias("moreblocks:ironstone", "moreblocks:iron_stone") -minetest.register_alias("moreblocks:woodtile", "moreblocks:wood_tile") -minetest.register_alias("moreblocks:woodtile_full", "moreblocks:wood_tile_full") -minetest.register_alias("moreblocks:woodtile_centered", "moreblocks:wood_tile_centered") -minetest.register_alias("moreblocks:woodtile_up", "moreblocks:wood_tile_up") -minetest.register_alias("moreblocks:woodtile_down", "moreblocks:wood_tile_down") -minetest.register_alias("moreblocks:woodtile_left", "moreblocks:wood_tile_left") -minetest.register_alias("moreblocks:woodtile_right", "moreblocks:wood_tile_right") -minetest.register_alias("moreblocks:coalglass", "moreblocks:coal_glass") -minetest.register_alias("moreblocks:ironglass", "moreblocks:iron_glass") -minetest.register_alias("moreblocks:glowglass", "moreblocks:glow_glass") -minetest.register_alias("moreblocks:superglowglass", "moreblocks:super_glow_glass") -minetest.register_alias("moreblocks:trapglass", "moreblocks:trap_glass") -minetest.register_alias("moreblocks:trapstone", "moreblocks:trap_stone") -minetest.register_alias("moreblocks:cactuschecker", "moreblocks:cactus_checker") -minetest.register_alias("moreblocks:coalchecker", "moreblocks:coal_checker") -minetest.register_alias("moreblocks:ironchecker", "moreblocks:iron_checker") -minetest.register_alias("moreblocks:cactusbrick", "moreblocks:cactus_brick") -minetest.register_alias("moreblocks:cleanglass", "moreblocks:clean_glass") -minetest.register_alias("moreblocks:emptybookshelf", "moreblocks:empty_bookshelf") -minetest.register_alias("moreblocks:junglestick", "moreblocks:jungle_stick") -minetest.register_alias("moreblocks:splitstonesquare","moreblocks:split_stone_tile") -minetest.register_alias("moreblocks:allfacestree","moreblocks:all_faces_tree") diff --git a/mods/moreblocks/circular_saw.lua b/mods/moreblocks/circular_saw.lua deleted file mode 100644 index 741275f..0000000 --- a/mods/moreblocks/circular_saw.lua +++ /dev/null @@ -1,380 +0,0 @@ --- Load translation library if intllib is installed - -local S -if (minetest.get_modpath("intllib")) then - dofile(minetest.get_modpath("intllib").."/intllib.lua") - S = intllib.Getter(minetest.get_current_modname()) - else - S = function ( s ) return s end -end - -circular_saw = {}; - -circular_saw.known_stairs = {} - - --- Register known moreblocks stairs -for i,v in ipairs({"default:wood", "default:stone", "default:cobble", "default:mossycobble", "default:brick", "default:sandstone", - "default:steelblock", "default:desert_stone", "default:glass", "default:tree", "default:jungletree", "default:stonebrick", - "default:obsidian", "default:obsidian_glass", "default:stone_bricks", "default:junglewood", "default:goldblock", - "default:copperblock", "default:bronzeblock", "default:diamondblock", "default:desert_stonebrick", "default:sandstonebrick", - - "moreblocks:coal_stone", "moreblocks:iron_stone", "moreblocks:coal_checker", "moreblocks:iron_checker", - "moreblocks:cactus_checker", "moreblocks:coal_glass", "moreblocks:iron_glass", "moreblocks:glow_glass", - "moreblocks:super_glow_glass", "moreblocks:wooden_tile", "moreblocks:stone_tile", "moreblocks:split_stone_tile", - "moreblocks:iron_stone_bricks", "moreblocks:circle_stone_bricks", "moreblocks:wood_tile_centered", - "moreblocks:wood_tile_full", "moreblocks:plank_stone"}) do - table.insert(circular_saw.known_stairs, v); -end - - --- How many microblocks does this shape at the output inventory cost? -circular_saw.cost_in_microblocks = { 1, 1, 1, 1, 1, 1, 1, 2, - 2, 3, 2, 4, 2, 4, 5, 6, - 7, 1, 1, 2, 4, 6, 7, 8, - 3, 4, 0, 0, 0, 0, 0, 0, }; - --- anz: amount of input material in microblocks -circular_saw.get_stair_output_inv = function(modname, material, anz, max) - - local max_offered = 99; - - if(not(max) or (max == nil) or tonumber(max) > 99 or tonumber(max) < 1) then - max_offered = 99; - else - max_offered = tonumber(max); - end - - - -- If there is nothing inside display empty inventory - if(anz < 1) then - return { "", "", "", "", "", "", "", - "", "", "", "", "", "", "", - "", "", "", "", "", "", "", - "", "", "", "", "", "", ""}; - end - - return { - - modname .. ":micro_" .. material .. "_1 " .. math.min(math.floor(anz/1), max_offered), - modname .. ":panel_" .. material .. "_1 " .. math.min(math.floor(anz/1), max_offered), - modname .. ":micro_" .. material .. "_2 " .. math.min(math.floor(anz/1), max_offered), - modname .. ":panel_" .. material .. "_2 " .. math.min(math.floor(anz/1), max_offered), - modname .. ":micro_" .. material .. "_4 " .. math.min(math.floor(anz/1), max_offered), - modname .. ":panel_" .. material .. "_4 " .. math.min(math.floor(anz/1), max_offered), - modname .. ":micro_" .. material .. " " .. math.min(math.floor(anz/1), max_offered), - modname .. ":panel_" .. material .. " " .. math.min(math.floor(anz/2), max_offered), - - modname .. ":micro_" .. material .. "_12 " .. math.min(math.floor(anz/2), max_offered), - modname .. ":panel_" .. material .. "_12 " .. math.min(math.floor(anz/3), max_offered), - modname .. ":micro_" .. material .. "_14 " .. math.min(math.floor(anz/2), max_offered), - modname .. ":panel_" .. material .. "_14 " .. math.min(math.floor(anz/4), max_offered), - modname .. ":micro_" .. material .. "_15 " .. math.min(math.floor(anz/2), max_offered), - modname .. ":panel_" .. material .. "_15 " .. math.min(math.floor(anz/4), max_offered), - modname .. ":stair_" .. material .. "_outer " .. math.min(math.floor(anz/5), max_offered), - modname .. ":stair_" .. material .. " " .. math.min(math.floor(anz/6), max_offered), - - modname .. ":stair_" .. material .. "_inner " .. math.min(math.floor(anz/7), max_offered), - modname .. ":slab_" .. material .. "_1 " .. math.min(math.floor(anz/1), max_offered), - modname .. ":slab_" .. material .. "_2 " .. math.min(math.floor(anz/1), max_offered), - modname .. ":slab_" .. material .. "_quarter " .. math.min(math.floor(anz/2), max_offered), - modname .. ":slab_" .. material .. " " .. math.min(math.floor(anz/4), max_offered), - modname .. ":slab_" .. material .. "_three_quarter " .. math.min(math.floor(anz/6), max_offered), - modname .. ":slab_" .. material .. "_14 " .. math.min(math.floor(anz/7), max_offered), - modname .. ":slab_" .. material .. "_15 " .. math.min(math.floor(anz/8), max_offered), - - modname .. ":stair_" .. material .. "_half " .. math.min(math.floor(anz/3), max_offered), - modname .. ":stair_" .. material .. "_alt " .. math.min(math.floor(anz/4), max_offered), - - "", - } -end - - --- Reset empty circular_saw after last full block has been taken out (or the circular_saw has been placed the first tiem); note: max_offered is not reset -circular_saw.reset_circular_saw = function(pos) - local meta = minetest.env:get_meta(pos); - local inv = meta:get_inventory(); - - inv:set_list("input", { "" }); - inv:set_list("micro", { "" }); - inv:set_list("output", circular_saw.get_stair_output_inv("", "", 0, meta:get_string("max_offered"))); - meta:set_int("anz", 0); - - meta:set_string("infotext", "Circular saw, empty (owned by " .. (meta:get_string("owner") or "") .. ")"); -end - - --- Player has taken something out of the box or placed something inside; that amounts to count microblocks -circular_saw.update_inventory = function(pos, amount) - local meta = minetest.env:get_meta(pos); - local inv = meta:get_inventory(); - local akt = meta:get_int("anz"); - - -- The material is receicled automaticly - inv:set_list("recycle", { "" }); - - if(akt + amount < 1) then -- If the last block is taken out - - circular_saw.reset_circular_saw(pos); - return; - - end - - local stack = inv:get_stack("input", 1); - -- At least one "normal" block is necessary to see what kind of stairs are requested - if(stack:is_empty()) then - - -- Any microblocks not taken out yet are now lost (covers material loss in the machine) - circular_saw.reset_circular_saw(pos); - return; - - end - local node_name = stack:get_name(); - local liste = node_name:split(":"); - local modname = liste[1]; - local material = liste[2]; - - -- Display as many full blocks as possible - inv:set_list("input", { modname.. ":" .. material .. " " .. math.floor( (akt + amount) / 8) }); - - -- The stairnodes made of default nodes use moreblocks namespace, other mods keep own. - if(modname == "default") then modname = "moreblocks"; end - --print("circular_saw set to " ..modname.. " : " ..material.. " with " .. (akt+amount) .. " microblocks."); - - -- 0-7 microblocks may remain as a rest - inv:set_list("micro", { modname.. ":micro_" .. material .. "_bottom " .. ((akt + amount) % 8) }); - -- Display - inv:set_list("output", circular_saw.get_stair_output_inv(modname, material, (akt + amount), meta:get_string("max_offered"))); - -- Store how many microblocks are available - meta:set_int("anz", (akt+amount)); - - meta:set_string("infotext", "Circular saw, working with " ..material.. " (owned by " .. (meta:get_string("owner") or "") .. ")"); -end - - --- The amount of items offered per shape can be configured -circular_saw.on_receive_fields = function(pos, formname, fields, sender) - local meta = minetest.env:get_meta(pos); - if tonumber(fields.max_offered) and tonumber(fields.max_offered) > 0 and tonumber(fields.max_offered) < 99 then - meta:set_string("max_offered", fields.max_offered); - circular_saw.update_inventory(pos, 0); -- update to show the correct number of items - end -end - - --- Moving the inventory of the circular_saw around is not allowed because it is a fictional inventory -circular_saw.allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - -- Moving inventory around would be rather immpractical and make things more difficult to calculate - return 0; -end - - --- Only input- and recycle-slot are intended as input slots -circular_saw.allow_metadata_inventory_put = function(pos, listname, index, stack, player) - - -- The player is not allowed to put something in there - if(listname == "output" or listname == "micro") then - return 0; - end - - local meta = minetest.env:get_meta(pos); - local inv = meta:get_inventory(); - - -- Only alow those items that are offered in the output inventory to be recycled - if(listname == "recycle" and not(inv:contains_item("output", stack:get_name()))) then - return 0; - end - - -- Only accept certain blocks as input which are known to be craftable into stairs - if(listname == "input") then - - for i,v in ipairs(circular_saw.known_stairs) do - - if(circular_saw.known_stairs[ i ] == stack:get_name()) then - return stack:get_count(); - end - - end - return 0; - - end - - return stack:get_count() -end - --- Taking is allowed from all slots (even the internal microblock slot) - --- Putting something in is slightly more complicated than taking anything because we have to make sure it is of a suitable material -circular_saw.on_metadata_inventory_put = function(pos, listname, index, stack, player) - - -- We need to find out if the circular_saw is already set to a specific material or not - local meta = minetest.env:get_meta(pos); - local inv = meta:get_inventory(); - - -- Putting something into the input slot is only possible if that had been empty before or did contain something of the same material - if( listname=="input") then - - if( not( inv:is_empty("input"))) then - - local old_stack = inv:get_stack("input", 1 ); - if( old_stack:get_name() ~= stack:get_name() ) then - return 0; - end - end - - -- Each new block is worth 8 microblocks - circular_saw.update_inventory(pos, 8 * stack:get_count()); - - elseif(listname=="recycle") then - - -- Lets look which shape this represents - for i,v in ipairs(inv:get_list("output")) do - - if(v:get_name() == stack:get_name()) then - - local value = circular_saw.cost_in_microblocks[ i ] * stack:get_count(); - --print("\nRecycling " .. (v:get_name()) .. " into " ..value.. " microblocks."); - - -- We get value microblocks back - circular_saw.update_inventory(pos, value); - end - end - end -end - --- The player takes something -circular_saw.on_metadata_inventory_take = function(pos, listname, index, stack, player) - - -- If it is one of the offered stairs: find out how many microblocks have to be substracted - if(listname=="output") then - - -- We do know how much each block at each position costs - local cost = circular_saw.cost_in_microblocks[ index ] * stack:get_count(); - - circular_saw.update_inventory(pos, -1 * cost); - - elseif(listname=="mikro") then - - -- Each microblock costs 1 microblock - circular_saw.update_inventory(pos, -1 * 1 * stack:get_count()); - - elseif(listname=="input") then - - -- Each normal (= full) block taken costs 8 microblocks - circular_saw.update_inventory(pos, -1 * 8 * stack:get_count()); - - end - -- The recycle field plays no role here since it is processed immediately -end - - -circular_saw.on_construct_init = function(pos, formspec) - - local meta = minetest.env:get_meta(pos) - meta:set_string("formspec", formspec); - - meta:set_int( "anz", 0); -- No microblocks inside yet - meta:set_string("max_offered", 99); -- How many items of this kind are offered by default? - meta:set_string("infotext", "Circular saw, empty") - - local inv = meta:get_inventory() - inv:set_size("input", 1) -- Input slot for full blocks of material x - inv:set_size("micro", 1) -- Storage for 1-7 surplus microblocks - inv:set_size("recycle", 1) -- Surplus partial blocks can be placed here - inv:set_size("output", 32) -- 4*7 versions of stair-parts of material x - - circular_saw.reset_circular_saw(pos); -end - - -circular_saw.can_dig = function(pos,player) - local meta = minetest.env:get_meta(pos); - local inv = meta:get_inventory() - if not inv:is_empty("input") then - return false - elseif not inv:is_empty("micro") then - return false - elseif not inv:is_empty("recycle") then - return false - end - - -- Can be digged by anyone when empty (not only by the owner) - return true -end, - - -minetest.register_node("moreblocks:circular_saw", { - description = S("Circular Saw"), - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.4, -0.5, -0.4, -0.25, 0.25, -0.25}, -- Leg - {0.25, -0.5, 0.25, 0.4, 0.25, 0.4}, -- Leg - {-0.4, -0.5, 0.25, -0.25, 0.25, 0.4}, -- Leg - {0.25, -0.5, -0.4, 0.4, 0.25, -0.25}, -- Leg - {-0.5, 0.25, -0.5, 0.5, 0.375, 0.5}, -- Tabletop - {-0.01, 0.4375, -0.125, 0.01, 0.5, 0.125}, -- Saw blade (top) - {-0.01, 0.375, -0.1875, 0.01, 0.4375, 0.1875}, -- Saw blade (bottom) - {-0.25, -0.0625, -0.25, 0.25, 0.25, 0.25}, -- Motor case - }, - }, - tiles = {"moreblocks_circular_saw_top.png", "moreblocks_circular_saw_bottom.png", "moreblocks_circular_saw_side.png"}, - paramtype = "light", - sunlight_propagates = true, - paramtype2 = "facedir", - groups = {cracky=2}, - on_construct = function(pos) - return circular_saw.on_construct_init(pos, - "size[10,9]" .. - "list[current_name;input;0,0;1,1;]" .. - "label[0,0;Input material]" .. - "list[current_name;micro;0,1;1,1;]" .. - "label[0,1;Rest/microblocks]" .. - "field[0.3,2.5;1,1;max_offered;Max:;${max_offered}]" .. - "button[1,2;1,1;Set;Set]" .. - "list[current_name;recycle;0,3;1,1;]" .. - "label[0,3;Recycle output]" .. - "list[current_name;output;2,0;8,4;]" .. - "list[current_player;main;1,5;8,4;]"); - end, - - can_dig = function(pos,player) - return circular_saw.can_dig(pos, player); - end, - - -- Set owner of this circular saw - after_place_node = function(pos, placer) - local meta = minetest.env:get_meta(pos); - - meta:set_string("owner", (placer:get_player_name() or "")); - meta:set_string("infotext", "Circular saw is empty (owned by " .. (placer:get_player_name() or "") .. ")"); - end, - - -- The amount of items offered per shape can be configured - on_receive_fields = function(pos, formname, fields, sender) - return circular_saw.on_receive_fields(pos, formname, fields, sender); - end, - - allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - return circular_saw.allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player); - end, - - -- Only input- and recycle-slot are intended as input slots - allow_metadata_inventory_put = function(pos, listname, index, stack, player) - return circular_saw.allow_metadata_inventory_put(pos, listname, index, stack, player); - end, - - -- Taking is allowed from all slots (even the internal microblock slot); moving is forbidden - - -- Putting something in is slightly more complicated than taking anything because we have to make sure it is of a suitable material - on_metadata_inventory_put = function(pos, listname, index, stack, player) - return circular_saw.on_metadata_inventory_put(pos, listname, index, stack, player); - end, - - on_metadata_inventory_take = function(pos, listname, index, stack, player) - return circular_saw.on_metadata_inventory_take(pos, listname, index, stack, player); - end - -}) diff --git a/mods/moreblocks/crafting.lua b/mods/moreblocks/crafting.lua deleted file mode 100644 index 0410ad0..0000000 --- a/mods/moreblocks/crafting.lua +++ /dev/null @@ -1,389 +0,0 @@ --- Crafting - -minetest.register_craft({ - output = "default:stick 1", - recipe = { - {"default:dry_shrub"}, - } -}) - -minetest.register_craft({ - output = "default:dirt_with_grass 1", - recipe = { - {"default:junglegrass"}, - {"default:dirt"}, - } -}) - -minetest.register_craft({ - output = "default:dirt_with_grass 1", - recipe = { - {"default:mese"}, - {"default:dirt"}, - } -}) - -minetest.register_craft({ - output = "default:mossycobble 1", - recipe = { - {"default:junglegrass"}, - {"default:cobble"}, - } -}) - -minetest.register_craft({ - output = "default:mossycobble 1", - recipe = { - {"default:mese"}, - {"default:cobble"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:woodtile 9", - recipe = { - {"default:wood", "default:wood", "default:wood"}, - {"default:wood", "default:wood", "default:wood"}, - {"default:wood", "default:wood", "default:wood"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:woodtile_flipped 1", - recipe = { - {"moreblocks:woodtile"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:woodtile_center 9", - recipe = { - {"default:wood", "default:wood", "default:wood"}, - {"default:wood", "moreblocks:woodtile", "default:wood"}, - {"default:wood", "default:wood", "default:wood"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:woodtile_full 4", - recipe = { - {"moreblocks:woodtile", "moreblocks:woodtile"}, - {"moreblocks:woodtile", "moreblocks:woodtile"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:woodtile_up 1", - recipe = { - {"default:stick"}, - {"moreblocks:woodtile_center"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:woodtile_down 1", - recipe = { - {"moreblocks:woodtile_center"}, - {"default:stick"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:woodtile_left 1", - recipe = { - {"default:stick", "moreblocks:woodtile_center"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:woodtile_right 1", - recipe = { - {"moreblocks:woodtile_center", "default:stick"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:junglestick 4", - recipe = { - {"default:junglewood"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:fence_jungle_wood 2", - recipe = { - {"moreblocks:jungle_stick", "moreblocks:jungle_stick", "moreblocks:jungle_stick"}, - {"moreblocks:jungle_stick", "moreblocks:jungle_stick", "moreblocks:jungle_stick"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:circle_stone_bricks 8", - recipe = { - {"default:stone", "default:stone", "default:stone"}, - {"default:stone", "", "default:stone"}, - {"default:stone", "default:stone", "default:stone"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:all_faces_tree 8", - recipe = { - {"default:tree", "default:tree", "default:tree"}, - {"default:tree", "", "default:tree"}, - {"default:tree", "default:tree", "default:tree"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:all_faces_jungle_tree 8", - recipe = { - {"default:jungletree", "default:jungletree", "default:jungletree"}, - {"default:jungletree", "", "default:jungletree"}, - {"default:jungletree", "default:jungletree", "default:jungletree"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:sweeper 3", - recipe = { - {"default:junglegrass"}, - {"default:stick"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:stone_tile 4", - recipe = { - {"default:cobble", "default:cobble"}, - {"default:cobble", "default:cobble"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:split_stone_tile 1", - recipe = { - {"moreblocks:stone_tile"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:empty_bookshelf 1", - recipe = { - {"moreblocks:sweeper"}, - {"default:bookshelf"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:iron_stone_bricks 1", - type = "shapeless", - recipe = {"default:steel_ingot", "default:stonebrick"}, -}) - -minetest.register_craft({ - output = "default:wood 4", - recipe = { - {"moreblocks:horizontal_tree"}, - } -}) - -minetest.register_craft({ - output = "default:junglewood 4", - recipe = { - {"moreblocks:horizontal_jungle_tree"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:plankstone 4", - recipe = { - {"default:stone", "default:wood"}, - {"default:wood", "default:stone"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:plankstone 4", - recipe = { - {"default:wood", "default:stone"}, - {"default:stone", "default:wood"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:coal_checker 4", - recipe = { - {"default:stone", "default:coal_lump"}, - {"default:coal_lump", "default:stone"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:coal_checker 4", - recipe = { - {"default:coal_lump", "default:stone"}, - {"default:stone", "default:coal_lump"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:iron_checker 4", - recipe = { - {"default:steel_ingot", "default:stone"}, - {"default:stone", "default:steel_ingot"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:iron_checker 4", - recipe = { - {"default:stone", "default:steel_ingot"}, - {"default:steel_ingot", "default:stone"}, - } -}) - -minetest.register_craft({ - output = "default:chest_locked 1", - type = "shapeless", - recipe = {"default:steel_ingot", "default:chest"}, -}) - -minetest.register_craft({ - output = "moreblocks:iron_glass 1", - type = "shapeless", - recipe = {"default:steel_ingot", "default:glass"}, -}) - -minetest.register_craft({ - output = "moreblocks:coal_glass 1", - type = "shapeless", - recipe = {"default:coal_lump", "default:glass"}, -}) - -minetest.register_craft({ - output = "moreblocks:clean_glass 1", - type = "shapeless", - recipe = {"moreblocks:sweeper", "default:glass"}, -}) - -minetest.register_craft({ - output = "moreblocks:glow_glass 1", - type = "shapeless", - recipe = {"default:torch", "default:glass"}, -}) - -minetest.register_craft({ - output = "moreblocks:trap_glow_glass 1", - type = "shapeless", - walkable = false, - recipe = {"default:mese_crystal", "default:glass", "default:torch"}, -}) - -minetest.register_craft({ - output = "moreblocks:super_glow_glass 1", - type = "shapeless", - recipe = {"default:torch", "default:torch", "default:glass"}, -}) - -minetest.register_craft({ - output = "moreblocks:trap_super_glow_glass 1", - type = "shapeless", - walkable = false, - recipe = {"default:mese_crystal", "default:glass", "default:torch", "default:torch"}, -}) - -minetest.register_craft({ - output = "moreblocks:coal_stone 1", - type = "shapeless", - recipe = {"default:coal_lump", "default:stone"}, -}) - -minetest.register_craft({ - output = "moreblocks:iron_stone 1", - type = "shapeless", - recipe = {"default:iron_lump", "default:stone"}, -}) - -minetest.register_craft({ - output = "moreblocks:trap_stone 12", - type = "shapeless", - recipe = {"default:mese", "default:stone"}, -}) - -minetest.register_craft({ - output = "moreblocks:trap_glass 12", - type = "shapeless", - recipe = {"default:mese", "default:glass"}, -}) - -minetest.register_craft({ - output = "moreblocks:cactus_brick 1", - type = "shapeless", - recipe = {"default:cactus", "default:brick"}, -}) - -minetest.register_craft({ - output = "moreblocks:cactus_checker 4", - recipe = { - {"default:cactus", "default:stone"}, - {"default:stone", "default:cactus"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:cactuschecker 4", - recipe = { - {"default:stone", "default:cactus"}, - {"default:cactus", "default:stone"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:rope 2", - recipe = { - {"default:junglegrass"}, - {"default:junglegrass"}, - {"default:junglegrass"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:horizontal_tree 2", - recipe = { - {"default:tree", "", "default:tree"}, - } -}) - -minetest.register_craft({ - output = "default:tree 2", - recipe = { - {"moreblocks:horizontal_tree"}, - {"moreblocks:horizontal_tree"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:horizontal_jungle_tree 2", - recipe = { - {"default:jungletree", "", "default:jungletree"}, - } -}) - -minetest.register_craft({ - output = "default:jungletree 2", - recipe = { - {"moreblocks:horizontal_jungle_tree"}, - {"moreblocks:horizontal_jungle_tree"}, - } -}) - - -minetest.register_craft({ - output = "moreblocks:circular_saw 1", - recipe = { - { "", "default:steel_ingot", "" }, - { "default:tree", "default:tree", "default:tree"}, - { "default:tree", "", "default:tree"}, - } -}) diff --git a/mods/moreblocks/depends.txt b/mods/moreblocks/depends.txt deleted file mode 100644 index 4ad96d5..0000000 --- a/mods/moreblocks/depends.txt +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/mods/moreblocks/init.lua b/mods/moreblocks/init.lua deleted file mode 100644 index d69da68..0000000 --- a/mods/moreblocks/init.lua +++ /dev/null @@ -1,383 +0,0 @@ --- Load translation library if intllib is installed - -local S -if (minetest.get_modpath("intllib")) then - dofile(minetest.get_modpath("intllib").."/intllib.lua") - S = intllib.Getter(minetest.get_current_modname()) - else - S = function ( s ) return s end -end - -dofile(minetest.get_modpath("moreblocks").."/_config.txt") - -dofile(minetest.get_modpath("moreblocks").."/redefinitions.lua") -dofile(minetest.get_modpath("moreblocks").."/crafting.lua") -dofile(minetest.get_modpath("moreblocks").."/aliases.lua") -dofile(minetest.get_modpath("moreblocks").."/stairsplus_convert.lua") -dofile(minetest.get_modpath("moreblocks").."/stairsplus/stairs.lua") -dofile(minetest.get_modpath("moreblocks").."/stairsplus/slabs.lua") -dofile(minetest.get_modpath("moreblocks").."/stairsplus/panels.lua") -dofile(minetest.get_modpath("moreblocks").."/stairsplus/microblocks.lua") -dofile(minetest.get_modpath("moreblocks").."/stairsplus/aliases.lua") -dofile(minetest.get_modpath("moreblocks").."/stairsplus.lua") -dofile(minetest.get_modpath("moreblocks").."/circular_saw.lua") - ---[[ -**** -More Blocks -by Calinou -Licensed under the zlib/libpng license for code and CC BY-SA for textures, see LICENSE.txt for info. -**** ---]] - --- Blocks - -minetest.register_node("moreblocks:wood_tile", { - description = S("Wooden Tile"), - tiles = {"moreblocks_wood_tile.png", "moreblocks_wood_tile.png", "moreblocks_wood_tile.png", "moreblocks_wood_tile.png", "moreblocks_wood_tile.png^[transformR90", "moreblocks_wood_tile.png^[transformR90"}, - paramtype2 = "facedir", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_node("moreblocks:wood_tile_flipped", { - description = S("Wooden Tile"), - tiles = {"moreblocks_wood_tile_flipped.png", "moreblocks_wood_tile_flipped.png", "moreblocks_wood_tile_flipped.png", "moreblocks_wood_tile_flipped.png", "moreblocks_wood_tile_flipped.png^[transformR90", "moreblocks_wood_tile_flipped.png^[transformR90"}, - paramtype2 = "facedir", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_node("moreblocks:wood_tile_center", { - description = S("Centered Wooden Tile"), - tiles = {"moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png^[transformR90", "moreblocks_wood_tile_center.png^[transformR90"}, - paramtype2 = "facedir", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_node("moreblocks:wood_tile_full", { - description = S("Full Wooden Tile"), - tiles = {"moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png", - "moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png^[transformR90", "moreblocks_wood_tile_full.png^[transformR90"}, - paramtype2 = "facedir", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_node("moreblocks:wood_tile_up", { - description = S("Up Wooden Tile"), - tiles = {"moreblocks_wood_tile_up.png", "moreblocks_wood_tile_up.png", "moreblocks_wood_tile_up.png", - "moreblocks_wood_tile_up.png", "moreblocks_wood_tile_up.png^[transformR90", "moreblocks_wood_tile_up.png^[transformR90"}, - paramtype2 = "facedir", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_node("moreblocks:wood_tile_down", { - description = S("Down Wooden Tile"), - tiles = {"moreblocks_wood_tile_down.png", "moreblocks_wood_tile_down.png", "moreblocks_wood_tile_down.png", - "moreblocks_wood_tile_down.png", "moreblocks_wood_tile_down.png^[transformR90", "moreblocks_wood_tile_down.png^[transformR90"}, - paramtype2 = "facedir", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_node("moreblocks:wood_tile_left", { - description = S("Left Wooden Tile"), - tiles = {"moreblocks_wood_tile_left.png", "moreblocks_wood_tile_left.png", "moreblocks_wood_tile_left.png", - "moreblocks_wood_tile_left.png", "moreblocks_wood_tile_left.png^[transformR90", "moreblocks_wood_tile_left.png^[transformR90"}, - paramtype2 = "facedir", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_node("moreblocks:wood_tile_right", { - description = S("Right Wooden Tile"), - tiles = {"moreblocks_wood_tile_right.png", "moreblocks_wood_tile_right.png", "moreblocks_wood_tile_right.png", - "moreblocks_wood_tile_right.png", "moreblocks_wood_tile_right.png^[transformR90", "moreblocks_wood_tile_right.png^[transformR90"}, - paramtype2 = "facedir", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_node("moreblocks:circle_stone_bricks", { - description = S("Circle Stone Bricks"), - tiles = {"moreblocks_circle_stone_bricks.png"}, - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:iron_stone_bricks", { - description = S("Iron Stone Bricks"), - tiles = {"moreblocks_iron_stone_bricks.png"}, - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:stone_tile", { - description = S("Stone Tile"), - tiles = {"moreblocks_stone_tile.png"}, - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:split_stone_tile", { - description = S("Split Stone Tile"), - tiles = {"moreblocks_split_stone_tile_top.png", "moreblocks_split_stone_tile.png"}, - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:plankstone", { - description = S("Plankstone"), - tiles = {"moreblocks_plankstone.png", "moreblocks_plankstone.png", "moreblocks_plankstone.png", - "moreblocks_plankstone.png", "moreblocks_plankstone.png^[transformR90", "moreblocks_plankstone.png^[transformR90"}, - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:iron_glass", { - description = S("Iron Glass"), - drawtype = "glasslike", - tiles = {"moreblocks_iron_glass.png"}, - inventory_image = minetest.inventorycube("moreblocks_iron_glass.png"), - paramtype = "light", - sunlight_propagates = true, - groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, - sounds = default.node_sound_glass_defaults(), -}) - -minetest.register_node("moreblocks:coal_glass", { - description = S("Coal Glass"), - drawtype = "glasslike", - tiles = {"moreblocks_coal_glass.png"}, - inventory_image = minetest.inventorycube("moreblocks_coal_glass.png"), - paramtype = "light", - sunlight_propagates = true, - groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, - sounds = default.node_sound_glass_defaults(), -}) - -minetest.register_node("moreblocks:clean_glass", { - description = S("Clean Glass"), - drawtype = "glasslike", - tiles = {"moreblocks_clean_glass.png"}, - inventory_image = minetest.inventorycube("moreblocks_clean_glass.png"), - paramtype = "light", - sunlight_propagates = true, - groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, - sounds = default.node_sound_glass_defaults(), -}) - - -minetest.register_node("moreblocks:cactus_brick", { - description = S("Cactus Brick"), - tiles = {"moreblocks_cactus_brick.png"}, - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:cactus_checker", { - description = S("Cactus Checker"), - tiles = {"moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png", - "moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png^[transformR90", "moreblocks_cactus_checker.png^[transformR90"}, - paramtype2 = "facedir", - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:empty_bookshelf", { - description = S("Empty Bookshelf"), - tiles = {"default_wood.png", "default_wood.png", "moreblocks_empty_bookshelf.png"}, - groups = {snappy=2,choppy=3,oddly_breakable_by_hand=2,flammable=3}, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_node("moreblocks:coal_stone", { - description = S("Coal Stone"), - tiles = {"moreblocks_coal_stone.png"}, - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:iron_stone", { - description = S("Iron Stone"), - tiles = {"moreblocks_iron_stone.png"}, - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:coal_checker", { - description = S("Coal Checker"), - tiles = {"moreblocks_coal_checker.png", "moreblocks_coal_checker.png", "moreblocks_coal_checker.png", - "moreblocks_coal_checker.png", "moreblocks_coal_checker.png^[transformR90", "moreblocks_coal_checker.png^[transformR90"}, - paramtype2 = "facedir", - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:iron_checker", { - description = S("Iron Checker"), - tiles = {"moreblocks_iron_checker.png", "moreblocks_iron_checker.png", "moreblocks_iron_checker.png", - "moreblocks_iron_checker.png", "moreblocks_iron_checker.png^[transformR90", "moreblocks_iron_checker.png^[transformR90"}, - paramtype2 = "facedir", - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:trap_stone", { - description = S("Trap Stone"), - tiles = {"moreblocks_trap_stone.png"}, - walkable = false, - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("moreblocks:trap_glass", { - description = S("Trap Glass"), - drawtype = "glasslike", - tiles = {"moreblocks_trap_glass.png"}, - inventory_image = minetest.inventorycube("moreblocks_trap_glass.png"), - paramtype = "light", - sunlight_propagates = true, - walkable = false, - groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, - sounds = default.node_sound_glass_defaults(), -}) - -minetest.register_node("moreblocks:fence_jungle_wood", { - description = S("Jungle Wood Fence"), - drawtype = "fencelike", - tiles = {"moreblocks_jungle_wood.png"}, - inventory_image = "moreblocks_fence_jungle_wood.png", - wield_image = "moreblocks_fence_jungle_wood.png", - paramtype = "light", - selection_box = { - type = "fixed", - fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, - }, - groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=2}, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_node("moreblocks:horizontal_tree", { - description = S("Horizontal Tree"), - tiles = {"default_tree.png", "default_tree.png", "default_tree.png^[transformR90", - "default_tree.png^[transformR90", "default_tree_top.png", "default_tree_top.png"}, - paramtype2 = "facedir", - groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, - sounds = default.node_sound_wood_defaults(), - furnace_burntime = 30, -}) - -minetest.register_node("moreblocks:horizontal_jungle_tree", { - description = S("Horizontal Jungle Tree"), - tiles = {"default_jungletree.png", "default_jungletree.png", "default_jungletree.png^[transformR90", - "default_jungletree.png^[transformR90", "default_jungletree_top.png", "default_jungletree_top.png"}, - paramtype2 = "facedir", - groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, - sounds = default.node_sound_wood_defaults(), - furnace_burntime = 30, -}) - -minetest.register_node("moreblocks:all_faces_tree", { - description = S("All-faces Tree"), - tiles = {"default_tree_top.png"}, - groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, - sounds = default.node_sound_wood_defaults(), - furnace_burntime = 30, -}) - -minetest.register_node("moreblocks:all_faces_jungle_tree", { - description = S("All-faces Tree"), - tiles = {"default_jungletree_top.png"}, - groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, - sounds = default.node_sound_wood_defaults(), - furnace_burntime = 30, -}) - -minetest.register_node("moreblocks:glow_glass", { - description = S("Glow Glass"), - drawtype = "glasslike", - tiles = {"moreblocks_glow_glass.png"}, - inventory_image = minetest.inventorycube("moreblocks_glow_glass.png"), - paramtype = "light", - sunlight_propagates = true, - light_source = 11, - groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, - sounds = default.node_sound_glass_defaults(), -}) -minetest.register_node("moreblocks:trap_glow_glass", { - description = S("Trap Glow Glass"), - drawtype = "glasslike", - tiles = {"moreblocks_glow_glass.png"}, - inventory_image = minetest.inventorycube("moreblocks_glow_glass.png"), - paramtype = "light", - sunlight_propagates = true, - light_source = 11, - walkable = false, - groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, - sounds = default.node_sound_glass_defaults(), -}) - -minetest.register_node("moreblocks:super_glow_glass", { - description = S("Super Glow Glass"), - drawtype = "glasslike", - tiles = {"moreblocks_super_glow_glass.png"}, - inventory_image = minetest.inventorycube("moreblocks_super_glow_glass.png"), - paramtype = "light", - sunlight_propagates = true, - light_source = 15, - groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, - sounds = default.node_sound_glass_defaults(), -}) - -minetest.register_node("moreblocks:trap_super_glow_glass", { - description = S("Trap Super Glow Glass"), - drawtype = "glasslike", - tiles = {"moreblocks_glow_glass.png"}, - inventory_image = minetest.inventorycube("moreblocks_glow_glass.png"), - paramtype = "light", - sunlight_propagates = true, - light_source = 11, - walkable = false, - groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, - sounds = default.node_sound_glass_defaults(), -}) - -minetest.register_node("moreblocks:rope", { - description = S("Rope"), - drawtype = "signlike", - tiles = {"moreblocks_rope.png"}, - inventory_image = "moreblocks_rope.png", - wield_image = "moreblocks_rope.png", - paramtype = "light", - paramtype2 = "wallmounted", - walkable = false, - climbable = true, - selection_box = { - type = "wallmounted", - }, - groups = {snappy=3,flammable=2}, - sounds = default.node_sound_leaves_defaults(), -}) - --- Items - -minetest.register_craftitem("moreblocks:sweeper", { - description = S("Sweeper"), - inventory_image = "moreblocks_sweeper.png", -}) - -minetest.register_craftitem("moreblocks:jungle_stick", { - description = S("Jungle Stick"), - inventory_image = "moreblocks_junglestick.png", -}) - -minetest.register_craftitem("moreblocks:nothing", { - inventory_image = "invisible.png", - on_use = minetest.item_eat(0), -}) - -print(S("[moreblocks] loaded.")) diff --git a/mods/moreblocks/locale/es.txt b/mods/moreblocks/locale/es.txt deleted file mode 100644 index d11ba49..0000000 --- a/mods/moreblocks/locale/es.txt +++ /dev/null @@ -1,52 +0,0 @@ -# Translation by kaeza - -[moreblocks] loaded. = [moreblocks] cargado. - -Jungle Wooden Planks = Tablones de madera de jungla -Empty Bookshelf = Estante para libros vacío -Clean Glass = Cristal Limpio -Plankstone = Tablones de piedra -Wooden Tile = Parquet -Full Wooden Tile = Parquet Completo -Centered Wooden Tile = Parquet Centrado -Up Wooden Tile = Parquet Superior -Down Wooden Tile = Parquet Inferior -Left Wooden Tile = Parquet Izquierdo -Right Wooden Tile = Parquet Derecho -Circle Stone Bricks = Bloques de Piedra Circulares -Stone Tile = Baldosa de Piedra -Split Stone Tile = Baldosas de Piedra Partida -Glow Glass = Cristal Brillante -Super Glow Glass = Cristal Súper Brillante -Coal Glass = Cristal con Carbón -Iron Glass = Cristal con Hierro -Coal Checker = Cuadros de Carbón -Iron Checker = Cuadros de Hierro -Trap Stone = Piedra Trampa -Trap Glass = Cristal Trampa -Coal Stone = Carbón y Piedra -Iron Stone = Hierro y Piedra -Cactus Checker = Cuadros de Cactus -Cactus Brick = Ladrillos de Cactus -Sweeper = Limpiador -Jungle Stick = Varita de Madera de Jungla -Horizontal Tree = Tronco de árbol horizontal -Horizontal Jungle Tree = Tronco de árbol de la jungla horizontal -Rope = Soga -All-faces Tree = Tronco de Árbol - -%s Stairs = Escalera de %s -%s Slab = Losa de %s -%s Panel = Panel de %s -%s Microblock = Microbloque de %s - -Wooden = Madera -Papyrus = Papiro -Dry Shrub = Arbusto Desértico -Sapling = Brote de Árbol -Wooden Planks = Tablones de Madera -Ladder = Escalera de Mano -Glass = Cristal - -%s Pane = Panel de %s -%s Fence = Valla de %s diff --git a/mods/moreblocks/locale/fr.txt b/mods/moreblocks/locale/fr.txt deleted file mode 100644 index e537a8c..0000000 --- a/mods/moreblocks/locale/fr.txt +++ /dev/null @@ -1,54 +0,0 @@ -# Translation by Calinou - -[moreblocks] loaded. = [moreblocks] a été chargé. - -Jungle Wooden Planks = Planches de bois de jungle -Empty Bookshelf = Étagère vide -Clean Glass = Verre propre -Plankstone = Pierre-bois -Wooden Tile = Dalle en bois -Full Wooden Tile = Dalle en bois complète -Centered Wooden Tile = Dalle en bois centrée -Up Wooden Tile = Dalle en bois vers le haut -Down Wooden Tile = Dalle en bois vers le bas -Left Wooden Tile = Dalle en bois vers la gauche -Right Wooden Tile = Dalle en bois vers la droite -Circle Stone Bricks = Briques en pierre circulaires -Stone Tile = Dalle en pierre -Split Stone Tile = Dalle en pierre découpée -Glow Glass = Verre brillant -Super Glow Glass = Verre très brillant -Coal Glass = Verre en charbon -Iron Glass = Verre en fer -Coal Checker = Damier en charbon -Iron Checker = Damier en fer -Trap Stone = Pierre à piège -Trap Glass = Verre à piège -Coal Stone = Pierre en charbon -Iron Stone = Pierre en fer -Cactus Checker = Damier en cactus -Cactus Brick = Briques en cactus -Sweeper = Balai -Jungle Stick = Bâton en bois de jungle -Horizontal Tree = Tronc d'arbre horizontal -Horizontal Jungle Tree = Tronc d'arbre de jungle horizontal -Rope = Corde -All-faces Tree = Tronc d'arbre - -Wooden = bois -Papyrus = Papyrus -Dry Shrub = Buisson mort -Sapling = Pousse d'arbre -Wooden Planks = Planches de bois -Ladder = Échelle -Glass = Verre - -Circular Saw = Scie circulaire - -%s Stairs = Escaliers en %s -%s Slab = Demi-dalle en %s -%s Panel = Barre en %s -%s Microblock = Microbloc en %s - -%s Pane = Panneau en %s -%s Fence = Barrière en %s diff --git a/mods/moreblocks/redefinitions.lua b/mods/moreblocks/redefinitions.lua deleted file mode 100644 index 07a28bc..0000000 --- a/mods/moreblocks/redefinitions.lua +++ /dev/null @@ -1,272 +0,0 @@ --- Redefinitions of some default crafting recipes - -minetest.register_craft({ - output = "default:sign_wall 4", - recipe = { - {"default:wood", "default:wood", "default:wood"}, - {"default:wood", "default:wood", "default:wood"}, - {"", "default:stick", ""}, - } -}) - -minetest.register_craft({ - output = "default:ladder 3", - recipe = { - {"default:stick", "", "default:stick"}, - {"default:stick", "default:stick", "default:stick"}, - {"default:stick", "", "default:stick"}, - } -}) - -minetest.register_craft({ - output = "default:paper 3", - recipe = { - {"default:papyrus", "default:papyrus", "default:papyrus"}, - } -}) - -minetest.register_craft({ - output = "default:rail 16", - recipe = { - {"default:steel_ingot", "", "default:steel_ingot"}, - {"default:steel_ingot", "default:stick", "default:steel_ingot"}, - {"default:steel_ingot", "", "default:steel_ingot"}, - } -}) - -minetest.register_craft({ - output = "default:axe_wood", - recipe = { - {"default:wood", "default:wood"}, - {"default:stick", "default:wood"}, - {"default:stick", ""}, - } -}) - -minetest.register_craft({ - output = "default:axe_stone", - recipe = { - {"default:cobble", "default:cobble"}, - {"default:stick", "default:cobble"}, - {"default:stick", ""}, - } -}) - -minetest.register_craft({ - output = "default:axe_steel", - recipe = { - {"default:steel_ingot", "default:steel_ingot"}, - {"default:stick", "default:steel_ingot"}, - {"default:stick", ""}, - } -}) - --- Tool repair buff (15% bonus instead of 2%) - -minetest.register_craft({ - type = "toolrepair", - additional_wear = -0.15, -}) - --- Redefinitions of some default nodes - -minetest.register_node(":default:ladder", { - description = "Ladder", - drawtype = "signlike", - tiles = {"default_ladder.png"}, - inventory_image = "default_ladder.png", - wield_image = "default_ladder.png", - paramtype = "light", - sunlight_propagates = true, - paramtype2 = "wallmounted", - walkable = false, - climbable = true, - selection_box = { - type = "wallmounted", - }, - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=3,flammable=2}, - legacy_wallmounted = true, - sounds = default.node_sound_wood_defaults(), -}) - -if wood_facedir == true -then -minetest.register_node(":default:wood", { - description = "Wooden Planks", - tiles = {"default_wood.png"}, - paramtype2 = "facedir", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1}, - sounds = default.node_sound_wood_defaults(), -}) -end - -minetest.register_node(":default:sapling", { - description = "Sapling", - drawtype = "plantlike", - visual_scale = 1.0, - tiles = {"default_sapling.png"}, - inventory_image = "default_sapling.png", - wield_image = "default_sapling.png", - paramtype = "light", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "fixed", - fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} - }, - groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1}, - sounds = default.node_sound_defaults(), -}) - -minetest.register_node(":default:dry_shrub", { - description = "Dry Shrub", - drawtype = "plantlike", - visual_scale = 1.0, - tiles = {"default_dry_shrub.png"}, - inventory_image = "default_dry_shrub.png", - wield_image = "default_dry_shrub.png", - paramtype = "light", - sunlight_propagates = true, - walkable = false, - groups = {snappy=3,flammable=3,attached_node=1}, - sounds = default.node_sound_leaves_defaults(), - selection_box = { - type = "fixed", - fixed = {-1/3, -1/2, -1/3, 1/3, 1/6, 1/3}, - }, -}) - -minetest.register_node(":default:papyrus", { - description = "Papyrus", - drawtype = "plantlike", - tiles = {"default_papyrus.png"}, - inventory_image = "default_papyrus.png", - wield_image = "default_papyrus.png", - paramtype = "light", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "fixed", - fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} - }, - groups = {snappy=3,flammable=2}, - sounds = default.node_sound_leaves_defaults(), -}) - -minetest.register_node(":default:fence_wood", { - description = "Wooden Fence", - drawtype = "fencelike", - tiles = {"default_wood.png"}, - inventory_image = "default_fence.png", - wield_image = "default_fence.png", - paramtype = "light", - sunlight_propagates = true, - selection_box = { - type = "fixed", - fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, - }, - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2}, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_node(":default:junglegrass", { - description = "Jungle Grass", - drawtype = "plantlike", - visual_scale = 1.3, - tiles = {"default_junglegrass.png"}, - inventory_image = "default_junglegrass.png", - wield_image = "default_junglegrass.png", - paramtype = "light", - walkable = false, - buildable_to = true, - is_ground_content = true, - sunlight_propagates = true, - drop = { - max_items = 1, - items = { - {items = {'farming:seed_cotton'},rarity = 8}, - {items = {'default:junglegrass'}}, - } - }, - groups = {snappy=3,flammable=2,flora=1,attached_node=1}, - sounds = default.node_sound_leaves_defaults(), - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, - }, -}) - -minetest.register_node(":default:junglesapling", { - description = "Jungle Sapling", - drawtype = "plantlike", - sunlight_propagates = true, - tiles = {"default_junglesapling.png"}, - paramtype = "light", - walkable = false, - selection_box = { - type = "fixed", - fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} - }, - groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1}, - sounds = default.node_sound_defaults(), -}) - -minetest.register_node(":default:grass_1", { - description = "Grass", - drawtype = "plantlike", - tiles = {"default_grass_1.png"}, - -- use a bigger inventory image - inventory_image = "default_grass_3.png", - wield_image = "default_grass_3.png", - paramtype = "light", - sunlight_propagates = true, - walkable = false, - buildable_to = true, - drop = { - max_items = 1, - items = { - {items = {'farming:seed_wheat'},rarity = 5}, - {items = {'default:grass_1'}}, - } - }, - groups = {snappy=3,flammable=3,flora=1,attached_node=1}, - sounds = default.node_sound_leaves_defaults(), - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, - }, - on_place = function(itemstack, placer, pointed_thing) - -- place a random grass node - local stack = ItemStack("default:grass_"..math.random(1,5)) - local ret = minetest.item_place(stack, placer, pointed_thing) - return ItemStack("default:grass_1 "..itemstack:get_count()-(1-ret:get_count())) - end, -}) - -for i=2,5 do - minetest.register_node(":default:grass_"..i, { - description = "Grass", - drawtype = "plantlike", - tiles = {"default_grass_"..i..".png"}, - inventory_image = "default_grass_"..i..".png", - wield_image = "default_grass_"..i..".png", - paramtype = "light", - sunlight_propagates = true, - walkable = false, - buildable_to = true, - is_ground_content = true, - drop = { - max_items = 1, - items = { - {items = {'farming:seed_wheat'},rarity = 5}, - {items = {'default:grass_1'}}, - } - }, - groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1}, - sounds = default.node_sound_leaves_defaults(), - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, - }, - }) -end diff --git a/mods/moreblocks/stairsplus.lua b/mods/moreblocks/stairsplus.lua deleted file mode 100644 index c99ffd2..0000000 --- a/mods/moreblocks/stairsplus.lua +++ /dev/null @@ -1,448 +0,0 @@ -dofile(minetest.get_modpath("moreblocks").."/_config.txt") - --- Nodes will be called :{stair,slab,panel,micro}_ - -if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then - stairsplus_expect_infinite_stacks = false -else - stairsplus_expect_infinite_stacks = true -end - --- these vales are in order: facedir in degrees = 90, 0, 270, 180, 90 - -local dirs1 = { 21, 20, 23, 22, 21 } -local dirs2 = { 15, 8, 17, 6, 15 } -local dirs3 = { 14, 11, 16, 5, 14 } - -stairsplus_players_onwall = {} - -minetest.register_chatcommand("st", { - params = "", - description = "Toggle stairsplus between placing wall/vertical stairs/panels and normal.", - func = function(name, param) - stairsplus_players_onwall[name] = not stairsplus_players_onwall[name] - - if stairsplus_players_onwall[name] then - minetest.chat_send_player(name, "Stairsplus: Placing wall stairs/vertical panels.") - else - minetest.chat_send_player(name, "Stairsplus: Placing floor/ceiling stairs/panels.") - end - end -}) - -stairsplus_can_it_stack = function(itemstack, placer, pointed_thing) - return false ---[[ - if pointed_thing.type ~= "node" then - return itemstack - end - - -- If it's being placed on an another similar one, replace it with - -- a full block - local slabpos = nil - local slabnode = nil - local p1 = pointed_thing.above - p1 = {x = p1.x, y = p1.y - 1, z = p1.z} - local n1 = minetest.env:get_node(p1) - if n1.name == modname .. ":slab_" .. subname then - slabpos = p1 - slabnode = n1 - end - if slabpos then - -- Remove the slab at slabpos - minetest.env:remove_node(slabpos) - -- Make a fake stack of a single item and try to place it - local fakestack = ItemStack(recipeitem) - pointed_thing.above = slabpos - fakestack = minetest.item_place(fakestack, placer, pointed_thing) - -- If the item was taken from the fake stack, decrement original - if not fakestack or fakestack:is_empty() then - itemstack:take_item(1) - -- Else put old node back - else - minetest.env:set_node(slabpos, slabnode) - end - return itemstack - end - - if n1.name == modname .. ":slab_" .. subname .. "_quarter" then - slabpos = p1 - slabnode = n1 - end - if slabpos then - -- Remove the slab at slabpos - minetest.env:remove_node(slabpos) - -- Make a fake stack of a single item and try to place it - local fakestack = ItemStack(modname .. ":slab_" .. subname .. "_three_quarter") - pointed_thing.above = slabpos - fakestack = minetest.item_place(fakestack, placer, pointed_thing) - -- If the item was taken from the fake stack, decrement original - if not fakestack or fakestack:is_empty() then - itemstack:take_item(1) - -- Else put old node back - else - minetest.env:set_node(slabpos, slabnode) - end - return itemstack - end - - -- Otherwise place regularly - return minetest.item_place(itemstack, placer, pointed_thing) - -]]-- - -end - -local function get_nodedef_field(nodename, fieldname) - if not minetest.registered_nodes[nodename] then - return nil - end - return minetest.registered_nodes[nodename][fieldname] -end - -function stairsplus_rotate_and_place(itemstack, placer, pointed_thing, onwall) - - local node = minetest.env:get_node(pointed_thing.under) - - if not minetest.registered_nodes[node.name] or not minetest.registered_nodes[node.name].on_rightclick then - - local above = pointed_thing.above - local under = pointed_thing.under - local top = {x=under.x, y=under.y+1, z=under.z} - - local pitch = placer:get_look_pitch() - local node = minetest.env:get_node(above) - local fdir = minetest.dir_to_facedir(placer:get_look_dir()) - local wield_name = itemstack:get_name() - - local slab = string.find(wield_name, "slab") - local panel = string.find(wield_name, "panel") - local micro = string.find(wield_name, "micro") - local iswall = (above.x ~= under.x) or (above.z ~= under.z) - local isceiling = (above.x == under.x) and (above.z == under.z) and (pitch > 0) - - if get_nodedef_field(minetest.env:get_node(under).name, "buildable_to") then - if slab then fdir = 0 end - minetest.env:add_node(under, {name = wield_name, param2 = fdir }) -- place right side up - elseif not get_nodedef_field(minetest.env:get_node(above).name, "buildable_to") then - return - elseif onwall or (iswall and (slab or panel)) then - if slab then - minetest.env:add_node(above, {name = wield_name, param2 = dirs2[fdir+2] }) -- place with wall slab rotation - else - minetest.env:add_node(above, {name = wield_name, param2 = dirs3[fdir+2] }) -- place with wall panel/micro rotation - end - elseif isceiling then - local nfdir = dirs1[fdir+2] - if slab then nfdir = 22 end - minetest.env:add_node(above, {name = wield_name, param2 = nfdir }) -- place upside down variant - else - if slab then fdir = 0 end - minetest.env:add_node(above, {name = wield_name, param2 = fdir }) -- place right side up - end - - if not stairsplus_expect_infinite_stacks then - itemstack:take_item() - return itemstack - end - else - minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer) - end -end - -function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light) - if show_stairsplus_creative_inv then - groups.not_in_creative_inventory = 0 - else - groups.not_in_creative_inventory = 1 - end - register_stair(modname, subname, recipeitem, groups, images, description, drop, light) - register_slab( modname, subname, recipeitem, groups, images, description, drop, light) - register_panel(modname, subname, recipeitem, groups, images, description, drop, light) - register_micro(modname, subname, recipeitem, groups, images, description, drop, light) - register_6dfacedir_conversion(modname, subname) -end - --- Default stairs/slabs/panels/microblocks - -register_stair_slab_panel_micro("moreblocks", "wood", "default:wood", - {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - {"default_wood.png"}, - "Wooden", - "wood", - 0) - -register_stair_slab_panel_micro("moreblocks", "stone", "default:stone", - {cracky=3}, - {"default_stone.png"}, - "Stone", - "cobble", - 0) - -register_stair_slab_panel_micro("moreblocks", "cobble", "default:cobble", - {cracky=3}, - {"default_cobble.png"}, - "Cobblestone", - "cobble", - 0) - -register_stair_slab_panel_micro("moreblocks", "mossycobble", "default:mossycobble", - {cracky=3}, - {"default_mossycobble.png"}, - "Mossy Cobblestone", - "mossycobble", - 0) - -register_stair_slab_panel_micro("moreblocks", "brick", "default:brick", - {cracky=3}, - {"default_brick.png"}, - "Brick", - "brick", - 0) - -register_stair_slab_panel_micro("moreblocks", "sandstone", "default:sandstone", - {crumbly=2,cracky=2}, - {"default_sandstone.png"}, - "Sandstone", - "sandstone", - 0) - -register_stair_slab_panel_micro("moreblocks", "steelblock", "default:steelblock", - {cracky=1,level=2}, - {"default_steel_block.png"}, - "Steel Block", - "steelblock", - 0) - -register_stair_slab_panel_micro("moreblocks", "goldblock", "default:goldblock", - {cracky=1}, - {"default_gold_block.png"}, - "Gold Block", - "goldblock", - 0) - -register_stair_slab_panel_micro("moreblocks", "copperblock", "default:copperblock", - {cracky=1,level=2}, - {"default_copper_block.png"}, - "Copper Block", - "copperblock", - 0) - -register_stair_slab_panel_micro("moreblocks", "bronzeblock", "default:bronzeblock", - {cracky=1,level=2}, - {"default_bronze_block.png"}, - "Bronze Block", - "bronzeblock", - 0) - -register_stair_slab_panel_micro("moreblocks", "diamondblock", "default:diamondblock", - {cracky=1,level=3}, - {"default_diamond_block.png"}, - "Diamond Block", - "diamondblock", - 0) - -register_stair_slab_panel_micro("moreblocks", "desert_stone", "default:desert_stone", - {cracky=3}, - {"default_desert_stone.png"}, - "Desert Stone", - "desert_stone", - 0) - -register_stair_slab_panel_micro("moreblocks", "glass", "default:glass", - {snappy=2,cracky=3,oddly_breakable_by_hand=3}, - {"moreblocks_glass_stairsplus.png"}, - "Glass", - "glass", - 0) - -register_stair_slab_panel_micro("moreblocks", "tree", "default:tree", - {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, - {"default_tree_top.png", "default_tree_top.png", "default_tree.png"}, - "Tree", - "tree", - 0) - -register_stair_slab_panel_micro("moreblocks", "jungletree", "default:jungletree", - {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, - {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"}, - "Jungle Tree", - "jungletree", - 0) - -register_stair_slab_panel_micro("moreblocks", "obsidian", "default:obsidian", - {cracky=1,level=2}, - {"default_obsidian.png"}, - "Obsidian", - "obsidian", - 0) - -register_stair_slab_panel_micro("moreblocks", "obsidian_glass", "default:obsidian_glass", - {cracky=3,oddly_breakable_by_hand=3}, - {"moreblocks_obsidian_glass_stairsplus.png"}, - "Obsidian Glass", - "obsidian_glass", - 0) - -register_stair_slab_panel_micro("moreblocks", "stonebrick", "default:stonebrick", - {cracky=3}, - {"default_stone_brick.png"}, - "Stone Bricks", - "stone_bricks", - 0) - -register_stair_slab_panel_micro("moreblocks", "desert_stonebrick", "default:desert_stonebrick", - {cracky=3}, - {"default_desert_stone_brick.png"}, - "Desert Stone Bricks", - "desert_stonebrick", - 0) - -register_stair_slab_panel_micro("moreblocks", "sandstonebrick", "default:sandstonebrick", - {cracky=3}, - {"default_sandstone_brick.png"}, - "Sandstone Bricks", - "sandstonebrick", - 0) - --- More Blocks stairs/slabs/panels/microblocks - -register_stair_slab_panel_micro("moreblocks", "circle_stone_bricks", "moreblocks:circle_stone_bricks", - {cracky=3}, - {"moreblocks_circle_stone_bricks.png"}, - "Circle Stone Bricks", - "circle_stone_bricks", - 0) - -register_stair_slab_panel_micro("moreblocks", "iron_stone_bricks", "moreblocks:iron_stone_bricks", - {cracky=3}, - {"moreblocks_iron_stone_bricks.png"}, - "Iron Stone Bricks", - "iron_stone_bricks", - 0) - -register_stair_slab_panel_micro("moreblocks", "stone_tile", "moreblocks:stone_tile", - {cracky=3}, - {"moreblocks_stone_tile.png"}, - "Stonesquare", - "stone_tile", - 0) - -register_stair_slab_panel_micro("moreblocks", "split_stone_tile", "moreblocks:split_stone_tile", - {cracky=3}, - {"moreblocks_split_stone_tile_top.png", "moreblocks_split_stone_tile.png"}, - "Split Stonesquare", - "split_stone_tile", - 0) - -register_stair_slab_panel_micro("moreblocks", "jungle_wood", "default:junglewood", -- Compatibility - {snappy=1, choppy=2, oddly_breakable_by_hand=2,flammable=3}, - {"default_junglewood.png"}, - "Jungle Wood", - "jungle_wood", - 0) - -register_stair_slab_panel_micro("moreblocks", "junglewood", "default:junglewood", - {snappy=1, choppy=2, oddly_breakable_by_hand=2,flammable=3}, - {"default_junglewood.png"}, - "Jungle Wood", - "jungle_wood", - 0) - -register_stair_slab_panel_micro("moreblocks", "plankstone", "moreblocks:plankstone", - {cracky=3}, - {"moreblocks_plankstone.png", "moreblocks_plankstone.png", "moreblocks_plankstone.png", - "moreblocks_plankstone.png", "moreblocks_plankstone.png^[transformR90", "moreblocks_plankstone.png^[transformR90"}, - "Plankstone", - "plankstone", - 0) - -register_stair_slab_panel_micro("moreblocks", "coal_checker", "moreblocks:coal_checker", - {cracky=3}, - {"moreblocks_coal_checker.png", "moreblocks_coal_checker.png", "moreblocks_coal_checker.png", - "moreblocks_coal_checker.png", "moreblocks_coal_checker.png^[transformR90", "moreblocks_coal_checker.png^[transformR90"}, - "Coal Checker", - "coal_checker", - 0) - -register_stair_slab_panel_micro("moreblocks", "iron_checker", "moreblocks:iron_checker", - {cracky=3}, - {"moreblocks_iron_checker.png", "moreblocks_iron_checker.png", "moreblocks_iron_checker.png", - "moreblocks_iron_checker.png", "moreblocks_iron_checker.png^[transformR90", "moreblocks_iron_checker.png^[transformR90"}, - "Iron Checker", - "iron_checker", - 0) - -register_stair_slab_panel_micro("moreblocks", "cactus_checker", "moreblocks:cactus_checker", - {cracky=3}, - {"moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png", - "moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png^[transformR90", "moreblocks_cactus_checker.png^[transformR90"}, - "Cactus Checker", - "cactus_checker", - 0) - -register_stair_slab_panel_micro("moreblocks", "coal_stone", "moreblocks:coal_stone", - {cracky=3}, - {"moreblocks_coal_stone.png"}, - "Coal Stone", - "coal_stone", - 0) - -register_stair_slab_panel_micro("moreblocks", "iron_stone", "moreblocks:iron_stone", - {cracky=3}, - {"moreblocks_iron_stone.png"}, - "Iron Stone", - "iron_stone", - 0) - -register_stair_slab_panel_micro("moreblocks", "glow_glass", "moreblocks:glow_glass", - {snappy=2,cracky=3,oddly_breakable_by_hand=3}, - {"moreblocks_glow_glass_stairsplus.png"}, - "Glow Glass", - "glow_glass", - 11) - -register_stair_slab_panel_micro("moreblocks", "super_glow_glass", "moreblocks:super_glow_glass", - {snappy=2, cracky=3, oddly_breakable_by_hand=3}, - {"moreblocks_super_glow_glass_stairsplus.png"}, - "Super Glow Glass", - "super_glow_glass", - 15) - -register_stair_slab_panel_micro("moreblocks", "coal_glass", "moreblocks:coal_glass", - {snappy=2, cracky=3, oddly_breakable_by_hand=3}, - {"moreblocks_coal_glass_stairsplus.png"}, - "Coal Glass", - "coal_glass", - 0) - -register_stair_slab_panel_micro("moreblocks", "iron_glass", "moreblocks:iron_glass", - {snappy=2,cracky=3,oddly_breakable_by_hand=3}, - {"moreblocks_iron_glass_stairsplus.png"}, - "Iron Glass", - "iron_glass", - 0) - -register_stair_slab_panel_micro("moreblocks", "wood_tile", "moreblocks:wood_tile", - {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - {"moreblocks_wood_tile.png", "moreblocks_wood_tile.png", "moreblocks_wood_tile.png", - "moreblocks_wood_tile.png", "moreblocks_wood_tile.png^[transformR90", "moreblocks_wood_tile.png^[transformR90"}, - "Wooden Tile", - "wood_tile", - 0) - -register_stair_slab_panel_micro("moreblocks", "wood_tile_center", "moreblocks:wood_tile_center", - {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - {"moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png", - "moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png^[transformR90", "moreblocks_wood_tile_center.png^[transformR90"}, - "Centered Wooden Tile", - "wood_tile_center", - 0) - -register_stair_slab_panel_micro("moreblocks", "wood_tile_full", "moreblocks:wood_tile_full", - {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - {"moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png", - "moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png^[transformR90", "moreblocks_wood_tile_full.png^[transformR90"}, - "Full Wooden Tile", - "wood_tile_full", - 0) diff --git a/mods/moreblocks/stairsplus/aliases.lua b/mods/moreblocks/stairsplus/aliases.lua deleted file mode 100644 index 3fcd867..0000000 --- a/mods/moreblocks/stairsplus/aliases.lua +++ /dev/null @@ -1,61 +0,0 @@ -function register_stairsplus_alias(modname, origname, newname) -minetest.register_alias(modname .. ":slab_" .. origname, "moreblocks:slab_" .. newname) -minetest.register_alias(modname .. ":slab_" .. origname .. "_inverted", "moreblocks:slab_" .. newname .. "_inverted") -minetest.register_alias(modname .. ":slab_" .. origname .. "_wall", "moreblocks:slab_" .. newname .. "_wall") -minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter", "moreblocks:slab_" .. newname .. "_quarter") -minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_inverted", "moreblocks:slab_" .. newname .. "_quarter_inverted") -minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_wall", "moreblocks:slab_" .. newname .. "_quarter_wall") -minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter", "moreblocks:slab_" .. newname .. "_three_quarter") -minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_inverted", "moreblocks:slab_" .. newname .. "_three_quarter_inverted") -minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_wall", "moreblocks:slab_" .. newname .. "_three_quarter_wall") -minetest.register_alias(modname .. ":stair_" .. origname, "moreblocks:stair_" .. newname) -minetest.register_alias(modname .. ":stair_" .. origname .. "_inverted", "moreblocks:stair_" .. newname .. "_inverted") -minetest.register_alias(modname .. ":stair_" .. origname .. "_wall", "moreblocks:stair_" .. newname .. "_wall") -minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", "moreblocks:stair_" .. newname .. "_wall_half") -minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", "moreblocks:stair_" .. newname .. "_wall_half_inverted") -minetest.register_alias(modname .. ":stair_" .. origname .. "_half", "moreblocks:stair_" .. newname .. "_half") -minetest.register_alias(modname .. ":stair_" .. origname .. "_half_inverted", "moreblocks:stair_" .. newname .. "_half_inverted") -minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half", "moreblocks:stair_" .. newname .. "_right_half") -minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half_inverted", "moreblocks:stair_" .. newname .. "_right_half_inverted") -minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", "moreblocks:stair_" .. newname .. "_wall_half") -minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", "moreblocks:stair_" .. newname .. "_wall_half_inverted") -minetest.register_alias(modname .. ":stair_" .. origname .. "_inner", "moreblocks:stair_" .. newname .. "_inner") -minetest.register_alias(modname .. ":stair_" .. origname .. "_inner_inverted", "moreblocks:stair_" .. newname .. "_inner_inverted") -minetest.register_alias(modname .. ":stair_" .. origname .. "_outer", "moreblocks:stair_" .. newname .. "_outer") -minetest.register_alias(modname .. ":stair_" .. origname .. "_outer_inverted", "moreblocks:stair_" .. newname .. "_outer_inverted") -minetest.register_alias(modname .. ":panel_" .. origname .. "_bottom", "moreblocks:panel_" .. newname .. "_bottom") -minetest.register_alias(modname .. ":panel_" .. origname .. "_top", "moreblocks:panel_" .. newname .. "_top") -minetest.register_alias(modname .. ":panel_" .. origname .. "_vertical", "moreblocks:panel_" .. newname .. "_vertical") -minetest.register_alias(modname .. ":micro_" .. origname .. "_bottom", "moreblocks:micro_" .. newname .. "_bottom") -minetest.register_alias(modname .. ":micro_" .. origname .. "_top", "moreblocks:micro_" .. newname .. "_top") -end - -register_stairsplus_alias("stairsplus", "stone", "stone") -register_stairsplus_alias("stairsplus", "wood", "wood") -register_stairsplus_alias("stairsplus", "cobble", "cobble") -register_stairsplus_alias("stairsplus", "brick", "brick") -register_stairsplus_alias("stairsplus", "sandstone", "sandstone") -register_stairsplus_alias("stairsplus", "glass", "glass") -register_stairsplus_alias("stairsplus", "tree", "tree") -register_stairsplus_alias("stairsplus", "jungletree", "jungletree") -register_stairsplus_alias("stairsplus", "desert_stone", "desert_stone") -register_stairsplus_alias("stairsplus", "steelblock", "steelblock") -register_stairsplus_alias("stairsplus", "mossycobble", "mossycobble") - -register_stairsplus_alias("moreblocks", "coalstone", "coal_stone") -register_stairsplus_alias("moreblocks", "junglewood", "jungle_wood") -register_stairsplus_alias("moreblocks", "circlestonebrick", "circle_stone_bricks") -register_stairsplus_alias("moreblocks", "ironstone", "iron_stone") -register_stairsplus_alias("moreblocks", "coalglass", "coal_glass") -register_stairsplus_alias("moreblocks", "ironglass", "iron_glass") -register_stairsplus_alias("moreblocks", "glowglass", "glow_glass") -register_stairsplus_alias("moreblocks", "superglowglass", "super_glow_glass") -register_stairsplus_alias("moreblocks", "coalchecker", "coal_checker") -register_stairsplus_alias("moreblocks", "ironchecker", "iron_checker") -register_stairsplus_alias("moreblocks", "cactuschecker", "cactus_checker") -register_stairsplus_alias("moreblocks", "ironstonebrick", "iron_stone_bricks") -register_stairsplus_alias("moreblocks", "stonesquare", "stone_tile") -register_stairsplus_alias("moreblocks", "splitstonesquare", "split_stone_tile") -register_stairsplus_alias("moreblocks", "woodtile", "wood_tile") -register_stairsplus_alias("moreblocks", "woodtile_centered", "wood_tile_centered") -register_stairsplus_alias("moreblocks", "woodtile_full", "wood_tile_full") diff --git a/mods/moreblocks/stairsplus/microblocks.lua b/mods/moreblocks/stairsplus/microblocks.lua deleted file mode 100644 index 24a69ea..0000000 --- a/mods/moreblocks/stairsplus/microblocks.lua +++ /dev/null @@ -1,199 +0,0 @@ --- Load translation library if intllib is installed - -local S -if (minetest.get_modpath("intllib")) then - dofile(minetest.get_modpath("intllib").."/intllib.lua") - S = intllib.Getter(minetest.get_current_modname()) - else - S = function ( s ) return s end -end - --- Node will be called micro_ - -function register_micro(modname, subname, recipeitem, groups, images, description, drop, light) - - minetest.register_node(":"..modname .. ":micro_" .. subname, { - description = S("%s Microblock"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":micro_" .. drop, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, 0, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, 0, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":micro_" .. subname .. "_1", { - description = S("%s Microblock"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":micro_" .. drop .. "_1", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, -0.4375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, -0.4375, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":micro_" .. subname .. "_2", { - description = S("%s Microblock"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":micro_" .. drop .. "_2", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, -0.375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, -0.375, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":micro_" .. subname .. "_4", { - description = S("%s Microblock"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":micro_" .. drop .. "_4", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, -0.25, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, -0.25, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":micro_" .. subname .. "_12", { - description = S("%s Microblock"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":micro_" .. drop .. "_12", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, 0.25, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, 0.25, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":micro_" .. subname .. "_14", { - description = S("%s Microblock"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":micro_" .. drop .. "_14", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, 0.375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, 0.375, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":micro_" .. subname .. "_15", { - description = S("%s Microblock"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":micro_" .. drop .. "_15", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, 0.4375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0, 0.4375, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_alias(modname..":micro_"..subname.."_bottom", modname..":micro_"..subname) -end - diff --git a/mods/moreblocks/stairsplus/panels.lua b/mods/moreblocks/stairsplus/panels.lua deleted file mode 100644 index a5a9caa..0000000 --- a/mods/moreblocks/stairsplus/panels.lua +++ /dev/null @@ -1,192 +0,0 @@ --- Load translation library if intllib is installed - -local S -if (minetest.get_modpath("intllib")) then - dofile(minetest.get_modpath("intllib").."/intllib.lua") - S = intllib.Getter(minetest.get_current_modname()) - else - S = function ( s ) return s end -end - --- Node will be called panel_ - -function register_panel(modname, subname, recipeitem, groups, images, description, drop, light) - - minetest.register_node(":" .. modname .. ":panel_" .. subname, { - description = S("%s Panel"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":panel_" .. drop, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5}, - }, - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_1", { - description = S("%s Panel"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":panel_" .. drop .. "_1", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, -0.4375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, -0.4375, 0.5}, - }, - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_2", { - description = S("%s Panel"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":panel_" .. drop .. "_2", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, -0.375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, -0.375, 0.5}, - }, - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_4", { - description = S("%s Panel"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":panel_" .. drop .. "_4", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, -0.25, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, -0.25, 0.5}, - }, - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_12", { - description = S("%s Panel"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":panel_" .. drop .. "_12", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, 0.25, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, 0.25, 0.5}, - }, - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_14", { - description = S("%s Panel"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":panel_" .. drop .. "_14", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, 0.375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, 0.375, 0.5}, - }, - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":" .. modname .. ":panel_" .. subname .. "_15", { - description = S("%s Panel"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":panel_" .. drop .. "_15", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5}, - }, - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_alias(modname..":panel_"..subname.."_bottom", modname..":panel_"..subname) -end - diff --git a/mods/moreblocks/stairsplus/slabs.lua b/mods/moreblocks/stairsplus/slabs.lua deleted file mode 100644 index a7ebe43..0000000 --- a/mods/moreblocks/stairsplus/slabs.lua +++ /dev/null @@ -1,234 +0,0 @@ --- Load translation library if intllib is installed - -local S -if (minetest.get_modpath("intllib")) then - dofile(minetest.get_modpath("intllib").."/intllib.lua") - S = intllib.Getter(minetest.get_current_modname()) - else - S = function ( s ) return s end -end - --- Node will be called slab_ - -function register_slab(modname, subname, recipeitem, groups, images, description, drop, light) - - minetest.register_node(":" .. modname .. ":slab_" .. subname, { - description = S("%s Slab"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":slab_" .. drop, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":stairs:slab_" .. subname, { - description = S("%s Slab"):format(S(description)), - drawtype = "nodebox", - tiles = images, - drop = modname .. ":slab_" .. drop, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":slab_" .. subname .. "_quarter", { - description = S("%s Slab"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":slab_" .. drop .. "_quarter", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":slab_" .. subname .. "_three_quarter", { - description = S("%s Slab"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":slab_" .. drop .. "_three_quarter", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":slab_" .. subname .. "_1", { - description = S("%s Slab"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":slab_" .. drop .. "_1", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":slab_" .. subname .. "_2", { - description = S("%s Slab"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":slab_" .. drop .. "_2", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":slab_" .. subname .. "_14", { - description = S("%s Slab"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":slab_" .. drop .. "_14", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.375, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":slab_" .. subname .. "_15", { - description = S("%s Slab"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":slab_" .. drop .. "_15", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5}, - }, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5}, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - -- Unregister default recipes, optional, see _config.txt - -if allow_stair_slab_crafting == false -then - minetest.register_craft({ - output = "moreblocks:nothing 1", - recipe = { - {recipeitem, recipeitem, recipeitem}, - }, - }) -end -end - diff --git a/mods/moreblocks/stairsplus/stairs.lua b/mods/moreblocks/stairsplus/stairs.lua deleted file mode 100644 index 7fa6a30..0000000 --- a/mods/moreblocks/stairsplus/stairs.lua +++ /dev/null @@ -1,251 +0,0 @@ --- Load translation library if intllib is installed - -local S -if (minetest.get_modpath("intllib")) then - dofile(minetest.get_modpath("intllib").."/intllib.lua") - S = intllib.Getter(minetest.get_current_modname()) - else - S = function ( s ) return s end -end - --- Node will be called :stair_ - -function register_stair(modname, subname, recipeitem, groups, images, description, drop, light) - - minetest.register_node(":" .. modname .. ":stair_" .. subname, { - description = S("%s Stairs"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - {-0.5, 0, 0, 0.5, 0.5, 0.5}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - {-0.5, 0, 0, 0.5, 0.5, 0.5}, - }, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":stairs:stair_" .. subname, { - description = S("%s Stairs"):format(S(description)), - drawtype = "nodebox", - tiles = images, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = {cracky=3, not_in_creative_inventory=1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - {-0.5, 0, 0, 0.5, 0.5, 0.5}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - {-0.5, 0, 0, 0.5, 0.5, 0.5}, - }, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_half", { - description = S("%s Stairs"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0, 0, 0.5}, - {-0.5, 0, 0, 0, 0.5, 0.5}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0, 0, 0.5}, - {-0.5, 0, 0, 0, 0.5, 0.5}, - }, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":stair_" .. subname .. "_right_half", { - description = S("%s Stairs"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = { - {0, -0.5, -0.5, 0.5, 0, 0.5}, - {0, 0, 0, 0.5, 0.5, 0.5}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {0, -0.5, -0.5, 0.5, 0, 0.5}, - {0, 0, 0, 0.5, 0.5, 0.5}, - }, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":stair_" .. subname .. "_inner", { - description = S("%s Stairs"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":stair_" .. drop .. "_inner", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - {-0.5, 0, 0, 0.5, 0.5, 0.5}, - {-0.5, 0, -0.5, 0, 0.5, 0}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - {-0.5, 0, 0, 0.5, 0.5, 0.5}, - {-0.5, 0, -0.5, 0, 0.5, 0}, - }, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":"..modname .. ":stair_" .. subname .. "_outer", { - description = S("%s Stairs"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - drop = modname .. ":stair_" .. drop .. "_outer", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - {-0.5, 0, 0, 0, 0.5, 0.5}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - {-0.5, 0, 0, 0, 0.5, 0.5}, - }, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_alt", { - description = S("%s Stairs"):format(S(description)), - drawtype = "nodebox", - tiles = images, - light_source = light, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - groups = groups, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0, 0}, - {-0.5, 0, 0, 0.5, 0.5, 0.5}, - }, - }, - sounds = default.node_sound_stone_defaults(), - on_place = function(itemstack, placer, pointed_thing) - local keys=placer:get_player_control() - stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"]) - return itemstack - end - }) - - -- Unregister default recipes, optional, see _config.txt - -if allow_stair_slab_crafting == false -then - minetest.register_craft({ - output = "moreblocks:nothing 1", - recipe = { - {recipeitem, "", ""}, - {recipeitem, recipeitem, ""}, - {recipeitem, recipeitem, recipeitem}, - }, - }) - - minetest.register_craft({ - output = "moreblocks:nothing 1", - recipe = { - {"", "", recipeitem}, - {"", recipeitem, recipeitem}, - {recipeitem, recipeitem, recipeitem}, - }, - }) -end -end - diff --git a/mods/moreblocks/stairsplus_convert.lua b/mods/moreblocks/stairsplus_convert.lua deleted file mode 100644 index 7d6b94b..0000000 --- a/mods/moreblocks/stairsplus_convert.lua +++ /dev/null @@ -1,133 +0,0 @@ --- Function to convert all stairs/slabs/etc nodes from --- inverted, wall, etc to regular + 6d facedir - -local dirs1 = { 21, 20, 23, 22, 21 } -local dirs2 = { 15, 8, 17, 6, 15 } -local dirs3 = { 14, 11, 16, 5, 14 } - -function register_6dfacedir_conversion(modname, material) - --print("Register stairsplus 6d facedir conversion") - --print('ABM for '..modname..' "'..material..'"') - - local objects_list1 = { - modname..":slab_" .. material .. "_inverted", - modname..":slab_" .. material .. "_quarter_inverted", - modname..":slab_" .. material .. "_three_quarter_inverted", - modname..":stair_" .. material .. "_inverted", - modname..":stair_" .. material .. "_wall", - modname..":stair_" .. material .. "_wall_half", - modname..":stair_" .. material .. "_wall_half_inverted", - modname..":stair_" .. material .. "_half_inverted", - modname..":stair_" .. material .. "_right_half_inverted", - modname..":panel_" .. material .. "_vertical", - modname..":panel_" .. material .. "_top", - } - - local objects_list2 = { - modname..":slab_" .. material .. "_wall", - modname..":slab_" .. material .. "_quarter_wall", - modname..":slab_" .. material .. "_three_quarter_wall", - modname..":stair_" .. material .. "_inner_inverted", - modname..":stair_" .. material .. "_outer_inverted", - modname..":micro_" .. material .. "_top" - } - - for j in ipairs(objects_list1) do - local flip_upside_down = false - local flip_to_wall = false - - local object = objects_list1[j] - local dest_object = objects_list1[j] - - if string.find(dest_object, "_inverted") then - flip_upside_down = true - dest_object = string.gsub(dest_object, "_inverted", "") - end - - if string.find(dest_object, "_top") then - flip_upside_down = true - dest_object = string.gsub(dest_object, "_top", "") - end - - if string.find(dest_object, "_wall") then - flip_to_wall = true - dest_object = string.gsub(dest_object, "_wall", "") - end - - if string.find(dest_object, "_vertical") then - flip_to_wall = true - dest_object = string.gsub(dest_object, "_vertical", "") - end - - if string.find(dest_object, "_half") and not string.find(dest_object, "_right_half") then - dest_object = string.gsub(dest_object, "_half", "_right_half") - elseif string.find(dest_object, "_right_half") then - dest_object = string.gsub(dest_object, "_right_half", "_half") - end - - --print(" +---> convert "..object) - --print(" | to "..dest_object) - - minetest.register_abm({ - nodenames = { object }, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local fdir = node.param2 or 0 - - if flip_upside_down and not flip_to_wall then - nfdir = dirs1[fdir+2] - elseif flip_to_wall and not flip_upside_down then - nfdir = dirs2[fdir+1] - elseif flip_to_wall and flip_upside_down then - nfdir = dirs3[fdir+2] - end - minetest.env:add_node(pos, {name = dest_object, param2 = nfdir}) - end - }) - end - - for j in ipairs(objects_list2) do - local flip_upside_down = false - local flip_to_wall = false - - local object = objects_list2[j] - local dest_object = objects_list2[j] - - if string.find(dest_object, "_inverted") then - flip_upside_down = true - dest_object = string.gsub(dest_object, "_inverted", "") - end - - if string.find(dest_object, "_top") then - flip_upside_down = true - dest_object = string.gsub(dest_object, "_top", "") - end - - if string.find(dest_object, "_wall") then - flip_to_wall = true - dest_object = string.gsub(dest_object, "_wall", "") - end - - --print(" +---> convert "..object) - --print(" | to "..dest_object) - - minetest.register_abm({ - nodenames = { object }, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local fdir = node.param2 - local nfdir = 20 - - if flip_upside_down and not flip_to_wall then - nfdir = dirs1[fdir+1] - elseif flip_to_wall and not flip_upside_down then - nfdir = dirs2[fdir+2] - - end - minetest.env:add_node(pos, {name = dest_object, param2 = nfdir}) - end - }) - end -end diff --git a/mods/moreblocks/textures/moreblocks_cactus_brick.png b/mods/moreblocks/textures/moreblocks_cactus_brick.png deleted file mode 100644 index bdd4b92..0000000 Binary files a/mods/moreblocks/textures/moreblocks_cactus_brick.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_cactus_checker.png b/mods/moreblocks/textures/moreblocks_cactus_checker.png deleted file mode 100644 index 0e55b0a..0000000 Binary files a/mods/moreblocks/textures/moreblocks_cactus_checker.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_circle_stone_bricks.png b/mods/moreblocks/textures/moreblocks_circle_stone_bricks.png deleted file mode 100644 index 03bbcbb..0000000 Binary files a/mods/moreblocks/textures/moreblocks_circle_stone_bricks.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_circular_saw_bottom.png b/mods/moreblocks/textures/moreblocks_circular_saw_bottom.png deleted file mode 100644 index c472a8b..0000000 Binary files a/mods/moreblocks/textures/moreblocks_circular_saw_bottom.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_circular_saw_side.png b/mods/moreblocks/textures/moreblocks_circular_saw_side.png deleted file mode 100644 index a557095..0000000 Binary files a/mods/moreblocks/textures/moreblocks_circular_saw_side.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_circular_saw_top.png b/mods/moreblocks/textures/moreblocks_circular_saw_top.png deleted file mode 100644 index cec4aaa..0000000 Binary files a/mods/moreblocks/textures/moreblocks_circular_saw_top.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_clean_glass.png b/mods/moreblocks/textures/moreblocks_clean_glass.png deleted file mode 100644 index 906a3c1..0000000 Binary files a/mods/moreblocks/textures/moreblocks_clean_glass.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_coal_checker.png b/mods/moreblocks/textures/moreblocks_coal_checker.png deleted file mode 100644 index 4da7746..0000000 Binary files a/mods/moreblocks/textures/moreblocks_coal_checker.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_coal_glass.png b/mods/moreblocks/textures/moreblocks_coal_glass.png deleted file mode 100644 index d7c830d..0000000 Binary files a/mods/moreblocks/textures/moreblocks_coal_glass.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_coal_glass_stairsplus.png b/mods/moreblocks/textures/moreblocks_coal_glass_stairsplus.png deleted file mode 100644 index 0441cec..0000000 Binary files a/mods/moreblocks/textures/moreblocks_coal_glass_stairsplus.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_coal_stone.png b/mods/moreblocks/textures/moreblocks_coal_stone.png deleted file mode 100644 index 95db8fa..0000000 Binary files a/mods/moreblocks/textures/moreblocks_coal_stone.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_empty_bookshelf.png b/mods/moreblocks/textures/moreblocks_empty_bookshelf.png deleted file mode 100644 index 56fc713..0000000 Binary files a/mods/moreblocks/textures/moreblocks_empty_bookshelf.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_fence_jungle_wood.png b/mods/moreblocks/textures/moreblocks_fence_jungle_wood.png deleted file mode 100644 index 63a39ee..0000000 Binary files a/mods/moreblocks/textures/moreblocks_fence_jungle_wood.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_fence_wood.png b/mods/moreblocks/textures/moreblocks_fence_wood.png deleted file mode 100644 index 0b99f0e..0000000 Binary files a/mods/moreblocks/textures/moreblocks_fence_wood.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_glass.png b/mods/moreblocks/textures/moreblocks_glass.png deleted file mode 100644 index ade0196..0000000 Binary files a/mods/moreblocks/textures/moreblocks_glass.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_glass_stairsplus.png b/mods/moreblocks/textures/moreblocks_glass_stairsplus.png deleted file mode 100644 index d222b62..0000000 Binary files a/mods/moreblocks/textures/moreblocks_glass_stairsplus.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_glow_glass.png b/mods/moreblocks/textures/moreblocks_glow_glass.png deleted file mode 100644 index 84991fa..0000000 Binary files a/mods/moreblocks/textures/moreblocks_glow_glass.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_glow_glass_stairsplus.png b/mods/moreblocks/textures/moreblocks_glow_glass_stairsplus.png deleted file mode 100644 index 235179c..0000000 Binary files a/mods/moreblocks/textures/moreblocks_glow_glass_stairsplus.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_iron_checker.png b/mods/moreblocks/textures/moreblocks_iron_checker.png deleted file mode 100644 index f852884..0000000 Binary files a/mods/moreblocks/textures/moreblocks_iron_checker.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_iron_glass.png b/mods/moreblocks/textures/moreblocks_iron_glass.png deleted file mode 100644 index ad5cd1e..0000000 Binary files a/mods/moreblocks/textures/moreblocks_iron_glass.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_iron_glass_stairsplus.png b/mods/moreblocks/textures/moreblocks_iron_glass_stairsplus.png deleted file mode 100644 index b41cba7..0000000 Binary files a/mods/moreblocks/textures/moreblocks_iron_glass_stairsplus.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_iron_stone.png b/mods/moreblocks/textures/moreblocks_iron_stone.png deleted file mode 100644 index 657c4b2..0000000 Binary files a/mods/moreblocks/textures/moreblocks_iron_stone.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_iron_stone_bricks.png b/mods/moreblocks/textures/moreblocks_iron_stone_bricks.png deleted file mode 100644 index 1b0ed5c..0000000 Binary files a/mods/moreblocks/textures/moreblocks_iron_stone_bricks.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_jungle_wood.png b/mods/moreblocks/textures/moreblocks_jungle_wood.png deleted file mode 100644 index ebc6485..0000000 Binary files a/mods/moreblocks/textures/moreblocks_jungle_wood.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_junglestick.png b/mods/moreblocks/textures/moreblocks_junglestick.png deleted file mode 100644 index afe5892..0000000 Binary files a/mods/moreblocks/textures/moreblocks_junglestick.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_obsidian_glass_stairsplus.png b/mods/moreblocks/textures/moreblocks_obsidian_glass_stairsplus.png deleted file mode 100644 index eb758f1..0000000 Binary files a/mods/moreblocks/textures/moreblocks_obsidian_glass_stairsplus.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_plankstone.png b/mods/moreblocks/textures/moreblocks_plankstone.png deleted file mode 100644 index ac866b8..0000000 Binary files a/mods/moreblocks/textures/moreblocks_plankstone.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_plankstone_2.png b/mods/moreblocks/textures/moreblocks_plankstone_2.png deleted file mode 100644 index 52656b0..0000000 Binary files a/mods/moreblocks/textures/moreblocks_plankstone_2.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_rope.png b/mods/moreblocks/textures/moreblocks_rope.png deleted file mode 100644 index 55967a6..0000000 Binary files a/mods/moreblocks/textures/moreblocks_rope.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_split_stone_tile.png b/mods/moreblocks/textures/moreblocks_split_stone_tile.png deleted file mode 100644 index 579e5ac..0000000 Binary files a/mods/moreblocks/textures/moreblocks_split_stone_tile.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_split_stone_tile_top.png b/mods/moreblocks/textures/moreblocks_split_stone_tile_top.png deleted file mode 100644 index 76e39df..0000000 Binary files a/mods/moreblocks/textures/moreblocks_split_stone_tile_top.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_stone_bricks.png b/mods/moreblocks/textures/moreblocks_stone_bricks.png deleted file mode 100644 index 52c8ca8..0000000 Binary files a/mods/moreblocks/textures/moreblocks_stone_bricks.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_stone_tile.png b/mods/moreblocks/textures/moreblocks_stone_tile.png deleted file mode 100644 index 20b070e..0000000 Binary files a/mods/moreblocks/textures/moreblocks_stone_tile.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_super_glow_glass.png b/mods/moreblocks/textures/moreblocks_super_glow_glass.png deleted file mode 100644 index 65e09f4..0000000 Binary files a/mods/moreblocks/textures/moreblocks_super_glow_glass.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_super_glow_glass_stairsplus.png b/mods/moreblocks/textures/moreblocks_super_glow_glass_stairsplus.png deleted file mode 100644 index b8a6657..0000000 Binary files a/mods/moreblocks/textures/moreblocks_super_glow_glass_stairsplus.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_sweeper.png b/mods/moreblocks/textures/moreblocks_sweeper.png deleted file mode 100644 index e901ef0..0000000 Binary files a/mods/moreblocks/textures/moreblocks_sweeper.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_trap_glass.png b/mods/moreblocks/textures/moreblocks_trap_glass.png deleted file mode 100644 index e0d1c26..0000000 Binary files a/mods/moreblocks/textures/moreblocks_trap_glass.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_trap_stone.png b/mods/moreblocks/textures/moreblocks_trap_stone.png deleted file mode 100644 index 05a2531..0000000 Binary files a/mods/moreblocks/textures/moreblocks_trap_stone.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_wood.png b/mods/moreblocks/textures/moreblocks_wood.png deleted file mode 100644 index 66f2b72..0000000 Binary files a/mods/moreblocks/textures/moreblocks_wood.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_wood_tile.png b/mods/moreblocks/textures/moreblocks_wood_tile.png deleted file mode 100644 index c05a56f..0000000 Binary files a/mods/moreblocks/textures/moreblocks_wood_tile.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_wood_tile_center.png b/mods/moreblocks/textures/moreblocks_wood_tile_center.png deleted file mode 100644 index 7b8f822..0000000 Binary files a/mods/moreblocks/textures/moreblocks_wood_tile_center.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_wood_tile_down.png b/mods/moreblocks/textures/moreblocks_wood_tile_down.png deleted file mode 100644 index aedddfb..0000000 Binary files a/mods/moreblocks/textures/moreblocks_wood_tile_down.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_wood_tile_flipped.png b/mods/moreblocks/textures/moreblocks_wood_tile_flipped.png deleted file mode 100644 index 66eb5a6..0000000 Binary files a/mods/moreblocks/textures/moreblocks_wood_tile_flipped.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_wood_tile_full.png b/mods/moreblocks/textures/moreblocks_wood_tile_full.png deleted file mode 100644 index 0c28e92..0000000 Binary files a/mods/moreblocks/textures/moreblocks_wood_tile_full.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_wood_tile_left.png b/mods/moreblocks/textures/moreblocks_wood_tile_left.png deleted file mode 100644 index b84166f..0000000 Binary files a/mods/moreblocks/textures/moreblocks_wood_tile_left.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_wood_tile_right.png b/mods/moreblocks/textures/moreblocks_wood_tile_right.png deleted file mode 100644 index 883f44c..0000000 Binary files a/mods/moreblocks/textures/moreblocks_wood_tile_right.png and /dev/null differ diff --git a/mods/moreblocks/textures/moreblocks_wood_tile_up.png b/mods/moreblocks/textures/moreblocks_wood_tile_up.png deleted file mode 100644 index 6221910..0000000 Binary files a/mods/moreblocks/textures/moreblocks_wood_tile_up.png and /dev/null differ diff --git a/mods/moreores b/mods/moreores new file mode 160000 index 0000000..76b04dd --- /dev/null +++ b/mods/moreores @@ -0,0 +1 @@ +Subproject commit 76b04dd3bea51b9224c102c781055c2836966d1d diff --git a/mods/moreores/LICENSE.txt b/mods/moreores/LICENSE.txt deleted file mode 100644 index 2499ee9..0000000 --- a/mods/moreores/LICENSE.txt +++ /dev/null @@ -1,17 +0,0 @@ -+---- GNU GPL v3 ----+ - -More Ores -- a Minetest mod that adds ores. -Copyright (C) 2013 Calinou - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . diff --git a/mods/moreores/README.txt b/mods/moreores/README.txt deleted file mode 100644 index 660b2ab..0000000 --- a/mods/moreores/README.txt +++ /dev/null @@ -1,24 +0,0 @@ -Calinou's Minetest Mods -===================== - -Calinou's Mods for Minetest [http://minetest.net], a free and opensource Minecraft-like game. - -This Git repository is mostly made for servers; it allows easy updating. - -To install, just clone this repository somewhere, then copy the "calinou_mods" folder in the "mods/minetest" folder of Minetest's installation folder. - - - -Misc stuff -===================== - -All these mods' source codes, except More Ores are under the zlib/libpng license. More Ores is under the GNU GPLv3; the mods' textures are under the CC BY-SA 3.0 Unported. - -Mods' forum threads: -More Blocks: http://minetest.net/forum/viewtopic.php?id=509 -More Ores: http://minetest.net/forum/viewtopic.php?id=549 -Map Tools: http://minetest.net/forum/viewtopic.php?id=1882 -Doors+: http://minetest.net/forum/viewtopic.php?id=2059 -Stairs+: http://minetest.net/forum/viewtopic.php?id=2092 - -Pitriss note: version 05.July 2014 - 779baaf3de105a609213c87ce3399371e651204c - removed new recipes for locked chests \ No newline at end of file diff --git a/mods/moreores/_config.txt b/mods/moreores/_config.txt deleted file mode 100644 index 68c6658..0000000 --- a/mods/moreores/_config.txt +++ /dev/null @@ -1,35 +0,0 @@ ------------------------------------------------------------------------------- ------------------------------- CONFIGURATION --------------------------------- ------------------------------------------------------------------------------- - ------------------------------------------------------------------------------- --------- Change settings by changing the values after the "=". --------------- ------------------------------------------------------------------------------- - --- Chunk sizes for ore generation (bigger = ore deposits are more scattered around) -moreores_copper_chunk_size = 8 -moreores_tin_chunk_size = 7 -moreores_silver_chunk_size = 11 -moreores_gold_chunk_size = 14 -moreores_mithril_chunk_size = 11 - --- Amount of ore per chunk (higher = bigger ore deposits) -moreores_copper_ore_per_chunk = 8 -moreores_tin_ore_per_chunk = 3 -moreores_silver_ore_per_chunk = 4 -moreores_gold_ore_per_chunk = 4 -moreores_mithril_ore_per_chunk = 1 - --- Minimal depths of ore generation (Y coordinate, 0 being sea level by default) -moreores_copper_min_depth = -31000 -moreores_tin_min_depth = -31000 -moreores_silver_min_depth = -31000 -moreores_gold_min_depth = -31000 -moreores_mithril_min_depth = -31000 - --- Maximal depths of ore generation (Y coordinate, 0 being sea level by default) -moreores_copper_max_depth = 64 -moreores_tin_max_depth = 8 -moreores_silver_max_depth = -2 -moreores_gold_max_depth = -64 -moreores_mithril_max_depth = -512 diff --git a/mods/moreores/depends.txt b/mods/moreores/depends.txt deleted file mode 100644 index 0219052..0000000 --- a/mods/moreores/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default -mg? diff --git a/mods/moreores/init.lua b/mods/moreores/init.lua deleted file mode 100644 index 82b41da..0000000 --- a/mods/moreores/init.lua +++ /dev/null @@ -1,348 +0,0 @@ --- Load translation library if intllib is installed - -local S -if (minetest.get_modpath("intllib")) then - dofile(minetest.get_modpath("intllib").."/intllib.lua") - S = intllib.Getter(minetest.get_current_modname()) - else - S = function ( s ) return s end -end - -moreores_modpath = minetest.get_modpath("moreores") -dofile(moreores_modpath .. "/_config.txt") - ---[[ -**** -More Ores -by Calinou -with the help of Nore/Novatux -Licensed under the CC0 -**** ---]] - --- Utility functions - -local default_stone_sounds = default.node_sound_stone_defaults() - -local function hoe_on_use(itemstack, user, pointed_thing, uses) - local pt = pointed_thing - -- check if pointing at a node - if not pt then - return - end - if pt.type ~= "node" then - return - end - - local under = minetest.get_node(pt.under) - local pos = {x = pt.under.x, y = pt.under.y + 1, z = pt.under.z} - local above = minetest.get_node(pos) - - -- Return if any of the nodes is not registered: - if not minetest.registered_nodes[under.name] then return end - if not minetest.registered_nodes[above.name] then return end - - -- Check if the node above the pointed thing is air: - if above.name ~= "air" then return end - - -- Check if pointing at dirt: - if minetest.get_item_group(under.name, "soil") ~= 1 then return end - - -- Turn the node into soil, wear out item and play sound: - minetest.set_node(pt.under, {name ="farming:soil"}) - minetest.sound_play("default_dig_crumbly", {pos = pt.under, gain = 0.5}) - itemstack:add_wear(65535 / (uses - 1)) - return itemstack -end - -local function get_recipe(c, name) - if name == "sword" then - return {{c}, {c}, {"group:stick"}} - end - if name == "shovel" then - return {{c}, {"group:stick"}, {"group:stick"}} - end - if name == "axe" then - return {{c, c}, {c, "group:stick"}, {"", "group:stick"}} - end - if name == "pick" then - return {{c, c, c}, {"", "group:stick", ""}, {"", "group:stick", ""}} - end - if name == "hoe" then - return {{c, c}, {"", "group:stick"}, {"", "group:stick"}} - end - if name == "block" then - return {{c, c, c}, {c, c, c}, {c, c, c}} - end -end - -local function add_ore(modname, description, mineral_name, oredef) - local img_base = modname .. "_" .. mineral_name - local toolimg_base = modname .. "_tool_"..mineral_name - local tool_base = modname .. ":" - local tool_post = "_" .. mineral_name - local item_base = tool_base .. mineral_name - local ingot = item_base .. "_ingot" - local lumpitem = item_base .. "_lump" - local ingotcraft = ingot - - if oredef.makes.ore then - minetest.register_node(modname .. ":mineral_"..mineral_name, { - description = S("%s Ore"):format(S(description)), - tiles = {"default_stone.png^"..modname.."_mineral_"..mineral_name..".png"}, - groups = {cracky = 3}, - sounds = default_stone_sounds, - drop = lumpitem - }) - end - - if oredef.makes.block then - local blockitem = item_base .. "_block" - minetest.register_node(blockitem, { - description = S("%s Block"):format(S(description)), - tiles = { img_base .. "_block.png" }, - groups = {snappy = 1,bendy = 2, cracky = 1,melty = 2,level= 2}, - sounds = default_stone_sounds - }) - minetest.register_alias(mineral_name.."_block", blockitem) - if oredef.makes.ingot then - minetest.register_craft( { - output = blockitem, - recipe = get_recipe(ingot, "block") - }) - minetest.register_craft( { - output = ingot .. " 9", - recipe = { - { blockitem } - } - }) - end - end - - if oredef.makes.lump then - minetest.register_craftitem(lumpitem, { - description = S("%s Lump"):format(S(description)), - inventory_image = img_base .. "_lump.png", - }) - minetest.register_alias(mineral_name .. "_lump", lumpitem) - if oredef.makes.ingot then - minetest.register_craft({ - type = "cooking", - output = ingot, - recipe = lumpitem - }) - end - end - - if oredef.makes.ingot then - minetest.register_craftitem(ingot, { - description = S("%s Ingot"):format(S(description)), - inventory_image = img_base .. "_ingot.png", - }) - minetest.register_alias(mineral_name .. "_ingot", ingot) - end - - oredef.oredef.ore_type = "scatter" - oredef.oredef.ore = modname .. ":mineral_" .. mineral_name - oredef.oredef.wherein = "default:stone" - - minetest.register_ore(oredef.oredef) - - for toolname, tooldef in pairs(oredef.tools) do - local tdef = { - description = "", - inventory_image = toolimg_base .. toolname .. ".png", - tool_capabilities = { - max_drop_level = 3, - groupcaps = tooldef - } - } - - if toolname == "sword" then - tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval - tdef.tool_capabilities.damage_groups = oredef.damage_groups - tdef.description = S("%s Sword"):format(S(description)) - end - - if toolname == "pick" then - tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval - tdef.tool_capabilities.damage_groups = oredef.damage_groups - tdef.description = S("%s Pickaxe"):format(S(description)) - end - - if toolname == "axe" then - tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval - tdef.tool_capabilities.damage_groups = oredef.damage_groups - tdef.description = S("%s Axe"):format(S(description)) - end - - if toolname == "shovel" then - tdef.full_punch_interval = oredef.full_punch_interval - tdef.tool_capabilities.damage_groups = oredef.damage_groups - tdef.description = S("%s Shovel"):format(S(description)) - end - - if toolname == "hoe" then - tdef.description = S("%s Hoe"):format(S(description)) - local uses = tooldef.uses - tooldef.uses = nil - tdef.on_use = function(itemstack, user, pointed_thing) - return hoe_on_use(itemstack, user, pointed_thing, uses) - end - end - - local fulltoolname = tool_base .. toolname .. tool_post - minetest.register_tool(fulltoolname, tdef) - minetest.register_alias(toolname .. tool_post, fulltoolname) - if oredef.makes.ingot then - minetest.register_craft({ - output = fulltoolname, - recipe = get_recipe(ingot, toolname) - }) - end - end -end - --- Add everything: -local modname = "moreores" - -local oredefs = { - silver = { - desc = "Silver", - makes = {ore = true, block = true, lump = true, ingot = true, chest = true}, - oredef = {clust_scarcity = moreores_silver_chunk_size * moreores_silver_chunk_size * moreores_silver_chunk_size, - clust_num_ores = moreores_silver_ore_per_chunk, - clust_size = moreores_silver_chunk_size, - height_min = moreores_silver_min_depth, - height_max = moreores_silver_max_depth - }, - tools = { - pick = { - cracky = {times = {[1] = 2.60, [2] = 1.00, [3] = 0.60}, uses = 100, maxlevel= 1} - }, - hoe = { - uses = 300 - }, - shovel = { - crumbly = {times = {[1] = 1.10, [2] = 0.40, [3] = 0.25}, uses = 100, maxlevel= 1} - }, - axe = { - choppy = {times = {[1] = 2.50, [2] = 0.80, [3] = 0.50}, uses = 100, maxlevel= 1}, - fleshy = {times = {[2] = 1.10, [3] = 0.60}, uses = 100, maxlevel= 1} - }, - sword = { - fleshy = {times = {[2] = 0.70, [3] = 0.30}, uses = 100, maxlevel= 1}, - snappy = {times = {[2] = 0.70, [3] = 0.30}, uses = 100, maxlevel= 1}, - choppy = {times = {[3] = 0.80}, uses = 100, maxlevel= 0} - } - }, - full_punch_interval = 1.0, - damage_groups = {fleshy = 6}, - }, - tin = { - desc = "Tin", - makes = {ore = true, block = true, lump = true, ingot = true, chest = false}, - oredef = {clust_scarcity = moreores_tin_chunk_size * moreores_tin_chunk_size * moreores_tin_chunk_size, - clust_num_ores = moreores_tin_ore_per_chunk, - clust_size = moreores_tin_chunk_size, - height_min = moreores_tin_min_depth, - height_max = moreores_tin_max_depth - }, - tools = {} - }, - mithril = { - desc = "Mithril", - makes = {ore = true, block = true, lump = true, ingot = true, chest = false}, - oredef = {clust_scarcity = moreores_mithril_chunk_size * moreores_mithril_chunk_size * moreores_mithril_chunk_size, - clust_num_ores = moreores_mithril_ore_per_chunk, - clust_size = moreores_mithril_chunk_size, - height_min = moreores_mithril_min_depth, - height_max = moreores_mithril_max_depth - }, - tools = { - pick = { - cracky = {times = {[1] = 2.25, [2] = 0.55, [3] = 0.35}, uses = 200, maxlevel= 1} - }, - hoe = { - uses = 1000 - }, - shovel = { - crumbly = {times = {[1] = 0.70, [2] = 0.35, [3] = 0.20}, uses = 200, maxlevel= 1} - }, - axe = { - choppy = {times = {[1] = 1.75, [2] = 0.45, [3] = 0.45}, uses = 200, maxlevel= 1}, - fleshy = {times = {[2] = 0.95, [3] = 0.30}, uses = 200, maxlevel= 1} - }, - sword = { - fleshy = {times = {[2] = 0.65, [3] = 0.25}, uses = 200, maxlevel= 1}, - snappy = {times = {[2] = 0.70, [3] = 0.25}, uses = 200, maxlevel= 1}, - choppy = {times = {[3] = 0.65}, uses = 200, maxlevel= 0} - } - }, - full_punch_interval = 0.45, - damage_groups = {fleshy = 9}, - } -} - -for orename,def in pairs(oredefs) do - add_ore(modname, def.desc, orename, def) -end - --- Copper rail (special node) - -minetest.register_craft({ - output = "moreores:copper_rail 16", - recipe = { - {"default:copper_ingot", "", "default:copper_ingot"}, - {"default:copper_ingot", "group:stick", "default:copper_ingot"}, - {"default:copper_ingot", "", "default:copper_ingot"} - } -}) - --- Bronze has some special cases, because it is made from copper and tin: -minetest.register_craft( { - type = "shapeless", - output = "default:bronze_ingot 3", - recipe = { - "moreores:tin_ingot", - "default:copper_ingot", - "default:copper_ingot", - } -}) - --- Unique node: -minetest.register_node("moreores:copper_rail", { - description = S("Copper Rail"), - drawtype = "raillike", - tiles = {"moreores_copper_rail.png", "moreores_copper_rail_curved.png", "moreores_copper_rail_t_junction.png", "moreores_copper_rail_crossing.png"}, - inventory_image = "moreores_copper_rail.png", - wield_image = "moreores_copper_rail.png", - paramtype = "light", - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "fixed", - fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, - }, - groups = {bendy = 2,snappy = 1,dig_immediate = 2,rail= 1, connect_to_raillike = 1}, - mesecons = { - effector = { - action_on = function(pos, node) - minetest.get_meta(pos):set_string("cart_acceleration", "0.5") - end, - - action_off = function(pos, node) - minetest.get_meta(pos):set_string("cart_acceleration", "0") - end, - }, - }, -}) - --- mg support: -if minetest.get_modpath("mg") then - dofile(moreores_modpath.."/mg.lua") -end - -if minetest.setting_getbool("log_mods") then - print(S("[moreores] loaded.")) -end diff --git a/mods/moreores/locale/de.txt b/mods/moreores/locale/de.txt deleted file mode 100644 index 2eb6075..0000000 --- a/mods/moreores/locale/de.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Translation by Xanthin - -[moreores] loaded. = [moreores] geladen. - -%s Ore = %serz -%s Lump = %sklumpen -%s Ingot = %sbarren -%s Block = %sblock -%s Pickaxe = %sspitzhacke -%s Shovel = %sschaufel -%s Axe = %saxt -%s Sword = %sschwert -%s Hoe = %shacke - -Copper = Kupfer -Tin = Zinn -Bronze = Bronze -Silver = Silber -Gold = Gold -Mithril = Mithril - -Copper Rail = Kupferschiene diff --git a/mods/moreores/locale/es.txt b/mods/moreores/locale/es.txt deleted file mode 100644 index 1344a5a..0000000 --- a/mods/moreores/locale/es.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Translation by kaeza - -[moreores] loaded. = [moreores] cargado. - -%s Ore = Mineral de %s -%s Lump = Pepita de %s -%s Ingot = Lingote de %s -%s Block = Bloque de %s -%s Pickaxe = Pico de %s -%s Shovel = Pala de %s -%s Axe = Hacha de %s -%s Sword = Espada de %s - -Copper = cobre -Tin = estaño -Bronze = bronce -Silver = plata -Gold = oro -Mithril = mitrilo - -Copper Rail = Riel de Cobre diff --git a/mods/moreores/locale/fr.txt b/mods/moreores/locale/fr.txt deleted file mode 100644 index 65687fa..0000000 --- a/mods/moreores/locale/fr.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Translation by Calinou - -[moreores] loaded. = [moreores] a été chargé. - -%s Ore = Minerai en %s -%s Lump = Roche en %s -%s Ingot = Lingot en %s -%s Block = Bloc en %s -%s Pickaxe = Pioche en %s -%s Shovel = Pelle en %s -%s Axe = Hache en %s -%s Sword = Épée en %s - -Copper = cuivre -Tin = étain -Bronze = bronze -Silver = argent -Gold = or -Mithril = mithril - -Copper Rail = Rail en cuivre diff --git a/mods/moreores/locale/it.txt b/mods/moreores/locale/it.txt deleted file mode 100644 index dcd8c52..0000000 --- a/mods/moreores/locale/it.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Translation by Pagliaccio - -[moreores] loaded. = [moreores] caricato. - -%s Ore = Minerale di %s -%s Lump = %s grezzo -%s Ingot = Lingotto di %s -%s Block = Blocco di %s -%s Pickaxe = Piccone di %s -%s Shovel = Badile di %s -%s Axe = Ascia di %s -%s Sword = Spada di %s - -Copper = Rame -Tin = Stagno -Bronze = Bronzo -Silver = Argento -Gold = Oro -Mithril = Mithril - -Copper Rail = Binario di rame \ No newline at end of file diff --git a/mods/moreores/mg.lua b/mods/moreores/mg.lua deleted file mode 100644 index c950a4b..0000000 --- a/mods/moreores/mg.lua +++ /dev/null @@ -1,46 +0,0 @@ -mg.register_ore({ - name = "moreores:mineral_tin", - wherein = "default:stone", - seeddiff = 8, - maxvdistance = 10.5, - maxheight = 8, - seglenghtn = 15, - seglenghtdev = 6, - segincln = 0, - segincldev = 0.6, - turnangle = 57, - forkturnangle = 57, - numperblock = 2 -}) - -mg.register_ore({ - name = "moreores:mineral_silver", - wherein = "default:stone", - seeddiff = 9, - maxvdistance = 10.5, - maxheight = -2, - seglenghtn = 15, - seglenghtdev = 6, - sizen = 60, - sizedev = 30, - segincln = 0, - segincldev = 0.6, - turnangle = 57, - forkturnangle = 57, - numperblock = 2 -}) - -mg.register_ore({ - name = "moreores:mineral_mithril", - wherein = "default:stone", - seeddiff = 10, - maxvdistance = 10.5, - maxheight = -512, - seglenghtn = 2, - seglenghtdev = 4, - sizen = 12, - sizedev = 5, - segincln = 0, - segincldev = 0.6, - turnangle = 57, -}) diff --git a/mods/moreores/textures/moreores_bronze_block.png b/mods/moreores/textures/moreores_bronze_block.png deleted file mode 100644 index 3f714df..0000000 Binary files a/mods/moreores/textures/moreores_bronze_block.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_bronze_ingot.png b/mods/moreores/textures/moreores_bronze_ingot.png deleted file mode 100644 index 99b3f02..0000000 Binary files a/mods/moreores/textures/moreores_bronze_ingot.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_copper_block.png b/mods/moreores/textures/moreores_copper_block.png deleted file mode 100644 index 9a164af..0000000 Binary files a/mods/moreores/textures/moreores_copper_block.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_copper_ingot.png b/mods/moreores/textures/moreores_copper_ingot.png deleted file mode 100644 index 9e58e9d..0000000 Binary files a/mods/moreores/textures/moreores_copper_ingot.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_copper_lump.png b/mods/moreores/textures/moreores_copper_lump.png deleted file mode 100644 index 45702a9..0000000 Binary files a/mods/moreores/textures/moreores_copper_lump.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_copper_rail.png b/mods/moreores/textures/moreores_copper_rail.png deleted file mode 100644 index 73963f6..0000000 Binary files a/mods/moreores/textures/moreores_copper_rail.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_copper_rail_crossing.png b/mods/moreores/textures/moreores_copper_rail_crossing.png deleted file mode 100644 index 6ff1153..0000000 Binary files a/mods/moreores/textures/moreores_copper_rail_crossing.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_copper_rail_curved.png b/mods/moreores/textures/moreores_copper_rail_curved.png deleted file mode 100644 index 6cfc8c2..0000000 Binary files a/mods/moreores/textures/moreores_copper_rail_curved.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_copper_rail_t_junction.png b/mods/moreores/textures/moreores_copper_rail_t_junction.png deleted file mode 100644 index 5775919..0000000 Binary files a/mods/moreores/textures/moreores_copper_rail_t_junction.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_gold_block.png b/mods/moreores/textures/moreores_gold_block.png deleted file mode 100644 index 2f54afd..0000000 Binary files a/mods/moreores/textures/moreores_gold_block.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_gold_ingot.png b/mods/moreores/textures/moreores_gold_ingot.png deleted file mode 100644 index 00a8321..0000000 Binary files a/mods/moreores/textures/moreores_gold_ingot.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_gold_lump.png b/mods/moreores/textures/moreores_gold_lump.png deleted file mode 100644 index e63a6d2..0000000 Binary files a/mods/moreores/textures/moreores_gold_lump.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_mineral_copper.png b/mods/moreores/textures/moreores_mineral_copper.png deleted file mode 100644 index bc3d9c1..0000000 Binary files a/mods/moreores/textures/moreores_mineral_copper.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_mineral_gold.png b/mods/moreores/textures/moreores_mineral_gold.png deleted file mode 100644 index c8aede3..0000000 Binary files a/mods/moreores/textures/moreores_mineral_gold.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_mineral_mithril.png b/mods/moreores/textures/moreores_mineral_mithril.png deleted file mode 100644 index 126daea..0000000 Binary files a/mods/moreores/textures/moreores_mineral_mithril.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_mineral_silver.png b/mods/moreores/textures/moreores_mineral_silver.png deleted file mode 100644 index 6b57c62..0000000 Binary files a/mods/moreores/textures/moreores_mineral_silver.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_mineral_tin.png b/mods/moreores/textures/moreores_mineral_tin.png deleted file mode 100644 index fc71837..0000000 Binary files a/mods/moreores/textures/moreores_mineral_tin.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_mithril_block.png b/mods/moreores/textures/moreores_mithril_block.png deleted file mode 100644 index 1b3398f..0000000 Binary files a/mods/moreores/textures/moreores_mithril_block.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_mithril_ingot.png b/mods/moreores/textures/moreores_mithril_ingot.png deleted file mode 100644 index 1630a68..0000000 Binary files a/mods/moreores/textures/moreores_mithril_ingot.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_mithril_lump.png b/mods/moreores/textures/moreores_mithril_lump.png deleted file mode 100644 index 3aa7255..0000000 Binary files a/mods/moreores/textures/moreores_mithril_lump.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_silver_block.png b/mods/moreores/textures/moreores_silver_block.png deleted file mode 100644 index 556af1c..0000000 Binary files a/mods/moreores/textures/moreores_silver_block.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_silver_ingot.png b/mods/moreores/textures/moreores_silver_ingot.png deleted file mode 100644 index 49c7a07..0000000 Binary files a/mods/moreores/textures/moreores_silver_ingot.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_silver_lump.png b/mods/moreores/textures/moreores_silver_lump.png deleted file mode 100644 index f71f5e3..0000000 Binary files a/mods/moreores/textures/moreores_silver_lump.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tin_block.png b/mods/moreores/textures/moreores_tin_block.png deleted file mode 100644 index 9dd053c..0000000 Binary files a/mods/moreores/textures/moreores_tin_block.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tin_ingot.png b/mods/moreores/textures/moreores_tin_ingot.png deleted file mode 100644 index 901d231..0000000 Binary files a/mods/moreores/textures/moreores_tin_ingot.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tin_lump.png b/mods/moreores/textures/moreores_tin_lump.png deleted file mode 100644 index 5114985..0000000 Binary files a/mods/moreores/textures/moreores_tin_lump.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_bronzeaxe.png b/mods/moreores/textures/moreores_tool_bronzeaxe.png deleted file mode 100644 index cea9f35..0000000 Binary files a/mods/moreores/textures/moreores_tool_bronzeaxe.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_bronzepick.png b/mods/moreores/textures/moreores_tool_bronzepick.png deleted file mode 100644 index e9d3ca7..0000000 Binary files a/mods/moreores/textures/moreores_tool_bronzepick.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_bronzeshovel.png b/mods/moreores/textures/moreores_tool_bronzeshovel.png deleted file mode 100644 index cdc7384..0000000 Binary files a/mods/moreores/textures/moreores_tool_bronzeshovel.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_bronzesword.png b/mods/moreores/textures/moreores_tool_bronzesword.png deleted file mode 100644 index aa6adc3..0000000 Binary files a/mods/moreores/textures/moreores_tool_bronzesword.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_goldaxe.png b/mods/moreores/textures/moreores_tool_goldaxe.png deleted file mode 100644 index 0290f3f..0000000 Binary files a/mods/moreores/textures/moreores_tool_goldaxe.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_goldpick.png b/mods/moreores/textures/moreores_tool_goldpick.png deleted file mode 100644 index 129e449..0000000 Binary files a/mods/moreores/textures/moreores_tool_goldpick.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_goldshovel.png b/mods/moreores/textures/moreores_tool_goldshovel.png deleted file mode 100644 index 1d07af8..0000000 Binary files a/mods/moreores/textures/moreores_tool_goldshovel.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_goldsword.png b/mods/moreores/textures/moreores_tool_goldsword.png deleted file mode 100644 index e94ec05..0000000 Binary files a/mods/moreores/textures/moreores_tool_goldsword.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_mithrilaxe.png b/mods/moreores/textures/moreores_tool_mithrilaxe.png deleted file mode 100644 index f243a29..0000000 Binary files a/mods/moreores/textures/moreores_tool_mithrilaxe.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_mithrilhoe.png b/mods/moreores/textures/moreores_tool_mithrilhoe.png deleted file mode 100644 index 9d226f7..0000000 Binary files a/mods/moreores/textures/moreores_tool_mithrilhoe.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_mithrilpick.png b/mods/moreores/textures/moreores_tool_mithrilpick.png deleted file mode 100644 index ff1ed7c..0000000 Binary files a/mods/moreores/textures/moreores_tool_mithrilpick.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_mithrilshovel.png b/mods/moreores/textures/moreores_tool_mithrilshovel.png deleted file mode 100644 index 18a7de0..0000000 Binary files a/mods/moreores/textures/moreores_tool_mithrilshovel.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_mithrilsword.png b/mods/moreores/textures/moreores_tool_mithrilsword.png deleted file mode 100644 index 09a030c..0000000 Binary files a/mods/moreores/textures/moreores_tool_mithrilsword.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_silveraxe.png b/mods/moreores/textures/moreores_tool_silveraxe.png deleted file mode 100644 index d33edd5..0000000 Binary files a/mods/moreores/textures/moreores_tool_silveraxe.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_silverhoe.png b/mods/moreores/textures/moreores_tool_silverhoe.png deleted file mode 100644 index 066b908..0000000 Binary files a/mods/moreores/textures/moreores_tool_silverhoe.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_silverpick.png b/mods/moreores/textures/moreores_tool_silverpick.png deleted file mode 100644 index 69de097..0000000 Binary files a/mods/moreores/textures/moreores_tool_silverpick.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_silvershovel.png b/mods/moreores/textures/moreores_tool_silvershovel.png deleted file mode 100644 index d55185b..0000000 Binary files a/mods/moreores/textures/moreores_tool_silvershovel.png and /dev/null differ diff --git a/mods/moreores/textures/moreores_tool_silversword.png b/mods/moreores/textures/moreores_tool_silversword.png deleted file mode 100644 index 220ba2b..0000000 Binary files a/mods/moreores/textures/moreores_tool_silversword.png and /dev/null differ diff --git a/mods/trash_can b/mods/trash_can new file mode 160000 index 0000000..a94e587 --- /dev/null +++ b/mods/trash_can @@ -0,0 +1 @@ +Subproject commit a94e5872aafd46e9508f733a7955b7dd5599d5dd diff --git a/mods/trash_can/README.txt b/mods/trash_can/README.txt deleted file mode 100644 index 1ec9eef..0000000 --- a/mods/trash_can/README.txt +++ /dev/null @@ -1,62 +0,0 @@ - _____ _ _____ -|_ _| | | / __ \ - | |_ __ __ _ ___| |__ | / \/ __ _ _ __ - | | '__/ _` / __| '_ \ | | / _` | '_ \ - | | | | (_| \__ \ | | | | \__/\ (_| | | | | - \_/_| \__,_|___/_| |_| \____/\__,_|_| |_| - - - - -This mod adds a wooden trash can, and a dumpster to the game. Right click it, put in your trash, and click the empty trash button. -You can also throw things in the wooden trash can by pressing "q" or throwing them out of your inventory. - - -Dependencies: Default - - - -License: CC BY-SA 3.0 - -This work is licensed under a Creative Commons Attribution 3.0 Unported License. -More info at http://creativecommons.org/licenses/by/3.0/ - - - -Crafting: - - -Wooden trash can: -w = wood planks x = nothing - -w|x|w ------ -w|x|w ------ -w|w|w - - -Dumpster: -i = iron ingot c = coal block g = dark green dye - -c|c|c ------ -i|g|i ------ -i|i|i - - -Contributers: - - -Zeg9: - -Made it so you can throw stuff in the trash can (by pressing "q") - - -Mossmanikin: - -Made the nodeboxes for the dumpster, the textures for the wooden trash can, and the texture for the dumpster node. -(with some editing by me) - - diff --git a/mods/trash_can/depends.txt b/mods/trash_can/depends.txt deleted file mode 100644 index 331d858..0000000 --- a/mods/trash_can/depends.txt +++ /dev/null @@ -1 +0,0 @@ -default \ No newline at end of file diff --git a/mods/trash_can/dumpster.lua b/mods/trash_can/dumpster.lua deleted file mode 100644 index ea2d4c1..0000000 --- a/mods/trash_can/dumpster.lua +++ /dev/null @@ -1,145 +0,0 @@ --- Dumpster nodes --- by Mossmanikin --- License: WTFPL - ---Custom Sounds -function default.node_sound_metal_defaults(table) - table = table or {} - table.footstep = table.footstep or {name="default_hard_footstep", gain=0.4} - table.dig = table.dig or {name="metal_bang", gain=0.6} - table.dug = table.dug or {name="default_dug_node", gain=1.0} - default.node_sound_defaults(table) - return table -end - ---Nodeboxes(some are unused) -local cube = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5} -local selectah = {-0.4375, -0.5, -0.9375, 1.4375, 0.75, 0.4375} -local container = { - {-0.4375, -0.5, -0.9375, 1.4375, 0.75, 0.4375}, - {-0.5, 0.75, -1.0, 1.5, 0.875, 0.5}, -} - -local container2 = { -- the one on Container.png - {-0.4375, -0.4375, -0.9375, -0.375 , 0.625 , 0.4375}, - { 1.375 , -0.4375, -0.9375, 1.4375, 0.625 , 0.4375}, - {-0.4375, -0.4375, -0.9375, 1.4375, 0.625 , -0.875 }, - {-0.4375, -0.4375, 0.375 , 1.4375, 0.625 , 0.4375}, - {-0.375 , -0.5 , -0.875 , 1.375 , -0.4375, 0.375 }, - {-0.5 , 0.625 , -1.0 , -0.375 , 0.75 , 0.5 }, - { 1.375 , 0.625 , -1.0 , 1.5 , 0.75 , 0.5 }, - {-0.5 , 0.625 , -1.0 , 1.5 , 0.75 , -0.875 }, - {-0.5 , 0.625 , 0.375 , 1.5 , 0.75 , 0.5 }, -} - -local container3 = { - -- Top - {-0.4375, 1.125 , 0.1875, 1.4375, 1.1875, 0.4375}, - {-0.4375, 1.0625, 0.0 , 1.4375, 1.125 , 0.4375}, - {-0.4375, 1.0 , -0.1875, 1.4375, 1.0625, 0.4375}, - {-0.4375, 0.9375, -0.375 , 1.4375, 1.0 , 0.4375}, - {-0.4375, 0.875 , -0.5625, 1.4375, 0.9375, 0.4375}, - {-0.4375, 0.8125, -0.75 , 1.4375, 0.875 , 0.4375}, - {-0.4375, 0.75 , -0.9375, 1.4375, 0.8125, 0.4375}, - -- Border - {-0.5 , 0.625 , -1.0 , 1.5 , 0.75 , 0.5 }, - -- Main Body - {-0.4375, -0.4375, -0.9375, 1.4375, 0.625 , 0.4375}, - -- Grip - {-0.5 , 0.0 , -1.0 , -0.25 , 0.25 , 0.5 }, - { 1.25 , 0.0 , -1.0 , 1.5 , 0.25 , 0.5 }, - -- Feet - {-0.4375, -0.5 , -0.9375, -0.1875, -0.4375, -0.6875}, - { 1.1875, -0.5 , -0.9375, 1.4375, -0.4375, -0.6875}, - {-0.4375, -0.5 , 0.1875, -0.1875, -0.4375, 0.4375}, - { 1.1875, -0.5 , 0.1875, 1.4375, -0.4375, 0.4375}, -} - -local container4 = { -- the one on Dumpster.png - -- Top - {-0.4375, 0.75 , -0.9375, 1.4375, 0.875 , 0.4375}, - -- Border - {-0.5 , 0.625 , -1.0 , 1.5 , 0.75 , 0.5 }, - -- Main Body - {-0.4375, -0.4375, -0.9375, 1.4375, 0.625 , 0.4375}, - -- Feet - {-0.4375, -0.5 , -0.9375, -0.1875, -0.4375, -0.6875}, - { 1.1875, -0.5 , -0.9375, 1.4375, -0.4375, -0.6875}, - {-0.4375, -0.5 , 0.1875, -0.1875, -0.4375, 0.4375}, - { 1.1875, -0.5 , 0.1875, 1.4375, -0.4375, 0.4375}, -} - ---Node Registration -minetest.register_node("trash_can:dumpster", { - description = "Dumpster", - paramtype = "light", - paramtype2 = "facedir", - inventory_image = "dumpster_wield.png", - tiles = { - "dumpster_top.png", - "dumpster_bottom.png", - "dumpster_side.png", - "dumpster_side.png", - "dumpster_side.png", - "dumpster_side.png" - }, - drawtype = "nodebox", - selection_box = { - type = "fixed", - fixed = selectah, - }, - node_box = { - type = "fixed", - fixed = container4, - }, - groups = { - cracky = 3, - oddly_breakable_by_hand = 1, - }, - sounds = default.node_sound_metal_defaults(), - on_construct = function(pos) - local meta = minetest.env:get_meta(pos) - meta:set_string("formspec", - "size[8,9]".. - "button[0,0;2,1;empty;Empty Trash]".. - "list[current_name;main;1,1;6,3;]".. - "list[current_player;main;0,5;8,4;]") - meta:set_string("infotext", "Dumpster") - local inv = meta:get_inventory() - inv:set_size("main", 8*4) - end, - can_dig = function(pos,player) - local meta = minetest.env:get_meta(pos); - local inv = meta:get_inventory() - return inv:is_empty("main") - end, - on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - minetest.log("action", player:get_player_name().." moves stuff in dumpster at "..minetest.pos_to_string(pos)) - end, - on_metadata_inventory_put = function(pos, listname, index, stack, player) - minetest.log("action", player:get_player_name().." moves stuff to dumpster at "..minetest.pos_to_string(pos)) - end, - on_metadata_inventory_take = function(pos, listname, index, stack, player) - minetest.log("action", player:get_player_name().." takes stuff from dumpster at "..minetest.pos_to_string(pos)) - end, - on_receive_fields = function(pos, formname, fields, sender) - if fields.empty then - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - for i = 1, inv:get_size("main") do - inv:set_stack("main", i, nil) - end - minetest.sound_play("trash", {to_player=sender:get_player_name(), gain = 2.0}) - end - end, -}) - ---Crafting -minetest.register_craft({ - output = 'trash_can:dumpster', - recipe = { - {'default:coalblock', 'default:coalblock', 'default:coalblock'}, - {'default:steel_ingot', 'dye:dark_green', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - } -}) diff --git a/mods/trash_can/init.lua b/mods/trash_can/init.lua deleted file mode 100644 index 4b7f2f0..0000000 --- a/mods/trash_can/init.lua +++ /dev/null @@ -1,78 +0,0 @@ ---dofiles -dofile(minetest.get_modpath("trash_can").."/dumpster.lua") - ---Node Registration - -minetest.register_node("trash_can:trash_can_wooden",{ - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, - tiles = {"trash_can_wooden_top.png", "trash_can_wooden_top.png", "trash_can_wooden.png"}, - description = "Wooden Trash Can", - drawtype="nodebox", - paramtype = "light", - node_box = { - type = "fixed", - fixed = { - {-0.375000,-0.500000,0.312500,0.375000,0.500000,0.375000}, - {0.312500,-0.500000,-0.375000,0.375000,0.500000,0.375000}, - {-0.375000,-0.500000,-0.375000,0.375000,0.500000,-0.312500}, - {-0.375000,-0.500000,-0.375000,-0.312500,0.500000,0.375000}, - {-0.312500,-0.500000,-0.312500,0.312500,-0.437500,0.312500}, - } - }, - on_construct = function(pos) - local meta = minetest.env:get_meta(pos) - meta:set_string("formspec", - "size[8,9]".. - "button[0,0;2,1;empty;Empty Trash]".. - "list[current_name;main;3,1;2,3;]".. - "list[current_player;main;0,5;8,4;]") - meta:set_string("infotext", "Trash Can") - local inv = meta:get_inventory() - inv:set_size("main", 8*4) - end, - can_dig = function(pos,player) - local meta = minetest.env:get_meta(pos); - local inv = meta:get_inventory() - return inv:is_empty("main") - end, - on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - minetest.log("action", player:get_player_name().. - " moves stuff in trash can at "..minetest.pos_to_string(pos)) - end, - on_metadata_inventory_put = function(pos, listname, index, stack, player) - minetest.log("action", player:get_player_name().." moves stuff to trash can at "..minetest.pos_to_string(pos)) - end, - on_metadata_inventory_take = function(pos, listname, index, stack, player) - minetest.log("action", player:get_player_name().." takes stuff from trash can at "..minetest.pos_to_string(pos)) - end, - on_receive_fields = function(pos, formname, fields, sender) - if fields.empty then - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - for i = 1, inv:get_size("main") do - inv:set_stack("main", i, nil) - end - minetest.sound_play("trash", {to_player=sender:get_player_name(), gain = 1.0}) - end - end, -}) - ---Crafting -minetest.register_craft({ - output = 'trash_can:trash_can_wooden', - recipe = { - {'group:wood', '', 'group:wood'}, - {'group:wood', '', 'group:wood'}, - {'group:wood', 'group:wood', 'group:wood'}, - } -}) - ---Throw In Trash Can Code -local old_on_step = minetest.registered_entities["__builtin:item"].on_step -minetest.registered_entities["__builtin:item"].on_step = function(self, dtime) - if minetest.env:get_node(self.object:getpos()).name == "trash_can:trash_can_wooden" then - self.object:remove() - return - end - old_on_step(self, dtime) -end diff --git a/mods/trash_can/sounds/metal_bang.ogg b/mods/trash_can/sounds/metal_bang.ogg deleted file mode 100644 index 4271992..0000000 Binary files a/mods/trash_can/sounds/metal_bang.ogg and /dev/null differ diff --git a/mods/trash_can/sounds/trash.ogg b/mods/trash_can/sounds/trash.ogg deleted file mode 100644 index 410f35e..0000000 Binary files a/mods/trash_can/sounds/trash.ogg and /dev/null differ diff --git a/mods/trash_can/textures/dumpster_bottom.png b/mods/trash_can/textures/dumpster_bottom.png deleted file mode 100644 index 06850c5..0000000 Binary files a/mods/trash_can/textures/dumpster_bottom.png and /dev/null differ diff --git a/mods/trash_can/textures/dumpster_side.png b/mods/trash_can/textures/dumpster_side.png deleted file mode 100644 index 0e96582..0000000 Binary files a/mods/trash_can/textures/dumpster_side.png and /dev/null differ diff --git a/mods/trash_can/textures/dumpster_top.png b/mods/trash_can/textures/dumpster_top.png deleted file mode 100644 index 2114022..0000000 Binary files a/mods/trash_can/textures/dumpster_top.png and /dev/null differ diff --git a/mods/trash_can/textures/dumpster_wield.png b/mods/trash_can/textures/dumpster_wield.png deleted file mode 100644 index e87c6b4..0000000 Binary files a/mods/trash_can/textures/dumpster_wield.png and /dev/null differ diff --git a/mods/trash_can/textures/trash_can_wooden.png b/mods/trash_can/textures/trash_can_wooden.png deleted file mode 100644 index 7ba44d8..0000000 Binary files a/mods/trash_can/textures/trash_can_wooden.png and /dev/null differ diff --git a/mods/trash_can/textures/trash_can_wooden_top.png b/mods/trash_can/textures/trash_can_wooden_top.png deleted file mode 100644 index 1c674da..0000000 Binary files a/mods/trash_can/textures/trash_can_wooden_top.png and /dev/null differ diff --git a/mods/wireless b/mods/wireless new file mode 160000 index 0000000..88b8efa --- /dev/null +++ b/mods/wireless @@ -0,0 +1 @@ +Subproject commit 88b8efa298dc999a6289e6ccfda6e2cd4a08244c diff --git a/mods/wireless/LICENSE.txt b/mods/wireless/LICENSE.txt deleted file mode 100644 index 5a50b05..0000000 --- a/mods/wireless/LICENSE.txt +++ /dev/null @@ -1,2 +0,0 @@ -All code in wireless mod is GPLv3 -All art CC-BY-SA diff --git a/mods/wireless/README.md b/mods/wireless/README.md deleted file mode 100644 index bceb174..0000000 --- a/mods/wireless/README.md +++ /dev/null @@ -1,17 +0,0 @@ -minetest-wireless -================= - -wireless digilines mod. -No compilation needed. -Drop this folder into games/minetest_game/mods/ and rename it to just "wireless" . -Depends upon whole mesecons, digilines modpacks. -Crafting recipes can be found at the end of init.lua, but they require digilines, -which are not craftable in Jeija's version. -so in order to craft wireless you need to replace digilines with my fork: -in minetest/games/minetest_game/mods : -git clone git://github.com/lordcirth/minetest-mod-digilines.git - -If you want to contribute, please make better textures and nodeboxes - the current ones are just placeholders. -Submit a pull request to https://github.com/lordcirth/minetest-wireless - -See also https://github.com/lordcirth/minetest-digipad - great for entering passcodes / messages to a transmitter. diff --git a/mods/wireless/depends.txt b/mods/wireless/depends.txt deleted file mode 100644 index 47a8d80..0000000 --- a/mods/wireless/depends.txt +++ /dev/null @@ -1,3 +0,0 @@ -default -mesecons -digilines diff --git a/mods/wireless/init.lua b/mods/wireless/init.lua deleted file mode 100644 index a309cc9..0000000 --- a/mods/wireless/init.lua +++ /dev/null @@ -1,148 +0,0 @@ -receivers = {} --- ================ --- Function declarations --- ================ - - function getspec(node) - if not minetest.registered_nodes[node.name] then return false end -- ignore unknown nodes - return minetest.registered_nodes[node.name].wireless -end - - function get_range(pos, target_pos) - local x_dist = target_pos.x - pos.x - local y_dist = target_pos.y - pos.y - local z_dist = target_pos.z- pos.z - local dist = math.sqrt(x_dist^2 + y_dist^2 + z_dist^2) - print(dist) - return dist - end - - local on_digiline_receive = function (pos, node, channel, msg) - local range = 25 - print("digiline received") - for i=1, #receivers do -- Iterate over receivers - if get_range(pos, receivers[i]) <= range then -- max range - local target_node = minetest.env:get_node(receivers[i]) - if getspec(target_node) ~= nil then - local target_spec = getspec(target_node) - target_spec.receiver.action(receivers[i], channel, msg) - else print("Receiver no longer there") - end - end - end -end - -local check_msgs = function (pos, channel, msg) - local meta = minetest.env:get_meta(pos) - if chan1~="" and msg1 ~= "" then --don't send blank digiline msgs - digiline:receptor_send(pos, digiline.rules.default,channel, msg) - end -end - -local register = function (pos) - local meta = minetest.env:get_meta(pos) - local RID = meta:get_int("RID") - if receivers[RID] == nil then - table.insert(receivers, pos) - meta:set_int("RID", #receivers) - end - - -end --- ================ --- ABM declarations - -- ================ -minetest.register_abm({ -nodenames = {"wireless:recv"}, -interval=1.0, -chance=1, -action = function(pos) - register(pos) -end -}) - --- ================ --- Node declarations --- ================ - -minetest.register_node("wireless:recv", { -- Relays wireless to digiline - paramtype = "light", - description = "wireless digiline receiver", - digiline = --declare as digiline-capable - { - receptor = {}, - }, - wireless = { - receiver = { - action = check_msgs - } - }, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.500000,-0.500000,-0.500000,0.500000,-0.125000,0.500000}, --Base - {-0.062500,-0.125000,-0.062500,0.062500,0.500000,0.062500}, --Antenna - } - }, - tiles = {"recv_side.png"}, - groups = {oddly_breakable_by_hand=1}, - on_construct = function(pos) - local meta = minetest.env:get_meta(pos) - meta:set_string("infotext", "Wireless digiline receiver") - register(pos) --register and record RID - end, -}) - -minetest.register_node("wireless:trans", { -- Relays digiline to wireless - paramtype = "light", - description = "wireless digiline transmitter", - digiline = --declare as digiline-capable - { - receptor = {}, - effector = { - action = on_digiline_receive - }, - }, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.500000,-0.500000,-0.500000,0.500000,-0.125000,0.500000}, --Base - {-0.062500,-0.125000,-0.062500,0.062500,0.500000,0.062500}, --Antenna - } - }, - tiles = {"trans_side.png"}, - groups = {oddly_breakable_by_hand=1}, - on_construct = function(pos) - local meta = minetest.env:get_meta(pos) - meta:set_string("infotext", "wireless digiline transmitter") - print("trans construct") - end, - on_punch = function(pos) - print("trans punched") - end - -}) - --- ================ ---Crafting recipes --- ================ - - minetest.register_craft({ - output = 'wireless:trans', - recipe = { - {"mesecons_extrawires:vertical_off", "", ""}, - {"default:steel_ingot", "mesecons_luacontroller:luacontroller0000", "default:steel_ingot"}, - {"default:steel_ingot", "digilines:wire_std_00000000", "default:steel_ingot"} - } - }) - - minetest.register_craft({ - output = 'wireless:recv', - recipe = { - { "", "", "mesecons_extrawires:vertical_off"}, - {"default:steel_ingot", "mesecons_luacontroller:luacontroller0000", "default:steel_ingot"}, - {"default:steel_ingot", "digilines:wire_std_00000000", "default:steel_ingot"} - } - }) \ No newline at end of file diff --git a/mods/wireless/textures/recv_side.png b/mods/wireless/textures/recv_side.png deleted file mode 100644 index 355410e..0000000 Binary files a/mods/wireless/textures/recv_side.png and /dev/null differ diff --git a/mods/wireless/textures/trans_side.png b/mods/wireless/textures/trans_side.png deleted file mode 100644 index ac2f567..0000000 Binary files a/mods/wireless/textures/trans_side.png and /dev/null differ