Merge pull request 'Pull sus_stews update' (#2709) from sus_stew_allium into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2709
This commit is contained in:
cora 2022-10-07 00:22:54 +00:00
commit 8893241ae9
2 changed files with 13 additions and 1 deletions

View File

@ -5,6 +5,7 @@
local eat = minetest.item_eat(6, "mcl_core:bowl") --6 hunger points, player receives mcl_core:bowl after eating
local flower_effect = {
[ "mcl_flowers:allium" ] = "fire_resistance",
[ "mcl_flowers:tulip_white" ] = "poison",
[ "mcl_flowers:blue_orchid" ] = "hunger",
[ "mcl_flowers:dandelion" ] = "hunger",
@ -14,6 +15,10 @@ local flower_effect = {
}
local effects = {
[ "fire_resistance" ] = function(itemstack, placer, pointed_thing)
mcl_potions.fire_resistance_func(placer, 1, 4)
return eat(itemstack, placer, pointed_thing)
end,
[ "poison" ] = function(itemstack, placer, pointed_thing)
mcl_potions.poison_func(placer, 1, 12)
return eat(itemstack, placer, pointed_thing)
@ -77,6 +82,7 @@ minetest.register_craftitem("mcl_sus_stew:stew",{
inventory_image = "sus_stew.png",
stack_max = 1,
on_place = eat_stew,
on_secondary_use = eat_stew,
groups = { food = 2, eatable = 4, can_eat_when_full = 1, not_in_creative_inventory=1,},
_mcl_saturation = 7.2,
})
@ -93,6 +99,12 @@ minetest.register_alias("mcl_sus_stew:night_vision_stew", "mcl_sus_stew:stew")
-- ______________
--_________________________________________/ Crafts \________________________________
minetest.register_craft({
type = "shapeless",
output = "mcl_sus_stew:stew",
recipe = {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown", "mcl_core:bowl", "mcl_flowers:allium"},
})
minetest.register_craft({
type = "shapeless",
output = "mcl_sus_stew:stew",

View File

@ -1,3 +1,3 @@
name = mcl_sus_stew
author = chmodsayshello
author = chmodsayshello, cora
depends = mcl_core, mcl_mushrooms, mcl_flowers, mcl_potions, mcl_hunger