From f1cbb82470f91a162570417be0365213a852b31d Mon Sep 17 00:00:00 2001 From: HybridDog Date: Mon, 26 Jan 2015 16:53:44 +0100 Subject: [PATCH] automatic update --- init.lua | 86 +++++++++++++++++++++++++- rest/default_nc_rb_ani_300ms.png | Bin 221 -> 0 bytes textures/technic_laser_beam_mk1.png | Bin 244 -> 0 bytes textures/technic_laser_beam_mk2.png | Bin 617 -> 0 bytes textures/technic_laser_beam_mk3.png | Bin 522 -> 0 bytes textures/technic_mining_laser_mk1.png | Bin 186 -> 0 bytes textures/technic_mining_laser_mk2.png | Bin 209 -> 0 bytes textures/technic_mining_laser_mk3.png | Bin 268 -> 0 bytes 8 files changed, 85 insertions(+), 1 deletion(-) delete mode 100644 rest/default_nc_rb_ani_300ms.png delete mode 100644 textures/technic_laser_beam_mk1.png delete mode 100644 textures/technic_laser_beam_mk2.png delete mode 100644 textures/technic_laser_beam_mk3.png delete mode 100644 textures/technic_mining_laser_mk1.png delete mode 100644 textures/technic_mining_laser_mk2.png delete mode 100644 textures/technic_mining_laser_mk3.png diff --git a/init.lua b/init.lua index 3b6e443..0151c80 100644 --- a/init.lua +++ b/init.lua @@ -375,6 +375,66 @@ minetest.register_node("extrablocks:seakiller", { end }) +local function get_tab2d(pos, func, max) + local count + local tab = {pos} + local tab_avoid = {[pos.x.." "..pos.y.." "..pos.z] = true} + local tab_done,num = {pos},2 + while tab[1] do + for n,p in pairs(tab) do + for i = -1,1,2 do + for _,p2 in pairs({ + {x=p.x+i, y=p.y, z=p.z}, + {x=p.x, y=p.y, z=p.z+i}, + }) do + local pstr = p2.x.." "..p2.y.." "..p2.z + if not tab_avoid[pstr] + and func(p2) then + tab_avoid[pstr] = true + tab_done[num] = p2 + num = num+1 + table.insert(tab, p2) + if max + and num > max then + return false + end + end + end + end + tab[n] = nil + end + end + return tab_done +end + +local function is_air(pos) + return minetest.get_node(pos).name == "air" or false +end + +minetest.register_node("extrablocks:house_tidy_up", { + description = "AUFRÄUMEN", + tiles = {"default_wood.png^default_glass.png"}, + groups = {snappy=2}, + on_construct = function(pos) + local t1 = os.clock() + pos.y = pos.y+1 + local data = get_tab2d(pos, is_air, 3000) + if data then + for _,p in pairs(data) do + p.y = p.y-1 + if minetest.get_node(p).name ~= "air" then + minetest.remove_node(p) + end + end + end + --[[lq_rm_count = 0 + for _, nam in ipairs() do + rm_lqud(pos, nam) + end]] + print(string.format("[extrablocks] ("..pos.x..", "..pos.y..", "..pos.z..") nodees removed after: %.2fs", os.clock() - t1)) + end +}) + local function moitem(name, desc) minetest.register_craftitem("extrablocks:"..name, { @@ -395,9 +455,33 @@ minetest.register_craftitem("extrablocks:muffin", { on_use = minetest.item_eat(20), }) +local nt = { + "default_water_source_animated.png^[verticalframe:8:1".. + "^(default_nc_rb.png^[transformR90)".. + "^[transformR270".. + "^[transformFX".. + "^[combine:16x16:16,0=default_nc_rb.png^[transformR90", + "default_water_source_animated.png^[verticalframe:8:1".. + "^default_nc_rb.png".. + "^[transformFX".. + "^[combine:16x16:0,16=default_nc_rb.png", +} +for i = 1,2 do + nt[i] = { + name = nt[i], + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.6, -- 300ms (from nyan.cat) + }, + } +end - +minetest.override_item("default:nyancat_rainbow", { + tiles = {nt[1], nt[1], nt[2]}, +}) if moss then moss.register_moss({ diff --git a/rest/default_nc_rb_ani_300ms.png b/rest/default_nc_rb_ani_300ms.png deleted file mode 100644 index c13d185c736e24ac4c61d6be16fe4d3ed5bee6d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<5!VDx|E`RzTNNEN5gt!{<#Z3^*1#Px# diff --git a/textures/technic_laser_beam_mk1.png b/textures/technic_laser_beam_mk1.png deleted file mode 100644 index e07315262777be507f3c1716e33b16f306460631..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`Gb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