mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-09 01:03:50 +01:00
Throw experience points after food is cooked
This commit is contained in:
parent
04b59b2190
commit
21f0c7750b
@ -138,6 +138,10 @@ function mcl_campfires.cook_item(pos, elapsed)
|
|||||||
meta:set_string("food_z_"..tostring(i), nil)
|
meta:set_string("food_z_"..tostring(i), nil)
|
||||||
end
|
end
|
||||||
minetest.add_item(pos, cooked.item) -- Drop Cooked Item
|
minetest.add_item(pos, cooked.item) -- Drop Cooked Item
|
||||||
|
-- Throw some Experience Points because why not?
|
||||||
|
-- Food is cooked, xp is deserved for using this unique cooking method. Take that Minecraft ;)
|
||||||
|
local dir = vector.divide(minetest.facedir_to_dir(minetest.get_node(pos).param2),-1.95)
|
||||||
|
mcl_experience.throw_xp(vector.add(pos, dir), 1)
|
||||||
inv:set_stack("main", i, "") -- Clear Inventory
|
inv:set_stack("main", i, "") -- Clear Inventory
|
||||||
continue = continue + 1 -- Indicate that the slot is clear.
|
continue = continue + 1 -- Indicate that the slot is clear.
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user