added fishing mod (own mod)
This commit is contained in:
parent
95a6075a54
commit
2e455dffd4
16
mods/fishing/LICENSE.txt
Normal file
16
mods/fishing/LICENSE.txt
Normal file
@ -0,0 +1,16 @@
|
||||
License for Code
|
||||
----------------
|
||||
|
||||
Copyright (C) 2016 cd2 (cdqwertz) <cdqwertz@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
|
||||
License for Media
|
||||
-----------------
|
||||
|
||||
CC-BY-SA 3.0 UNPORTED. Created by cd2 (cdqwertz)
|
31
mods/fishing/init.lua
Normal file
31
mods/fishing/init.lua
Normal file
@ -0,0 +1,31 @@
|
||||
minetest.register_craftitem("fishing:fishing_rod", {
|
||||
description = "Fishing rod",
|
||||
inventory_image = "fishing_fishing_rod.png",
|
||||
wield_image = "fishing_fishing_rod_wield.png",
|
||||
liquids_pointable = true,
|
||||
range = 10.0,
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
if minetest.get_node(pointed_thing.under).name == "default:water_source" then
|
||||
if math.random(10) == 2 then
|
||||
user:get_inventory():add_item("main", "fishing:fish")
|
||||
end
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fishing:fishing_rod",
|
||||
recipe = {
|
||||
{"default:log_3", "default:string", ""},
|
||||
{"default:log_3", "default:string", ""},
|
||||
{"default:log_3", "default:string", ""},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("fishing:fish", {
|
||||
description = "Fish",
|
||||
inventory_image = "fishing_fish.png",
|
||||
})
|
31
mods/fishing/init.lua~
Normal file
31
mods/fishing/init.lua~
Normal file
@ -0,0 +1,31 @@
|
||||
minetest.register_craftitem("fishing:fishing_rod", {
|
||||
description = "Fishing rod",
|
||||
inventory_image = "fishing_fishing_rod.png",
|
||||
wield_image = "fishing_fishing_rod_wield.png",
|
||||
liquids_pointable = true,
|
||||
range = 10.0,
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
if minetest.get_node(pointed_thing.under).name == "default:water_source" then
|
||||
if math.random(10) == 2 then
|
||||
user:get_inventory():add_item("main", "fishing:fish")
|
||||
end
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fishing:fishing_rod",
|
||||
recipe = {
|
||||
{"default:log_3", "default:string", ""},
|
||||
{"default:log_3", "default:string", ""},
|
||||
{"default:log_3", "default:string", ""},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("fishing:fish", {
|
||||
description = "Fish",
|
||||
inventory_image = "fishing_fish.png",
|
||||
})
|
BIN
mods/fishing/textures/fishing_cooked_fish.png
Normal file
BIN
mods/fishing/textures/fishing_cooked_fish.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 253 B |
BIN
mods/fishing/textures/fishing_fish.png
Normal file
BIN
mods/fishing/textures/fishing_fish.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 252 B |
BIN
mods/fishing/textures/fishing_fishing_rod.png
Normal file
BIN
mods/fishing/textures/fishing_fishing_rod.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 332 B |
BIN
mods/fishing/textures/fishing_fishing_rod_wield.png
Normal file
BIN
mods/fishing/textures/fishing_fishing_rod_wield.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 360 B |
Loading…
x
Reference in New Issue
Block a user