From 692a35679a0d61beac3651eaab9d6874b7517aaa Mon Sep 17 00:00:00 2001 From: jp Date: Fri, 23 Jan 2015 23:25:00 +0100 Subject: [PATCH] New cardboard boxes --- homedecor/crafts.lua | 9 +++ homedecor/misc-nodes.lua | 55 ++++++++++-------- .../textures/homedecor_cardbox_big_sides.png | Bin 0 -> 204 bytes .../textures/homedecor_cardbox_big_tb.png | Bin 0 -> 208 bytes .../textures/homedecor_cardbox_sides.png | Bin 0 -> 165 bytes homedecor/textures/homedecor_cardbox_tb.png | Bin 0 -> 170 bytes 6 files changed, 41 insertions(+), 23 deletions(-) create mode 100644 homedecor/textures/homedecor_cardbox_big_sides.png create mode 100644 homedecor/textures/homedecor_cardbox_big_tb.png create mode 100644 homedecor/textures/homedecor_cardbox_sides.png create mode 100644 homedecor/textures/homedecor_cardbox_tb.png diff --git a/homedecor/crafts.lua b/homedecor/crafts.lua index f426c321..b35d1f08 100644 --- a/homedecor/crafts.lua +++ b/homedecor/crafts.lua @@ -2133,6 +2133,15 @@ minetest.register_craft({ }, }) +minetest.register_craft({ + output = "homedecor:cardboard_box_big 2", + recipe = { + { "default:paper", "", "default:paper" }, + { "default:paper", "", "default:paper" }, + { "default:paper", "default:paper", "default:paper" }, + }, +}) + minetest.register_craft({ output = "homedecor:desk", recipe = { diff --git a/homedecor/misc-nodes.lua b/homedecor/misc-nodes.lua index c4a034df..5251a623 100644 --- a/homedecor/misc-nodes.lua +++ b/homedecor/misc-nodes.lua @@ -290,38 +290,47 @@ minetest.register_node("homedecor:fishtank_lighted", { end }) -homedecor.register("cardboard_box", { - drawtype = "nodebox", - description = S("Cardboard box"), +homedecor.register("cardboard_box_big", { + drawtype = "normal", + description = S("Cardboard box (big)"), tiles = { - 'homedecor_cardboard_box_tb.png', - 'homedecor_cardboard_box_tb.png', - 'homedecor_cardboard_box_sides.png' + 'homedecor_cardbox_big_tb.png', + 'homedecor_cardbox_big_tb.png', + 'homedecor_cardbox_big_sides.png', }, sunlight_propagates = false, paramtype = "light", paramtype2 = "facedir", - walkable = true, - selection_box = homedecor.nodebox.slab_y(0.5), - node_box = { - type = "fixed", - fixed = { - {0.1875, -0.5, -0.25, 0.25, 0, 0.25}, - {-0.25, -0.5, -0.25, -0.1875, 0, 0.25}, - {-0.25, -0.5, 0.1875, 0.25, 0, 0.25}, - {-0.25, -0.5, -0.25, 0.25, 0, -0.1875}, - {-0.25, -0.5, -0.25, 0.25, -0.4375, 0.25}, - {0.1875, -0.0625, -0.25, 0.5, 0, 0.25}, - {-0.5, -0.0625, -0.25, -0.1875, 0, 0.25}, - {-0.25, -0.0625, 0.1875, 0.25, 0, 0.5}, - {-0.25, -0.0625, -0.5, 0.25, 0, -0.1875}, - } - }, groups = { snappy = 3 }, sounds = default.node_sound_wood_defaults(), infotext=S("Cardboard box"), inventory = { - size=4, + size=24, + }, +}) + +homedecor.register("cardboard_box", { + drawtype = "nodebox", + description = S("Cardboard box"), + tiles = { + 'homedecor_cardbox_tb.png', + 'homedecor_cardbox_tb.png', + 'homedecor_cardbox_sides.png', + }, + node_box = { + type = "fixed", + fixed = { + {-0.3125, -0.5, -0.3125, 0.3125, 0, 0.3125}, + } + }, + sunlight_propagates = false, + paramtype = "light", + paramtype2 = "facedir", + groups = { snappy = 3 }, + sounds = default.node_sound_wood_defaults(), + infotext=S("Cardboard box"), + inventory = { + size=8, }, }) diff --git a/homedecor/textures/homedecor_cardbox_big_sides.png b/homedecor/textures/homedecor_cardbox_big_sides.png new file mode 100644 index 0000000000000000000000000000000000000000..67fb05ed7ae67f3d4e799137bf9d1db175690544 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZotNi3H`jMTp6|i}|GC*- zTY54kCpj&hvvvwlL6N76V+hA})`J@bn+*h9503m1u-ZT=O3B9x`9c+Yr}uJzIeHr zE#WtopW+YsUYDuTangBG(Sn`%Rf12yT()p${69rth15P_vsr5PbGEP^voFtCvZ<+b zwM^N`f+Wu01>1$*PIT8{GW*%*84-N_(A+)Yr)+nfmrq>5e@xrp_*9?^7(8A5T-G@y GGywoq`%pvx literal 0 HcmV?d00001 diff --git a/homedecor/textures/homedecor_cardbox_sides.png b/homedecor/textures/homedecor_cardbox_sides.png new file mode 100644 index 0000000000000000000000000000000000000000..830bcedd1a81a7c7f34ae0c8d4f191ff7ab6754a GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^3h)VW1=90!z2{_m&C2rJJ~4kv zveUeY1t~yL#*!evU7>s7{xXMfwZQyZBPE=N8 z6mY(I!s8-?imJ+z6pkbVE-p#Q#-$>SI;<1Q6ou0tGO#h+NN4?aN$kWWpkWN2u6{1- HoD!MfJ*T9(Z=aaIrY)s6 z&VKHmhxR~G#*!evU