From c3254a879ac5b810c89b5f11a17a5ab5cc6b039b Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Thu, 18 Sep 2014 00:35:02 -0400 Subject: [PATCH] Add beer mug --- homedecor/misc-nodes.lua | 48 +++++++++++++++++++ homedecor/textures/homedecor_beer_back.png | Bin 0 -> 138 bytes homedecor/textures/homedecor_beer_bottom.png | Bin 0 -> 111 bytes homedecor/textures/homedecor_beer_front.png | Bin 0 -> 135 bytes homedecor/textures/homedecor_beer_inv.png | Bin 0 -> 4060 bytes homedecor/textures/homedecor_beer_left.png | Bin 0 -> 132 bytes homedecor/textures/homedecor_beer_right.png | Bin 0 -> 132 bytes homedecor/textures/homedecor_beer_top.png | Bin 0 -> 169 bytes 8 files changed, 48 insertions(+) create mode 100644 homedecor/textures/homedecor_beer_back.png create mode 100644 homedecor/textures/homedecor_beer_bottom.png create mode 100644 homedecor/textures/homedecor_beer_front.png create mode 100644 homedecor/textures/homedecor_beer_inv.png create mode 100644 homedecor/textures/homedecor_beer_left.png create mode 100644 homedecor/textures/homedecor_beer_right.png create mode 100644 homedecor/textures/homedecor_beer_top.png diff --git a/homedecor/misc-nodes.lua b/homedecor/misc-nodes.lua index ed0872b..739aa0c 100644 --- a/homedecor/misc-nodes.lua +++ b/homedecor/misc-nodes.lua @@ -1650,6 +1650,54 @@ minetest.register_node("homedecor:beer_tap", { selection_box = { type = "fixed", fixed = { -0.25, -0.5, -0.4375, 0.25, 0.235, 0 } + }, + on_punch = function(pos, node, puncher, pointed_thing) + local wielditem = puncher:get_wielded_item() + local inv = puncher:get_inventory() + + local wieldname = wielditem:get_name() + if wieldname == "vessels:drinking_glass" then + if inv:room_for_item("main", "homedecor:beer_mug 1") then + wielditem:take_item() + puncher:set_wielded_item(wielditem) + inv:add_item("main", "homedecor:beer_mug 1") + minetest.chat_send_player(puncher:get_player_name(), "Ahh, a frosty cold beer - look in your inventory for it!") + else + minetest.chat_send_player(puncher:get_player_name(), "No room in your inventory to add a beer mug!") + end + end + end +}) + +minetest.register_node("homedecor:beer_mug", { + description = "Beer mug", + tiles = { + "homedecor_beer_top.png", + "homedecor_beer_bottom.png", + "homedecor_beer_right.png", + "homedecor_beer_left.png", + "homedecor_beer_back.png", + "homedecor_beer_front.png" + }, + inventory_image = "homedecor_beer_inv.png", + use_texture_alpha = true, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = { snappy=3, oddly_breakable_by_hand=3 }, + sounds = default.node_sound_glass_defaults(), + node_box = { + type = "fixed", + fixed = { + {-0.125, -0.5, -0.25, 0.0625, -0.25, -0.0625}, -- NodeBox1 + {0.0625, -0.3125, -0.18, 0.135, -0.285, -0.14}, -- NodeBox2 + {0.1, -0.465, -0.18, 0.135, -0.285, -0.14}, -- NodeBox3 + {0.0625, -0.465, -0.18, 0.135, -0.4375, -0.14}, -- NodeBox4 + } + }, + selection_box = { + type = "fixed", + fixed = { -0.125, -0.5, -0.25, 0.135, -0.25, -0.0625 } } }) diff --git a/homedecor/textures/homedecor_beer_back.png b/homedecor/textures/homedecor_beer_back.png new file mode 100644 index 0000000000000000000000000000000000000000..8b5add667e4e912a4e3369527ad5f017928e1323 GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJKu;IPkch*{2@2r~IF%d#%!lPG0Sy=frs eZZ^lK%aTD`jW^}@M^=BJ;S8RxelF{r5}E+lm@Fs& literal 0 HcmV?d00001 diff --git a/homedecor/textures/homedecor_beer_bottom.png b/homedecor/textures/homedecor_beer_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..850b3a6e83174c7ad470420c8c85ac87bb5aa6b4 GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`W}YsNAr_~T6C_xBUNF7CzRE5+ zAt6D4W7kza;olql)=p|{Y;-jEu}x%Gm6}(q0S}J^>tQAahIUO3u5YVWw*yUJ@O1Ta JS?83{1OQP(Ajbdz literal 0 HcmV?d00001 diff --git a/homedecor/textures/homedecor_beer_front.png b/homedecor/textures/homedecor_beer_front.png new file mode 100644 index 0000000000000000000000000000000000000000..853cf582e5200b7e2e09d481427b1d2b95a26b2b GIT binary patch literal 135 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzKTj9Okch*{2@fFtjveHwXckwvRIn)y#=%7E<3m%T*2%n>)>a0=IBIT d^~sMJ7|ws^;S;Tw_zEPp*c%N-xDD5^kq=JE=^lISmfY*SRfd2(vZf;2J zD|)X7Sim+nq?8XqlUW;nG%d~ZQ#vq|o)7#NumUiVfg#{V&jEUXr-0{xp5}&BUlAyU z_vi-!%KHJp1?~jy2P`sfY^hcN1;C4b4+7r>{uSs0-fM11*&<-%Yycv&H2z%Rt;i^6 zmOX3HqtM3~@NMA9D3pR?P(Dxq28Pn6xgli-hSK{{&N(}Nh7V+cXMlffZb-dQ@Qy;b zytU|=}y zAS}l60?-zjBC|43PMg;j!lrofGQd9Ib!&A^OXD2-zC2)HI317vd;(=3uwYsf-&g)#)@YY)cIF4t=4*$n5p8M$!%vFDO z{fv^JE0XWpTFbtD@6gk;pLje@DpkX>Ws6z7xQ!qe650?E`S5_EaPZ(D##nOcy$t{Q z<{c(hKjYw(?>+X+1;ERtAP=pDP?xu|L5R%PiS-7y7 z*47r9o9ENmIGWa`3<)qoZSJm}BtyPle*nc?$U2HFx!9XAGu4 z_&;fSg;fBGFz6;;I;A(>2Y{P;;uoJjN9Yj2{eEM2;oMT=UgtD8eI87BzB z@(EQ-$M$p{lF9gFGCsyjaqOk*5wG4sgMR>mS*Mn+^{uMmD6z&XNVa_e6KeqRK!fr; zK+1avKrRKlcOl94FXF@+!FZsy{FWrshm5LXt!2@oHqJkPIf-N(V+>jxauxa% z5qf(E$Yuk?sU`919~1YmBV#%;FD0w8IX$#$?cVJB1fY06n$HQw#fi62vv>_|YFXYZ zv}lGiOl0}+F(eXkmakaCk|m4A!%9TT=7P~tpMwVnL6z{gx6xqsOa?HoI{Cm4fCpBs z-P^nS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