mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 12:31:05 +01:00
Save tropical fish properties in item meta on bucket pickup
This commit is contained in:
parent
665e8a06a2
commit
d3349396b4
1 changed files with 7 additions and 2 deletions
|
@ -104,8 +104,13 @@ local tropical_fish = {
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
|
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
|
||||||
|
if clicker:set_wielded_item("mcl_buckets:bucket_tropical_fish") then
|
||||||
|
local it = clicker:get_wielded_item()
|
||||||
|
local m = it:get_meta()
|
||||||
|
m:set_string("properties",minetest.serialize(self.object:get_properties()))
|
||||||
|
clicker:set_wielded_item(it)
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
clicker:set_wielded_item("mcl_buckets:bucket_tropical_fish")
|
end
|
||||||
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
|
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue