Add simple food poisoning to some food items
parent
02bb8adbe3
commit
6ec9da0fae
|
@ -83,9 +83,11 @@ minetest.register_craftitem("mcl_farming:potato_item_poison", {
|
|||
description = "Poisonous Potato",
|
||||
stack_max = 64,
|
||||
inventory_image = "farming_potato_poison.png",
|
||||
on_place = minetest.item_eat(2),
|
||||
on_secondary_use = minetest.item_eat(2),
|
||||
groups = { food = 2, eatable = 2 },
|
||||
-- TODO: Cause status effects
|
||||
-- TODO: Raise to 2
|
||||
on_place = minetest.item_eat(0),
|
||||
on_secondary_use = minetest.item_eat(0),
|
||||
groups = { food = 2, eatable = 0 },
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
|
|
@ -187,6 +187,7 @@ minetest.register_craftitem("mcl_fishing:clownfish_raw", {
|
|||
})
|
||||
|
||||
-- Pufferfish
|
||||
-- TODO: Add status effect
|
||||
minetest.register_craftitem("mcl_fishing:pufferfish_raw", {
|
||||
description = "Pufferfish",
|
||||
inventory_image = "mcl_fishing_pufferfish_raw.png",
|
||||
|
|
|
@ -4,10 +4,9 @@ minetest.register_craftitem("mcl_mobitems:rotten_flesh", {
|
|||
description = "Rotten Flesh",
|
||||
inventory_image = "mcl_mobitems_rotten_flesh.png",
|
||||
wield_image = "mcl_mobitems_rotten_flesh.png",
|
||||
-- TODO: Raise to 4
|
||||
on_place = minetest.item_eat(1),
|
||||
on_secondary_use = minetest.item_eat(1),
|
||||
groups = { food = 2, eatable = 1 },
|
||||
on_place = minetest.item_eat(4),
|
||||
on_secondary_use = minetest.item_eat(4),
|
||||
groups = { food = 2, eatable = 4 },
|
||||
stack_max = 64,
|
||||
})
|
||||
|
||||
|
|
|
@ -24,12 +24,14 @@ local wip_items = {
|
|||
"mcl_maps:filled_map",
|
||||
"mcl_maps:empty_map",
|
||||
"mcl_mobitems:rotten_flesh",
|
||||
"mcl_mobitems:spider_eye",
|
||||
"mcl_minecarts:golden_rail",
|
||||
"mcl_sponges:sponge",
|
||||
"mcl_farming:mushroom_red",
|
||||
"mcl_farming:mushroom_brown",
|
||||
"gemalde:node_1",
|
||||
"mcl_observers:observer",
|
||||
"mcl_farming:potato_item_poison",
|
||||
}
|
||||
|
||||
for i=1,#wip_items do
|
||||
|
|
|
@ -187,5 +187,18 @@ function mcl_hunger.handle_node_actions(pos, oldnode, player, ext)
|
|||
mcl_hunger.exhaustion[name] = exhaus
|
||||
end
|
||||
|
||||
-- Apply simple poison effect as long there are no real status effect
|
||||
-- TODO: Remove this when status effects are in place
|
||||
if minetest.get_modpath("mcl_farming") then
|
||||
mcl_hunger.register_food("mcl_farming:potato_item_poison", 2, "", 3)
|
||||
end
|
||||
if minetest.get_modpath("mcl_mobitems") then
|
||||
mcl_hunger.register_food("mcl_mobitems:rotten_flesh", 4, "", 8)
|
||||
mcl_hunger.register_food("mcl_mobitems:spider_eye", 2, "", 4)
|
||||
end
|
||||
if minetest.get_modpath("mcl_fishing") then
|
||||
mcl_hunger.register_food("mcl_fishing:pufferfish_raw", 1, "", 60)
|
||||
end
|
||||
|
||||
minetest.register_on_placenode(mcl_hunger.handle_node_actions)
|
||||
minetest.register_on_dignode(mcl_hunger.handle_node_actions)
|
||||
|
|
Loading…
Reference in New Issue