Make it possible to pick up fish with river water bucket
This commit is contained in:
parent
d4c2501d62
commit
bb73e5f1cd
|
@ -53,7 +53,8 @@ local axolotl = {
|
||||||
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
|
local bn = clicker:get_wielded_item():get_name()
|
||||||
|
if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then
|
||||||
if clicker:set_wielded_item("mcl_buckets:bucket_axolotl") then
|
if clicker:set_wielded_item("mcl_buckets:bucket_axolotl") then
|
||||||
local it = clicker:get_wielded_item()
|
local it = clicker:get_wielded_item()
|
||||||
local m = it:get_meta()
|
local m = it:get_meta()
|
||||||
|
|
|
@ -102,7 +102,8 @@ local cod = {
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
|
local bn = clicker:get_wielded_item():get_name()
|
||||||
|
if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
clicker:set_wielded_item("mcl_buckets:bucket_cod")
|
clicker:set_wielded_item("mcl_buckets:bucket_cod")
|
||||||
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
|
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
|
||||||
|
|
|
@ -58,7 +58,8 @@ local salmon = {
|
||||||
runaway = true,
|
runaway = true,
|
||||||
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
|
local bn = clicker:get_wielded_item():get_name()
|
||||||
|
if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
clicker:set_wielded_item("mcl_buckets:bucket_salmon")
|
clicker:set_wielded_item("mcl_buckets:bucket_salmon")
|
||||||
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
|
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
|
||||||
|
|
|
@ -103,7 +103,8 @@ local tropical_fish = {
|
||||||
runaway = true,
|
runaway = true,
|
||||||
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
|
local bn = clicker:get_wielded_item():get_name()
|
||||||
|
if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then
|
||||||
if clicker:set_wielded_item("mcl_buckets:bucket_tropical_fish") then
|
if clicker:set_wielded_item("mcl_buckets:bucket_tropical_fish") then
|
||||||
local it = clicker:get_wielded_item()
|
local it = clicker:get_wielded_item()
|
||||||
local m = it:get_meta()
|
local m = it:get_meta()
|
||||||
|
|
|
@ -23,7 +23,11 @@ local function on_place_fish(itemstack, placer, pointed_thing)
|
||||||
if props ~= "" then
|
if props ~= "" then
|
||||||
o:set_properties(minetest.deserialize(props))
|
o:set_properties(minetest.deserialize(props))
|
||||||
end
|
end
|
||||||
minetest.set_node(pos,{name = "mcl_core:water_source"})
|
local water = "mcl_core:water_source"
|
||||||
|
if n.name == "mclx_core:river_water_source" then
|
||||||
|
water = n.name
|
||||||
|
end
|
||||||
|
minetest.set_node(pos,{name = water})
|
||||||
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
||||||
itemstack:set_name("mcl_buckets:bucket_empty")
|
itemstack:set_name("mcl_buckets:bucket_empty")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user