diff --git a/fishing/README b/fishing/README deleted file mode 100644 index ad30ed5..0000000 --- a/fishing/README +++ /dev/null @@ -1,28 +0,0 @@ -Originally Posted at: https://forum.minetest.net/viewtopic.php?id=4375 -A newer mod, based on this one, is here: https://github.com/Mossmanikin/fishing - -Includes: - a fish (can be cooked or eaten raw), - fishing poles, - worm (bait), - sushi -To get worms for bait you must dig in dirt (without grass) by hand. There is a default 30% chance that you will find one. This can be configured in init.lua, as well as the chance of catching a fish. Or, you can use "/giveme fishing:bait_worm". -To catch a fish, use a baited fishing pole on a water node. -Depends: - To craft a fishing pole: (or you can use "/giveme fishing:pole") - ropes or moreblocks or farming - I suggest using my modified version of ropes. Get it here. - This also modifies moreblocks:rope to be used as ropes:rope -- which is really handy. - To craft sushi: (or you can use "/giveme fishing:sushi") - plantlife - -Code:WTFPL -Textures: - - -TODO: - item wear, - automatic re-baiting option, - different types of fish/sushi, - sounds, - nets and traps diff --git a/fishing/init.lua b/fishing/init.lua deleted file mode 100644 index 63d9997..0000000 --- a/fishing/init.lua +++ /dev/null @@ -1,139 +0,0 @@ ---todo: item wear, automatic re-baiting option, different types of fish/sushi, add sound - -local FISH_CHANCE = 15 -local WORM_CHANCE = 30 - -minetest.register_craftitem("fishing:fish_raw", { - description = "Raw Fish", - groups = {}, - inventory_image = "fishing_fish.png", - on_use = minetest.item_eat(2), -}) - -minetest.register_craftitem("fishing:fish", { - description = "Cooked Fish", - groups = {}, - inventory_image = "fishing_fish_cooked.png", - on_use = minetest.item_eat(4), -}) - -minetest.register_craftitem("fishing:sushi", { - description = "Sushi (Hoso Maki)", - groups = {}, - inventory_image = "fishing_sushi.png", - on_use = minetest.item_eat(8), -}) - -minetest.register_craftitem("fishing:bait_worm", { - description = "Worms", - groups = { fishing_bait=1 }, - inventory_image = "fishing_worm.png", --- wield_image = "fishing_worm_wield.png", -}) - - -minetest.register_craftitem("fishing:pole", { - description = "Fishing Pole", - groups = {}, - inventory_image = "fishing_pole.png", --- wield_image = "", [MAYBE REVERSE IMAGE] --- wield_scale = {x=1,y=1,z=1}, - stack_max = 1, - liquids_pointable = true, -}) - -minetest.register_craftitem("fishing:pole_baited", { - description = "Baited Fishing Pole", - groups = {}, - inventory_image = "fishing_pole_baited.png", --- wield_image = "", --- wield_scale = {x=1,y=1,z=1}, - stack_max = 1, - liquids_pointable = true, - on_use = function (itemstack, user, pointed_thing) - if pointed_thing and pointed_thing.under then - local node = minetest.env:get_node(pointed_thing.under) - if string.find(node.name, "default:water") then - if math.random(1, 100) < FISH_CHANCE then - local inv = user:get_inventory() - if inv:room_for_item("main", {name="fishing:fish_raw", count=1, wear=0, metadata=""}) then - inv:add_item("main", {name="fishing:fish_raw", count=1, wear=0, metadata=""}) - end - end - return {name="fishing:pole", count=1, wear=0, metadata=""} - end - end - return nil - end, --- ^ default: nil --- ^ Function must return either nil if no item shall be removed from --- inventory, or an itemstack to replace the original itemstack. --- eg. itemstack:take_item(); return itemstack --- ^ Otherwise, the function is free to do what it wants. --- ^ The default functions handle regular use cases. -}) - - ---Crafts: -if minetest.get_modpath("ropes") ~= nil then - minetest.register_craft({ - type = "shapeless", - output = "fishing:pole", - recipe = {"default:stick","default:stick","ropes:rope"}, - }) -end - -if minetest.get_modpath("moreblocks") ~= nil then -minetest.register_craft({ - type = "shapeless", - output = "fishing:pole", - recipe = {"default:stick","default:stick","moreblocks:rope"}, - }) -end - -if minetest.get_modpath("farming") ~= nil then - minetest.register_craft({ - type = "shapeless", - output = "fishing:pole", - recipe = {"default:stick","default:stick","farming:string","farming:string"}, - }) -end - -minetest.register_craft({ - type = "cooking", - output = "fishing:fish", - recipe = "fishing:fish_raw", - cooktime = 2, -}) - -minetest.register_craft({ - type = "shapeless", - output = "fishing:sushi", - recipe = {"fishing:fish_raw","flowers:flower_seaweed"}, -}) - -minetest.register_craft({ - type = "shapeless", - output = "fishing:pole_baited", - recipe = {"fishing:pole", "group:fishing_bait"}, -}) - ---get worms from digging in dirt: -minetest.register_node(":default:dirt", { - description = "Dirt", - tiles = {"default_dirt.png"}, - is_ground_content = true, - groups = {crumbly=3}, - sounds = default.node_sound_dirt_defaults(), - after_dig_node = function (pos, oldnode, oldmetadata, digger) - if math.random(1, 100) < WORM_CHANCE then - local tool_in_use = digger:get_wielded_item():get_name() - if tool_in_use == "" or tool_in_use == "default:dirt" then - local inv = digger:get_inventory() - if inv:room_for_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) then - inv:add_item("main", {name="fishing:bait_worm", count=1, wear=0, metadata=""}) - end - end - end - end, -}) \ No newline at end of file diff --git a/fishing/textures/fishing_fish.png b/fishing/textures/fishing_fish.png deleted file mode 100644 index b74b6bc..0000000 Binary files a/fishing/textures/fishing_fish.png and /dev/null differ diff --git a/fishing/textures/fishing_fish_cooked.png b/fishing/textures/fishing_fish_cooked.png deleted file mode 100644 index 67ff039..0000000 Binary files a/fishing/textures/fishing_fish_cooked.png and /dev/null differ diff --git a/fishing/textures/fishing_pole.png b/fishing/textures/fishing_pole.png deleted file mode 100644 index 67f1ff4..0000000 Binary files a/fishing/textures/fishing_pole.png and /dev/null differ diff --git a/fishing/textures/fishing_pole_baited.png b/fishing/textures/fishing_pole_baited.png deleted file mode 100644 index b462005..0000000 Binary files a/fishing/textures/fishing_pole_baited.png and /dev/null differ diff --git a/fishing/textures/fishing_sushi.png b/fishing/textures/fishing_sushi.png deleted file mode 100644 index 24f5821..0000000 Binary files a/fishing/textures/fishing_sushi.png and /dev/null differ diff --git a/fishing/textures/fishing_worm.png b/fishing/textures/fishing_worm.png deleted file mode 100644 index cbc143b..0000000 Binary files a/fishing/textures/fishing_worm.png and /dev/null differ