From 65fea54e1e1194295e44ce26b85ed8f0ef522fb7 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 10 Feb 2017 21:15:36 +0100 Subject: [PATCH] Remove the old horribly broken flower pot --- mods/mcl_flowers/func.lua | 81 ------------------ mods/mcl_flowers/init.lua | 64 -------------- .../textures/flowers_pot_bottom.png | Bin 311 -> 0 bytes mods/mcl_flowers/textures/flowers_pot_top.png | Bin 460 -> 0 bytes 4 files changed, 145 deletions(-) delete mode 100644 mods/mcl_flowers/func.lua delete mode 100644 mods/mcl_flowers/textures/flowers_pot_bottom.png delete mode 100644 mods/mcl_flowers/textures/flowers_pot_top.png diff --git a/mods/mcl_flowers/func.lua b/mods/mcl_flowers/func.lua deleted file mode 100644 index b43545490..000000000 --- a/mods/mcl_flowers/func.lua +++ /dev/null @@ -1,81 +0,0 @@ -minetest.register_entity("mcl_flowers:item",{ - hp_max = 1, - visual="wielditem", - visual_size={x=.25,y=.25}, - collisionbox = {0,0,0,0,0,0}, - groups = {snappy=3,attached_node=1}, - stack_max = 1, - physical=false, - textures={"air"}, - on_activate = function(self, staticdata) - if flower_tmp.nodename ~= nil and flower_tmp.texture ~= nil then - self.nodename = flower_tmp.nodename - flower_tmp.nodename = nil - self.texture = flower_tmp.texture - flower_tmp.texture = nil - else - if staticdata ~= nil and staticdata ~= "" then - local data = staticdata:split(';') - if data and data[1] and data[2] then - self.nodename = data[1] - self.texture = data[2] - end - end - end - if self.texture ~= nil then - self.object:set_properties({textures={self.texture}}) - end - end, - get_staticdata = function(self) - if self.nodename ~= nil and self.texture ~= nil then - return self.nodename .. ';' .. self.texture - end - return "" - end, -}) - - - -local facedir = {} -facedir[0] = {x=0,y=0,z=1} -facedir[1] = {x=1,y=0,z=0} -facedir[2] = {x=0,y=0,z=-1} -facedir[3] = {x=-1,y=0,z=0} - -local flower_pot_remove_item = function(pos, node) - local objs = nil - if node and node.name == "mcl_flowers:pot" then - objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, .5) - end - if objs then - for _, obj in ipairs(objs) do - if obj and obj:get_luaentity() and obj:get_luaentity().name == "mcl_flowers:item" then - obj:remove() - end - end - end -end - -flower_pot_update_item = function(pos, node) - flower_pot_remove_item(pos, node) - local meta = minetest.get_meta(pos) - if meta and meta:get_string("item") ~= "" then - if node.name == "mcl_flowers:pot" then - pos.y = pos.y - end - flower_tmp.nodename = node.name - flower_tmp.texture = ItemStack(meta:get_string("item")):get_name() - local e = minetest.add_entity(pos,"mcl_flowers:item") - end -end - -flower_pot_drop_item = function(pos, node) - local meta = minetest.get_meta(pos) - if meta:get_string("item") ~= "" then - if node.name == "mcl_flowers:pot" then - minetest.add_item({x=pos.x,y=pos.y+1,z=pos.z}, meta:get_string("item")) - end - meta:set_string("item","") - end - flower_pot_remove_item(pos, node) -end diff --git a/mods/mcl_flowers/init.lua b/mods/mcl_flowers/init.lua index 4d41e7eaa..ed168661a 100644 --- a/mods/mcl_flowers/init.lua +++ b/mods/mcl_flowers/init.lua @@ -6,7 +6,6 @@ flower_tmp={} -- Map Generation dofile(minetest.get_modpath("mcl_flowers").."/mapgen.lua") -dofile(minetest.get_modpath("mcl_flowers").."/func.lua") @@ -276,69 +275,6 @@ function register_large(name, desc, inv_img, bot_img, colr) --change in function end --- --- Flower Pot --- - -minetest.register_node("mcl_flowers:pot",{ - description = "Flower Pot", - drawtype = "nodebox", - is_ground_content = false, - node_box = { type = "fixed", fixed = { - {-0.125,-0.125,-0.187500,-0.187500,-0.500,0.1875}, --Wall 1 - {0.1875,-0.125,-0.125,0.125,-0.500,0.1875}, --Wall 2 - {-0.1875,-0.125,-0.125,0.1875,-0.500,-0.1875}, --Wall 3 - {0.1875,-0.125,0.125,-0.1875,-0.500,0.1875}, --Wall 4 - {-0.125,-0.500,-0.125,0.125,-0.250,0.125}, --Dirt 5 - }}, - selection_box = { type = "fixed", fixed = {-0.125,-0.5,-0.125,0.125,-0.25,0.125 }}, - tiles = {"flowers_pot_top.png", "flowers_pot_bottom.png", "flowers_pot_top.png"}, - inventory_image="flowers_pot_inventory.png", - paramtype = "light", - groups = {dig_immediate=3,deco_block=1}, - stack_max = 64, - sounds = mcl_core.node_sound_defaults(), - after_place_node = function(pos, placer, itemstack) - local meta = minetest.get_meta(pos) - meta:set_string("owner",placer:get_player_name()) - end, - on_rightclick = function(pos, node, clicker, itemstack) - if not itemstack then return end - local meta = minetest.get_meta(pos) - if clicker:get_player_name() == meta:get_string("owner") then - flower_pot_drop_item(pos,node) - local s = itemstack:take_item() - meta:set_string("item",s:to_string()) - flower_pot_update_item(pos,node) - end - return itemstack - end, - on_punch = function(pos,node,puncher) - local meta = minetest.get_meta(pos) - if puncher:get_player_name() == meta:get_string("owner") then - flower_pot_drop_item(pos,node) - end - end, - can_dig = function(pos,player) - local meta = minetest.get_meta(pos) - return player:get_player_name() == meta:get_string("owner") - end, - on_destruct = function(pos) - local node = minetest.get_node(pos) - flower_pot_drop_item(pos,node) - minetest.add_node(pos, {name="air"}) - minetest.add_item(pos, "mcl_flowers:pot") - end, -}) - -minetest.register_craft({ - output = "mcl_flowers:pot", - recipe = { - { "mcl_core:brick", "", "mcl_core:brick", }, - { "", "mcl_core:brick", "" }, - }, -}) - -- Lily Pad minetest.register_node("mcl_flowers:waterlily", { description = "Lily Pad", diff --git a/mods/mcl_flowers/textures/flowers_pot_bottom.png b/mods/mcl_flowers/textures/flowers_pot_bottom.png deleted file mode 100644 index 165b26ae607e1e500d220638d3c1e6724d21ae4e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv^#Gp`*Z=?j7uo6++v%6s8r_B>sw&h>VyUOJ%WUhcTiMH3Z`KA+^KlXK5V4xJF^PTBflccqgtfH|gc;cGTllVNn_>&}34^DrpUXO@ GgeCwd6>#bR diff --git a/mods/mcl_flowers/textures/flowers_pot_top.png b/mods/mcl_flowers/textures/flowers_pot_top.png deleted file mode 100644 index 622935d6fc9962d88cb940979de35855b9eeb304..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 460 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dy`2jv5u0R?WNOw2P_BJl`H!HH$ zE4I@wu{S7nFf0wSD04I_i*_$}GOlnosdO=|47I9qHLG?ruW`4i^{{M+wrfvt>P&R* zPjj1=?KLgOYhIz>{38ElKqv@%3>@jg7_% zDiTZ$f_F8f4oM`0uZ_R%9k@~Pf#d7H_uj2KbNlf=W~11xI^MJMEOY)k>j!yVynHFI z`@uE)Z`vzDZRbySog4Px#~*KJ?aND^ZeA<(t$q1)K99^EwCPReD z^~lZUg*pon>@C>D70~0 gROse(_}%GR=6#by7e@LSB!l9_)78&qol`;+06&YVKmY&$