Skip to content

Commit

Permalink
allow soups to give different items than themselves
Browse files Browse the repository at this point in the history
  • Loading branch information
Elkien3 committed Nov 5, 2022
1 parent 67b520a commit 6f6f471
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -747,10 +747,11 @@ local function pot_on_punch(pos, node, player, replacement)
if bowldef._soup_swap ~= false then
itemstack:take_item(1)
end
if soupdef and soupdef._soup_item then soupstring = soupdef._soup_item end
if itemstack:get_count() > 0 then
minetest.add_item(pos, player_inv:add_item("main", meta:get_string("soup")))
minetest.add_item(pos, player_inv:add_item("main", soupstring))
else
itemstack:replace(meta:get_string("soup"))
itemstack:replace(soupstring)
end
player:set_wielded_item(itemstack)
if replacement == "cooking:pot_0" then
Expand Down

0 comments on commit 6f6f471

Please sign in to comment.