fishing-0.2.2

Twigs (undergrowth) can be caught.
Updated support for sea modpack.
master
Mossmanikin 2013-10-26 21:09:43 +02:00
parent 9babaf625a
commit 06ef684aa6
4 changed files with 71 additions and 35 deletions

View File

@ -18,27 +18,40 @@ local CaTCH = {
{"animal_rat", "rat", 0, "a Rat.", false, 84, 1},
{"", "rat", 0, "a Rat.", false, 85, 1},
{"flowers_plus", "seaweed", 0, "some Seaweed.", true, 86, 20},
{"seaplants", "leavysnackgreen", 0, "a Leavy Snack.", true, 106, 10},
{"seaplants", "kelpgreen", 0, "a Green Kelp.", true, 106, 10},
{"farming", "string", 0, "a String.", true, 116, 2},
{"fishing", "pole", PoLeWeaR, "an old Fishing Pole.", true, 118, 2},
{"3d_armor", "boots_wood", BooTSWear, "some very old Boots.", true, 120, 1},
{"trunks", "twig_1", 0, "a Twig.", true, 121, 2},
}
minetest.register_alias("flowers_plus:seaweed", "flowers:seaweed") -- exception
local PLaNTS = {
-- MoD* iTeM MeSSaGe ("You caught "..)
{"flowers", "waterlily", "a Waterlily." },
{"flowers", "waterlily_225", "a Waterlily." },
{"flowers", "waterlily_45", "a Waterlily." },
{"flowers", "waterlily_675", "a Waterlily." },
{"flowers", "waterlily_s1", "a Waterlily." },
{"flowers", "waterlily_s2", "a Waterlily." },
{"flowers", "waterlily_s3", "a Waterlily." },
{"flowers", "waterlily_s4", "a Waterlily." },
{"flowers", "seaweed", "some Seaweed."},
{"flowers", "seaweed_2", "some Seaweed."},
{"flowers", "seaweed_3", "some Seaweed."},
{"flowers", "seaweed_4", "some Seaweed."},
-- MoD* iTeM MeSSaGe ("You caught "..)
{"flowers", "waterlily", "a Waterlily." },
{"flowers", "waterlily_225", "a Waterlily." },
{"flowers", "waterlily_45", "a Waterlily." },
{"flowers", "waterlily_675", "a Waterlily." },
{"flowers", "waterlily_s1", "a Waterlily." },
{"flowers", "waterlily_s2", "a Waterlily." },
{"flowers", "waterlily_s3", "a Waterlily." },
{"flowers", "waterlily_s4", "a Waterlily." },
{"flowers", "seaweed", "some Seaweed."},
{"flowers", "seaweed_2", "some Seaweed."},
{"flowers", "seaweed_3", "some Seaweed."},
{"flowers", "seaweed_4", "some Seaweed."},
{"trunks", "twig_1", "a Twig." },
{"trunks", "twig_2", "a Twig." },
{"trunks", "twig_3", "a Twig." },
{"trunks", "twig_4", "a Twig." },
{"trunks", "twig_5", "a Twig." },
{"trunks", "twig_7", "a Twig." },
{"trunks", "twig_8", "a Twig." },
{"trunks", "twig_9", "a Twig." },
{"trunks", "twig_10", "a Twig." },
{"trunks", "twig_11", "a Twig." },
{"trunks", "twig_12", "a Twig." },
{"trunks", "twig_13", "a Twig." },
}
-- *as used in the node name
@ -127,11 +140,12 @@ local FISHING_BOBBER_ENTITY={
end
end
end
end
--end
elseif minetest.get_node(pos).name == "air" then
-- catch visible fish and invisible stuff
if self.object:get_hp() <= 300 then
if math.random(1, 100) < FISH_CHANCE then
local chance = math.random(1, 120) -- ><((((º>
local chance = math.random(1, 122) -- ><((((º>
for i in pairs(CaTCH) do
local MoD = CaTCH[i][1]
local iTeM = CaTCH[i][2]
@ -190,6 +204,7 @@ local FISHING_BOBBER_ENTITY={
end
end
end
end
end
-- weither player has fishing pole or not
-- make sound and remove bobber

View File

@ -1,5 +1,5 @@
-----------------------------------------------------------------------------------------------
-- Fishing - Mossmanikin's version - Bobber Shark 0.0.5
-- Fishing - Mossmanikin's version - Bobber Shark 0.0.6
-- License (code & textures): WTFPL
-----------------------------------------------------------------------------------------------
@ -11,19 +11,31 @@ local CaTCH_BiG = {
}
local PLaNTS = {
-- MoD* iTeM MeSSaGe ("You caught "..)
{"flowers", "waterlily", "a Waterlily." },
{"flowers", "waterlily_225", "a Waterlily." },
{"flowers", "waterlily_45", "a Waterlily." },
{"flowers", "waterlily_675", "a Waterlily." },
{"flowers", "waterlily_s1", "a Waterlily." },
{"flowers", "waterlily_s2", "a Waterlily." },
{"flowers", "waterlily_s3", "a Waterlily." },
{"flowers", "waterlily_s4", "a Waterlily." },
{"flowers", "seaweed", "some Seaweed."},
{"flowers", "seaweed_2", "some Seaweed."},
{"flowers", "seaweed_3", "some Seaweed."},
{"flowers", "seaweed_4", "some Seaweed."},
-- MoD* iTeM MeSSaGe ("You caught "..)
{"flowers", "waterlily", "a Waterlily." },
{"flowers", "waterlily_225", "a Waterlily." },
{"flowers", "waterlily_45", "a Waterlily." },
{"flowers", "waterlily_675", "a Waterlily." },
{"flowers", "waterlily_s1", "a Waterlily." },
{"flowers", "waterlily_s2", "a Waterlily." },
{"flowers", "waterlily_s3", "a Waterlily." },
{"flowers", "waterlily_s4", "a Waterlily." },
{"flowers", "seaweed", "some Seaweed."},
{"flowers", "seaweed_2", "some Seaweed."},
{"flowers", "seaweed_3", "some Seaweed."},
{"flowers", "seaweed_4", "some Seaweed."},
{"trunks", "twig_1", "a Twig." },
{"trunks", "twig_2", "a Twig." },
{"trunks", "twig_3", "a Twig." },
{"trunks", "twig_4", "a Twig." },
{"trunks", "twig_5", "a Twig." },
{"trunks", "twig_7", "a Twig." },
{"trunks", "twig_8", "a Twig." },
{"trunks", "twig_9", "a Twig." },
{"trunks", "twig_10", "a Twig." },
{"trunks", "twig_11", "a Twig." },
{"trunks", "twig_12", "a Twig." },
{"trunks", "twig_13", "a Twig." },
}
-- *as used in the node name
@ -78,9 +90,10 @@ local FISHING_BOBBER_ENTITY_SHARK={
end
end
end
--elseif minetest.get_node(pos).name == "air" then
if self.object:get_hp() <= 300 then
if math.random(1, 100) < SHARK_CHANCE then
local chance = math.random(1, 6) -- ><((((º>
local chance = math.random(1, 5) -- ><((((º>
for i in pairs(CaTCH_BiG) do
local MoD = CaTCH_BiG[i][1]
local iTeM = CaTCH_BiG[i][2]
@ -112,7 +125,7 @@ local FISHING_BOBBER_ENTITY_SHARK={
end
end
if self.object:get_hp() > 300 and minetest.get_node(pos).name == "air" then
if MESSAGES == true then say(player, "You didn't catch anything.", false) end -- fish escaped
if MESSAGES == true then say(player, "You didn't catch any fish.", false) end -- fish escaped
if not minetest.setting_getbool("creative_mode") then
if math.random(1, 3) == 1 then
if inv:room_for_item("main", {name="fishing:fish_raw", count=1, wear=0, metadata=""}) then
@ -122,6 +135,7 @@ local FISHING_BOBBER_ENTITY_SHARK={
end
end
end
--end
else
if MESSAGES == true then say(player, "Your fish escaped.", false) end -- fish escaped
end

View File

@ -1,5 +1,5 @@
-----------------------------------------------------------------------------------------------
-- Fishing - Mossmanikin's version - Recipes 0.0.6
-- Fishing - Mossmanikin's version - Recipes 0.0.7
-----------------------------------------------------------------------------------------------
-- License (code & textures): WTFPL
-- Contains code from: animal_clownfish, animal_fish_blue_white, fishing (original), stoneage
@ -70,7 +70,14 @@ minetest.register_craft({
minetest.register_craft({
type = "shapeless",
output = "fishing:sushi",
recipe = {"fishing:fish_raw","farming:seed_wheat","seaplants:leavysnackgreen"},
recipe = {"fishing:fish_raw","farming:seed_wheat","seaplants:kelpgreen"},
})
minetest.register_craft({
type = "shapeless",
output = "fishing:sushi",
recipe = {"fishing:fish_raw","farming:seed_wheat","seaplants:kelpgreenmiddle"},
})

View File

@ -1,6 +1,6 @@
-----------------------------------------------------------------------------------------------
local title = "Fishing - Mossmanikin's version"
local version = "0.2.1"
local version = "0.2.2"
local mname = "fishing"
-----------------------------------------------------------------------------------------------
-- original by wulfsdad (http://forum.minetest.net/viewtopic.php?id=4375)