Add files via upload

This commit is contained in:
ChimneySwift 2018-03-21 10:51:49 +10:00 committed by GitHub
parent fa5da20514
commit d4f77f3828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 0 deletions

20
README.md Normal file
View File

@ -0,0 +1,20 @@
# Golden Melon
![](https://github.com/ChimneySwift/golden_melon/blob/master/screenshot.png?raw=true)
Adds a golden melon to Minetest which regenerates breath.
**Code license:** [MIT](https://opensource.org/licenses/MIT)
**Textures license:** [MIT](https://opensource.org/licenses/MIT)
**Dependencies:** [farming_redo](https://github.com/tenplus1/farming)
**Optional Dependencies:** none
**Contributors:** Many thanks to LadyK for the golden melon texture and to kiko for the ideas.
## Notes and Crafting
You can craft 8 golden melon slices with a gold bar surounded by regular melon slices. Eating the melon provides the same amount of health/food regen as a regular melon but additially adds 5 "bubbles" to your breath bar.

1
depends.txt Normal file
View File

@ -0,0 +1 @@
farming

23
init.lua Normal file
View File

@ -0,0 +1,23 @@
-- Golden melon
minetest.register_craftitem(":farming:golden_melon", {
description = "Golden Melon",
inventory_image = "golden_melon_slice.png",
on_use = function(itemstack, user, pointed_thing)
minetest.do_item_eat(2, "", itemstack, user, pointed_thing)
user:set_breath(user:get_breath() + 5)
return itemstack
end,
})
-- Compatability
minetest.register_alias("farming_plus:golden_melon", "farming:golden_melon")
-- Craft
minetest.register_craft({
output = "farming:golden_melon 8",
recipe = {
{"farming:melon_slice", "farming:melon_slice", "farming:melon_slice"},
{"farming:melon_slice", "default:gold_ingot", "farming:melon_slice"},
{"farming:melon_slice", "farming:melon_slice", "farming:melon_slice"},
}
})

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B