commit 09889aab68dd1360853784bed0ef41ec1bb06e1e Author: user Date: Thu Jun 28 21:11:10 2012 +0000 Initial import diff --git a/bookmarks.lua b/bookmarks.lua new file mode 100644 index 0000000..ec1eb51 --- /dev/null +++ b/bookmarks.lua @@ -0,0 +1,72 @@ + +-- *********************************************************************************** +-- go ************************************************** +-- *********************************************************************************** +local write_gofile = function() + local output = '' -- WRITE CHANGES TO FILE + for name, coords in pairs(GONETWORK) do output = output..name..':'..coords.x..','..coords.y..','..coords.z..';' end + local f = io.open(minetest.get_worldpath()..'/godtools.gonetwork', "w") + f:write(output) + io.close(f) +end + + +GONETWORK = {} +local gonfile = io.open(minetest.get_worldpath()..'/godtools.gonetwork', "r") +if gonfile then + local contents = gonfile:read() + io.close(gonfile) + if contents ~= nil then + local entries = contents:split(";") + for i,entry in pairs(entries) do + local goname, coords = unpack(entry:split(":")) + local p = {} + p.x, p.y, p.z = string.match(coords, "^([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$") + if p.x and p.y and p.z then + GONETWORK[goname] = {x = tonumber(p.x),y= tonumber(p.y),z = tonumber(p.z)} + end + end + end +end +minetest.register_chatcommand("setgo", { + params = "", + description = "set /go destination", + privs = {server=true}, + func = function(name, param) + local target = minetest.env:get_player_by_name(name) + if target then + GONETWORK[param] = target:getpos() + write_gofile() + minetest.chat_send_player(name, "/go "..param.." set") + return + end + end, +}) +minetest.register_chatcommand("go", { + params = "", + description = "go to destination", + func = function(name, param) + if GONETWORK[param] == nil then minetest.chat_send_player(name, "no such destination") return end + teleportee = minetest.env:get_player_by_name(name) + teleportee:setpos(GONETWORK[param]) + end, +}) +minetest.register_chatcommand("delgo", { + params = "", + description = "delete /go destination", + privs = {server=true}, + func = function(name, param) + if GONETWORK[param] then + GONETWORK[param] = nil + write_gofile() + end + end, +}) +minetest.register_chatcommand("listgo", { + params = "", + description = "list all go destinations", + func = function(name, param) + for go, coords in pairs(GONETWORK) do minetest.chat_send_player(name, "/go "..go.. ' at '..coords.x..','..coords.y..','..coords.z) end + end, +}) + diff --git a/buildings/aztec.bld b/buildings/aztec.bld new file mode 100644 index 0000000..e69de29 diff --git a/buildings/aztectower.bld b/buildings/aztectower.bld new file mode 100644 index 0000000..e69de29 diff --git a/buildings/bighome.bld b/buildings/bighome.bld new file mode 100644 index 0000000..e69de29 diff --git a/crafts.lua b/crafts.lua new file mode 100644 index 0000000..776d1ab --- /dev/null +++ b/crafts.lua @@ -0,0 +1,460 @@ + +minetest.register_craft({ output = 'madblocks:promix 6', recipe = { + {'', 'default:clay_lump',''}, + {'default:dirt', 'default:dirt', 'default:dirt'}, + {'default:dirt', 'default:dirt', 'default:dirt'}, + }}) +minetest.register_craft({ output = 'madblocks:growlamp 1', recipe = { + {'glass', 'torch','glass'}, + {'glass', 'torch','glass'}, + {'glass', 'torch','glass'}, + }}) +-- ** dye +minetest.register_craft({ output = 'node "madblocks:dye_cyan" 4', recipe = { + {'','',''}, + {'node "madblocks:hydroponics_cyanflower"','',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:dye_magenta" 4', recipe = { + {'','',''}, + {'node "madblocks:hydroponics_magentaflower"','',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:dye_yellow" 4', recipe = { + {'','',''}, + {'node "madblocks:hydroponics_yellowflower"','',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:dye_green" 2', recipe = { + {'','',''}, + {'','madblocks:dye_cyan',''}, + {'','madblocks:dye_yellow',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:dye_blue" 2', recipe = { + {'','',''}, + {'','madblocks:dye_cyan',''}, + {'','madblocks:dye_magenta',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:dye_red" 2', recipe = { + {'','',''}, + {'','madblocks:dye_yellow',''}, + {'','madblocks:dye_magenta',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:dye_black" 3', recipe = { + {'','madblocks:dye_cyan',''}, + {'','madblocks:dye_magenta',''}, + {'','madblocks:dye_yellow',''}, + }}) +-- ** bricks +minetest.register_craft({ output = 'node "madblocks:bluecyanbrick" 1', recipe = { + {'','node "madblocks:dye_blue"',''}, + {'','node "brick"',''}, + {'','madblocks:dye_cyan',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:magentabrick" 1', recipe = { + {'','node "madblocks:dye_magenta"',''}, + {'','node "brick"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:greenbrick" 1', recipe = { + {'','node "madblocks:dye_green"',''}, + {'','node "brick"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:blackbrick" 1', recipe = { + {'','node "madblocks:dye_black"',''}, + {'','node "brick"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:bluebrick" 1', recipe = { + {'','node "madblocks:dye_blue"',''}, + {'','node "brick"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:yellowbrick" 1', recipe = { + {'','madblocks:dye_yellow',''}, + {'','node "brick"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:brownbrick" 1', recipe = { + {'','madblocks:dye_red',''}, + {'','node "brick"',''}, + {'','madblocks:dye_black',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:cyanbrick" 1', recipe = { + {'','madblocks:dye_cyan',''}, + {'','node "brick"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:oddbrick" 1', recipe = { + {'','madblocks:dye_red',''}, + {'','node "brick"',''}, + {'','madblocks:dye_yellow',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:asphalte" 1', recipe = { + {'','',''}, + {'','craft "lump_of_coal"',''}, + {'','node "cobble"',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:mossystonebrick" 1', recipe = { + {'','node "default:leaves"',''}, + {'','node "default:cobble"',''}, + {'','node "madblocks:dye_yellow"',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:culturedstone" 1', recipe = { + {'','madblocks:dye_yellow',''}, + {'','node "default:cobble"',''}, + {'','node "madblocks:dye_red"',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:marblestonebrick" 1', recipe = { + {'','node "madblocks:dye_green"',''}, + {'','node "default:cobble"',''}, + {'','node "madblocks:dye_black"',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:shinystonebrick" 1', recipe = { + {'','node "default:sand"',''}, + {'','node "default:cobble"',''}, + {'','node "madblocks:dye_red"',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:cinderblock" 9', recipe = { + {'default:cobble','default:cobble','default:cobble'}, + {'default:cobble','default:cobble','default:cobble'}, + {'default:cobble','default:cobble','default:cobble'}, + }}) +minetest.register_craft({ output = 'node "madblocks:woodshingles" 8', recipe = { + {'node "default:wood"','node "default:wood"'}, + {'node "default:wood"','node "default:wood"'}, + }}) +minetest.register_craft({ output = 'node "madblocks:magentawood" 1', recipe = { + {'','node "madblocks:dye_magenta"',''}, + {'','node "default:wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:bluewood" 1', recipe = { + {'','node "madblocks:dye_blue"',''}, + {'','node "default:wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:blackwood" 1', recipe = { + {'','node "madblocks:dye_black"',''}, + {'','node "default:wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:yellowwood" 1', recipe = { + {'','node "madblocks:dye_yellow"',''}, + {'','node "default:wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:cyanwood" 1', recipe = { + {'','node "madblocks:dye_cyan"',''}, + {'','node "default:wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:greenwood" 1', recipe = { + {'','node "madblocks:dye_green"',''}, + {'','node "default:wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:redwood" 1', recipe = { + {'','node "madblocks:dye_red"',''}, + {'','node "default:wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:redwood_fence" 1', recipe = { + {'','node "madblocks:dye_red"',''}, + {'','node "default:fence_wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:blackwood_fence" 1', recipe = { + {'','node "madblocks:dye_black"',''}, + {'','node "default:fence_wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:greenwood_fence" 1', recipe = { + {'','node "madblocks:dye_green"',''}, + {'','node "default:fence_wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:yellowwood_fence" 1', recipe = { + {'','node "madblocks:dye_yellow"',''}, + {'','node "default:fence_wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:bluewood_fence" 1', recipe = { + {'','node "madblocks:dye_blue"',''}, + {'','node "default:fence_wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:magentawood_fence" 1', recipe = { + {'','node "madblocks:dye_magenta"',''}, + {'','node "default:fence_wood"',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:cyanwood_fence" 1', recipe = { + {'','node "madblocks:dye_cyan"',''}, + {'','node "default:fence_wood"',''}, + {'','',''}, + }}) +-- ** lights +minetest.register_craft({ output = 'node "madblocks:glowtron" 1', recipe = { + {'','torch',''}, + {'','glass',''}, + {'','madblocks:dye_black','madblocks:dye_yellow'}, + }}) +minetest.register_craft({ output = 'node "madblocks:glowyellow" 1', recipe = { + {'','torch',''}, + {'','glass',''}, + {'','madblocks:dye_yellow',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:glowgreen" 1', recipe = { + {'','torch',''}, + {'','glass',''}, + {'','madblocks:dye_green',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:glowred" 1', recipe = { + {'','torch',''}, + {'','glass',''}, + {'','madblocks:dye_red',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:glowblue" 1', recipe = { + {'','torch',''}, + {'','glass',''}, + {'','madblocks:dye_blue',''}, + }}) +-- ** signs +minetest.register_craft({ output = 'madblocks:signs_park 1', recipe = { + {'','madblocks:dye_blue',''}, + {'','madblocks:sheetmetal',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'madblocks:signs_cliff 1', recipe = { + {'','madblocks:dye_black',''}, + {'','madblocks:sheetmetal',''}, + {'','madblocks:dye_yellow',''}, + }}) +minetest.register_craft({ output = 'madblocks:signs_interdit 1', recipe = { + {'','madblocks:dye_red',''}, + {'','madblocks:sheetmetal',''}, + {'','madblocks:dye_red',''}, + }}) +minetest.register_craft({ output = 'madblocks:signs_montreal 1', recipe = { + {'','madblocks:dye_green',''}, + {'','madblocks:sheetmetal',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'madblocks:signs_420 1', recipe = { + {'','madblocks:dye_black',''}, + {'','madblocks:sheetmetal',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'madblocks:signs_chicken 1', recipe = { + {'','madblocks:dye_yellow',''}, + {'','madblocks:sheetmetal',''}, + {'','madblocks:dye_black',''}, + }}) +minetest.register_craft({ output = 'madblocks:signs_obscene 1', recipe = { + {'','madblocks:dye_red',''}, + {'','madblocks:sheetmetal',''}, + {'','madblocks:dye_black',''}, + }}) +minetest.register_craft({ output = 'madblocks:sheetmetal 4', recipe = { + {'default:steel_ingot'}, + }}) +minetest.register_craft({ output = 'node "madblocks:pylon" 5', recipe = { + {'madblocks:sheetmetal','','madblocks:sheetmetal'}, + {'','madblocks:sheetmetal',''}, + {'madblocks:sheetmetal','','madblocks:sheetmetal'}, + }}) +minetest.register_craft({ output = 'node "madblocks:safetyladder" 7', recipe = { + {'madblocks:sheetmetal','','madblocks:sheetmetal'}, + {'madblocks:sheetmetal','madblocks:sheetmetal','madblocks:sheetmetal'}, + {'madblocks:sheetmetal','','madblocks:sheetmetal'}, + }}) +minetest.register_craft({ output = 'node "madblocks:spotlight" 1', recipe = { + {'','',''}, + {'','madblocks:glowyellow_off',''}, + {'','madblocks:sheetmetal',''}, + }}) +minetest.register_craft({ output = 'madblocks:wine 1', recipe = { + {'default:glass', 'madblocks:hydroponics_grapes','default:glass'}, + {'default:glass', 'madblocks:hydroponics_grapes','default:glass'}, + {'default:glass', 'madblocks:hydroponics_grapes','default:glass'}, + }}) +minetest.register_craft({ output = 'node "madblocks:bigben" 1', recipe = { + {'','madblocks:dye_black',''}, + {'','madblocks:sheetmetal',''}, + {'','default:wood',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:siren" 1', recipe = { + {'','',''}, + {'madblocks:sheetmetal','madblocks:dye_red','madblocks:sheetmetal'}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:churchbells" 1', recipe = { + {'','',''}, + {'','madblocks:sheetmetal',''}, + {'madblocks:sheetmetal','','madblocks:sheetmetal'}, + }}) +minetest.register_craft({ output = 'node "madblocks:slimtree" 1', recipe = { + {'','default:leaves',''}, + {'','default:leaves',''}, + {'','default:stick',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:orangecone" 1', recipe = { + {'','madblocks:dye_red','madblocks:dye_yellow'}, + {'','madblocks:rubber',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:coffeecup" 1', recipe = { + {'','',''}, + {'default:clay_lump','madblocks:coffee','default:clay_lump'}, + {'','default:clay_lump',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:fancylamp" 1', recipe = { + {'','madblocks:dye_black',''}, + {'','madblocks:sheetmetal',''}, + {'','madblocks:glowyellow_off',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:hangingflowers" 1', recipe = { + {'','',''}, + {'default:stick','madblocks:rosebush','default:stick'}, + {'','default:stick',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:countrystonebrick" 2', recipe = { + {'','',''}, + {'','madblocks:cement',''}, + {'','default:cobble',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:cement" 2', recipe = { + {'','',''}, + {'','default:sand',''}, + {'','default:gravel',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:cinderblock_planter" 2', recipe = { + {'','',''}, + {'','default:dirt',''}, + {'','madblocks:cinderblock',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:fancybracket" 4', recipe = { + {'','','madblocks:sheetmetal'}, + {'','','madblocks:sheetmetal'}, + {'','madblocks:sheetmetal','madblocks:sheetmetal'}, + }}) +minetest.register_craft({ output = 'node "madblocks:blackstonebrick" 1', recipe = { + {'','',''}, + {'','madblocks:dye_black',''}, + {'','default:cobble',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:roundstonebrick" 5', recipe = { + {'','default:cobble',''}, + {'default:cobble','madblocks:cement','default:cobble'}, + {'','default:cobble',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:slimstonebrick" 3', recipe = { + {'','default:cobble',''}, + {'','madblocks:cement',''}, + {'','default:cobble',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:greystonebrick" 2', recipe = { + {'','madblocks:dye_black',''}, + {'','default:cobble',''}, + {'','madblocks:cement',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:medistonebrick" 3', recipe = { + {'','',''}, + {'madblocks:dye_cyan','','madblocks:dye_yellow'}, + {'default:cobble','madblocks:cement','default:cobble'}, + }}) +minetest.register_craft({ output = 'node "madblocks:whitestonebrick" 3', recipe = { + {'','default:clay',''}, + {'','default:cobble',''}, + {'','madblocks:cement',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:flowers2" 2', recipe = { + {'','',''}, + {'madblocks:hydroponics_yellowflower','madblocks:hydroponics_magentaflower',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:flowers1" 2', recipe = { + {'','',''}, + {'madblocks:hydroponics_magentaflower','madblocks:hydroponics_cyanflower',''}, + {'','',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:awning" 2', recipe = { + {'','',''}, + {'','','default:junglegrass'}, + {'','default:junglegrass','madblocks:dye_red'}, + }}) +minetest.register_craft({ output = 'node "madblocks:drum" 3', recipe = { + {'madblocks:sheetmetal','','madblocks:sheetmetal'}, + {'madblocks:sheetmetal','madblocks:dye_black','madblocks:sheetmetal'}, + {'madblocks:sheetmetal','madblocks:sheetmetal','madblocks:sheetmetal'}, + }}) +minetest.register_craft({ output = 'node "madblocks:barrel" 3', recipe = { + {'default:wood','','default:wood'}, + {'default:wood','madblocks:sheetmetal','default:wood'}, + {'default:wood','default:wood','default:wood'}, + }}) +minetest.register_craft({ output = 'node "madblocks:stool" 1', recipe = { + {'','madblocks:dye_red',''}, + {'','madblocks:sheetmetal',''}, + {'default:stick','','default:stick'}, + }}) +minetest.register_craft({ output = 'node "madblocks:gnome" 1', recipe = { + {'default:clay_lump','madblocks:dye_red','default:clay_lump'}, + {'','default:clay_lump','madblocks:dye_green'}, + {'default:clay_lump','','default:clay_lump'}, + }}) +minetest.register_craft({ output = 'node "madblocks:statue" 1', recipe = { + {'','default:clay_lump',''}, + {'','default:clay_lump',''}, + {'','default:clay_lump',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:gargoyle" 1', recipe = { + {'','',''}, + {'default:clay_lump','madblocks:dye_black','default:clay_lump'}, + {'','default:clay_lump',''}, + }}) +minetest.register_craft({ output = 'node "madblocks:searchlight" 1', recipe = { + {'','madblocks:spotlight',''}, + {'madblocks:spotlight','madblocks:sheetmetal','madblocks:spotlight'}, + {'','madblocks:spotlight',''}, + }}) +-- 8 signs todo +minetest.register_craft({ output = 'madblocks:signs_cafe 1', recipe = { + {'','madblocks:coffeecup',''}, + {'','default:sign_wall',''}, + {'','default:torch',''}, + }}) +minetest.register_craft({ output = 'madblocks:signs_drpepper 1', recipe = { + {'','madblocks:dye_black',''}, + {'','default:sign_wall',''}, + {'','madblocks:dye_red',''}, + }}) +minetest.register_craft({ output = 'madblocks:signs_enjoycoke 1', recipe = { + {'','madblocks:sheetmetal',''}, + {'','default:sign_wall',''}, + {'','madblocks:dye_red',''}, + }}) +minetest.register_craft({ output = 'madblocks:signs_hucksfoodfuel 1', recipe = { + {'','madblocks:dye_red',''}, + {'','default:sign_wall',''}, + {'','madblocks:dye_yellow',''}, + }}) +minetest.register_craft({ output = 'madblocks:signs_dangermines 1', recipe = { + {'','madblocks:dye_yellow',''}, + {'','default:sign_wall',''}, + {'','madblocks:dye_black',''}, + }}) +minetest.register_craft({ output = 'madblocks:lampling 1', recipe = { + {'','madblocks:glowyellow',''}, + {'','default:stick',''}, + {'','default:stick',''}, + }}) +minetest.register_craft({ output = 'madblocks:street 1', recipe = { + {'','',''}, + {'','',''}, + {'madblocks:replicator','madblocks:replicator','madblocks:replicator'}, + }}) + +minetest.register_craft({ type = "cooking", output = "madblocks:coffee", recipe = "madblocks:hydroponics_coffee", }) diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/depends.txt @@ -0,0 +1 @@ +default diff --git a/hydroponics.lua b/hydroponics.lua new file mode 100644 index 0000000..0d32a21 --- /dev/null +++ b/hydroponics.lua @@ -0,0 +1,356 @@ +GLOWLIKE('growlamp','Growlamp','plantlike') +minetest.register_node("madblocks:promix", { + description = "Promix", + tile_images = {"madblocks_promix.png"}, + is_ground_content = true, + groups = {crumbly=3}, + sounds = default.node_sound_dirt_defaults(), +}) + +get_plantname = {} -- plants index by nodenames (tomato1, tomato2, seeds_tomato, etc..) +get_plantbynumber = {} -- plants index by number (for random select) +get_wildplants = {} -- wildplant nodenames (pop control) + +local is_specialharvest = function(plantname) + local result = 'madblocks:hydroponics_'..plantname + if HYDROPONICS_PLANTS[plantname].give_on_harvest ~= nil then result = HYDROPONICS_PLANTS[plantname].give_on_harvest end + return result +end + +for index,plant in pairs(HYDROPONICS_PLANTS) do + -- define nodes + minetest.register_node("madblocks:hydroponics_wild_"..plant.name, { + description = "Wild Plant", + drawtype = "plantlike", + visual_scale = 1.0, + tile_images = {"madblocks_hydroponics_wildplant.png"}, + paramtype = "light", + walkable = false, + groups = {snappy=3,flammable=3}, + sounds = default.node_sound_leaves_defaults(), + drop = 'madblocks:hydroponics_seeds_'..plant.name..' 4', + selection_box = { + type = "fixed", + fixed = {-1/3, -1/2, -1/3, 1/3, 1/6, 1/3}, + }, + }) + minetest.register_node("madblocks:hydroponics_seeds_"..plant.name, { + description = plant.name.." Seeds", + drawtype = "signlike", + tile_images = {"madblocks_hydroponics_seeds.png"}, + inventory_image = "madblocks_hydroponics_seeds.png", + wield_image = "madblocks_hydroponics_seeds.png", + paramtype = "light", + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + climbable = false, + selection_box = { + type = "wallmounted", + --wall_top = = + --wall_bottom = = + --wall_side = = + }, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3}, + legacy_wallmounted = true, + sounds = default.node_sound_wood_defaults(), + }) + minetest.register_node('madblocks:hydroponics_seedlings_'..plant.name, { + drawtype = 'plantlike', + visual_scale = 1.0, + tile_images = { 'madblocks_hydroponics_seedlings.png' }, + inventory_image = 'madblocks_hydroponics_seedlings.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + furnace_burntime = 1, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + drop = '', + }) + minetest.register_node('madblocks:hydroponics_sproutlings_' .. plant.name, { + drawtype = 'plantlike', + visual_scale = 1.0, + tile_images = { 'madblocks_hydroponics_sproutlings.png' }, + inventory_image = 'madblocks_hydroponics_sproutlings.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + furnace_burntime = 1, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + drop = '', + }) + minetest.register_node('madblocks:hydroponics_'..plant.name..'1', { + description = 'Tomato Plant (Young)', + drawtype = 'plantlike', + visual_scale = 1.0, + tile_images = { 'madblocks_hydroponics_'..plant.name..'1.png' }, + inventory_image = 'madblocks_hydroponics_'..plant.name..'1.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + furnace_burntime = 1, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + drop = '', + }) + local ondig = nil + if plant.growtype == 'permaculture' then + plant.growtype = 'growshort' + ondig = function(pos,node) + minetest.env:add_node(pos,{type='node',name='madblocks:hydroponics_'..plant.name..'1'}) + end + end + minetest.register_node('madblocks:hydroponics_'..plant.name..'2', { + description = 'Tomato Plant (Youngish)', + drawtype = 'plantlike', + visual_scale = 1.0, + tile_images = { 'madblocks_hydroponics_'..plant.name..'2.png' }, + inventory_image = 'madblocks_hydroponics_'..plant.name..'2.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + furnace_burntime = 1, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + on_dig = ondig, + drop = '', + }) + minetest.register_node('madblocks:hydroponics_'..plant.name..'3', { + description = 'Tomato Plant (Fruitings)', + drawtype = 'plantlike', + visual_scale = 1.0, + tile_images = { 'madblocks_hydroponics_'..plant.name..'3.png' }, + inventory_image = 'madblocks_hydroponics_'..plant.name..'3.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + furnace_burntime = 1, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + on_dig = ondig, + drop = '', + }) + local harvest = 'madblocks:hydroponics_'..plant.name + if plant.give_on_harvest ~= nil then harvest = plant.give_on_harvest end + + minetest.register_node('madblocks:hydroponics_'..plant.name..'4', { + description = 'Tomato Plant (Ripe)', + drawtype = 'plantlike', + visual_scale = 1.0, + tile_images = { 'madblocks_hydroponics_'..plant.name..'4.png' }, + inventory_image = 'madblocks_hydroponics_'..plant.name..'4.png', + sunlight_propagates = true, + paramtype = 'light', + walkable = false, + furnace_burntime = 1, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults(), + on_dig = ondig, + drop = { + items = { + { items = {'madblocks:hydroponics_seeds_'..plant.name..' 4'}, + rarity = 6, + }, + { + items = {harvest..' 4'}, + } + } + }, + + }) + if plant.give_on_harvest == nil then + minetest.register_node("madblocks:hydroponics_"..plant.name, { + description = plant.name, + drawtype = "plantlike", + visual_scale = 1.0, + tile_images = {"madblocks_hydroponics_"..plant.name..".png"}, + inventory_image = "madblocks_hydroponics_"..plant.name..".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + groups = {fleshy=3,dig_immediate=3,flammable=2}, + on_use = minetest.item_eat(4), + sounds = default.node_sound_defaults(), + }) + end + table.insert(get_wildplants, 'madblocks:hydroponics_wild_'..plant.name) + table.insert(get_plantbynumber, plant.name) + get_plantname["madblocks:hydroponics_"..plant.name.."4"] = plant.name + get_plantname["madblocks:hydroponics_"..plant.name.."3"] = plant.name + get_plantname["madblocks:hydroponics_"..plant.name.."2"] = plant.name + get_plantname["madblocks:hydroponics_"..plant.name.."1"] = plant.name + get_plantname['madblocks:hydroponics_sproutlings_'..plant.name] = plant.name + get_plantname['madblocks:hydroponics_seedlings_'..plant.name] = plant.name + get_plantname['madblocks:hydroponics_seeds_'..plant.name] = plant.name +end + +-- GROW (TALL) FUNCTION +growtall = function (plantname, nodename, grnode) + if nodename == 'madblocks:hydroponics_'..plantname..'3' then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_"..plantname.."4"}) + minetest.env:add_node(grnode.grow2,{type="node",name="madblocks:hydroponics_"..plantname.."4"}) + elseif nodename == 'madblocks:hydroponics_'..plantname..'2' then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_"..plantname.."3"}) + minetest.env:add_node(grnode.grow2,{type="node",name="madblocks:hydroponics_"..plantname.."3"}) + elseif nodename == 'madblocks:hydroponics_'..plantname..'1' then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_"..plantname.."2"}) + minetest.env:add_node(grnode.grow2,{type="node",name="madblocks:hydroponics_"..plantname.."2"}) + elseif nodename =='madblocks:hydroponics_sproutlings_'..plantname then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_"..plantname.."1"}) + elseif nodename == 'madblocks:hydroponics_seedlings_'..plantname then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_sproutlings_"..plantname}) + elseif nodename == 'madblocks:hydroponics_seeds_'..plantname then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_seedlings_"..plantname}) + end + +end + +growshort = function (plantname, nodename, grnode) + if nodename == 'madblocks:hydroponics_'..plantname..'3' then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_"..plantname.."4"}) +-- minetest.env:add_node(grnode.grow2,{type="node",name="madblocks:hydroponics_"..plantname.."4"}) + elseif nodename == 'madblocks:hydroponics_'..plantname..'2' then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_"..plantname.."3"}) +-- minetest.env:add_node(grnode.grow2,{type="node",name="madblocks:hydroponics_"..plantname.."3"}) + elseif nodename == 'madblocks:hydroponics_'..plantname..'1' then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_"..plantname.."2"}) +-- minetest.env:add_node(grnode.grow2,{type="node",name="madblocks:hydroponics_"..plantname.."2"}) + elseif nodename =='madblocks:hydroponics_sproutlings_'..plantname then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_"..plantname.."1"}) + elseif nodename == 'madblocks:hydroponics_seedlings_'..plantname then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_sproutlings_"..plantname}) + elseif nodename == 'madblocks:hydroponics_seeds_'..plantname then minetest.env:add_node(grnode.grow1,{type="node",name="madblocks:hydroponics_seedlings_"..plantname}) + end + +end + +-- WILD PLANTS/SEEDS GENERATING +minetest.register_abm({ + nodenames = { "default:dirt_with_grass" }, + interval = NATURE_GROWSPEED, + chance = 80, + action = function(pos, node, active_object_count, active_object_count_wider) + local air = { x=pos.x, y=pos.y+1,z=pos.z } + local is_air = minetest.env:get_node_or_nil(air) + if is_air ~= nil and is_air.name == 'air' then + local count = table.getn(get_plantbynumber) + local random_plant = math.random(1,count) + local nodename = "madblocks:hydroponics_wild_"..get_plantbynumber[random_plant] + minetest.env:add_node({x=pos.x,y=pos.y+1,z=pos.z},{type="node",name=nodename}) + end + end +}) +minetest.register_abm({ + nodenames = get_wildplants, + interval = NATURE_GROWSPEED, + chance = 2, + action = function(pos, node, active_object_count, active_object_count_wider) + minetest.env:remove_node({x=pos.x,y=pos.y,z=pos.z}) + end +}) + + +-- GROWING +minetest.register_abm({ + nodenames = { "madblocks:growlamp" }, + interval = HYDRO_GROW_INTERVAL, + chance = 1, + + action = function(pos, node, active_object_count, active_object_count_wider) + local grnode1 = {water = {x=pos.x,y=pos.y-5,z=pos.z}, mix = {x=pos.x,y=pos.y-4,z=pos.z},grow1 = {x=pos.x,y=pos.y-3,z=pos.z}, grow2 = {x=pos.x,y=pos.y-2,z=pos.z}} + local grnode2 = {water = {x=pos.x-1,y=pos.y-5,z=pos.z}, mix = {x=pos.x-1,y=pos.y-4,z=pos.z},grow1 = {x=pos.x-1, y=pos.y-3,z=pos.z}, grow2 = {x=pos.x-1,y=pos.y-2,z=pos.z}} + local grnode3 = {water = {x=pos.x+1,y=pos.y-5,z=pos.z}, mix = {x=pos.x+1,y=pos.y-4,z=pos.z},grow1 = {x=pos.x+1, y=pos.y-3,z=pos.z}, grow2 = {x=pos.x+1,y=pos.y-2,z=pos.z}} + local grnode4 = {water = {x=pos.x,y=pos.y-5,z=pos.z-1}, mix = {x=pos.x,y=pos.y-4,z=pos.z-1},grow1 = {x=pos.x, y=pos.y-3, z=pos.z-1}, grow2 = {x=pos.x,y=pos.y-2,z=pos.z-1}} + local grnode5 = {water = {x=pos.x,y=pos.y-5,z=pos.z+1}, mix = {x=pos.x,y=pos.y-4,z=pos.z+1},grow1 = {x=pos.x, y=pos.y-3, z=pos.z+1}, grow2 = {x=pos.x,y=pos.y-2,z=pos.z+1}} + local grnode6 = {water = {x=pos.x-1,y=pos.y-5,z=pos.z-1}, mix = {x=pos.x-1,y=pos.y-4,z=pos.z-1},grow1 = {x=pos.x-1,y=pos.y-3,z=pos.z-1}, grow2 = {x=pos.x-1,y=pos.y-2,z=pos.z-1}} + local grnode7 = {water = {x=pos.x-1,y=pos.y-5,z=pos.z+1}, mix = {x=pos.x-1,y=pos.y-4,z=pos.z+1},grow1 = {x=pos.x-1,y=pos.y-3,z=pos.z+1}, grow2 = {x=pos.x-1,y=pos.y-2,z=pos.z+1}} + local grnode8 = {water = {x=pos.x+1,y=pos.y-5,z=pos.z-1}, mix = {x=pos.x+1,y=pos.y-4,z=pos.z-1},grow1 = {x=pos.x+1,y=pos.y-3,z=pos.z-1}, grow2 = {x=pos.x+1,y=pos.y-2,z=pos.z-1}} + local grnode9 = {water = {x=pos.x+1,y=pos.y-5,z=pos.z+1}, mix = {x=pos.x+1,y=pos.y-4,z=pos.z+1},grow1 = {x=pos.x+1,y=pos.y-3,z=pos.z+1}, grow2 = {x=pos.x+1,y=pos.y-2,z=pos.z+1}} + + + local water1 = minetest.env:get_node(grnode1.water) + if water1.name == 'default:water_source' or water1.name == 'default:water_flowing' then water1 = true end + local ismix1 = minetest.env:get_node(grnode1.mix) + local water2 = minetest.env:get_node(grnode2.water) + if water2.name == 'default:water_source' or water2.name == 'default:water_flowing' then water2 = true end + local ismix2 = minetest.env:get_node(grnode2.mix) + local water3 = minetest.env:get_node(grnode3.water) + if water3.name == 'default:water_source' or water3.name == 'default:water_flowing' then water3 = true end + local ismix3 = minetest.env:get_node(grnode3.mix) + local water4 = minetest.env:get_node(grnode4.water) + if water4.name == 'default:water_source' or water4.name == 'default:water_flowing' then water4 = true end + local ismix4 = minetest.env:get_node(grnode4.mix) + local water5 = minetest.env:get_node(grnode5.water) + if water5.name == 'default:water_source' or water5.name == 'default:water_flowing' then water5 = true end + local ismix5 = minetest.env:get_node(grnode5.mix) + local water6 = minetest.env:get_node(grnode6.water) + if water6.name == 'default:water_source' or water6.name == 'default:water_flowing' then water6 = true end + local ismix6 = minetest.env:get_node(grnode6.mix) + local water7 = minetest.env:get_node(grnode7.water) + if water7.name == 'default:water_source' or water7.name == 'default:water_flowing' then water7 = true end + local ismix7 = minetest.env:get_node(grnode7.mix) + local water8 = minetest.env:get_node(grnode8.water) + if water8.name == 'default:water_source' or water8.name == 'default:water_flowing' then water8 = true end + local ismix8 = minetest.env:get_node(grnode8.mix) + local water9 = minetest.env:get_node(grnode9.water) + if water9.name == 'default:water_source' or water9.name == 'default:water_flowing' then water9 = true end + local ismix9 = minetest.env:get_node(grnode9.mix) + + + if water1 == true and ismix1.name == 'madblocks:promix' then + local grow1 = minetest.env:get_node(grnode1.grow1) + local curplant = get_plantname[grow1.name] + if curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growtall' then growtall(curplant,grow1.name,grnode1) -- *** GENERIC GROW FUNCTION + elseif curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growshort' then growshort(curplant,grow1.name,grnode1) end -- *** GENERIC GROW FUNCTION + end + if water2 == true and ismix2.name == 'madblocks:promix' then + local grow2 = minetest.env:get_node(grnode2.grow1) + local curplant = get_plantname[grow2.name] + if curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growtall' then growtall(curplant,grow2.name,grnode2) -- *** GENERIC GROW FUNCTION + elseif curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growshort' then growshort(curplant,grow2.name,grnode2) end -- *** GENERIC GROW FUNCTION + end + if water3 == true and ismix3.name == 'madblocks:promix' then + local grow3 = minetest.env:get_node(grnode3.grow1) + local curplant = get_plantname[grow3.name] + if curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growtall' then growtall(curplant,grow3.name,grnode3) -- *** GENERIC GROW FUNCTION + elseif curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growshort' then growshort(curplant,grow3.name,grnode3) end -- *** GENERIC GROW FUNCTION + + end + if water4 == true and ismix4.name == 'madblocks:promix' then + local grow4 = minetest.env:get_node(grnode4.grow1) + local curplant = get_plantname[grow4.name] + if curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growtall' then growtall(curplant,grow4.name,grnode4) -- *** GENERIC GROW FUNCTION + elseif curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growshort' then growshort(curplant,grow4.name,grnode4) end -- *** GENERIC GROW FUNCTION + + end + if water5 == true and ismix5.name == 'madblocks:promix' then + local grow5 = minetest.env:get_node(grnode5.grow1) + local curplant = get_plantname[grow5.name] + if curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growtall' then growtall(curplant,grow5.name,grnode5) -- *** GENERIC GROW FUNCTION + elseif curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growshort' then growshort(curplant,grow5.name,grnode5) end -- *** GENERIC GROW FUNCTION + + end + if water6 == true and ismix6.name == 'madblocks:promix' then + local grow6 = minetest.env:get_node(grnode6.grow1) + local curplant = get_plantname[grow6.name] + if curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growtall' then growtall(curplant,grow6.name,grnode6) -- *** GENERIC GROW FUNCTION + elseif curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growshort' then growshort(curplant,grow6.name,grnode6) end -- *** GENERIC GROW FUNCTION + + end + if water7 == true and ismix7.name == 'madblocks:promix' then + local grow7 = minetest.env:get_node(grnode7.grow1) + local curplant = get_plantname[grow7.name] + if curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growtall' then growtall(curplant,grow7.name,grnode7) -- *** GENERIC GROW FUNCTION + elseif curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growshort' then growshort(curplant,grow7.name,grnode7) end -- *** GENERIC GROW FUNCTION + + end + if water8 == true and ismix8.name == 'madblocks:promix' then + local grow8 = minetest.env:get_node(grnode8.grow1) + local curplant = get_plantname[grow8.name] + if curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growtall' then growtall(curplant,grow8.name,grnode8) -- *** GENERIC GROW FUNCTION + elseif curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growshort' then growshort(curplant,grow8.name,grnode8) end -- *** GENERIC GROW FUNCTION + + end + if water9 == true and ismix9.name == 'madblocks:promix' then + local grow9 = minetest.env:get_node(grnode9.grow1) + local curplant = get_plantname[grow9.name] + if curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growtall' then growtall(curplant,grow9.name,grnode9) -- *** GENERIC GROW FUNCTION + elseif curplant ~= nil and HYDROPONICS_PLANTS[curplant].growtype == 'growshort' then growshort(curplant,grow9.name,grnode9) end -- *** GENERIC GROW FUNCTION + + end + + end +}) + + diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..cbde767 --- /dev/null +++ b/init.lua @@ -0,0 +1,38 @@ +local madblocks_modpath = minetest.get_modpath("madblocks") +math.randomseed(os.time()) + +SEASON_LENGTH = 1500 -- max tested 1500 +WEATHER_CHANGE_INTERVAL = 60 +NATURE_GROW_INTERVAL = 700 +HYDRO_GROW_INTERVAL = 100 +BIRDS = false--true + +NATURE_PLANTS = { 'madblocks:hydroponics_cyanflower','madblocks:hydroponics_magentaflower','madblocks:hydroponics_yellowflower', + 'madblocks:dandylions','madblocks:mushroom'} +HYDROPONICS_PLANTS = { + tomato = {name='tomato',growtype='growtall'}, + peas = {name='peas',growtype='growtall'}, + habanero = {name='habanero',growtype='growtall'}, + cyanflower = {name='cyanflower',growtype='growtall'}, + magentaflower = {name='magentaflower',growtype='growtall'}, + yellowflower = {name='yellowflower',growtype='growtall'}, + rubberplant = {name='rubberplant',growtype='growshort', give_on_harvest='madblocks:rubber'}, + grapes = {name='grapes',growtype='permaculture'}, + coffee = {name='coffee',growtype='permaculture'}, + roses = {name='roses',growtype='growtall',give_on_harvest='madblocks:rosebush'} +} + +-- fixed git-120603 +dofile (madblocks_modpath .. "/items.lua") +dofile (madblocks_modpath .. "/lights.lua") +dofile (madblocks_modpath .. "/nature.lua") +dofile (madblocks_modpath .. "/hydroponics.lua") +dofile (madblocks_modpath .. "/misc.lua") +dofile (madblocks_modpath .. "/crafts.lua") +dofile (madblocks_modpath .. "/bookmarks.lua") +dofile (madblocks_modpath .. "/multinode.lua") +dofile (madblocks_modpath .. "/nocrafts.lua") -- new stuff, look in file for giveme names + +print('mAdBlOcKs 12.6.12 loaded') + +--next: get rid of rubber, rubberplant (5 or 6 nodes), fix crafts diff --git a/items.lua b/items.lua new file mode 100644 index 0000000..fb9030a --- /dev/null +++ b/items.lua @@ -0,0 +1,373 @@ +-- *********************************************************************************** +-- FUNCTIONS ************************************************** +-- *********************************************************************************** +BRICKLIKE = function(nodeid, nodename) + minetest.register_node("madblocks:"..nodeid, { + description = nodename, + tile_images = {"madblocks_"..nodeid..'.png'}, + inventory_image = minetest.inventorycube("madblocks_"..nodeid..'.png'), + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + }) +end +WOODLIKE = function(nodeid, nodename,fence) + minetest.register_node("madblocks:"..nodeid, { + description = nodename, + tile_images = {"madblocks_"..nodeid..".png"}, + inventory_image = minetest.inventorycube("madblocks_"..nodeid..".png"), + is_ground_content = true, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3}, + sounds = default.node_sound_wood_defaults(), + }) + if fence == true then + minetest.register_node("madblocks:"..nodeid.."_fence", { + description = nodename.." Fence", + drawtype = "fencelike", + tile_images = {"madblocks_"..nodeid..".png"}, + inventory_image = "madblocks_"..nodeid.."_fence.png", + wield_image = "madblocks_"..nodeid.."_fence.png", + paramtype = "light", + is_ground_content = true, + 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=3}, + sounds = default.node_sound_wood_defaults(), + }) + end +end +SIGNLIKE = function(nodeid, light) + light = light or 0 + minetest.register_node("madblocks:signs_"..nodeid, { + description = "Sign", + drawtype = "signlike", + tile_images = {"madblocks_signs_"..nodeid..".png"}, + inventory_image = "madblocks_signs_"..nodeid..".png", + wield_image = "madblocks_signs_"..nodeid..".png", + paramtype = "light", + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + climbable = false, + selection_box = { + type = "wallmounted", + }, + light_source = light , + light_propagates = true, + sunlight_propagates = true, + + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=2}, + legacy_wallmounted = true, + sounds = default.node_sound_stone_defaults(), + }) +end +PLANTLIKE = function(nodeid, nodename,type,option) + if option == nil then option = false end + + local params ={ description = nodename, drawtype = "plantlike", tile_images = {"madblocks_"..nodeid..'.png'}, + inventory_image = "madblocks_"..nodeid..'.png', wield_image = "madblocks_"..nodeid..'.png', paramtype = "light", } + + if type == 'veg' then + params.groups = {snappy=2,dig_immediate=3,flammable=2} + params.sounds = default.node_sound_leaves_defaults() + if option == false then params.walkable = false end + elseif type == 'met' then -- metallic + params.groups = {cracky=3} + params.sounds = default.node_sound_stone_defaults() + elseif type == 'cri' then -- craft items + params.groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3} + params.sounds = default.node_sound_wood_defaults() + if option == false then params.walkable = false end + elseif type == 'eat' then -- edible + params.groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3} + params.sounds = default.node_sound_wood_defaults() + params.walkable = false + params.on_use = minetest.item_eat(option) + end + minetest.register_node("madblocks:"..nodeid, params) +end + +-- *********************************************************************************** +-- STANDARD DEFS ************************************************** +-- *********************************************************************************** +BRICKLIKE('bluecyanbrick', 'Blue-Cyan Odd Brick') +BRICKLIKE('magentabrick','Magenta Brick') +BRICKLIKE('greenbrick','Green Brick') +BRICKLIKE('blackbrick','Black Brick') +BRICKLIKE('bluebrick','Blue Brick') +BRICKLIKE('yellowbrick','Yellow Brick') +BRICKLIKE('brownbrick','Brown Brick') +BRICKLIKE('cyanbrick','Cyan Brick') +BRICKLIKE('oddbrick','Oddly Coloured Brick') +BRICKLIKE('mossystonebrick','Mossy Stone Brick') +BRICKLIKE('culturedstone','Cultured Stone') +BRICKLIKE('marblestonebrick','Marble Stone Brick') +BRICKLIKE('shinystonebrick','Sand-Blasted Stone Brick') +BRICKLIKE('cinderblock','Cinderblock') +BRICKLIKE('blackstonebrick','Black Stonebrick') +BRICKLIKE('roundstonebrick','Round Stonebrick') +BRICKLIKE('slimstonebrick','Slim Stonebrick') +BRICKLIKE('greystonebrick','Grey Stonebrick') +BRICKLIKE('medistonebrick','Mediterranean Stonebrick') +BRICKLIKE('whitestonebrick','White Stonebrick') +BRICKLIKE('cement','Cement') +BRICKLIKE('countrystonebrick','Country Stonebrick') +BRICKLIKE('asphalte','Asphalte') +WOODLIKE('woodshingles','Wood Shingles') +WOODLIKE('magentawood','Magenta Stained Wood',true) +WOODLIKE('bluewood','Blue Stained Wood',true) +WOODLIKE('blackwood','Black Stained Wood',true) +WOODLIKE('yellowwood','Yellow Stained Wood',true) +WOODLIKE('cyanwood','Cyan Stained Wood',true) +WOODLIKE('greenwood','Green Stained Wood',true) +WOODLIKE('redwood','Red Stained Wood',true) +WOODLIKE('dye_cyan','Cyan Dye') +WOODLIKE('dye_magenta','Magenta Dye') +WOODLIKE('dye_yellow','Yellow Dye') +WOODLIKE('dye_red','Red Dye') +WOODLIKE('dye_blue','Blue Dye') +WOODLIKE('dye_green','Green Dye') +WOODLIKE('dye_black','Black Dye') +SIGNLIKE('park') +SIGNLIKE('cliff') +SIGNLIKE('interdit') +SIGNLIKE('montreal') +SIGNLIKE('420') +SIGNLIKE('chicken') +SIGNLIKE('obscene') +SIGNLIKE('cafe',7) +SIGNLIKE('drpepper') +SIGNLIKE('dangermines') +SIGNLIKE('hucksfoodfuel') +SIGNLIKE('enjoycoke') +PLANTLIKE('flowers1','Flower Arrangement #1','veg') +PLANTLIKE('flowers2','Flower Arrangement #2','veg') +PLANTLIKE('hangingflowers','Hanging Flower Basket','cri') +PLANTLIKE('stool','Bar Stool','cri',true) +PLANTLIKE('gnome','Garden Gnome','cri') +PLANTLIKE('statue','Statuette','cri') +PLANTLIKE('gargoyle','Gargoyle','cri') +PLANTLIKE('wine','Wine Bottle','eat',1) +PLANTLIKE('coffeecup','Coffee Cup','eat',2) + +-- *********************************************************************************** +-- ASSORTED DEFS ************************************************** +-- *********************************************************************************** + +minetest.register_node("madblocks:drum", { + description = "Drum", + drawtype = 'plantlike', + tile_images = {"madblocks_drum.png"}, + inventory_image = "madblocks_drum.png", + wield_image = "madblocks_drum.png", + paramtype = "light", + + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + on_construct = function(pos) + local meta = minetest.env:get_meta(pos) + meta:set_string("formspec", + "invsize[8,9;]".. + "list[current_name;main;0,0;8,4;]".. + "list[current_player;main;0,5;8,4;]") + meta:set_string("infotext", "Chest") + 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 chest at "..minetest.pos_to_string(pos)) + return minetest.node_metadata_inventory_move_allow_all( + pos, from_list, from_index, to_list, to_index, count, player) + end, + on_metadata_inventory_offer = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name().. + " moves stuff to chest at "..minetest.pos_to_string(pos)) + return minetest.node_metadata_inventory_offer_allow_all( + pos, listname, index, stack, player) + end, + on_metadata_inventory_take = function(pos, listname, index, count, player) + minetest.log("action", player:get_player_name().. + " takes stuff from chest at "..minetest.pos_to_string(pos)) + return minetest.node_metadata_inventory_take_allow_all( + pos, listname, index, count, player) + end, +}) +minetest.register_node("madblocks:barrel", { + description = "Barrel", + drawtype = 'plantlike', + tile_images = {"madblocks_barrel.png"}, + inventory_image = "madblocks_barrel.png", + wield_image = "madblocks_barrel.png", + paramtype = "light", + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, + legacy_facedir_simple = true, + sounds = default.node_sound_wood_defaults(), + on_construct = function(pos) + local meta = minetest.env:get_meta(pos) + meta:set_string("formspec", + "invsize[8,9;]".. + "list[current_name;main;0,0;8,4;]".. + "list[current_player;main;0,5;8,4;]") + meta:set_string("infotext", "Chest") + 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 chest at "..minetest.pos_to_string(pos)) + return minetest.node_metadata_inventory_move_allow_all( + pos, from_list, from_index, to_list, to_index, count, player) + end, + on_metadata_inventory_offer = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name().. + " moves stuff to chest at "..minetest.pos_to_string(pos)) + return minetest.node_metadata_inventory_offer_allow_all( + pos, listname, index, stack, player) + end, + on_metadata_inventory_take = function(pos, listname, index, count, player) + minetest.log("action", player:get_player_name().. + " takes stuff from chest at "..minetest.pos_to_string(pos)) + return minetest.node_metadata_inventory_take_allow_all( + pos, listname, index, count, player) + end, +}) + +minetest.register_node("madblocks:pylon", { + description = "Pylon", + drawtype = "glasslike", + tile_images = {"madblocks_power_pylon.png"}, + inventory_image = minetest.inventorycube("madblocks_power_pylon.png"), + paramtype = "light", + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_node("madblocks:safetyladder", { + description = "Ladder", + drawtype = "signlike", + tile_images = {"madblocks_power_polepegs.png"}, + inventory_image = "madblocks_power_polepegs.png", + wield_image = "madblocks_power_polepegs.png", + paramtype = "light", + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + climbable = true, + selection_box = { type = "wallmounted" }, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=2}, + legacy_wallmounted = true, + sounds = default.node_sound_wood_defaults(), +}) +minetest.register_node(":madblocks:lampling", { + description = "Lampling", + drawtype = "plantlike", + visual_scale = 1.0, + tile_images = {"madblocks_lampling.png"}, + inventory_image = "madblocks_lampling.png", + wield_image = "madblocks_lampling.png", + paramtype = "light", + walkable = false, + groups = {snappy=2,dig_immediate=3}, + sounds = default.node_sound_wood_defaults(), +}) + + +minetest.register_node("madblocks:sheetmetal", { + description = "Sheet Metal", + tile_images = {"madblocks_sheetmetal_top.png","madblocks_sheetmetal_top.png","madblocks_sheetmetal.png"}, + is_ground_content = true, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=2}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_node("madblocks:rosebush", { + description = "Rose Bush", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tile_images = {"madblocks_rosebush.png"}, + paramtype = "light", + groups = {snappy=3, flammable=2}, + sounds = default.node_sound_leaves_defaults(), +}) +minetest.register_node("madblocks:rubber", { + paramtype2 = "facedir", + legacy_facedir_simple = true, + description = "Rubber", + tile_images = { "madblocks_rubber_ends.png", "madblocks_rubber_ends.png", "madblocks_rubber_side.png"}, + light_propagates = true, + paramtype = "light", + sunlight_propagates = true, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + sounds = default.node_sound_wood_defaults(), +}) +minetest.register_node("madblocks:bigben", { + description = "Big Ben", + tile_images = {"madblocks_bigben_top.png","madblocks_bigben_top.png","madblocks_bigben.png"}, + is_ground_content = true, + groups = {snappy=2,choppy=3,flammable=2}, + sounds = default.node_sound_wood_defaults(), +}) +minetest.register_node("madblocks:coffee", { + description = "Roasted Coffee", + tile_images = {"madblocks_coffee.png"}, + inventory_image = minetest.inventorycube("madblocks_coffee.png"), + is_ground_content = true, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_node("madblocks:fancybracket", { + description = "Fancy Support Bracket", + drawtype = "torchlike", + tile_images = {"madblocks_fancybracket.png", "madblocks_fancybracket.png", "madblocks_fancybracket.png"}, + inventory_image = "madblocks_fancybracket.png", + wield_image = "madblocks_fancybracket.png", + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + selection_box = { + 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.3, -0.1, -0.5+0.3, 0.3, 0.1}, + }, + groups = {choppy=2,dig_immediate=3,flammable=1}, + legacy_wallmounted = true, + sounds = default.node_sound_defaults(), +}) +minetest.register_node("madblocks:cinderblock_planter", { + description = "Cinderblock Planter", + tile_images = {"madblocks_cinderblock_planter.png","madblocks_cinderblock.png"}, + inventory_image = minetest.inventorycube("madblocks_cinderblock_planter.png","madblocks_cinderblock.png","madblocks_cinderblock.png"), + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("madblocks:awning", { + drawtype = "raillike", + visual_scale = 1.0, + paramtype = "light", + description = "Awning", + tile_images = {"madblocks_awning.png","madblocks_awning2.png"}, + inventory_image = "madblocks_awning.png", + light_propagates = true, + sunlight_propagates = true, + is_ground_content = true, + groups = {cracky=3}, +}) + + diff --git a/lights.lua b/lights.lua new file mode 100644 index 0000000..de48582 --- /dev/null +++ b/lights.lua @@ -0,0 +1,187 @@ +-- *********************************************************************************** +-- FUNCTIONS ************************************************** +-- *********************************************************************************** +searchlight = function(pos) + for i = 1, 30, 1 do + local xm = {x=pos.x-i,y=pos.y-i,z=pos.z} + local xp = {x=pos.x+i,y=pos.y-i,z=pos.z} + local zm = {x=pos.x,y=pos.y-i,z=pos.z-i} + local zp = {x=pos.x,y=pos.y-i,z=pos.z+i} + local xmn = minetest.env:get_node_or_nil(xm) + local xpn = minetest.env:get_node_or_nil(xp) + local zmn = minetest.env:get_node_or_nil(zm) + local zpn = minetest.env:get_node_or_nil(zp) + + if xmn ~= nil and xmn.name == "air" then + minetest.env:add_node(xm,{type="node",name='madblocks:light'}) + end + if xpn ~= nil and xpn.name == "air" then + minetest.env:add_node(xp,{type="node",name='madblocks:light'}) + end + if zmn ~= nil and zmn.name == "air" then + minetest.env:add_node(zm,{type="node",name='madblocks:light'}) + end + if zpn ~= nil and zpn.name == "air" then + minetest.env:add_node(zp,{type="node",name='madblocks:light'}) + end + end +end +searchlight_off = function(pos) + for i = 1, 30, 1 do + local xm = {x=pos.x-i,y=pos.y-i,z=pos.z} + local xp = {x=pos.x+i,y=pos.y-i,z=pos.z} + local zm = {x=pos.x,y=pos.y-i,z=pos.z-i} + local zp = {x=pos.x,y=pos.y-i,z=pos.z+i} + local xmn = minetest.env:get_node_or_nil(xm) + local xpn = minetest.env:get_node_or_nil(xp) + local zmn = minetest.env:get_node_or_nil(zm) + local zpn = minetest.env:get_node_or_nil(zp) + + if xmn ~= nil and xmn.name == 'madblocks:light' then + minetest.env:remove_node(xm) + end + if xpn ~= nil and xpn.name == 'madblocks:light' then + minetest.env:remove_node(xp) + end + if zmn ~= nil and zmn.name == 'madblocks:light' then + minetest.env:remove_node(zm) + end + if zpn ~= nil and zpn.name == 'madblocks:light' then + minetest.env:remove_node(zp) + end + end +end +spotlight = function(pos,node) + + for i = 1, 19, 1 do + local ontop = {x=pos.x,y=pos.y+i,z=pos.z} + local is_air = minetest.env:get_node_or_nil(ontop) + + if is_air ~= nil and is_air.name == "air" then + minetest.env:add_node(ontop,{type="node",name='madblocks:light'}) + end + end +end + +spotlight_off = function(pos,node) + for i = 1, 19, 1 do + local ontop = {x=pos.x,y=pos.y+i,z=pos.z} + local is_air = minetest.env:get_node_or_nil(ontop) + if is_air ~= nil and is_air.name == 'madblocks:light' then + minetest.env:remove_node(ontop) + end + end +end + +GLOWLIKE = function(nodeid,nodename,drawtype) + if drawtype == nil then + drawtype = 'glasslike' + inv_image = minetest.inventorycube("madblocks_"..nodeid..".png") + else + inv_image = "madblocks_"..nodeid..".png" + end + minetest.register_node("madblocks:"..nodeid, { + description = nodename, + drawtype = drawtype, + tile_images = {"madblocks_"..nodeid..".png"}, + inventory_image = inv_image, + light_propagates = true, + paramtype = "light", + sunlight_propagates = true, + light_source = 15 , + is_ground_content = true, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + sounds = default.node_sound_glass_defaults(), + }) +end + +-- *********************************************************************************** +-- DEFS ************************************************** +-- *********************************************************************************** +GLOWLIKE('glowyellow','Yellow Glow Glass') +GLOWLIKE('glowgreen','Green Glow Glass') +GLOWLIKE('glowblue','Blue Glow Glass') +GLOWLIKE('glowred','Red Glow Glass') +GLOWLIKE('glowtron','Tron Glow Glass') +GLOWLIKE('fancylamp','Fancy Lamp','plantlike') + +minetest.register_node("madblocks:light", { + drawtype = "glasslike", + tile_images = {"madblocks_spotlights_inv.png"}, + inventory_image = minetest.inventorycube("madblocks_spotlights_inv.png"), + paramtype = "light", + walkable = false, + is_ground_content = true, + light_propagates = true, + sunlight_propagates = true, + light_source = 15 , + selection_box = { + type = "fixed", + fixed = {0, 0, 0, 0, 0, 0}, + }, +}) +minetest.register_node("madblocks:searchlight", { + description = 'Searchlight', + drawtype = "plantlike", + tile_images = {'madblocks_searchlight.png'}, + inventory_image = 'madblocks_searchlight.png', + wield_image = 'madblocks_searchlight.png', + paramtype = "light", + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + drop = 'madblocks:searchlight_off', + on_punch = function(pos,node) + searchlight_off(pos) + minetest.env:add_node(pos, {name='madblocks:searchlight_off'}) + end, + on_dig = function(pos,node) + searchlight_off(pos) + end, +}) +minetest.register_node("madblocks:searchlight_off", { + description = 'Searchlight', + drawtype = "plantlike", + tile_images = {'madblocks_searchlight.png'}, + inventory_image = 'madblocks_searchlight.png', + wield_image = 'madblocks_searchlight.png', + paramtype = "light", + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + on_punch = function(pos,node) + searchlight(pos) + minetest.env:add_node(pos, {name='madblocks:searchlight'}) + end, +}) +minetest.register_node("madblocks:spotlight", { + description = "Spotlight", + tile_images = { "madblocks_spotlights_top.png", "madblocks_spotlights_side.png", "madblocks_spotlights_side.png"}, + inventory_image = minetest.inventorycube("madblocks_spotlights_top.png","madblocks_spotlights_side.png","madblocks_spotlights_side.png"), + paramtype2 = "facedir", + light_propagates = true, + paramtype = "light", + sunlight_propagates = true, + groups = {cracky=3}, + drop = 'madblocks:spotlight_off', + on_punch = function(pos,node) + spotlight_off(pos) + minetest.env:add_node(pos, {name='madblocks:spotlight_off'}) + end, + on_dig = function(pos,node) + spotlight_off(pos) + end, +}) +minetest.register_node("madblocks:spotlight_off", { + description = "Spotlight", + tile_images = { "madblocks_spotlights_top.png", "madblocks_spotlights_side.png", "madblocks_spotlights_side.png"}, + inventory_image = minetest.inventorycube("madblocks_spotlights_top.png","madblocks_spotlights_side.png","madblocks_spotlights_side.png"), + paramtype2 = "facedir", + light_propagates = true, + paramtype = "light", + sunlight_propagates = true, + groups = {cracky=3}, + on_punch = function(pos,node) + spotlight(pos) + minetest.env:add_node(pos, {name='madblocks:spotlight'}) + end, +}) + diff --git a/misc.lua b/misc.lua new file mode 100644 index 0000000..1ffd344 --- /dev/null +++ b/misc.lua @@ -0,0 +1,378 @@ +-- *********************************************************************************** +-- SOUND NODES ************************************************** +-- *********************************************************************************** +SOUNDS = {} +SOUNDNODE = function(nodeid, nodename,drawtype) + SOUNDS[nodeid] = {} + SOUNDS[nodeid].sounds = {} + local on_punch = function(pos,node) + local sound = SOUNDS[nodeid].sounds[minetest.hash_node_position(pos)] + if sound == nil then + local wanted_sound = {name=nodeid, gain=1.5} + SOUNDS[nodeid].sounds[minetest.hash_node_position(pos)] = { handle = minetest.sound_play(wanted_sound, {pos=pos, loop=true}), name = wanted_sound.name, } + + else + minetest.sound_stop(sound.handle) + SOUNDS[nodeid].sounds[minetest.hash_node_position(pos)] = nil + end + + end + after_dig_node = function(pos,node) + local sound = SOUNDS[nodeid].sounds[minetest.hash_node_position(pos)] + if sound ~= nil then + minetest.sound_stop(sound.handle) + SOUNDS[nodeid].sounds[minetest.hash_node_position(pos)] = nil + nodeupdate(pos) + end + end + if drawtype == 'signlike' then + minetest.register_node("madblocks:"..nodeid, { + description = nodename, + drawtype = "signlike", + tile_images = {"madblocks_"..nodeid..'.png'}, + inventory_image = "madblocks_"..nodeid..'.png', + wield_image = "madblocks_"..nodeid..'.png', + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + metadata_name = "sign", + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, + groups = {choppy=2,dig_immediate=2}, + legacy_wallmounted = true, + sounds = default.node_sound_defaults(), + on_punch = on_punch, + after_dig_node = after_dig_node, + }) + elseif drawtype == '' then + minetest.register_node("madblocks:"..nodeid, { + description = nodename, + drawtype = 'plantlike', + tile_images = {"madblocks_"..nodeid..'.png'}, + inventory_image = "madblocks_"..nodeid..'.png', + wield_image = "madblocks_"..nodeid..'.png', + paramtype = "light", + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + on_punch = on_punch, + after_dig_node = after_dig_node, + }) + end +end + + +SOUNDNODE('siren','Loud Siren') +SOUNDNODE('churchbells','Church Bells') + +local bigben = {} +bigben.sounds = {} +bigben_sound = function(p) + local wanted_sound = {name="bigbenshort", gain=1.5} + bigben.sounds[minetest.hash_node_position(p)] = { + handle = minetest.sound_play(wanted_sound, {pos=p, loop=false}), + name = wanted_sound.name, + } + +end + +minetest.register_abm({ + nodenames = {'madblocks:bigben'}, + interval = 60, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + bigben_sound(pos) + end +}) + +-- *********************************************************************************** +-- FIREPLACE ************************************************** +-- *********************************************************************************** +local fireplace = {} +fireplace.D = 1 +fireplace.sounds = {} + +function fireplace.get_area_p0p1(pos) + local p0 = { + x=math.floor(pos.x/fireplace.D)*fireplace.D, + y=math.floor(pos.y/fireplace.D)*fireplace.D, + z=math.floor(pos.z/fireplace.D)*fireplace.D, + } + local p1 = { + x=p0.x+fireplace.D-1, + y=p0.y+fireplace.D-1, + z=p0.z+fireplace.D-1 + } + return p0, p1 +end + +function fireplace.update_sounds_around(pos) + local p0, p1 = fireplace.get_area_p0p1(pos) + local cp = {x=(p0.x+p1.x)/2, y=(p0.y+p1.y)/2, z=(p0.z+p1.z)/2} + local flames_p = minetest.env:find_nodes_in_area(p0, p1, {"madblocks:basic_flame"}) + local should_have_sound = (#flames_p > 0) + local wanted_sound = nil + if #flames_p >= 9 then + wanted_sound = {name="fire_large", gain=1.5} + elseif #flames_p > 0 then + wanted_sound = {name="fire_small", gain=1.5} + end + local p0_hash = minetest.hash_node_position(p0) + local sound = fireplace.sounds[p0_hash] + if not sound then + if should_have_sound then + fireplace.sounds[p0_hash] = { + handle = minetest.sound_play(wanted_sound, {pos=cp, loop=true}), + name = wanted_sound.name, + } + end + else + if not wanted_sound then + minetest.sound_stop(sound.handle) + fireplace.sounds[p0_hash] = nil + elseif sound.name ~= wanted_sound.name then + minetest.sound_stop(sound.handle) + fireplace.sounds[p0_hash] = { + handle = minetest.sound_play(wanted_sound, {pos=cp, loop=true}), + name = wanted_sound.name, + } + end + end +end +function fireplace.on_flame_add_at(pos) + fireplace.update_sounds_around(pos) +end + +function fireplace.on_flame_remove_at(pos) + fireplace.update_sounds_around(pos) +end +minetest.register_abm({ + nodenames = { "madblocks:fireplace" }, + interval = 5, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local xm = {x=pos.x-1,y=pos.y,z=pos.z} + local xp = {x=pos.x+1,y=pos.y,z=pos.z} + local zm = {x=pos.x,y=pos.y,z=pos.z-1} + local zp = {x=pos.x,y=pos.y,z=pos.z+1} + local xmnode = minetest.env:get_node(xm) + local xpnode = minetest.env:get_node(xp) + local zmnode = minetest.env:get_node(zm) + local zpnode = minetest.env:get_node(zp) + + if xpnode.name == 'default:cobble' or + xmnode.name == 'default:cobble' then -- build along Z axis + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z},{type="node",name="madblocks:log"}) + minetest.env:add_node({x=pos.x,y=pos.y+1,z=pos.z},{type="node",name="madblocks:basic_flame"}) + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z-1},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x,y=pos.y+1,z=pos.z-1},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x,y=pos.y+2,z=pos.z-1},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x,y=pos.y+2,z=pos.z},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x,y=pos.y+2,z=pos.z+1},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x,y=pos.y+1,z=pos.z+1},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z+1},{type="node",name="default:cobble"}) + elseif zpnode.name == 'default:cobble' or + zmnode.name == 'default:cobble' then -- build along x axis + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z},{type="node",name="madblocks:log"}) + minetest.env:add_node({x=pos.x,y=pos.y+1,z=pos.z},{type="node",name="madblocks:basic_flame"}) + minetest.env:add_node({x=pos.x-1,y=pos.y,z=pos.z},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x-1,y=pos.y+1,z=pos.z},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x-1,y=pos.y+2,z=pos.z},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x,y=pos.y+2,z=pos.z},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x+1,y=pos.y+2,z=pos.z},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x+1,y=pos.y+1,z=pos.z},{type="node",name="default:cobble"}) + minetest.env:add_node({x=pos.x+1,y=pos.y,z=pos.z},{type="node",name="default:cobble"}) + end + fireplace.update_sounds_around({x=pos.x,y=pos.y+1,z=pos.z}) + end +}) +minetest.register_node(":madblocks:log", { + description = "Fire Log", + tile_images = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"}, + is_ground_content = true, + groups = {tree=1,snappy=2,choppy=2,oddly_breakable_by_hand=1,flammable=2}, + sounds = default.node_sound_wood_defaults(), + on_punch = function(p,node) + fire_above = {x = p.x, y= p.y+1, z = p.z} + isflame = minetest.env:get_node(fire_above) + if isflame.name == 'air' then + minetest.env:add_node(fire_above,{type="node",name="madblocks:basic_flame"}) + elseif isflame.name == "madblocks:basic_flame" then + minetest.env:remove_node(fire_above) + end + fireplace.update_sounds_around({x=p.x,y=p.y+1,z=p.z}) + end, + after_dig_node = function(p,node) + fire_above = {x = p.x, y= p.y+1, z = p.z} + isflame = minetest.env:get_node(fire_above) + if isflame.name == "madblocks:basic_flame" then + minetest.env:remove_node(fire_above) + end + fireplace.update_sounds_around({x=p.x,y=p.y+1,z=p.z}) + end, +}) +minetest.register_node(":madblocks:basic_flame", { + description = "Fire", + drawtype = "glasslike", + tile_images = {"fire_basic_flame.png"}, + light_source = 14, + groups = {dig_immediate=3}, + drop = '', + walkable = false, + after_place_node = function(pos, node) + fireplace.on_flame_add_at(pos) + end, + on_dig = function(pos,node) + fireplace.on_flame_remove_at(pos) + end, +}) +minetest.register_node(":madblocks:fireplace", { + description = "Fireplace", + tile_images = {"default_cobble.png","default_cobble.png","default_cobble.png","default_cobble.png","default_cobble.png","madblocks_fireplace.png"}, + inventory_image = minetest.inventorycube("default_cobble.png","madblocks_fireplace.png","default_cobble.png"), + light_propagates = true, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + light_source = 10, + material = minetest.digprop_glasslike(1.0), + groups = {cracky=3}, +}) +minetest.register_craft({ + output = 'madblocks:fireplace 1', + recipe = { + {'default:cobble','default:cobble','default:cobble'}, + {'default:cobble','default:torch','default:cobble'}, + {'default:cobble','default:tree','default:cobble'}, + } +}) +-- *********************************************************************************** +-- LAMPLING ************************************************** +-- *********************************************************************************** +minetest.register_abm({ + nodenames = { "madblocks:lampling" }, + interval = 60, + chance = 1, + + action = function(pos, node, active_object_count, active_object_count_wider) + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z},{type="node",name="madblocks:blackwood_fence"}) + minetest.env:add_node({x=pos.x,y=pos.y+1,z=pos.z},{type="node",name="madblocks:blackwood_fence"}) + minetest.env:add_node({x=pos.x,y=pos.y+2,z=pos.z},{type="node",name="madblocks:blackwood_fence"}) + minetest.env:add_node({x=pos.x,y=pos.y+3,z=pos.z},{type="node",name="madblocks:blackwood_fence"}) + minetest.env:add_node({x=pos.x,y=pos.y+4,z=pos.z},{type="node",name="madblocks:glowyellow"}) + + end +}) + +-- *********************************************************************************** +-- STREETS ************************************************** +-- *********************************************************************************** +minetest.register_node(":madblocks:street", { + description = "Street Builder", + tile_images = {"madblocks_street.png"}, + inventory_image = minetest.inventorycube("madblocks_street.png"), + light_propagates = true, + paramtype = "light", + sunlight_propagates = true, + light_source = 10, + material = minetest.digprop_glasslike(1.0), + groups = {cracky=3}, + on_punch = function(pos,node) + local xm = {x=pos.x-1,y=pos.y,z=pos.z} + local xp = {x=pos.x+1,y=pos.y,z=pos.z} + local zm = {x=pos.x,y=pos.y,z=pos.z-1} + local zp = {x=pos.x,y=pos.y,z=pos.z+1} + local xmnode = minetest.env:get_node(xm) + local xpnode = minetest.env:get_node(xp) + local zmnode = minetest.env:get_node(zm) + local zpnode = minetest.env:get_node(zp) + + if xpnode.name ~= "air" and xmnode.name == "air" and zpnode.name == "air" and zmnode.name == "air" and + xpnode.name ~= "madblocks:replicator" and xpnode.name ~= "madblocks:mk2" and xpnode.name ~= "madblocks:street" then + for i = 0, 9, 1 do + local xmin = pos.x-(i+1) + local corner1 = {x=pos.x+2,y=pos.y,z=pos.z+2} + local corner2 = {x=pos.x+2,y=pos.y,z=pos.z-2} + c1node = minetest.env:get_node(corner1) + c2node = minetest.env:get_node(corner2) + if i == 0 then + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z-1},{type="node",name=xpnode.name}) + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z+1},{type="node",name=xpnode.name}) + end + minetest.env:add_node({x=xmin,y=pos.y,z=pos.z},{type="node",name=xpnode.name}) + minetest.env:add_node({x=xmin,y=pos.y,z=pos.z-1},{type="node",name=xpnode.name}) + minetest.env:add_node({x=xmin,y=pos.y,z=pos.z+1},{type="node",name=xpnode.name}) + if i == 9 then + minetest.env:add_node({x=xmin,y=pos.y,z=pos.z+2},{type="node",name=xpnode.name}) + minetest.env:add_node({x=xmin,y=pos.y+1,z=pos.z+2},{type="node", name="madblocks:lampling"}) + end + end + elseif xmnode.name ~= "air" and xpnode.name == "air" and zpnode.name == "air" and zmnode.name == "air" and + xmnode.name ~= "madblocks:replicator" and xmnode.name ~= "madblocks:mk2" and xmnode.name ~= "madblocks:street" then + for i = 0, 9, 1 do + local xplu = pos.x+(i+1) + local corner1 = {x=pos.x-2,y=pos.y,z=pos.z+2} + local corner2 = {x=pos.x-2,y=pos.y,z=pos.z-2} + c1node = minetest.env:get_node(corner1) + c2node = minetest.env:get_node(corner2) + if i == 0 then + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z-1},{type="node",name=xmnode.name}) + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z+1},{type="node",name=xmnode.name}) + end + minetest.env:add_node({x=xplu,y=pos.y,z=pos.z},{type="node",name=xmnode.name}) + minetest.env:add_node({x=xplu,y=pos.y,z=pos.z-1},{type="node",name=xmnode.name}) + minetest.env:add_node({x=xplu,y=pos.y,z=pos.z+1},{type="node",name=xmnode.name}) + if i == 9 then + minetest.env:add_node({x=xplu,y=pos.y,z=pos.z+2},{type="node",name=xmnode.name}) + minetest.env:add_node({x=xplu,y=pos.y+1,z=pos.z+2},{type="node",name="madblocks:lampling"}) + end + end + elseif zpnode.name ~= "air" and zmnode.name == "air" and xpnode.name == "air" and xmnode.name == "air" and + zpnode.name ~= "madblocks:replicator" and zpnode.name ~= "madblocks:mk2" and zpnode.name ~= "madblocks:street" then + for i = 0, 9, 1 do + local zmin = pos.z-(i+1) + local corner1 = {x=pos.x+2,y=pos.y,z=pos.z+2} + local corner2 = {x=pos.x-2,y=pos.y,z=pos.z+2} + c1node = minetest.env:get_node(corner1) + c2node = minetest.env:get_node(corner2) + if i == 0 then + minetest.env:add_node({x=pos.x-1,y=pos.y,z=pos.z},{type="node",name=zpnode.name}) + minetest.env:add_node({x=pos.x+1,y=pos.y,z=pos.z},{type="node",name=zpnode.name}) + end + minetest.env:add_node({x=pos.x,y=pos.y,z=zmin},{type="node",name=zpnode.name}) + minetest.env:add_node({x=pos.x-1,y=pos.y,z=zmin},{type="node",name=zpnode.name}) + minetest.env:add_node({x=pos.x+1,y=pos.y,z=zmin},{type="node",name=zpnode.name}) + if i == 9 then + minetest.env:add_node({x=pos.x+2,y=pos.y,z=zmin},{type="node",name=zpnode.name}) + minetest.env:add_node({x=pos.x+2,y=pos.y+1,z=zmin},{type="node",name="madblocks:lampling"}) + end + end + elseif zmnode.name ~= "air" and zpnode.name == "air" and xpnode.name == "air" and xmnode.name == "air" and + zmnode.name ~= "madblocks:replicator" and zmnode.name ~= "madblocks:mk2" and zmnode.name ~= "madblocks:street" then + for i = 0, 9, 1 do + local zplu = pos.z+(i+1) + local corner1 = {x=pos.x+2,y=pos.y,z=pos.z-2} + local corner2 = {x=pos.x-2,y=pos.y,z=pos.z-2} + c1node = minetest.env:get_node(corner1) + c2node = minetest.env:get_node(corner2) + if i == 0 then + minetest.env:add_node({x=pos.x-1,y=pos.y,z=pos.z},{type="node",name=zmnode.name}) + minetest.env:add_node({x=pos.x+1,y=pos.y,z=pos.z},{type="node",name=zmnode.name}) + end + minetest.env:add_node({x=pos.x,y=pos.y,z=zplu},{type="node",name=zmnode.name}) + minetest.env:add_node({x=pos.x-1,y=pos.y,z=zplu},{type="node",name=zmnode.name}) + minetest.env:add_node({x=pos.x+1,y=pos.y,z=zplu},{type="node",name=zmnode.name}) + if i == 9 then + minetest.env:add_node({x=pos.x+2,y=pos.y,z=zplu},{type="node",name=zmnode.name}) + minetest.env:add_node({x=pos.x+2,y=pos.y+1,z=zplu},{type="node",name="madblocks:lampling"}) + end + end + nodeupdate(pos) + end + end, +}) + diff --git a/multinode.lua b/multinode.lua new file mode 100644 index 0000000..906e998 --- /dev/null +++ b/multinode.lua @@ -0,0 +1,399 @@ +MN1 = {} +MN2 = {} +MN1CACHE = {} +MN2CACHE = {} +COPY = {} +COPYREF = {} +PASTEREF ={} +REPLACE = {} +WITH = {} + +ACTIONNODE = function(nodeid, nodename,onplace,ondig) + local params = { + description = nodename, + tile_images = {"madblocks_"..nodeid..".png"}, + inventory_image = minetest.inventorycube("madblocks_"..nodeid..".png"), + is_ground_content = true, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3}, + sounds = default.node_sound_wood_defaults(), + } + if onplace ~= nil then params.after_place_node = onplace end + if ondig ~= nil then params.after_dig_node = ondig end + minetest.register_node("madblocks:"..nodeid, params) +end +ACTIONNODE('m1','Multinode Marker 1', function(pos,placer) + local player = placer:get_player_name()-- or "" + if player == '' then print('errorm1') end + if MN1[player] == nil then MN1[player] = {} end + table.insert(MN1[player], pos) + minetest.chat_send_player(player, "marker 1 set") +end) +ACTIONNODE('m2','Multinode Marker 2', function(pos,placer) + local player = placer:get_player_name()-- or "" + if player == '' then print('errorm2') end + if MN2[player] == nil then MN2[player] = {} end + table.insert(MN2[player], pos) + minetest.chat_send_player(player, "marker 2 set") +end) +ACTIONNODE('pasteref','Paste Reference Marker', function(pos,placer) + local player = placer:get_player_name()-- or "" + if player == '' then print('errorm2') end + PASTEREF[player] = pos + minetest.chat_send_player(player, "paste reference set") +end) + +-- *********************************************************************************** +-- FUNCTIONS ************************************************** +-- *********************************************************************************** +compare = function(p1,p2) + result = {} + if p1 > p2 then + result.high = p1 + result.low = p2 + result.diff = p1 - p2 + elseif p2 > p1 then + result.high = p2 + result.low = p1 + result.diff = p2 - p1 + else + result.high = p2 + result.low = p1 + result.diff = 0 + end + if result.diff < 0 then + result.diff = -result.diff + result.mul = -1 + else result.mul = 1 end + return result +end + +local fixlight = function(p) + local no = minetest.env:get_node(p) + no.param1 = 13 + minetest.env:add_node(p, no) +end +local fillnode = function(pos,param) + if param == '-light' then + fixlight(pos) + else + minetest.env:add_node(pos,{type="node",name=param}) + end +end +local removenode = function(pos,param) + if param == '-a' then + minetest.env:remove_node(pos) + else + local node = minetest.env:get_node_or_nil(pos) + if node and node.name == param then minetest.env:remove_node(pos) end + end +end +local copynode = function(pos,param) + local node = minetest.env:get_node_or_nil(pos) + if node then table.insert(COPY[param],{pos=pos,name=node.name}) end +end +local replacenode = function(pos,param) + local node = minetest.env:get_node_or_nil(pos) + if node and node.name == REPLACE[param] then minetest.env:add_node(pos,{type="node",name=WITH[param]}) end +end + +local multinode = function(p1,p2,mutation,param) + local xdif = compare(p1.x,p2.x) + local ydif = compare(p1.y,p2.y) + local zdif = compare(p1.z,p2.z) + if mutation == copynode then COPYREF[param] = p1 end + + if xdif.diff > 0 then + for q =0,xdif.diff,1 do + mutation({x=xdif.high-q*xdif.mul,y=ydif.high,z=zdif.high},param) + if ydif.diff > 0 then + for m =0,ydif.diff,1 do + mutation({x=xdif.high-q*xdif.mul,y=ydif.high-m*ydif.mul,z=zdif.high},param) + if zdif.diff > 0 then + for i =0,zdif.diff,1 do + mutation({x=xdif.high-q*xdif.mul,y=ydif.high-m*ydif.mul,z=zdif.high-i*zdif.mul},param) + end + end + end + elseif zdif.diff > 0 then + for i =0,zdif.diff,1 do + mutation({x=xdif.high-q*xdif.mul,y=ydif.high,z=zdif.high-i*zdif.mul},param) + end + end + + end + elseif ydif.diff > 0 then + for m =0,ydif.diff,1 do + mutation({x=xdif.high,y=ydif.high-m*ydif.mul,z=zdif.high},param) + if zdif.diff > 0 then + for i =0,zdif.diff,1 do + mutation({x=xdif.high,y=ydif.high-m*ydif.mul,z=zdif.high-i*zdif.mul},param) + end + end + end + elseif zdif.diff > 0 then + for i =0,zdif.diff,1 do + mutation({x=xdif.high,y=ydif.high,z=zdif.high-i*zdif.mul},param) + end + else + return false + end +end + +-- *********************************************************************************** +-- CHATCOMMANDS ************************************************** +-- *********************************************************************************** +minetest.register_chatcommand("reload", { + params = "", + description = "restore last multinode list", + privs = {server=true}, + func = function(name, param) + MN1[name] = MN1CACHE[name] + MN2[name] = MN2CACHE[name] + end, +}) +minetest.register_chatcommand("clear", { + params = "", + description = "clear", + privs = {server=true}, + func = function(name, param) + COPY[name] = {} + COPYREF[name] = {} + PASTEREF[name] = {} + REPLACE[name] = {} + WITH[name] = {} + MN1[name] = {} + MN2[name] = {} + end, +}) +minetest.register_chatcommand("p1", { + params = ",,", + description = "first corner", + privs = {server=true}, + func = function(name, param) + if MN1[name] == nil then MN1[name] = {} end + local p = {} + p.x, p.y, p.z = string.match(param, "^([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$") + if p.x and p.y and p.z then + table.insert(MN1[name], p) + minetest.chat_send_player(name, "p1 set") + return + else + local target = minetest.env:get_player_by_name(name) + if target then + table.insert(MN1[name],target:getpos()) + minetest.chat_send_player(name, "p1 set") + return + end + end + end, +}) +minetest.register_chatcommand("p2", { + params = ",,", + description = "opposite corner", + privs = {server=true}, + func = function(name, param) + if MN2[name] == nil then MN2[name] = {} end + local p = {} + p.x, p.y, p.z = string.match(param, "^([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$") + if p.x and p.y and p.z then + table.insert(MN2[name], p) + minetest.chat_send_player(name, "p2 set") + return + else + local target = minetest.env:get_player_by_name(name) + if target then + table.insert(MN2[name], target:getpos()) + minetest.chat_send_player(name, "p2 set") + return + end + end + end, +}) + +minetest.register_chatcommand("fill", { + params = "", + description = "fill with given node", + privs = {server=true}, + func = function(name, param) + if table.getn(MN1[name]) == 0 or table.getn(MN2[name]) == 0 or param == nil then + print('failed check 1') + return end + MN1CACHE[name] = MN1[name]--LASTFILL1 = FILL1 + MN2CACHE[name] = MN2[name]--LASTFILL2 = FILL2 + MN1[name] = {} + MN2[name] = {} + for a = 1,table.getn(MN1CACHE[name]),1 do + if MN1CACHE[name][a] == nil or MN2CACHE[name][a] == nil then print('failed check 2') return end + if multinode(MN1CACHE[name][a],MN2CACHE[name][a],fillnode,param) == false then minetest.chat_send_player(name, "there is no fill only zuul") end + end + end, +}) +minetest.register_chatcommand("remove", { + params = "", + description = "to remove specific node or use flag '-a'", + privs = {server=true}, + func = function(name, param) + if table.getn(MN1[name]) == 0 or table.getn(MN2[name]) == 0 or param == nil then + print('failed check 1') + return end + MN1CACHE[name] = MN1[name]--LASTFILL1 = FILL1 + MN2CACHE[name] = MN2[name]--LASTFILL2 = FILL2 + MN1[name] = {} + MN2[name] = {} + for a = 1,table.getn(MN1CACHE[name]),1 do + if MN1CACHE[name][a] == nil or MN2CACHE[name][a] == nil then print('failed check 2') return end + if multinode(MN1CACHE[name][a],MN2CACHE[name][a],removenode,param) == false then minetest.chat_send_player(name, "there is no remove only zuul") end + end + end, +}) +minetest.register_chatcommand("copy", { + params = "", + description = "copy", + privs = {server=true}, + func = function(name, param) + if MN1[name] == nil or MN2[name] == nil then minetest.chat_send_player(name, "a klingon that kills without showing his face, has no honor") return end + if table.getn(MN1[name]) == 0 or table.getn(MN2[name]) == 0 or param == nil then + print('failed check 1') + return end + MN1CACHE[name] = MN1[name] + MN2CACHE[name] = MN2[name] + MN1[name] = {} + MN2[name] = {} + if COPY[name] == nil then COPY[name] = {} end + if COPYREF[name] == nil then COPYREF[name] = {} end + for a = 1,table.getn(MN1CACHE[name]),1 do + if MN1CACHE[name][a] == nil or MN2CACHE[name][a] == nil then print('failed check 2') return end + if multinode(MN1CACHE[name][a],MN2CACHE[name][a],copynode,name) == false then minetest.chat_send_player(name, "there is no copy only zuul") end + end + end, +}) +minetest.register_chatcommand("paste", { + params = "", + description = "paste", + privs = {server=true}, + func = function(name, param) + if PASTEREF[name] then + newpos = PASTEREF[name] + else + local target = minetest.env:get_player_by_name(name) + if target then + newpos = target:getpos() + end + end + + difx = COPYREF[name].x - newpos.x + dify = COPYREF[name].y - newpos.y + difz = COPYREF[name].z - newpos.z + + for a = 1,table.getn(COPY[name]),1 do + if param ~= '+90' and param ~= '-90' and param ~= '+180' then + pastepos = {x=COPY[name][a].pos.x-difx,y=COPY[name][a].pos.y-dify,z=COPY[name][a].pos.z-difz} + else + local x = COPY[name][a].pos.x -COPYREF[name].x + local y = COPY[name][a].pos.y + local z = COPY[name][a].pos.z -COPYREF[name].z + local newx,newz = nil + if param == '+90' then + newx = z + newz = -(x) + elseif param == '-90' then + newx = -(z) + newz = x + elseif param == '+180' then + newx = -(x) + newz = -(z) + else + return + end + x = newx + COPYREF[name].x + z = newz + COPYREF[name].z + pastepos = {x=x-difx,y=y-dify,z=z-difz} + end + minetest.env:add_node(pastepos,{type="node",name=COPY[name][a].name}) + end + PASTEREF[name] = nil + end, +}) +minetest.register_chatcommand("replace", { + params = "", + description = "clear", + privs = {server=true}, + func = function(name, param) + REPLACE[name] = param + end, +}) +minetest.register_chatcommand("with", { + params = "", + description = "clear", + privs = {server=true}, + func = function(name, param) + WITH[name] = param + end, +}) +minetest.register_chatcommand("doit", { + params = "", + description = "clear", + privs = {server=true}, + func = function(name, param) + if table.getn(MN1[name]) == 0 or table.getn(MN2[name]) == 0 then + print('failed check 1') + return end + MN1CACHE[name] = MN1[name] + MN2CACHE[name] = MN2[name] + MN1[name] = {} + MN2[name] = {} + for a = 1,table.getn(MN1CACHE[name]),1 do + if MN1CACHE[name][a] == nil or MN2CACHE[name][a] == nil then print('failed check 2') return end + if multinode(MN1CACHE[name][a],MN2CACHE[name][a],replacenode,name) == false then minetest.chat_send_player(name, "there is no replace only zuul") end + end + REPLACE[name] = nil + WITH[name] = nil + end, +}) +minetest.register_chatcommand("saveas", { + params = "", + description = "paste", + privs = {server=true}, + func = function(name, param) + if COPY[name] == nil then minetest.chat_send_player(name, "a klingon that kills without showing his face, has no honor") return end + + local output = '' -- WRITE CHANGES TO FILE + local f = io.open(minetest.get_modpath('madblocks')..'/buildings/'..param..'.bld', "w") + if f == nil then minetest.chat_send_player(name, "a klingon that kills without showing his face, has no honor") return end + for a = 1,table.getn(COPY[name]),1 do + local x = COPY[name][a].pos.x -COPYREF[name].x + local y = COPY[name][a].pos.y -COPYREF[name].y + local z = COPY[name][a].pos.z -COPYREF[name].z + output = output..COPY[name][a].name..'~'..x..','..y..','..z..';' + end + f:write(output) + io.close(f) + minetest.chat_send_player(name, param.." saved") + + end, +}) +minetest.register_chatcommand("load", { + params = "", + description = "paste", + privs = {server=true}, + func = function(name, param) + local bldfile = io.open(minetest.get_modpath('madblocks')..'/buildings/'..param..'.bld', "r") + if bldfile then + COPY[name] = {} + COPYREF[name] = {x=0,y=0,z=0} + local contents = bldfile:read() + io.close(bldfile) + if contents ~= nil then + local entries = contents:split(";") + for i,entry in pairs(entries) do + local nodename, coords = unpack(entry:split("~")) + local p = {} + p.x, p.y, p.z = string.match(coords, "^([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$") + if p.x and p.y and p.z then + table.insert(COPY[name],{name = nodename, pos = {x = tonumber(p.x),y= tonumber(p.y),z = tonumber(p.z)}}) + end + end + end + end + end, +}) diff --git a/nature.lua b/nature.lua new file mode 100644 index 0000000..8765cca --- /dev/null +++ b/nature.lua @@ -0,0 +1,413 @@ + +-- *********************************************************************************** +-- SEASONAL CHANGES ************************************************** +-- *********************************************************************************** +SEASON_FILE = minetest.get_worldpath()..'/madblocks.season' + +local function set_season(t) + CURRENT_SEASON = t + -- write to file + local f = io.open(SEASON_FILE, "w") + f:write(CURRENT_SEASON) + io.close(f) +end + +local f = io.open(SEASON_FILE, "r") +if f ~= nil then + CURRENT_SEASON = f:read("*n") + io.close(f) +else + print('could not find season file, creating one (setting winter).') + set_season(1) + +end + +switch_seasons = function() + if CURRENT_SEASON == 1 then + set_season(2) -- set to spring + print('changing to spring') + minetest.after(SEASON_LENGTH,switch_seasons) + elseif CURRENT_SEASON == 2 then + set_season(3) -- set to summer + print('changing to summer') + minetest.after(SEASON_LENGTH,switch_seasons) + elseif CURRENT_SEASON == 3 then + set_season(4) -- set to autumn + print('changing to autumn') + minetest.after(SEASON_LENGTH,switch_seasons) + elseif CURRENT_SEASON == 4 then + set_season(1) -- set to winter + print('changing to winter') + minetest.after(SEASON_LENGTH,switch_seasons) + + end +end + +minetest.after(SEASON_LENGTH,switch_seasons) + +minetest.register_chatcommand("season", { + params = "", + description = "set the season", + func = function(name, param) + if param == 'winter' or param == 'Winter' then set_season(1) + elseif param == 'spring' or param == 'Spring' then set_season(2) + elseif param == 'summer' or param == 'Summer' then set_season(3) + elseif param == 'fall' or param == 'Fall' then set_season(4) + elseif param == 'pause' or param == 'Pause' then set_season(0) + minetest.chat_send_player(name, "Season paused.") + return + else + minetest.chat_send_player(name, "Invalid paramater '"..param.."', try 'winter','spring','summer' or 'fall'.") + return + end + minetest.chat_send_player(name, "Season changed.") + end, +}) + + +minetest.register_abm({ + nodenames = { "default:dirt_with_grass","madblocks:grass_autumn",'madblocks:grass_winter',"madblocks:grass_spring", + 'default:leaves','madblocks:leaves_autumn','madblocks:leaves_winter','madblocks:leaves_spring', + "default:water_source","default:water_flowing", "default:cactus","default:desert_sand","default:sand","madblocks:desertsand_winter", "madblocks:sand_winter","madblocks:cactus_winter",'madblocks:ice_source','madblocks:ice_flowing' }, + interval = WEATHER_CHANGE_INTERVAL, + chance = 6, + + action = function(pos, node, active_object_count, active_object_count_wider) + if CURRENT_SEASON == 1 then + if node.name == 'madblocks:grass_autumn' or node.name == 'default:dirt_with_grass' or node.name == 'madblocks:grass_spring' then + minetest.env:add_node(pos,{type="node",name='madblocks:grass_winter'}) + elseif node.name == 'madblocks:leaves_autumn' or node.name == 'default:leaves' or node.name == 'madblocks:leaves_spring' then + minetest.env:add_node(pos,{type="node",name='madblocks:leaves_winter'}) + + elseif node.name == 'default:desert_sand' then + above = minetest.env:get_node_or_nil({x=pos.x,y=pos.y+1,z=pos.z}) + if above ~= nil and above.name == 'air' then + minetest.env:add_node(pos,{type="node",name='madblocks:desertsand_winter'}) + end + elseif node.name == 'default:sand' then + above = minetest.env:get_node_or_nil({x=pos.x,y=pos.y+1,z=pos.z}) + if above ~= nil and above.name == 'air' then + minetest.env:add_node(pos,{type="node",name='madblocks:sand_winter'}) + end + elseif node.name == 'default:cactus' then + above = minetest.env:get_node_or_nil({x=pos.x,y=pos.y+1,z=pos.z}) + if above ~= nil and above.name == 'air' then + minetest.env:add_node(pos,{type="node",name='madblocks:cactus_winter'}) + end + elseif node.name == 'default:water_source' then + above = minetest.env:get_node_or_nil({x=pos.x,y=pos.y+1,z=pos.z}) + if above ~= nil and above.name == 'air' then + minetest.env:add_node(pos,{type="node",name='madblocks:ice_source'}) + end + elseif node.name == 'default:water_flowing' then + above = minetest.env:get_node_or_nil({x=pos.x,y=pos.y+1,z=pos.z}) + if above ~= nil and above.name == 'air' then + minetest.env:add_node(pos,{type="node",name='madblocks:ice_flowing'}) + end + end + elseif CURRENT_SEASON == 2 then + if node.name == 'madblocks:grass_winter' or node.name == 'madblocks:grass_autumn' or node.name == 'default:dirt_with_grass' then + minetest.env:add_node(pos,{type="node",name='madblocks:grass_spring'}) + elseif node.name == 'madblocks:leaves_winter' or node.name == 'madblocks:leaves_autumn' or node.name == 'default:leaves' then + minetest.env:add_node(pos,{type="node",name='madblocks:leaves_spring'}) + elseif node.name == 'madblocks:desertsand_winter' then + minetest.env:add_node(pos,{type="node",name='default:desert_sand'}) + elseif node.name == 'madblocks:sand_winter' then + minetest.env:add_node(pos,{type="node",name='default:sand'}) + elseif node.name == 'madblocks:cactus_winter' then + minetest.env:add_node(pos,{type="node",name='default:cactus'}) + elseif node.name == 'madblocks:ice_source' then + minetest.env:add_node(pos,{type="node",name='default:water_source'}) + elseif node.name == 'madblocks:ice_flowing' then + minetest.env:add_node(pos,{type="node",name='default:water_flowing'}) + end + elseif CURRENT_SEASON == 3 then + if node.name == 'madblocks:leaves_spring' or node.name == 'madblocks:leaves_winter' or node.name == 'madblocks:leaves_autumn' then + minetest.env:add_node(pos,{type="node",name='default:leaves'}) + elseif node.name == 'madblocks:grass_spring' or node.name == 'madblocks:grass_winter' or node.name == 'madblocks:grass_autumn' then + minetest.env:add_node(pos,{type="node",name='default:dirt_with_grass'}) + elseif node.name == 'madblocks:desertsand_winter' then + minetest.env:add_node(pos,{type="node",name='default:desert_sand'}) + elseif node.name == 'madblocks:sand_winter' then + minetest.env:add_node(pos,{type="node",name='default:sand'}) + elseif node.name == 'madblocks:cactus_winter' then + minetest.env:add_node(pos,{type="node",name='default:cactus'}) + elseif node.name == 'madblocks:ice_source' then + minetest.env:add_node(pos,{type="node",name='default:water_source'}) + elseif node.name == 'madblocks:ice_flowing' then + minetest.env:add_node(pos,{type="node",name='default:water_flowing'}) + end + elseif CURRENT_SEASON == 4 then + if node.name == 'default:leaves' or node.name == 'madblocks:leaves_spring' or node.name == 'madblocks:leaves_winter' then + minetest.env:add_node(pos,{type="node",name='madblocks:leaves_autumn'}) + elseif node.name == 'default:dirt_with_grass' or node.name == 'madblocks:grass_spring' or node.name == 'madblocks:grass_winter' then + minetest.env:add_node(pos,{type="node",name='madblocks:grass_autumn'}) + elseif node.name == 'madblocks:desertsand_winter' then + minetest.env:add_node(pos,{type="node",name='default:desert_sand'}) + elseif node.name == 'madblocks:sand_winter' then + minetest.env:add_node(pos,{type="node",name='default:sand'}) + elseif node.name == 'madblocks:cactus_winter' then + minetest.env:add_node(pos,{type="node",name='default:cactus'}) + elseif node.name == 'madblocks:ice_source' then + minetest.env:add_node(pos,{type="node",name='default:water_source'}) + elseif node.name == 'madblocks:ice_flowing' then + minetest.env:add_node(pos,{type="node",name='default:water_flowing'}) + end + end + end +}) + +-- *********************************************************************************** +-- BIRDS SPRING/SUMMER ************************************************** +-- *********************************************************************************** +if BIRDS == true then + local bird = {} + bird.sounds = {} + bird_sound = function(p) + local wanted_sound = {name="bird", gain=0.6} + bird.sounds[minetest.hash_node_position(p)] = { + handle = minetest.sound_play(wanted_sound, {pos=p, loop=true}), + name = wanted_sound.name, } + end + + bird_stop = function(p) + local sound = bird.sounds[minetest.hash_node_position(p)] + if sound ~= nil then + minetest.sound_stop(sound.handle) + bird.sounds[minetest.hash_node_position(p)] = nil + end + end + minetest.register_on_dignode(function(p, node) + if node.name == "madblocks:bird" then + bird_stop(p) + + end + end) + minetest.register_abm({ + nodenames = { "madblocks:leaves_spring",'default:leaves' }, + interval = NATURE_GROW_INTERVAL, + chance = 200, + action = function(pos, node, active_object_count, active_object_count_wider) + local air = { x=pos.x, y=pos.y+1,z=pos.z } + local is_air = minetest.env:get_node_or_nil(air) + if is_air ~= nil and is_air.name == 'air' then + minetest.env:add_node(air,{type="node",name='madblocks:bird'}) + bird_sound(air) + end + end + }) + minetest.register_abm({ + nodenames = {'madblocks:bird' }, + interval = NATURE_GROW_INTERVAL, + chance = 2, + action = function(pos, node, active_object_count, active_object_count_wider) + minetest.env:remove_node(pos) + bird_stop(pos) + end + }) +end +-- *********************************************************************************** +-- NATURE_GROW ************************************************** +-- *********************************************************************************** +minetest.register_abm({ + nodenames = { "default:dirt_with_grass",'madblocks:grass_spring' }, + interval = NATURE_GROW_INTERVAL, + chance = 200, + action = function(pos, node, active_object_count, active_object_count_wider) + local air = { x=pos.x, y=pos.y+1,z=pos.z } + local is_air = minetest.env:get_node_or_nil(air) + if is_air ~= nil and is_air.name == 'air' then + local count = table.getn(NATURE_PLANTS) + local random_plant = math.random(1,count) + minetest.env:add_node({x=pos.x,y=pos.y+1,z=pos.z},{type="node",name=NATURE_PLANTS[random_plant]}) + end + end +}) + +minetest.register_abm({ + nodenames = NATURE_PLANTS, + interval = NATURE_GROW_INTERVAL, + chance = 2, + action = function(pos, node, active_object_count, active_object_count_wider) + minetest.env:remove_node({x=pos.x,y=pos.y,z=pos.z}) + end +}) + +-- *********************************************************************************** +-- SLIMTREES ************************************************** +-- *********************************************************************************** +minetest.register_abm({ + nodenames = { "madblocks:slimtree" }, + interval = 60, + chance = 1, + + action = function(pos, node, active_object_count, active_object_count_wider) + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x,y=pos.y+1,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x,y=pos.y+2,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + + minetest.env:add_node({x=pos.x,y=pos.y+3,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x+1,y=pos.y+3,z=pos.z},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x-1,y=pos.y+3,z=pos.z},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+3,z=pos.z+1},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+3,z=pos.z-1},{type="node",name="default:leaves"}) + + + minetest.env:add_node({x=pos.x,y=pos.y+4,z=pos.z},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x+1,y=pos.y+4,z=pos.z},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x-1,y=pos.y+4,z=pos.z},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+4,z=pos.z+1},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+4,z=pos.z-1},{type="node",name="default:leaves"}) + + + minetest.env:add_node({x=pos.x,y=pos.y+5,z=pos.z},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x+1,y=pos.y+5,z=pos.z},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x-1,y=pos.y+5,z=pos.z},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+5,z=pos.z+1},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+5,z=pos.z-1},{type="node",name="default:leaves"}) + + minetest.env:add_node({x=pos.x,y=pos.y+6,z=pos.z},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x+1,y=pos.y+6,z=pos.z},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x-1,y=pos.y+6,z=pos.z},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+6,z=pos.z+1},{type="node",name="default:leaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+6,z=pos.z-1},{type="node",name="default:leaves"}) + end +}) + +-- *********************************************************************************** +-- NODES ************************************************** +-- *********************************************************************************** +PLANTLIKE('slimtree','Slimtree Sapling','veg') +PLANTLIKE('bird','Bird','veg') +PLANTLIKE('dandylions','Dandylions','veg') +PLANTLIKE('mushroom','Wild Mushroom','veg') +minetest.register_node("madblocks:slimtree_wood", { + description = "Slimtree", + drawtype = "fencelike", + tile_images = {"madblocks_tree.png"}, + inventory_image = "madblocks_tree.png", + wield_image = "madblocks_tree.png", + paramtype = "light", + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, + groups = {tree=1,snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=2}, + sounds = default.node_sound_wood_defaults(), + drop = 'default:fence_wood', +}) +minetest.register_node("madblocks:ice_source", { + description = "Ice", + tile_images = {"madblocks_ice.png"}, + is_ground_content = true, + groups = {snappy=2,choppy=3}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_node("madblocks:ice_flowing", { + description = "Ice", + tile_images = {"madblocks_ice.png"}, + is_ground_content = true, + groups = {snappy=2,choppy=3}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_node("madblocks:leaves_autumn", { + description = "Leaves", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tile_images = {"madblocks_leaves_autumn.png"}, + paramtype = "light", + groups = {snappy=3, leafdecay=3, flammable=2}, + drop = { + max_items = 1, items = { + {items = {'default:sapling'}, rarity = 20,}, + {items = {'madblocks:leaves_autumn'},} + }}, + sounds = default.node_sound_leaves_defaults(), +}) +minetest.register_node("madblocks:leaves_spring", { + description = "Leaves", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tile_images = {"madblocks_leaves_spring.png"}, + paramtype = "light", + groups = {snappy=3, leafdecay=3, flammable=2}, + drop = { + max_items = 1, items = { + {items = {'default:sapling'}, rarity = 20,}, + {items = {'madblocks:leaves_spring'},} + }}, + sounds = default.node_sound_leaves_defaults(), +}) +minetest.register_node("madblocks:grass_spring", { + description = "Dirt with snow", + tile_images = {"madblocks_grass_spring.png", "default_dirt.png", "default_dirt.png^madblocks_grass_spring_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = 'default:dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) +minetest.register_node("madblocks:grass_autumn", { + description = "Dirt with snow", + tile_images = {"madblocks_grass_autumn.png", "default_dirt.png", "default_dirt.png^madblocks_grass_autumn_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = 'default:dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) +minetest.register_node("madblocks:grass_winter", { + description = "Dirt with snow", + tile_images = {"madblocks_snow.png", "default_dirt.png", "default_dirt.png^madblocks_grass_w_snow_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = 'default:dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) +minetest.register_node("madblocks:leaves_winter", { + description = "Leaves", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tile_images = {"madblocks_leaves_with_snow.png"}, + paramtype = "light", + groups = {snappy=3, leafdecay=3, flammable=2}, + drop = { + max_items = 1, items = { + {items = {'default:sapling'}, rarity = 20,}, + {items = {'madblocks:leaves_winter'},} + }}, + sounds = default.node_sound_leaves_defaults(), +}) +minetest.register_node("madblocks:cactus_winter", { + description = "Cactus", + tile_images = {"madblocks_cactus_wsnow_top.png", "madblocks_cactus_wsnow_top.png", "madblocks_cactus_wsnow_side.png"}, + is_ground_content = true, + groups = {snappy=2,choppy=3,flammable=2}, + sounds = default.node_sound_wood_defaults(), +}) +minetest.register_node("madblocks:sand_winter", { + description = "Sand with snow", + tile_images = {"madblocks_snow.png", "default_sand.png", "default_sand.png^madblocks_sand_w_snow_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = 'default:sand', + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) +minetest.register_node("madblocks:desertsand_winter", { + description = "Desert Sand with snow", + tile_images = {"madblocks_snow.png", "default_desert_sand.png", "default_desert_sand.png^madblocks_desertsand_w_snow_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = 'default:desert_sand', + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + diff --git a/nocrafts.lua b/nocrafts.lua new file mode 100644 index 0000000..545ab85 --- /dev/null +++ b/nocrafts.lua @@ -0,0 +1,352 @@ +METALLIKE = function(nodeid, nodename,fence) + minetest.register_node("madblocks:"..nodeid, { + description = nodename, + tile_images = {"madblocks_"..nodeid..".png"}, + inventory_image = minetest.inventorycube("madblocks_"..nodeid..".png"), + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_wood_defaults(), + }) + if fence == true then + minetest.register_node("madblocks:"..nodeid.."_fence", { + description = nodename.." Fence", + drawtype = "fencelike", + tile_images = {"madblocks_"..nodeid..".png"}, + inventory_image = "madblocks_"..nodeid.."_fence.png", + wield_image = "madblocks_"..nodeid.."_fence.png", + paramtype = "light", + is_ground_content = true, + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, + groups = {cracky=3}, + sounds = default.node_sound_wood_defaults(), + }) + end +end + +-- *********************************************************************************** +-- NEW METALLIC ITEMS ************************************************** +-- *********************************************************************************** + +METALLIKE('brushedmetal','Brushed Metal',true) +METALLIKE('yellow_rustedmetal','Yellow Painted Rusted Metal',true) +METALLIKE('texturedmetal','Textured Metal') +METALLIKE('metalbulkhead','Metal Bulkhead') +METALLIKE('stripedmetal','Caution Striped Metal') +BRICKLIKE('brownmedistonebrick','Mediterranean Stonebrick (Brown Tones)') + +-- *********************************************************************************** +-- RIVEN/MYST (DECO) NODES ************************************************** +-- *********************************************************************************** + +SOUNDNODE('riven1','Riven Art (1)','signlike') +SOUNDNODE('riven2','Riven Art (2)','signlike') +SOUNDNODE('riven3','Riven Art (3)','signlike') +METALLIKE('rivenwood','Riven Wood') +METALLIKE('rivenwoodblue','Riven Wood (Blue)') +METALLIKE('rivenstone1','Riven Stone (1)') +METALLIKE('rivenstone2','Riven Stone (2)') +METALLIKE('rivenstoneblue','Riven Stone (Blue)') +METALLIKE('rivenmetal','Riven Rusted Metal') +METALLIKE('rivenbulkhead','Riven Metal Bulkhead') +METALLIKE('rivengoldstone1','Riven Gold Stone (1)') +METALLIKE('rivengoldstone2','Riven Gold Stone (2)') + +minetest.register_node("madblocks:rivenbeetle", { + description = "Sign", + drawtype = "signlike", + tile_images = {"madblocks_rivenbeetle.png"}, + inventory_image = "madblocks_rivenbeetle.png", + wield_image = "madblocks_rivenbeetle.png", + paramtype = "light", + paramtype2 = "wallmounted", + light_propagates = true, + sunlight_propagates = true, + light_source = 10, + walkable = false, + + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, + groups = {choppy=2,dig_immediate=2}, + legacy_wallmounted = true, + sounds = default.node_sound_defaults(), +}) +minetest.register_node("madblocks:rivendagger", { + description = "Sign", + drawtype = "signlike", + tile_images = {"madblocks_rivendagger.png"}, + inventory_image = "madblocks_rivendagger.png", + wield_image = "madblocks_rivendagger.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + metadata_name = "sign", + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, + groups = {choppy=2,dig_immediate=2}, + legacy_wallmounted = true, + sounds = default.node_sound_defaults(), + on_construct = function(pos) + --local n = minetest.env:get_node(pos) + local meta = minetest.env:get_meta(pos) + meta:set_string("formspec", "hack:sign_text_input") + meta:set_string("infotext", "\"\"") + end, + on_receive_fields = function(pos, formname, fields, sender) + --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) + local meta = minetest.env:get_meta(pos) + 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) + meta:set_string("infotext", '"'..fields.text..'"') + end, +}) + + +minetest.register_tool("madblocks:riventool", { + description = "Riven Dagger (tool)", + inventory_image = "madblocks_riventool.png", + tool_capabilities = { + full_punch_interval = 0.5, + max_drop_level=3, + groupcaps={ + fleshy={times={[1]=6.00, [2]=3, [3]=1}, uses=10, maxlevel=3}, + cracky={times={[1]=0.1, [2]=0.1, [3]=0.1}, uses=5000, maxlevel=3}, + crumbly={times={[1]=0.1, [2]=0.1, [3]=0.1}, uses=5000, maxlevel=3}, + snappy={times={[1]=0.1, [2]=0.1, [3]=0.1}, uses=5000, maxlevel=3} + } + }, +}) +-- *********************************************************************************** +-- RIVEN/MYST LINKING BOOKS ************************************************** +-- *********************************************************************************** +local linkingbook = {} +linkingbook.sounds = {} +linkingbook_sound = function(p) + local wanted_sound = {name="linkingbook", gain=1.5} + linkingbook.sounds[minetest.hash_node_position(p)] = { + handle = minetest.sound_play(wanted_sound, {pos=p, loop=false}), + name = wanted_sound.name, + } + +end +local function has_linkingbook_privilege(meta, player) + if player:get_player_name() ~= meta:get_string("owner") then + return false + end + return true +end +minetest.register_node("madblocks:linkingbook", { + description = "Linking Book", + drawtype = "signlike", + tile_images = {"madblocks_linkingbook.png"}, + inventory_image = "madblocks_linkingbook.png", + wield_image = "madblocks_linkingbook.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + metadata_name = "sign", + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, + groups = {choppy=2,dig_immediate=2}, + legacy_wallmounted = true, + sounds = default.node_sound_defaults(), + on_punch = function(pos,node,puncher) + local player = puncher:get_player_name()-- or "" + local meta = minetest.env:get_meta(pos) + local stringpos = meta:get_string("text") + local p = {} + p.x, p.y, p.z = string.match(stringpos, "^([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$") + if p.x and p.y and p.z then + + teleportee = minetest.env:get_player_by_name(player) + linkingbook_sound(pos) + teleportee:setpos(p) + linkingbook_sound(p) + end + end, + on_construct = function(pos) + --local n = minetest.env:get_node(pos) + local meta = minetest.env:get_meta(pos) + meta:set_string("formspec", "hack:sign_text_input") + meta:set_string("infotext", "Linking Book") + -- new material + meta:set_string("owner", "") + end, + on_receive_fields = function(pos, formname, fields, sender) + --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) + local meta = minetest.env:get_meta(pos) + -- new material + if not has_linkingbook_privilege(meta, sender) 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) +-- meta:set_string("infotext", '"'..fields.text..'"') + end, + + after_place_node = function(pos, placer) + local meta = minetest.env:get_meta(pos) + meta:set_string("owner", placer:get_player_name() or "") + end, + + can_dig = function(pos,player) + meta = minetest.env:get_meta(pos) + return has_linkingbook_privilege(meta, player) + end, + +}) +minetest.register_node("madblocks:plinkingbook", { + description = "Private Linking Book", + drawtype = "signlike", + tile_images = {"madblocks_plinkingbook.png"}, + inventory_image = "madblocks_plinkingbook.png", + wield_image = "madblocks_plinkingbook.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + metadata_name = "sign", + selection_box = { + type = "wallmounted", + --wall_top = + --wall_bottom = + --wall_side = + }, + groups = {choppy=2,dig_immediate=2}, + legacy_wallmounted = true, + sounds = default.node_sound_defaults(), + on_punch = function(pos,node,puncher) + local meta = minetest.env:get_meta(pos) + if not has_linkingbook_privilege(meta, puncher) then return end + local player = puncher:get_player_name()-- or "" + local stringpos = meta:get_string("text") + local p = {} + p.x, p.y, p.z = string.match(stringpos, "^([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$") + if p.x and p.y and p.z then + + teleportee = minetest.env:get_player_by_name(player) + linkingbook_sound(pos) + teleportee:setpos(p) + linkingbook_sound(p) + end + end, + on_construct = function(pos) + --local n = minetest.env:get_node(pos) + local meta = minetest.env:get_meta(pos) + meta:set_string("formspec", "hack:sign_text_input") + meta:set_string("infotext", "Linking Book") + -- new material + meta:set_string("owner", "") + end, + on_receive_fields = function(pos, formname, fields, sender) + --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) + local meta = minetest.env:get_meta(pos) + -- new material + if not has_linkingbook_privilege(meta, sender) 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) +-- meta:set_string("infotext", '"'..fields.text..'"') + end, + + after_place_node = function(pos, placer) + local meta = minetest.env:get_meta(pos) + meta:set_string("owner", placer:get_player_name() or "") + end, + + can_dig = function(pos,player) + meta = minetest.env:get_meta(pos) + return has_linkingbook_privilege(meta, player) + end, + +}) + +-- *********************************************************************************** +-- PALM TREES ************************************************** +-- *********************************************************************************** +minetest.register_node("madblocks:palmleaves", { + description = "Rail", + drawtype = "raillike", + tile_images = {"madblocks_palmleaves.png", "madblocks_palmleaves_top.png", "madblocks_palmleaves_top.png", "madblocks_palmleaves_top.png"}, + inventory_image = "madblocks_palmleaves.png", + wield_image = "madblocks_palmleaves.png", + paramtype = "light", + is_ground_content = true, + walkable = false, + selection_box = { + type = "fixed", + --fixed = + }, + groups = {bendy=2,snappy=1,dig_immediate=2}, +}) +PLANTLIKE('palmtree','Palmtree Sapling','veg') +minetest.register_abm({ + nodenames = { "madblocks:palmtree" }, + interval = 120, + chance = 1, + + action = function(pos, node, active_object_count, active_object_count_wider) + minetest.env:add_node({x=pos.x,y=pos.y,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x,y=pos.y+1,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x,y=pos.y+2,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x,y=pos.y+3,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x,y=pos.y+4,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x,y=pos.y+5,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x,y=pos.y+6,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x,y=pos.y+7,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x,y=pos.y+8,z=pos.z},{type="node",name="madblocks:slimtree_wood"}) + minetest.env:add_node({x=pos.x+2,y=pos.y+8,z=pos.z},{type="node",name="madblocks:palmleaves"}) + minetest.env:add_node({x=pos.x-2,y=pos.y+8,z=pos.z},{type="node",name="madblocks:palmleaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+8,z=pos.z+2},{type="node",name="madblocks:palmleaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+8,z=pos.z-2},{type="node",name="madblocks:palmleaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+9,z=pos.z},{type="node",name="madblocks:palmleaves"}) + minetest.env:add_node({x=pos.x+1,y=pos.y+9,z=pos.z},{type="node",name="madblocks:palmleaves"}) + minetest.env:add_node({x=pos.x-1,y=pos.y+9,z=pos.z},{type="node",name="madblocks:palmleaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+9,z=pos.z+1},{type="node",name="madblocks:palmleaves"}) + minetest.env:add_node({x=pos.x,y=pos.y+9,z=pos.z-1},{type="node",name="madblocks:palmleaves"}) + end +}) + +-- *********************************************************************************** +-- HOLO NODES ************************************************** +-- *********************************************************************************** + +minetest.register_node("madblocks:holocobble", { + description = "Holographic Cobblestone", + tile_images = {"default_cobble.png"}, + is_ground_content = true, + walkable = false, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) +minetest.register_node("madblocks:holostone", { + description = "Holographic Stone", + tile_images = {"default_stone.png"}, + is_ground_content = true, + walkable = false, + groups = {cracky=3}, + --drop = 'default:cobble', + legacy_mineral = true, + sounds = default.node_sound_stone_defaults(), +}) diff --git a/old/antigrief.lua b/old/antigrief.lua new file mode 100644 index 0000000..3bf6986 --- /dev/null +++ b/old/antigrief.lua @@ -0,0 +1,234 @@ +function table.set(t) -- set of list + local u = { } + for _, v in ipairs(t) do u[v] = true end + return u +end + +function table.find(f, l) -- find element v of l satisfying f(v) + for _, v in ipairs(l) do + if f(v) then + return v + end + end + return nil +end + +local function set_param(param,v) + local output = nil + local output_file = nil + + if param == 'shield' then + output_file = GODTOOLS.SHIELD + if v == true then + output = '1' + elseif v == false then + output = '0' + else return + end + SHIELD = v + elseif param == 'prot1' and v.x and v.y and v.z then + output_file = GODTOOLS.PROT1 + output = v.x..','..v.y..','..v.z + PROT1 = v + elseif param == 'prot2' and v.x and v.y and v.z then + output_file = GODTOOLS.PROT2 + output = v.x..','..v.y..','..v.z + PROT2 = v + else return + end + + local f = io.open(output_file, "w") + f:write(output) + io.close(f) +end +compare = function(p1,p2) + result = {} + if p1 > p2 then + result.high = p1 + result.low = p2 + result.diff = p1 - p2 + elseif p2 > p1 then + result.high = p2 + result.low = p1 + result.diff = p2 - p1 + else + result.high = p2 + result.low = p1 + result.diff = 0 + end + if result.diff < 0 then + result.diff = -result.diff + result.mul = -1 + else result.mul = 1 end + return result +end + +GODTOOLS = {} + +-- *********************************************************************************** +-- ANTIGRIEF / PROTECTION AREA ************************************************** +-- *********************************************************************************** +--ENABLE_PROTECTION = true -- uncomment if using godtools w/o madblocks +if ENABLE_PROTECTION == true then + GODTOOLS.SHIELD = minetest.get_worldpath()..'/godtools.shield' + GODTOOLS.PROT1 = minetest.get_worldpath()..'/godtools.prot1' + GODTOOLS.PROT2 = minetest.get_worldpath()..'/godtools.prot2' + + SHIELD = false + BACKUP_BUCKET = {} + PROT1 = {} + PROT2 = {} + + local paramshield = io.open(GODTOOLS.SHIELD, "r") + local paramprot1 = io.open(GODTOOLS.PROT1, "r") + local paramprot2 = io.open(GODTOOLS.PROT2, "r") + + if paramshield ~= nil then + value = paramshield:read("*n") + if value == 1 then + SHIELD = true + io.close(paramshield) + elseif value == 0 then + SHIELD = false + io.close(paramshield) + else + set_param('shield',false) + end + else + print('no shield file, setting default off') + set_param('shield',false) + end + + if paramprot1 ~= nil then + local value = paramprot1:read() + local p = {} + p.x, p.y, p.z = string.match(value, "^([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$") + if p.x and p.y and p.z then + PROT1.x = tonumber(p.x) + PROT1.y = tonumber(p.y) + PROT1.z = tonumber(p.z) + io.close(paramprot1) + else + set_param('prot1',{x=-500,y=-500,z=-500}) + end + else + print('no prot1 file, setting default -500,-500,-500') + set_param('prot1',{x=-500,y=-500,z=-500}) + end + + if paramprot2 ~= nil then + local value = paramprot2:read() + local p = {} + p.x, p.y, p.z = string.match(value, "^([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$") + if p.x and p.y and p.z then + PROT2.x = tonumber(p.x) + PROT2.y = tonumber(p.y) + PROT2.z = tonumber(p.z) + io.close(paramprot2) + else + set_param('prot2',{x=500,y=500,z=500}) + end + else + print('no prot2 file, setting default 500,500,500') + set_param('prot2',{x=500,y=500,z=500}) + end + + minetest.register_chatcommand("shield", { + params = "", + description = "griefing countermeasures", + privs = {server=true}, + func = function(name, param) + if param == 'on' then + set_param('shield',true) + -- SHIELD = true + BACKUP_BUCKET = bucket.liquids + bucket.liquids = {} + minetest.chat_send_player(name, "shield up.") + elseif param == 'off' then + set_param('shield',false) + -- SHIELD = false + bucket.liquids = BACKUP_BUCKET + minetest.chat_send_player(name, "shield down.") + else minetest.chat_send_player(name, "invalid paramter, try 'on' or 'off'.") + end + end, + }) + minetest.register_chatcommand("prot1", { + params = ",,", + description = "first corner", + privs = {server=true}, + func = function(name, param) + local p = {} + p.x, p.y, p.z = string.match(param, "^([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$") + if p.x and p.y and p.z then + set_param('prot1',{x= tonumber(p.x),y=tonumber(p.y),z=tonumber(p.z)}) + minetest.chat_send_player(name, "Fill1 set to ("..p.x..", "..p.y..", "..p.z..")") + return + else + local target = minetest.env:get_player_by_name(name) + if target then + set_param('prot1',target:getpos()) + minetest.chat_send_player(name, "Fill1 set to ("..PROT1.x..", "..PROT1.y..", "..PROT1.z..")") + return + end + end + end, + }) + minetest.register_chatcommand("prot2", { + params = ",,", + description = "opposite corner", + privs = {server=true}, + func = function(name, param) + local p = {} + p.x, p.y, p.z = string.match(param, "^([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$") + if p.x and p.y and p.z then + set_param('prot2',{x= tonumber(p.x),y=tonumber(p.y),z=tonumber(p.z)}) + minetest.chat_send_player(name, "Fill2 set to ("..p.x..", "..p.y..", "..p.z..")") + return + else + local target = minetest.env:get_player_by_name(name) + if target then + set_param('prot2',target:getpos()) + minetest.chat_send_player(name, "Fill2 set to ("..PROT2.x..", "..PROT2.y..", "..PROT2.z..")") + return + end + end + end, + }) + minetest.register_on_placenode(function(p, node) + if SHIELD == true then + if node.name == "default:water_source" or node.name == "default:lava_source" then + minetest.env:remove_node(p) + elseif PROT1 and PROT2 then + local xd = compare(PROT1.x,PROT2.x) + local yd = compare(PROT1.y,PROT2.y) + local zd = compare(PROT1.z,PROT2.z) + if p.x >= xd.low and p.x <= xd.high and p.y >= yd.low and p.y <= yd.high and p.z >= zd.low and p.z <= zd.high then + minetest.env:remove_node(p) + end + end + end + end) + + minetest.register_on_dignode(function(p, node) + if SHIELD == true and PROT1 and PROT2 then + local xd = compare(PROT1.x,PROT2.x) + local yd = compare(PROT1.y,PROT2.y) + local zd = compare(PROT1.z,PROT2.z) + print(p.x..' '..p.y..' '..p.z) + print(xd.low..' '..xd.high..' '..yd.low..' '..yd.high..' '..zd.low..' '..zd.high) + if p.x >= xd.low and p.x <= xd.high and p.y >= yd.low and p.y <= yd.high and p.z >= zd.low and p.z <= zd.high then + minetest.env:add_node(p,{type="node",name=node.name}) + print('VICTORY') + end + + end + + end) +end + + + + + + diff --git a/recipes-12-6-07-compressed.png b/recipes-12-6-07-compressed.png new file mode 100644 index 0000000..b5ef6aa Binary files /dev/null and b/recipes-12-6-07-compressed.png differ diff --git a/sounds/bigbenshort.ogg b/sounds/bigbenshort.ogg new file mode 100644 index 0000000..6e7b1d8 Binary files /dev/null and b/sounds/bigbenshort.ogg differ diff --git a/sounds/bird.ogg b/sounds/bird.ogg new file mode 100644 index 0000000..af705f5 Binary files /dev/null and b/sounds/bird.ogg differ diff --git a/sounds/churchbells.ogg b/sounds/churchbells.ogg new file mode 100644 index 0000000..2ea0284 Binary files /dev/null and b/sounds/churchbells.ogg differ diff --git a/sounds/fire_large.ogg b/sounds/fire_large.ogg new file mode 100644 index 0000000..fe78e62 Binary files /dev/null and b/sounds/fire_large.ogg differ diff --git a/sounds/fire_small.ogg b/sounds/fire_small.ogg new file mode 100644 index 0000000..5aac595 Binary files /dev/null and b/sounds/fire_small.ogg differ diff --git a/sounds/linkingbook.ogg b/sounds/linkingbook.ogg new file mode 100644 index 0000000..d8fc91e Binary files /dev/null and b/sounds/linkingbook.ogg differ diff --git a/sounds/riven1.ogg b/sounds/riven1.ogg new file mode 100644 index 0000000..fca4883 Binary files /dev/null and b/sounds/riven1.ogg differ diff --git a/sounds/riven2.ogg b/sounds/riven2.ogg new file mode 100644 index 0000000..e49490c Binary files /dev/null and b/sounds/riven2.ogg differ diff --git a/sounds/riven3.ogg b/sounds/riven3.ogg new file mode 100644 index 0000000..89f204e Binary files /dev/null and b/sounds/riven3.ogg differ diff --git a/sounds/siren.0.ogg b/sounds/siren.0.ogg new file mode 100644 index 0000000..95462e6 Binary files /dev/null and b/sounds/siren.0.ogg differ diff --git a/textures/default_cobble.png b/textures/default_cobble.png new file mode 100644 index 0000000..bc79696 Binary files /dev/null and b/textures/default_cobble.png differ diff --git a/textures/default_tree.png b/textures/default_tree.png new file mode 100644 index 0000000..ab12501 Binary files /dev/null and b/textures/default_tree.png differ diff --git a/textures/default_tree_top.png b/textures/default_tree_top.png new file mode 100644 index 0000000..6d62006 Binary files /dev/null and b/textures/default_tree_top.png differ diff --git a/textures/fire_basic_flame.png b/textures/fire_basic_flame.png new file mode 100644 index 0000000..a5c2afd Binary files /dev/null and b/textures/fire_basic_flame.png differ diff --git a/textures/madblocks_asphalte.png b/textures/madblocks_asphalte.png new file mode 100644 index 0000000..880b7ed Binary files /dev/null and b/textures/madblocks_asphalte.png differ diff --git a/textures/madblocks_awning.png b/textures/madblocks_awning.png new file mode 100644 index 0000000..9d26999 Binary files /dev/null and b/textures/madblocks_awning.png differ diff --git a/textures/madblocks_awning2.png b/textures/madblocks_awning2.png new file mode 100644 index 0000000..c0036bc Binary files /dev/null and b/textures/madblocks_awning2.png differ diff --git a/textures/madblocks_barrel.png b/textures/madblocks_barrel.png new file mode 100644 index 0000000..568edf3 Binary files /dev/null and b/textures/madblocks_barrel.png differ diff --git a/textures/madblocks_bbc.png b/textures/madblocks_bbc.png new file mode 100644 index 0000000..6a08d5e Binary files /dev/null and b/textures/madblocks_bbc.png differ diff --git a/textures/madblocks_bigben.png b/textures/madblocks_bigben.png new file mode 100644 index 0000000..abc0128 Binary files /dev/null and b/textures/madblocks_bigben.png differ diff --git a/textures/madblocks_bigben_top.png b/textures/madblocks_bigben_top.png new file mode 100644 index 0000000..fe10f62 Binary files /dev/null and b/textures/madblocks_bigben_top.png differ diff --git a/textures/madblocks_birch_slimtree.png b/textures/madblocks_birch_slimtree.png new file mode 100644 index 0000000..d03c3e4 Binary files /dev/null and b/textures/madblocks_birch_slimtree.png differ diff --git a/textures/madblocks_birchtree.png b/textures/madblocks_birchtree.png new file mode 100644 index 0000000..64d23dd Binary files /dev/null and b/textures/madblocks_birchtree.png differ diff --git a/textures/madblocks_bird.png b/textures/madblocks_bird.png new file mode 100644 index 0000000..b6cd64b Binary files /dev/null and b/textures/madblocks_bird.png differ diff --git a/textures/madblocks_blackbrick.png b/textures/madblocks_blackbrick.png new file mode 100644 index 0000000..2d97261 Binary files /dev/null and b/textures/madblocks_blackbrick.png differ diff --git a/textures/madblocks_blackstonebrick.png b/textures/madblocks_blackstonebrick.png new file mode 100644 index 0000000..410bfc2 Binary files /dev/null and b/textures/madblocks_blackstonebrick.png differ diff --git a/textures/madblocks_blackwood.png b/textures/madblocks_blackwood.png new file mode 100644 index 0000000..3fc61f3 Binary files /dev/null and b/textures/madblocks_blackwood.png differ diff --git a/textures/madblocks_blackwood_fence.png b/textures/madblocks_blackwood_fence.png new file mode 100644 index 0000000..21091a7 Binary files /dev/null and b/textures/madblocks_blackwood_fence.png differ diff --git a/textures/madblocks_bluebrick.png b/textures/madblocks_bluebrick.png new file mode 100644 index 0000000..9d4c52a Binary files /dev/null and b/textures/madblocks_bluebrick.png differ diff --git a/textures/madblocks_bluecyanbrick.png b/textures/madblocks_bluecyanbrick.png new file mode 100644 index 0000000..3af243c Binary files /dev/null and b/textures/madblocks_bluecyanbrick.png differ diff --git a/textures/madblocks_bluewood.png b/textures/madblocks_bluewood.png new file mode 100644 index 0000000..ba4b366 Binary files /dev/null and b/textures/madblocks_bluewood.png differ diff --git a/textures/madblocks_bluewood_fence.png b/textures/madblocks_bluewood_fence.png new file mode 100644 index 0000000..a4ca0b9 Binary files /dev/null and b/textures/madblocks_bluewood_fence.png differ diff --git a/textures/madblocks_brownbrick.png b/textures/madblocks_brownbrick.png new file mode 100644 index 0000000..337a7d7 Binary files /dev/null and b/textures/madblocks_brownbrick.png differ diff --git a/textures/madblocks_brownmedistonebrick.png b/textures/madblocks_brownmedistonebrick.png new file mode 100644 index 0000000..54f2867 Binary files /dev/null and b/textures/madblocks_brownmedistonebrick.png differ diff --git a/textures/madblocks_brushedmetal.png b/textures/madblocks_brushedmetal.png new file mode 100644 index 0000000..91c74fe Binary files /dev/null and b/textures/madblocks_brushedmetal.png differ diff --git a/textures/madblocks_brushedmetal_fence.png b/textures/madblocks_brushedmetal_fence.png new file mode 100644 index 0000000..629641a Binary files /dev/null and b/textures/madblocks_brushedmetal_fence.png differ diff --git a/textures/madblocks_cactus_wsnow_side.png b/textures/madblocks_cactus_wsnow_side.png new file mode 100644 index 0000000..e88e366 Binary files /dev/null and b/textures/madblocks_cactus_wsnow_side.png differ diff --git a/textures/madblocks_cactus_wsnow_top.png b/textures/madblocks_cactus_wsnow_top.png new file mode 100644 index 0000000..fee349a Binary files /dev/null and b/textures/madblocks_cactus_wsnow_top.png differ diff --git a/textures/madblocks_cement.png b/textures/madblocks_cement.png new file mode 100644 index 0000000..c87a822 Binary files /dev/null and b/textures/madblocks_cement.png differ diff --git a/textures/madblocks_churchbells.png b/textures/madblocks_churchbells.png new file mode 100644 index 0000000..ceeadc5 Binary files /dev/null and b/textures/madblocks_churchbells.png differ diff --git a/textures/madblocks_cinderblock.png b/textures/madblocks_cinderblock.png new file mode 100644 index 0000000..a8eaa72 Binary files /dev/null and b/textures/madblocks_cinderblock.png differ diff --git a/textures/madblocks_cinderblock_planter.png b/textures/madblocks_cinderblock_planter.png new file mode 100644 index 0000000..fe82aa5 Binary files /dev/null and b/textures/madblocks_cinderblock_planter.png differ diff --git a/textures/madblocks_coffee.png b/textures/madblocks_coffee.png new file mode 100644 index 0000000..9a274b2 Binary files /dev/null and b/textures/madblocks_coffee.png differ diff --git a/textures/madblocks_coffeecup.png b/textures/madblocks_coffeecup.png new file mode 100644 index 0000000..23c8a18 Binary files /dev/null and b/textures/madblocks_coffeecup.png differ diff --git a/textures/madblocks_countrystonebrick.png b/textures/madblocks_countrystonebrick.png new file mode 100644 index 0000000..4c7313d Binary files /dev/null and b/textures/madblocks_countrystonebrick.png differ diff --git a/textures/madblocks_culturedstone.png b/textures/madblocks_culturedstone.png new file mode 100644 index 0000000..f1528fe Binary files /dev/null and b/textures/madblocks_culturedstone.png differ diff --git a/textures/madblocks_cyanbrick.png b/textures/madblocks_cyanbrick.png new file mode 100644 index 0000000..e44f72c Binary files /dev/null and b/textures/madblocks_cyanbrick.png differ diff --git a/textures/madblocks_cyanwood.png b/textures/madblocks_cyanwood.png new file mode 100644 index 0000000..c1a356f Binary files /dev/null and b/textures/madblocks_cyanwood.png differ diff --git a/textures/madblocks_cyanwood_fence.png b/textures/madblocks_cyanwood_fence.png new file mode 100644 index 0000000..8e87326 Binary files /dev/null and b/textures/madblocks_cyanwood_fence.png differ diff --git a/textures/madblocks_dandylions.png b/textures/madblocks_dandylions.png new file mode 100644 index 0000000..284f240 Binary files /dev/null and b/textures/madblocks_dandylions.png differ diff --git a/textures/madblocks_desertsand_w_snow_side.png b/textures/madblocks_desertsand_w_snow_side.png new file mode 100644 index 0000000..51887c1 Binary files /dev/null and b/textures/madblocks_desertsand_w_snow_side.png differ diff --git a/textures/madblocks_drum.png b/textures/madblocks_drum.png new file mode 100644 index 0000000..27c12f3 Binary files /dev/null and b/textures/madblocks_drum.png differ diff --git a/textures/madblocks_dye_black.png b/textures/madblocks_dye_black.png new file mode 100644 index 0000000..afe2599 Binary files /dev/null and b/textures/madblocks_dye_black.png differ diff --git a/textures/madblocks_dye_blue.png b/textures/madblocks_dye_blue.png new file mode 100644 index 0000000..18f01c6 Binary files /dev/null and b/textures/madblocks_dye_blue.png differ diff --git a/textures/madblocks_dye_cyan.png b/textures/madblocks_dye_cyan.png new file mode 100644 index 0000000..b8caf5c Binary files /dev/null and b/textures/madblocks_dye_cyan.png differ diff --git a/textures/madblocks_dye_green.png b/textures/madblocks_dye_green.png new file mode 100644 index 0000000..fad66d4 Binary files /dev/null and b/textures/madblocks_dye_green.png differ diff --git a/textures/madblocks_dye_magenta.png b/textures/madblocks_dye_magenta.png new file mode 100644 index 0000000..a5bf959 Binary files /dev/null and b/textures/madblocks_dye_magenta.png differ diff --git a/textures/madblocks_dye_red.png b/textures/madblocks_dye_red.png new file mode 100644 index 0000000..e210f5d Binary files /dev/null and b/textures/madblocks_dye_red.png differ diff --git a/textures/madblocks_dye_yellow.png b/textures/madblocks_dye_yellow.png new file mode 100644 index 0000000..8373e27 Binary files /dev/null and b/textures/madblocks_dye_yellow.png differ diff --git a/textures/madblocks_fancybracket.png b/textures/madblocks_fancybracket.png new file mode 100644 index 0000000..8767d80 Binary files /dev/null and b/textures/madblocks_fancybracket.png differ diff --git a/textures/madblocks_fancylamp.png b/textures/madblocks_fancylamp.png new file mode 100644 index 0000000..4566470 Binary files /dev/null and b/textures/madblocks_fancylamp.png differ diff --git a/textures/madblocks_fireplace.png b/textures/madblocks_fireplace.png new file mode 100644 index 0000000..961209e Binary files /dev/null and b/textures/madblocks_fireplace.png differ diff --git a/textures/madblocks_flowers1.png b/textures/madblocks_flowers1.png new file mode 100644 index 0000000..30dc677 Binary files /dev/null and b/textures/madblocks_flowers1.png differ diff --git a/textures/madblocks_flowers2.png b/textures/madblocks_flowers2.png new file mode 100644 index 0000000..04feeb3 Binary files /dev/null and b/textures/madblocks_flowers2.png differ diff --git a/textures/madblocks_gargoyle.png b/textures/madblocks_gargoyle.png new file mode 100644 index 0000000..08da5ab Binary files /dev/null and b/textures/madblocks_gargoyle.png differ diff --git a/textures/madblocks_glowblue.png b/textures/madblocks_glowblue.png new file mode 100644 index 0000000..85bed2d Binary files /dev/null and b/textures/madblocks_glowblue.png differ diff --git a/textures/madblocks_glowgreen.png b/textures/madblocks_glowgreen.png new file mode 100644 index 0000000..e9d61bc Binary files /dev/null and b/textures/madblocks_glowgreen.png differ diff --git a/textures/madblocks_glowred.png b/textures/madblocks_glowred.png new file mode 100644 index 0000000..af6dab7 Binary files /dev/null and b/textures/madblocks_glowred.png differ diff --git a/textures/madblocks_glowtron.png b/textures/madblocks_glowtron.png new file mode 100644 index 0000000..bb092d8 Binary files /dev/null and b/textures/madblocks_glowtron.png differ diff --git a/textures/madblocks_glowyellow.png b/textures/madblocks_glowyellow.png new file mode 100644 index 0000000..c281152 Binary files /dev/null and b/textures/madblocks_glowyellow.png differ diff --git a/textures/madblocks_gnome.png b/textures/madblocks_gnome.png new file mode 100644 index 0000000..78800e9 Binary files /dev/null and b/textures/madblocks_gnome.png differ diff --git a/textures/madblocks_grass_autumn.png b/textures/madblocks_grass_autumn.png new file mode 100644 index 0000000..a20810f Binary files /dev/null and b/textures/madblocks_grass_autumn.png differ diff --git a/textures/madblocks_grass_autumn_side.png b/textures/madblocks_grass_autumn_side.png new file mode 100644 index 0000000..a1165cc Binary files /dev/null and b/textures/madblocks_grass_autumn_side.png differ diff --git a/textures/madblocks_grass_spring.png b/textures/madblocks_grass_spring.png new file mode 100644 index 0000000..6e9f2a6 Binary files /dev/null and b/textures/madblocks_grass_spring.png differ diff --git a/textures/madblocks_grass_spring_side.png b/textures/madblocks_grass_spring_side.png new file mode 100644 index 0000000..61aff1b Binary files /dev/null and b/textures/madblocks_grass_spring_side.png differ diff --git a/textures/madblocks_grass_w_snow_side.png b/textures/madblocks_grass_w_snow_side.png new file mode 100644 index 0000000..2329908 Binary files /dev/null and b/textures/madblocks_grass_w_snow_side.png differ diff --git a/textures/madblocks_greenbrick.png b/textures/madblocks_greenbrick.png new file mode 100644 index 0000000..b3c80e9 Binary files /dev/null and b/textures/madblocks_greenbrick.png differ diff --git a/textures/madblocks_greenwood.png b/textures/madblocks_greenwood.png new file mode 100644 index 0000000..b76c222 Binary files /dev/null and b/textures/madblocks_greenwood.png differ diff --git a/textures/madblocks_greenwood_fence.png b/textures/madblocks_greenwood_fence.png new file mode 100644 index 0000000..dd2d16c Binary files /dev/null and b/textures/madblocks_greenwood_fence.png differ diff --git a/textures/madblocks_greystonebrick.png b/textures/madblocks_greystonebrick.png new file mode 100644 index 0000000..f5ced6b Binary files /dev/null and b/textures/madblocks_greystonebrick.png differ diff --git a/textures/madblocks_growlamp.png b/textures/madblocks_growlamp.png new file mode 100644 index 0000000..86c2a17 Binary files /dev/null and b/textures/madblocks_growlamp.png differ diff --git a/textures/madblocks_hangingflowers.png b/textures/madblocks_hangingflowers.png new file mode 100644 index 0000000..d4d78e9 Binary files /dev/null and b/textures/madblocks_hangingflowers.png differ diff --git a/textures/madblocks_hydroponics_coffee.png b/textures/madblocks_hydroponics_coffee.png new file mode 100644 index 0000000..fffd1d5 Binary files /dev/null and b/textures/madblocks_hydroponics_coffee.png differ diff --git a/textures/madblocks_hydroponics_coffee1.png b/textures/madblocks_hydroponics_coffee1.png new file mode 100644 index 0000000..a3c5be7 Binary files /dev/null and b/textures/madblocks_hydroponics_coffee1.png differ diff --git a/textures/madblocks_hydroponics_coffee2.png b/textures/madblocks_hydroponics_coffee2.png new file mode 100644 index 0000000..4b2a9a3 Binary files /dev/null and b/textures/madblocks_hydroponics_coffee2.png differ diff --git a/textures/madblocks_hydroponics_coffee3.png b/textures/madblocks_hydroponics_coffee3.png new file mode 100644 index 0000000..033beac Binary files /dev/null and b/textures/madblocks_hydroponics_coffee3.png differ diff --git a/textures/madblocks_hydroponics_coffee4.png b/textures/madblocks_hydroponics_coffee4.png new file mode 100644 index 0000000..40c67f4 Binary files /dev/null and b/textures/madblocks_hydroponics_coffee4.png differ diff --git a/textures/madblocks_hydroponics_cyanflower.png b/textures/madblocks_hydroponics_cyanflower.png new file mode 100644 index 0000000..918ddc2 Binary files /dev/null and b/textures/madblocks_hydroponics_cyanflower.png differ diff --git a/textures/madblocks_hydroponics_cyanflower1.png b/textures/madblocks_hydroponics_cyanflower1.png new file mode 100644 index 0000000..d5f6d1b Binary files /dev/null and b/textures/madblocks_hydroponics_cyanflower1.png differ diff --git a/textures/madblocks_hydroponics_cyanflower2.png b/textures/madblocks_hydroponics_cyanflower2.png new file mode 100644 index 0000000..002bd02 Binary files /dev/null and b/textures/madblocks_hydroponics_cyanflower2.png differ diff --git a/textures/madblocks_hydroponics_cyanflower3.png b/textures/madblocks_hydroponics_cyanflower3.png new file mode 100644 index 0000000..97ed686 Binary files /dev/null and b/textures/madblocks_hydroponics_cyanflower3.png differ diff --git a/textures/madblocks_hydroponics_cyanflower4.png b/textures/madblocks_hydroponics_cyanflower4.png new file mode 100644 index 0000000..5a18f54 Binary files /dev/null and b/textures/madblocks_hydroponics_cyanflower4.png differ diff --git a/textures/madblocks_hydroponics_grapes.png b/textures/madblocks_hydroponics_grapes.png new file mode 100644 index 0000000..1475cff Binary files /dev/null and b/textures/madblocks_hydroponics_grapes.png differ diff --git a/textures/madblocks_hydroponics_grapes1.png b/textures/madblocks_hydroponics_grapes1.png new file mode 100644 index 0000000..a3c5be7 Binary files /dev/null and b/textures/madblocks_hydroponics_grapes1.png differ diff --git a/textures/madblocks_hydroponics_grapes2.png b/textures/madblocks_hydroponics_grapes2.png new file mode 100644 index 0000000..4b2a9a3 Binary files /dev/null and b/textures/madblocks_hydroponics_grapes2.png differ diff --git a/textures/madblocks_hydroponics_grapes3.png b/textures/madblocks_hydroponics_grapes3.png new file mode 100644 index 0000000..033beac Binary files /dev/null and b/textures/madblocks_hydroponics_grapes3.png differ diff --git a/textures/madblocks_hydroponics_grapes4.png b/textures/madblocks_hydroponics_grapes4.png new file mode 100644 index 0000000..bb38591 Binary files /dev/null and b/textures/madblocks_hydroponics_grapes4.png differ diff --git a/textures/madblocks_hydroponics_growlamp.png b/textures/madblocks_hydroponics_growlamp.png new file mode 100644 index 0000000..86c2a17 Binary files /dev/null and b/textures/madblocks_hydroponics_growlamp.png differ diff --git a/textures/madblocks_hydroponics_habanero.png b/textures/madblocks_hydroponics_habanero.png new file mode 100644 index 0000000..47fabaa Binary files /dev/null and b/textures/madblocks_hydroponics_habanero.png differ diff --git a/textures/madblocks_hydroponics_habanero1.png b/textures/madblocks_hydroponics_habanero1.png new file mode 100644 index 0000000..d4a0998 Binary files /dev/null and b/textures/madblocks_hydroponics_habanero1.png differ diff --git a/textures/madblocks_hydroponics_habanero2.png b/textures/madblocks_hydroponics_habanero2.png new file mode 100644 index 0000000..9d7f161 Binary files /dev/null and b/textures/madblocks_hydroponics_habanero2.png differ diff --git a/textures/madblocks_hydroponics_habanero3.png b/textures/madblocks_hydroponics_habanero3.png new file mode 100644 index 0000000..81c5e0b Binary files /dev/null and b/textures/madblocks_hydroponics_habanero3.png differ diff --git a/textures/madblocks_hydroponics_habanero4.png b/textures/madblocks_hydroponics_habanero4.png new file mode 100644 index 0000000..8053f3d Binary files /dev/null and b/textures/madblocks_hydroponics_habanero4.png differ diff --git a/textures/madblocks_hydroponics_magentaflower.png b/textures/madblocks_hydroponics_magentaflower.png new file mode 100644 index 0000000..9e3eea5 Binary files /dev/null and b/textures/madblocks_hydroponics_magentaflower.png differ diff --git a/textures/madblocks_hydroponics_magentaflower1.png b/textures/madblocks_hydroponics_magentaflower1.png new file mode 100644 index 0000000..d5f6d1b Binary files /dev/null and b/textures/madblocks_hydroponics_magentaflower1.png differ diff --git a/textures/madblocks_hydroponics_magentaflower2.png b/textures/madblocks_hydroponics_magentaflower2.png new file mode 100644 index 0000000..002bd02 Binary files /dev/null and b/textures/madblocks_hydroponics_magentaflower2.png differ diff --git a/textures/madblocks_hydroponics_magentaflower3.png b/textures/madblocks_hydroponics_magentaflower3.png new file mode 100644 index 0000000..97ed686 Binary files /dev/null and b/textures/madblocks_hydroponics_magentaflower3.png differ diff --git a/textures/madblocks_hydroponics_magentaflower4.png b/textures/madblocks_hydroponics_magentaflower4.png new file mode 100644 index 0000000..a62a2bb Binary files /dev/null and b/textures/madblocks_hydroponics_magentaflower4.png differ diff --git a/textures/madblocks_hydroponics_peas.png b/textures/madblocks_hydroponics_peas.png new file mode 100644 index 0000000..be738ac Binary files /dev/null and b/textures/madblocks_hydroponics_peas.png differ diff --git a/textures/madblocks_hydroponics_peas1.png b/textures/madblocks_hydroponics_peas1.png new file mode 100644 index 0000000..b428df4 Binary files /dev/null and b/textures/madblocks_hydroponics_peas1.png differ diff --git a/textures/madblocks_hydroponics_peas2.png b/textures/madblocks_hydroponics_peas2.png new file mode 100644 index 0000000..edef180 Binary files /dev/null and b/textures/madblocks_hydroponics_peas2.png differ diff --git a/textures/madblocks_hydroponics_peas3.png b/textures/madblocks_hydroponics_peas3.png new file mode 100644 index 0000000..b4f9085 Binary files /dev/null and b/textures/madblocks_hydroponics_peas3.png differ diff --git a/textures/madblocks_hydroponics_peas4.png b/textures/madblocks_hydroponics_peas4.png new file mode 100644 index 0000000..618b149 Binary files /dev/null and b/textures/madblocks_hydroponics_peas4.png differ diff --git a/textures/madblocks_hydroponics_promix.png b/textures/madblocks_hydroponics_promix.png new file mode 100644 index 0000000..2612bd6 Binary files /dev/null and b/textures/madblocks_hydroponics_promix.png differ diff --git a/textures/madblocks_hydroponics_roses1.png b/textures/madblocks_hydroponics_roses1.png new file mode 100644 index 0000000..d5f6d1b Binary files /dev/null and b/textures/madblocks_hydroponics_roses1.png differ diff --git a/textures/madblocks_hydroponics_roses2.png b/textures/madblocks_hydroponics_roses2.png new file mode 100644 index 0000000..002bd02 Binary files /dev/null and b/textures/madblocks_hydroponics_roses2.png differ diff --git a/textures/madblocks_hydroponics_roses3.png b/textures/madblocks_hydroponics_roses3.png new file mode 100644 index 0000000..6f5944c Binary files /dev/null and b/textures/madblocks_hydroponics_roses3.png differ diff --git a/textures/madblocks_hydroponics_roses4.png b/textures/madblocks_hydroponics_roses4.png new file mode 100644 index 0000000..d480a3b Binary files /dev/null and b/textures/madblocks_hydroponics_roses4.png differ diff --git a/textures/madblocks_hydroponics_rubberplant.png b/textures/madblocks_hydroponics_rubberplant.png new file mode 100644 index 0000000..3c02e7e Binary files /dev/null and b/textures/madblocks_hydroponics_rubberplant.png differ diff --git a/textures/madblocks_hydroponics_rubberplant1.png b/textures/madblocks_hydroponics_rubberplant1.png new file mode 100644 index 0000000..5dc8222 Binary files /dev/null and b/textures/madblocks_hydroponics_rubberplant1.png differ diff --git a/textures/madblocks_hydroponics_rubberplant2.png b/textures/madblocks_hydroponics_rubberplant2.png new file mode 100644 index 0000000..5ba86a3 Binary files /dev/null and b/textures/madblocks_hydroponics_rubberplant2.png differ diff --git a/textures/madblocks_hydroponics_rubberplant3.png b/textures/madblocks_hydroponics_rubberplant3.png new file mode 100644 index 0000000..6326394 Binary files /dev/null and b/textures/madblocks_hydroponics_rubberplant3.png differ diff --git a/textures/madblocks_hydroponics_rubberplant4.png b/textures/madblocks_hydroponics_rubberplant4.png new file mode 100644 index 0000000..42ebb34 Binary files /dev/null and b/textures/madblocks_hydroponics_rubberplant4.png differ diff --git a/textures/madblocks_hydroponics_seedlings.png b/textures/madblocks_hydroponics_seedlings.png new file mode 100644 index 0000000..ae7cb62 Binary files /dev/null and b/textures/madblocks_hydroponics_seedlings.png differ diff --git a/textures/madblocks_hydroponics_seeds.png b/textures/madblocks_hydroponics_seeds.png new file mode 100644 index 0000000..9194d48 Binary files /dev/null and b/textures/madblocks_hydroponics_seeds.png differ diff --git a/textures/madblocks_hydroponics_sproutlings.png b/textures/madblocks_hydroponics_sproutlings.png new file mode 100644 index 0000000..3168574 Binary files /dev/null and b/textures/madblocks_hydroponics_sproutlings.png differ diff --git a/textures/madblocks_hydroponics_tomato.png b/textures/madblocks_hydroponics_tomato.png new file mode 100644 index 0000000..a53429f Binary files /dev/null and b/textures/madblocks_hydroponics_tomato.png differ diff --git a/textures/madblocks_hydroponics_tomato1.png b/textures/madblocks_hydroponics_tomato1.png new file mode 100644 index 0000000..d5f6d1b Binary files /dev/null and b/textures/madblocks_hydroponics_tomato1.png differ diff --git a/textures/madblocks_hydroponics_tomato2.png b/textures/madblocks_hydroponics_tomato2.png new file mode 100644 index 0000000..002bd02 Binary files /dev/null and b/textures/madblocks_hydroponics_tomato2.png differ diff --git a/textures/madblocks_hydroponics_tomato3.png b/textures/madblocks_hydroponics_tomato3.png new file mode 100644 index 0000000..90ebe67 Binary files /dev/null and b/textures/madblocks_hydroponics_tomato3.png differ diff --git a/textures/madblocks_hydroponics_tomato4.png b/textures/madblocks_hydroponics_tomato4.png new file mode 100644 index 0000000..170f0c3 Binary files /dev/null and b/textures/madblocks_hydroponics_tomato4.png differ diff --git a/textures/madblocks_hydroponics_wildplant.png b/textures/madblocks_hydroponics_wildplant.png new file mode 100644 index 0000000..44a45c7 Binary files /dev/null and b/textures/madblocks_hydroponics_wildplant.png differ diff --git a/textures/madblocks_hydroponics_yellowflower.png b/textures/madblocks_hydroponics_yellowflower.png new file mode 100644 index 0000000..db30a29 Binary files /dev/null and b/textures/madblocks_hydroponics_yellowflower.png differ diff --git a/textures/madblocks_hydroponics_yellowflower1.png b/textures/madblocks_hydroponics_yellowflower1.png new file mode 100644 index 0000000..d5f6d1b Binary files /dev/null and b/textures/madblocks_hydroponics_yellowflower1.png differ diff --git a/textures/madblocks_hydroponics_yellowflower2.png b/textures/madblocks_hydroponics_yellowflower2.png new file mode 100644 index 0000000..002bd02 Binary files /dev/null and b/textures/madblocks_hydroponics_yellowflower2.png differ diff --git a/textures/madblocks_hydroponics_yellowflower3.png b/textures/madblocks_hydroponics_yellowflower3.png new file mode 100644 index 0000000..97ed686 Binary files /dev/null and b/textures/madblocks_hydroponics_yellowflower3.png differ diff --git a/textures/madblocks_hydroponics_yellowflower4.png b/textures/madblocks_hydroponics_yellowflower4.png new file mode 100644 index 0000000..e71e0a4 Binary files /dev/null and b/textures/madblocks_hydroponics_yellowflower4.png differ diff --git a/textures/madblocks_ice.png b/textures/madblocks_ice.png new file mode 100644 index 0000000..7fc94d7 Binary files /dev/null and b/textures/madblocks_ice.png differ diff --git a/textures/madblocks_lampling.png b/textures/madblocks_lampling.png new file mode 100644 index 0000000..313aade Binary files /dev/null and b/textures/madblocks_lampling.png differ diff --git a/textures/madblocks_leaves.png b/textures/madblocks_leaves.png new file mode 100644 index 0000000..d0258ed Binary files /dev/null and b/textures/madblocks_leaves.png differ diff --git a/textures/madblocks_leaves_autumn.png b/textures/madblocks_leaves_autumn.png new file mode 100644 index 0000000..baeab0f Binary files /dev/null and b/textures/madblocks_leaves_autumn.png differ diff --git a/textures/madblocks_leaves_spring.png b/textures/madblocks_leaves_spring.png new file mode 100644 index 0000000..d69b564 Binary files /dev/null and b/textures/madblocks_leaves_spring.png differ diff --git a/textures/madblocks_leaves_with_snow.png b/textures/madblocks_leaves_with_snow.png new file mode 100644 index 0000000..02c4db1 Binary files /dev/null and b/textures/madblocks_leaves_with_snow.png differ diff --git a/textures/madblocks_leaves_with_snow_top.png b/textures/madblocks_leaves_with_snow_top.png new file mode 100644 index 0000000..71d6fa2 Binary files /dev/null and b/textures/madblocks_leaves_with_snow_top.png differ diff --git a/textures/madblocks_linkingbook.png b/textures/madblocks_linkingbook.png new file mode 100644 index 0000000..3486e6a Binary files /dev/null and b/textures/madblocks_linkingbook.png differ diff --git a/textures/madblocks_m1.png b/textures/madblocks_m1.png new file mode 100644 index 0000000..db8b148 Binary files /dev/null and b/textures/madblocks_m1.png differ diff --git a/textures/madblocks_m2.png b/textures/madblocks_m2.png new file mode 100644 index 0000000..e2dd15f Binary files /dev/null and b/textures/madblocks_m2.png differ diff --git a/textures/madblocks_magentabrick.png b/textures/madblocks_magentabrick.png new file mode 100644 index 0000000..d4b1ae9 Binary files /dev/null and b/textures/madblocks_magentabrick.png differ diff --git a/textures/madblocks_magentawood.png b/textures/madblocks_magentawood.png new file mode 100644 index 0000000..150632b Binary files /dev/null and b/textures/madblocks_magentawood.png differ diff --git a/textures/madblocks_magentawood_fence.png b/textures/madblocks_magentawood_fence.png new file mode 100644 index 0000000..5c0e3b6 Binary files /dev/null and b/textures/madblocks_magentawood_fence.png differ diff --git a/textures/madblocks_marblestonebrick.png b/textures/madblocks_marblestonebrick.png new file mode 100644 index 0000000..b884f4a Binary files /dev/null and b/textures/madblocks_marblestonebrick.png differ diff --git a/textures/madblocks_medistonebrick.png b/textures/madblocks_medistonebrick.png new file mode 100644 index 0000000..0f72934 Binary files /dev/null and b/textures/madblocks_medistonebrick.png differ diff --git a/textures/madblocks_metalbulkhead.png b/textures/madblocks_metalbulkhead.png new file mode 100644 index 0000000..f341b76 Binary files /dev/null and b/textures/madblocks_metalbulkhead.png differ diff --git a/textures/madblocks_mossystonebrick.png b/textures/madblocks_mossystonebrick.png new file mode 100644 index 0000000..0145964 Binary files /dev/null and b/textures/madblocks_mossystonebrick.png differ diff --git a/textures/madblocks_mushroom.png b/textures/madblocks_mushroom.png new file mode 100644 index 0000000..a128a44 Binary files /dev/null and b/textures/madblocks_mushroom.png differ diff --git a/textures/madblocks_oddbrick.png b/textures/madblocks_oddbrick.png new file mode 100644 index 0000000..e77f6f1 Binary files /dev/null and b/textures/madblocks_oddbrick.png differ diff --git a/textures/madblocks_palmleaves.png b/textures/madblocks_palmleaves.png new file mode 100644 index 0000000..9cf4581 Binary files /dev/null and b/textures/madblocks_palmleaves.png differ diff --git a/textures/madblocks_palmleaves_top.png b/textures/madblocks_palmleaves_top.png new file mode 100644 index 0000000..3eac7ad Binary files /dev/null and b/textures/madblocks_palmleaves_top.png differ diff --git a/textures/madblocks_palmtree.png b/textures/madblocks_palmtree.png new file mode 100644 index 0000000..d03c3e4 Binary files /dev/null and b/textures/madblocks_palmtree.png differ diff --git a/textures/madblocks_pasteref.png b/textures/madblocks_pasteref.png new file mode 100644 index 0000000..08fd62e Binary files /dev/null and b/textures/madblocks_pasteref.png differ diff --git a/textures/madblocks_plinkingbook.png b/textures/madblocks_plinkingbook.png new file mode 100644 index 0000000..8c2eafa Binary files /dev/null and b/textures/madblocks_plinkingbook.png differ diff --git a/textures/madblocks_power_controller.png b/textures/madblocks_power_controller.png new file mode 100644 index 0000000..4421ae4 Binary files /dev/null and b/textures/madblocks_power_controller.png differ diff --git a/textures/madblocks_power_gen_off.png b/textures/madblocks_power_gen_off.png new file mode 100644 index 0000000..4f480ac Binary files /dev/null and b/textures/madblocks_power_gen_off.png differ diff --git a/textures/madblocks_power_polepegs.png b/textures/madblocks_power_polepegs.png new file mode 100644 index 0000000..18c34af Binary files /dev/null and b/textures/madblocks_power_polepegs.png differ diff --git a/textures/madblocks_power_pylon.png b/textures/madblocks_power_pylon.png new file mode 100644 index 0000000..2cc0b69 Binary files /dev/null and b/textures/madblocks_power_pylon.png differ diff --git a/textures/madblocks_promix.png b/textures/madblocks_promix.png new file mode 100644 index 0000000..2612bd6 Binary files /dev/null and b/textures/madblocks_promix.png differ diff --git a/textures/madblocks_redstonebrick.png b/textures/madblocks_redstonebrick.png new file mode 100644 index 0000000..e231a3b Binary files /dev/null and b/textures/madblocks_redstonebrick.png differ diff --git a/textures/madblocks_redwood.png b/textures/madblocks_redwood.png new file mode 100644 index 0000000..6787d85 Binary files /dev/null and b/textures/madblocks_redwood.png differ diff --git a/textures/madblocks_redwood_fence.png b/textures/madblocks_redwood_fence.png new file mode 100644 index 0000000..2b40851 Binary files /dev/null and b/textures/madblocks_redwood_fence.png differ diff --git a/textures/madblocks_riven1.png b/textures/madblocks_riven1.png new file mode 100644 index 0000000..9179505 Binary files /dev/null and b/textures/madblocks_riven1.png differ diff --git a/textures/madblocks_riven2.png b/textures/madblocks_riven2.png new file mode 100644 index 0000000..295a907 Binary files /dev/null and b/textures/madblocks_riven2.png differ diff --git a/textures/madblocks_riven3.png b/textures/madblocks_riven3.png new file mode 100644 index 0000000..6ab92a0 Binary files /dev/null and b/textures/madblocks_riven3.png differ diff --git a/textures/madblocks_rivenbeetle.png b/textures/madblocks_rivenbeetle.png new file mode 100644 index 0000000..ccde7d0 Binary files /dev/null and b/textures/madblocks_rivenbeetle.png differ diff --git a/textures/madblocks_rivenbulkhead.png b/textures/madblocks_rivenbulkhead.png new file mode 100644 index 0000000..e5e596b Binary files /dev/null and b/textures/madblocks_rivenbulkhead.png differ diff --git a/textures/madblocks_rivendagger.png b/textures/madblocks_rivendagger.png new file mode 100644 index 0000000..a480d4f Binary files /dev/null and b/textures/madblocks_rivendagger.png differ diff --git a/textures/madblocks_rivengoldstone1.png b/textures/madblocks_rivengoldstone1.png new file mode 100644 index 0000000..2258127 Binary files /dev/null and b/textures/madblocks_rivengoldstone1.png differ diff --git a/textures/madblocks_rivengoldstone2.png b/textures/madblocks_rivengoldstone2.png new file mode 100644 index 0000000..1556eca Binary files /dev/null and b/textures/madblocks_rivengoldstone2.png differ diff --git a/textures/madblocks_rivenmetal.png b/textures/madblocks_rivenmetal.png new file mode 100644 index 0000000..bc490c3 Binary files /dev/null and b/textures/madblocks_rivenmetal.png differ diff --git a/textures/madblocks_rivenstone1.png b/textures/madblocks_rivenstone1.png new file mode 100644 index 0000000..53189ff Binary files /dev/null and b/textures/madblocks_rivenstone1.png differ diff --git a/textures/madblocks_rivenstone2.png b/textures/madblocks_rivenstone2.png new file mode 100644 index 0000000..6e31a1c Binary files /dev/null and b/textures/madblocks_rivenstone2.png differ diff --git a/textures/madblocks_rivenstoneblue.png b/textures/madblocks_rivenstoneblue.png new file mode 100644 index 0000000..150ef3e Binary files /dev/null and b/textures/madblocks_rivenstoneblue.png differ diff --git a/textures/madblocks_riventool.png b/textures/madblocks_riventool.png new file mode 100644 index 0000000..5c3df2a Binary files /dev/null and b/textures/madblocks_riventool.png differ diff --git a/textures/madblocks_rivenwood.png b/textures/madblocks_rivenwood.png new file mode 100644 index 0000000..c8b3f36 Binary files /dev/null and b/textures/madblocks_rivenwood.png differ diff --git a/textures/madblocks_rivenwoodblue.png b/textures/madblocks_rivenwoodblue.png new file mode 100644 index 0000000..67e91d2 Binary files /dev/null and b/textures/madblocks_rivenwoodblue.png differ diff --git a/textures/madblocks_rosebush.png b/textures/madblocks_rosebush.png new file mode 100644 index 0000000..af42454 Binary files /dev/null and b/textures/madblocks_rosebush.png differ diff --git a/textures/madblocks_roundstonebrick.png b/textures/madblocks_roundstonebrick.png new file mode 100644 index 0000000..1e61b22 Binary files /dev/null and b/textures/madblocks_roundstonebrick.png differ diff --git a/textures/madblocks_rubber_ends.png b/textures/madblocks_rubber_ends.png new file mode 100644 index 0000000..6837d8d Binary files /dev/null and b/textures/madblocks_rubber_ends.png differ diff --git a/textures/madblocks_rubber_side.png b/textures/madblocks_rubber_side.png new file mode 100644 index 0000000..ae34f90 Binary files /dev/null and b/textures/madblocks_rubber_side.png differ diff --git a/textures/madblocks_sand_w_snow_side.png b/textures/madblocks_sand_w_snow_side.png new file mode 100644 index 0000000..7ec748f Binary files /dev/null and b/textures/madblocks_sand_w_snow_side.png differ diff --git a/textures/madblocks_searchlight.png b/textures/madblocks_searchlight.png new file mode 100644 index 0000000..8b300f7 Binary files /dev/null and b/textures/madblocks_searchlight.png differ diff --git a/textures/madblocks_sheetmetal.png b/textures/madblocks_sheetmetal.png new file mode 100644 index 0000000..acc5470 Binary files /dev/null and b/textures/madblocks_sheetmetal.png differ diff --git a/textures/madblocks_sheetmetal_top.png b/textures/madblocks_sheetmetal_top.png new file mode 100644 index 0000000..e588cfb Binary files /dev/null and b/textures/madblocks_sheetmetal_top.png differ diff --git a/textures/madblocks_shinystonebrick.png b/textures/madblocks_shinystonebrick.png new file mode 100644 index 0000000..0ac3cf7 Binary files /dev/null and b/textures/madblocks_shinystonebrick.png differ diff --git a/textures/madblocks_shutter_left.png b/textures/madblocks_shutter_left.png new file mode 100644 index 0000000..45d5db8 Binary files /dev/null and b/textures/madblocks_shutter_left.png differ diff --git a/textures/madblocks_shutter_right.png b/textures/madblocks_shutter_right.png new file mode 100644 index 0000000..53ec5a6 Binary files /dev/null and b/textures/madblocks_shutter_right.png differ diff --git a/textures/madblocks_signs_420.png b/textures/madblocks_signs_420.png new file mode 100644 index 0000000..e85696e Binary files /dev/null and b/textures/madblocks_signs_420.png differ diff --git a/textures/madblocks_signs_cafe.png b/textures/madblocks_signs_cafe.png new file mode 100644 index 0000000..ba8f99e Binary files /dev/null and b/textures/madblocks_signs_cafe.png differ diff --git a/textures/madblocks_signs_chicken.png b/textures/madblocks_signs_chicken.png new file mode 100644 index 0000000..c9dd843 Binary files /dev/null and b/textures/madblocks_signs_chicken.png differ diff --git a/textures/madblocks_signs_cliff.png b/textures/madblocks_signs_cliff.png new file mode 100644 index 0000000..deb357c Binary files /dev/null and b/textures/madblocks_signs_cliff.png differ diff --git a/textures/madblocks_signs_dangermines.png b/textures/madblocks_signs_dangermines.png new file mode 100644 index 0000000..20b2cfe Binary files /dev/null and b/textures/madblocks_signs_dangermines.png differ diff --git a/textures/madblocks_signs_drpepper.png b/textures/madblocks_signs_drpepper.png new file mode 100644 index 0000000..530017e Binary files /dev/null and b/textures/madblocks_signs_drpepper.png differ diff --git a/textures/madblocks_signs_enjoycoke.png b/textures/madblocks_signs_enjoycoke.png new file mode 100644 index 0000000..d50c8e0 Binary files /dev/null and b/textures/madblocks_signs_enjoycoke.png differ diff --git a/textures/madblocks_signs_hucksfoodfuel.png b/textures/madblocks_signs_hucksfoodfuel.png new file mode 100644 index 0000000..2929c3d Binary files /dev/null and b/textures/madblocks_signs_hucksfoodfuel.png differ diff --git a/textures/madblocks_signs_interdit.png b/textures/madblocks_signs_interdit.png new file mode 100644 index 0000000..2f4d7aa Binary files /dev/null and b/textures/madblocks_signs_interdit.png differ diff --git a/textures/madblocks_signs_montreal.png b/textures/madblocks_signs_montreal.png new file mode 100644 index 0000000..d377a30 Binary files /dev/null and b/textures/madblocks_signs_montreal.png differ diff --git a/textures/madblocks_signs_obscene.png b/textures/madblocks_signs_obscene.png new file mode 100644 index 0000000..ce01b28 Binary files /dev/null and b/textures/madblocks_signs_obscene.png differ diff --git a/textures/madblocks_signs_park.png b/textures/madblocks_signs_park.png new file mode 100644 index 0000000..baeb0c3 Binary files /dev/null and b/textures/madblocks_signs_park.png differ diff --git a/textures/madblocks_siren.png b/textures/madblocks_siren.png new file mode 100644 index 0000000..bf60b4c Binary files /dev/null and b/textures/madblocks_siren.png differ diff --git a/textures/madblocks_slimstonebrick.png b/textures/madblocks_slimstonebrick.png new file mode 100644 index 0000000..7d2f24e Binary files /dev/null and b/textures/madblocks_slimstonebrick.png differ diff --git a/textures/madblocks_slimtree.png b/textures/madblocks_slimtree.png new file mode 100644 index 0000000..d03c3e4 Binary files /dev/null and b/textures/madblocks_slimtree.png differ diff --git a/textures/madblocks_snow.png b/textures/madblocks_snow.png new file mode 100644 index 0000000..1d11a2d Binary files /dev/null and b/textures/madblocks_snow.png differ diff --git a/textures/madblocks_snowflakes.png b/textures/madblocks_snowflakes.png new file mode 100644 index 0000000..d6a908d Binary files /dev/null and b/textures/madblocks_snowflakes.png differ diff --git a/textures/madblocks_spotlights_inv.png b/textures/madblocks_spotlights_inv.png new file mode 100644 index 0000000..2572610 Binary files /dev/null and b/textures/madblocks_spotlights_inv.png differ diff --git a/textures/madblocks_spotlights_side.png b/textures/madblocks_spotlights_side.png new file mode 100644 index 0000000..63df756 Binary files /dev/null and b/textures/madblocks_spotlights_side.png differ diff --git a/textures/madblocks_spotlights_top.png b/textures/madblocks_spotlights_top.png new file mode 100644 index 0000000..a8ff5ba Binary files /dev/null and b/textures/madblocks_spotlights_top.png differ diff --git a/textures/madblocks_statue.png b/textures/madblocks_statue.png new file mode 100644 index 0000000..8271f05 Binary files /dev/null and b/textures/madblocks_statue.png differ diff --git a/textures/madblocks_stool.png b/textures/madblocks_stool.png new file mode 100644 index 0000000..15aad52 Binary files /dev/null and b/textures/madblocks_stool.png differ diff --git a/textures/madblocks_street.png b/textures/madblocks_street.png new file mode 100644 index 0000000..618d007 Binary files /dev/null and b/textures/madblocks_street.png differ diff --git a/textures/madblocks_stripedmetal.png b/textures/madblocks_stripedmetal.png new file mode 100644 index 0000000..b4df919 Binary files /dev/null and b/textures/madblocks_stripedmetal.png differ diff --git a/textures/madblocks_texturedmetal.png b/textures/madblocks_texturedmetal.png new file mode 100644 index 0000000..3d07205 Binary files /dev/null and b/textures/madblocks_texturedmetal.png differ diff --git a/textures/madblocks_tree.png b/textures/madblocks_tree.png new file mode 100644 index 0000000..ab12501 Binary files /dev/null and b/textures/madblocks_tree.png differ diff --git a/textures/madblocks_whitestonebrick.png b/textures/madblocks_whitestonebrick.png new file mode 100644 index 0000000..f59a6c0 Binary files /dev/null and b/textures/madblocks_whitestonebrick.png differ diff --git a/textures/madblocks_wild_rubberplant.png b/textures/madblocks_wild_rubberplant.png new file mode 100644 index 0000000..426f0d9 Binary files /dev/null and b/textures/madblocks_wild_rubberplant.png differ diff --git a/textures/madblocks_wine.png b/textures/madblocks_wine.png new file mode 100644 index 0000000..d0944ea Binary files /dev/null and b/textures/madblocks_wine.png differ diff --git a/textures/madblocks_woodshingles.png b/textures/madblocks_woodshingles.png new file mode 100644 index 0000000..884a066 Binary files /dev/null and b/textures/madblocks_woodshingles.png differ diff --git a/textures/madblocks_yellow_rustedmetal.png b/textures/madblocks_yellow_rustedmetal.png new file mode 100644 index 0000000..b839307 Binary files /dev/null and b/textures/madblocks_yellow_rustedmetal.png differ diff --git a/textures/madblocks_yellow_rustedmetal_fence.png b/textures/madblocks_yellow_rustedmetal_fence.png new file mode 100644 index 0000000..3c9df49 Binary files /dev/null and b/textures/madblocks_yellow_rustedmetal_fence.png differ diff --git a/textures/madblocks_yellowbrick.png b/textures/madblocks_yellowbrick.png new file mode 100644 index 0000000..d86dbfc Binary files /dev/null and b/textures/madblocks_yellowbrick.png differ diff --git a/textures/madblocks_yellowwood.png b/textures/madblocks_yellowwood.png new file mode 100644 index 0000000..a672e4b Binary files /dev/null and b/textures/madblocks_yellowwood.png differ diff --git a/textures/madblocks_yellowwood_fence.png b/textures/madblocks_yellowwood_fence.png new file mode 100644 index 0000000..5ffa159 Binary files /dev/null and b/textures/madblocks_yellowwood_fence.png differ