From 4aab7d0dbd782cf6741bdbba94440faf0c5c2e61 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sat, 12 Aug 2017 20:37:50 -0400 Subject: updated several mods biome_lib, boost cart, homedecor modpack, plantlife modpack, cottages, currency, farming redo, gloopblocks, ilights, moreores, moretrees, pipeworks, plasticbox, replacer, signs_lib, streets, travelnet, unified dyes, and vines, and maybe one or two others that I didn't see in the list. :-) I fixed the misc_overrides component (it broke when I switched over to farming redo a while back), and also I've added the classic peaceful_npc mod back into the modpack, since it seems to work now. Be sure when you run a world for the first time after this update, that you "Configure" the world, *disable* all of Dreambuilder Modpack, then re-enable the whole thing. If you don't, a few mods will fail to load due to recent changes in their dependencies. --- homedecor/gastronomy.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'homedecor/gastronomy.lua') diff --git a/homedecor/gastronomy.lua b/homedecor/gastronomy.lua index 51f6526..d261700 100644 --- a/homedecor/gastronomy.lua +++ b/homedecor/gastronomy.lua @@ -213,20 +213,24 @@ homedecor.register("soda_machine", { sounds = default.node_sound_wood_defaults(), on_rotate = screwdriver.rotate_simple, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + local playername = clicker:get_player_name() local wielditem = clicker:get_wielded_item() local wieldname = wielditem:get_name() local fdir_to_fwd = { {0, -1}, {-1, 0}, {0, 1}, {1, 0} } local fdir = node.param2 local pos_drop = { x=pos.x+fdir_to_fwd[fdir+1][1], y=pos.y, z=pos.z+fdir_to_fwd[fdir+1][2] } if wieldname == "homedecor:coin" then - wielditem:take_item() - clicker:set_wielded_item(wielditem) minetest.spawn_item(pos_drop, "homedecor:soda_can") minetest.sound_play("insert_coin", { pos=pos, max_hear_distance = 5 }) + if not creative.is_enabled_for(playername) then + wielditem:take_item() + clicker:set_wielded_item(wielditem) + return wielditem + end else - minetest.chat_send_player(clicker:get_player_name(), S("Please insert a coin in the machine.")) + minetest.chat_send_player(playername, S("Please insert a coin in the machine.")) end end }) -- cgit v1.2.3