From b76d50e4162ec4a9a4ddf4ff149a135570b5e679 Mon Sep 17 00:00:00 2001 From: kilbith Date: Tue, 16 Jun 2015 18:47:29 +0200 Subject: [PATCH] update pot textures and tweaks --- handlers/registration.lua | 16 +++++--- nodes.lua | 55 ++++++++++++++------------- textures/xdecor_plant_pot_bottom.png | Bin 0 -> 245 bytes textures/xdecor_plant_pot_sides.png | Bin 140 -> 258 bytes textures/xdecor_plant_pot_top.png | Bin 263 -> 313 bytes worktable.lua | 2 +- 6 files changed, 40 insertions(+), 33 deletions(-) create mode 100644 textures/xdecor_plant_pot_bottom.png diff --git a/handlers/registration.lua b/handlers/registration.lua index b9996ed..4ea94db 100644 --- a/handlers/registration.lua +++ b/handlers/registration.lua @@ -5,22 +5,27 @@ local default_can_dig = function(pos,player) return meta:get_inventory():is_empty("main") end -fancy_gui = default.gui_bg..default.gui_bg_img..default.gui_slots +xdecor.wood = default.node_sound_wood_defaults() +xdecor.glass = default.node_sound_glass_defaults() +xdecor.leaves = default.node_sound_leaves_defaults() +xdecor.stone = default.node_sound_stone_defaults() +xdecor.fancy_gui = default.gui_bg..default.gui_bg_img..default.gui_slots + local default_inventory_size = 32 local default_inventory_formspecs = { - ["8"]="size[8,6]"..fancy_gui.. + ["8"]="size[8,6]"..xdecor.fancy_gui.. "list[context;main;0,0;8,1;]".. "list[current_player;main;0,2;8,4;]", - ["16"]="size[8,7]"..fancy_gui.. + ["16"]="size[8,7]"..xdecor.fancy_gui.. "list[context;main;0,0;8,2;]".. "list[current_player;main;0,3;8,4;]", - ["24"]="size[8,8]"..fancy_gui.. + ["24"]="size[8,8]"..xdecor.fancy_gui.. "list[context;main;0,0;8,3;]".. "list[current_player;main;0,4;8,4;]", - ["32"]="size[8,9]"..fancy_gui.. + ["32"]="size[8,9]"..xdecor.fancy_gui.. "list[context;main;0,0.3;8,4;]".. "list[current_player;main;0,4.85;8,1;]".. "list[current_player;main;0,6.08;8,3;8]".. @@ -35,6 +40,7 @@ end function xdecor.register(name, def) def.drawtype = def.drawtype or (def.node_box and "nodebox") def.paramtype = def.paramtype or "light" + def.sounds = def.sounds or default.node_sound_defaults() if not (def.drawtype == "glasslike_framed" or def.drawtype == "glasslike_framed_optional" diff --git a/nodes.lua b/nodes.lua index 6cd346d..11ff130 100644 --- a/nodes.lua +++ b/nodes.lua @@ -1,22 +1,22 @@ xdecor.register("barrel", { description = "Barrel", inventory = {size=24}, infotext = "Barrel", tiles = {"xdecor_barrel_top.png", "xdecor_barrel_sides.png"}, - groups = {snappy=3}, sounds = default.node_sound_wood_defaults() }) + groups = {snappy=3}, sounds = xdecor.wood }) xdecor.register("cabinet", { description = "Cabinet", inventory = {size=24}, infotext = "Cabinet", tiles = {"default_wood.png", "default_wood.png", "default_wood.png", "default_wood.png", "default_wood.png","xdecor_cabinet_front.png"}, - groups = {snappy=3}, sounds = default.node_sound_wood_defaults() }) + groups = {snappy=3}, sounds = xdecor.wood }) xdecor.register("cabinet_half", { description = "Half Cabinet", inventory = {size=8}, infotext = "Half Cabinet", tiles = {"default_wood.png", "default_wood.png", "default_wood.png", "default_wood.png", "default_wood.png", "xdecor_cabinet_half_front.png"}, - groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), - node_box = {type="fixed", fixed={{-0.5, 0, -0.5, 0.5, 0.5, 0.5}}} }) + groups = {snappy=3}, sounds = xdecor.wood, + node_box = xdecor.nodebox.slab_y(0.5, 0.5) }) xdecor.register("candle", { description = "Candle", light_source = 12, drawtype = "torchlike", @@ -43,12 +43,12 @@ xdecor.register("cardboard_box", { xdecor.register("cauldron", { description = "Cauldron", groups = {snappy=1}, tiles = {{name="xdecor_cauldron_top_anim.png", - animation={type="vertical_frames", length=3.0}}, + animation={type="vertical_frames", length=3.0}}, "xdecor_cauldron_sides.png"} }) xdecor.register("chair", { description = "Chair", tiles = {"xdecor_wood.png"}, - sounds = default.node_sound_wood_defaults(), groups = {snappy=3}, + sounds = xdecor.wood, groups = {snappy=3}, node_box = {type="fixed", fixed={ {-0.3125, -0.5, 0.1875, -0.1875, 0.5, 0.3125}, {0.1875, -0.5, 0.1875, 0.3125, 0.5, 0.3125}, @@ -58,13 +58,13 @@ xdecor.register("chair", { {-0.3125, -0.125, -0.3125, 0.3125, 0, 0.1875}}} }) xdecor.register("chandelier", { - description = "Chandelier", drawtype = "plantlike", walkable = false, - inventory_image = "xdecor_chandelier.png", tiles = {"xdecor_chandelier.png"}, + description = "Chandelier", drawtype = "plantlike", walkable = false, + inventory_image = "xdecor_chandelier.png", tiles = {"xdecor_chandelier.png"}, groups = {dig_immediate=3}, light_source = 14 }) xdecor.register("coalstone_tile", { drawtype = "normal", description = "Coalstone Tile", tiles = {"xdecor_coalstone_tile.png"}, - groups = {snappy=2}, sounds = default.node_sound_stone_defaults() }) + groups = {snappy=2}, sounds = xdecor.stone }) local curtaincolors = {"red"} -- add more curtains simply here for _, c in ipairs(curtaincolors) do @@ -101,12 +101,12 @@ end xdecor.register("cushion", { description = "Cushion", tiles = {"xdecor_cushion.png"}, groups = {snappy=3}, on_place = minetest.rotate_node, - node_box = {type="fixed", fixed={{-0.5, -0.5, -0.5, 0.5, 0, 0.5}}} }) + node_box = xdecor.nodebox.slab_y(-0.5, 0.5) }) xdecor.register("empty_shelf", { description = "Empty Shelf", inventory = {size=24}, infotext = "Empty Shelf", tiles = {"default_wood.png", "xdecor_empty_shelf.png"}, - groups = {snappy=3}, sounds = default.node_sound_wood_defaults() }) + groups = {snappy=3}, sounds = xdecor.wood }) local fence_sbox = {type="fixed", fixed={-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}} xdecor.register("fence_wrought_iron", { @@ -126,10 +126,12 @@ minetest.register_tool("xdecor:flint_steel", { inventory_image = "xdecor_flint_steel.png", tool_capabilities = {groupcaps={flamable={uses=65, maxlevel=1}}}, on_use = function(itemstack, user, pointed_thing) - if pointed_thing.type == "node" and minetest.get_node(pointed_thing.above).name == "air" then + if pointed_thing.type == "node" + and minetest.get_node(pointed_thing.above).name == "air" then if not minetest.is_protected(pointed_thing.above, user:get_player_name()) then minetest.set_node(pointed_thing.above, {name="xdecor:fire"}) - else minetest.chat_send_player(user:get_player_name(), "This area is protected!") end + else + minetest.chat_send_player(user:get_player_name(), "This area is protected!") end else return end itemstack:add_wear(65535/65) @@ -154,7 +156,7 @@ xdecor.register("potted_"..f, { description = "Potted Flowers ("..f..")", walkable = false, groups = {dig_immediate=3}, tiles = {"xdecor_"..f.."_pot.png"}, inventory_image = "xdecor_"..f.."_pot.png", - drawtype = "plantlike", sounds = default.node_sound_leaves_defaults() }) + drawtype = "plantlike", sounds = xdecor.leaves }) minetest.register_craft({ type = "shapeless", output = "xdecor:potted_"..f.." 2", @@ -166,12 +168,11 @@ xdecor.register("painting", { tiles = {"xdecor_painting.png"}, inventory_image = "xdecor_painting.png", paramtype2 = "wallmounted", legacy_wallmounted = true, walkable = false, wield_image = "xdecor_painting.png", selection_box = {type = "wallmounted"}, - groups = {dig_immediate=3, attached_node=1}, - sounds = default.node_sound_wood_defaults() }) + groups = {dig_immediate=3, attached_node=1} }) xdecor.register("plant_pot", { description = "Plant Pot", groups = {snappy=3}, - tiles = {"xdecor_plant_pot_top.png", "xdecor_plant_pot_sides.png"} }) + tiles = {"xdecor_plant_pot_top.png", "xdecor_plant_pot_bottom.png", "xdecor_plant_pot_sides.png"} }) xdecor.register("metal_cabinet", { description = "Metal Cabinet", inventory = {size=24}, @@ -182,12 +183,12 @@ xdecor.register("metal_cabinet", { xdecor.register("moonbrick", { drawtype = "normal", description = "Moonbrick", tiles = {"xdecor_moonbrick.png"}, - groups = {snappy=2}, sounds = default.node_sound_stone_defaults() }) + groups = {snappy=2}, sounds = xdecor.stone }) xdecor.register("multishelf", { description = "Multi Shelf", inventory = {size=24}, infotext = "Multi Shelf", tiles = {"default_wood.png", "xdecor_multishelf.png"}, - groups = {snappy=3}, sounds = default.node_sound_wood_defaults() }) + groups = {snappy=3}, sounds = xdecor.wood }) local rope_sbox = {type="fixed", fixed={-0.15, -0.5, -0.15, 0.15, 0.5, 0.15}} xdecor.register("rope", { @@ -203,16 +204,16 @@ xdecor.register("stereo", { "xdecor_stereo_back.png", "xdecor_stereo_front.png"} }) xdecor.register("stone_rune", { - description = "Stone Rune", tiles = {"xdecor_stone_rune.png"}, drawtype = "normal", - groups = {snappy=3}, sounds = default.node_sound_stone_defaults() }) + description = "Stone Rune", tiles = {"xdecor_stone_rune.png"}, + drawtype = "normal", groups = {snappy=3}, sounds = xdecor.stone }) xdecor.register("stone_tile", { - description = "Stone Tile", tiles = {"xdecor_stone_tile.png"}, drawtype = "normal", - groups = {snappy=3}, sounds = default.node_sound_stone_defaults() }) + description = "Stone Tile", tiles = {"xdecor_stone_tile.png"}, + drawtype = "normal", groups = {snappy=3}, sounds = xdecor.stone }) xdecor.register("table", { description = "Table", tiles = {"xdecor_wood.png"}, - groups = {snappy=3}, sounds = default.node_sound_wood_defaults(), + groups = {snappy=3}, sounds = xdecor.wood, node_box = {type="fixed", fixed={ {-0.5, 0.4, -0.5, 0.5, 0.5, 0.5}, {-0.15, -0.5, -0.15, 0.15, 0.4, 0.15}}} }) @@ -231,8 +232,8 @@ xdecor.register("tv", { xdecor.register("woodframed_glass", { description = "Wood Framed Glass", drawtype = "glasslike_framed", tiles = {"xdecor_framed_glass.png", "xdecor_framed_glass_detail.png"}, - groups = {snappy=3}, sounds = default.node_sound_glass_defaults() }) + groups = {snappy=3}, sounds = xdecor.glass }) xdecor.register("wood_tile", { - description = "Wood Tile", tiles = {"xdecor_wood_tile.png"}, drawtype = "normal", - groups = {snappy=2, wood=1}, sounds = default.node_sound_wood_defaults() }) + description = "Wood Tile", tiles = {"xdecor_wood_tile.png"}, + drawtype = "normal", groups = {snappy=2, wood=1}, sounds = xdecor.wood }) diff --git a/textures/xdecor_plant_pot_bottom.png b/textures/xdecor_plant_pot_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..51e85124c4caa55ae4ddff4b78154e46cde8d75b GIT binary patch literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFv5AX?bP196J(2&p8QZSJe(GwH0 zloGR*m55N4i&d9*QIygY<_}bn^;VKmyWcAZ)Y9qc;uyklJvksKC?SDilEV=V4UH2E zSXwR_r@s?OND6o`W7@Q7ktYr;P?#x}BW2~>;8+;FV&mpaA7$ppTN1>@pPz72ID8{} z>SoOe6SE#|J#}@!aPemPePZ5z&wQAVL%)o1^4_44$rjF6*2UngGpJP2~Up literal 0 HcmV?d00001 diff --git a/textures/xdecor_plant_pot_sides.png b/textures/xdecor_plant_pot_sides.png index 1848b971f8155328f9b70c949d45067517714b71..4850e7cadd4633d8e7d0bff1722424cbdbc23889 100644 GIT binary patch delta 242 zcmVIipBA&%OOl z0001ZNklIIgR3a*woC|JqAjjRx5Kd!KR09q9Wu3b|QbN~PV07*qoM6N<$g0Hb#Jpcdz delta 123 zcmZo->S3H9QNqH^z`*eK?xP?eB^}@s;yT~MdRK_sI)BHd-nLVn%_lmUt@L%6qgffgnfWf3lk2M(NE0zD=g2?lLUEX=}FoEe+BMGi=E?6z9K Zz;OGxv}CNt6j`7?22WQ%mvv4FO#tXbBX0lz diff --git a/textures/xdecor_plant_pot_top.png b/textures/xdecor_plant_pot_top.png index 9a7307e8a61b62c55aff884dfdfe797bb10f078c..69589348b8a5f20305c6c949e7da59d3ddd80756 100644 GIT binary patch delta 298 zcmV+_0oDG80=WW^7=H)@0000eEe}%w002=?OjJb>3Eg}|$HYbTlYaFC%?9EQU8LS286~ zEh0=hBvddX-C&$-0001^Nkl5TIPklisX7aPY^Aiq-tW1rXRJjet=?<_R%M}z@gz_qw5+;|o;(Ga%_Y7!eH z(E+(sDE^^s5}?r@%Iv93VZzxovlfbhRx(8gl57=jM@&}cp_c5d@cQB?Q80H2Ki_H%Gj-*+KL}0*_K;*@asU7T07*qoM6N<$f`mS5)c^nh delta 247 zcmV3W z8x;&hD<5_>C{ivWJT4qHDHwe@ELSomOgbcHO}K~v005FnL_t&t*A0!K3c^qnKo2}| zpd!0NVXnQ`Y`4t(K*ypitPfnX42&j&!CL2VQj8;Fv|8VfN0|(B*IV&R0;cQ>- zZW17CVE;<6PxNCZ!WutQc#vWuMqF6vu+c6mhylzoC-%_!HV?`W84A*A$&AC56|L8E x`whWyqs%L8HmEuM1SkFWeXo*mU)FUk?hlfW8P%_mb;1Au002ovPDHLkV1njvUe*8r diff --git a/worktable.lua b/worktable.lua index 01fb6b8..73e16df 100644 --- a/worktable.lua +++ b/worktable.lua @@ -27,7 +27,7 @@ local function xconstruct(pos) end nodebtn = table.concat(nodebtn) - meta:set_string("formspec", "size[8,7;]"..fancy_gui.. + meta:set_string("formspec", "size[8,7;]"..xdecor.fancy_gui.. "label[0,0;Cut your material into...]".. nodebtn.. "label[0,1.5;Input]"..