mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 05:43:43 +01:00
Add various factoids and complete some food help
This commit is contained in:
parent
14a5d7803f
commit
c2fbe2ad55
@ -113,7 +113,7 @@ These groups are used mostly for informational purposes
|
||||
* `food=2`: Food
|
||||
* `food=3`: Drink (including soups)
|
||||
* `food=1`: Other/unsure
|
||||
* `eatable`: Item can be *directly* eaten by wielding + left click (`on_use=item_eat`). Rating is the satiation gain
|
||||
* `eatable`: Item can be *directly* eaten by wielding + right click (`on_use=item_eat`). Rating is the satiation gain
|
||||
* `cocoa`: Node is a cocoa pod (rating is growth stage, ranging from 1 to 3)
|
||||
* `ammo=1`: Item is used as ammo for a weapon
|
||||
* `ammo_bow=1`: Item is used as ammo for bows
|
||||
|
@ -1 +1,2 @@
|
||||
doc
|
||||
doc_items
|
||||
|
@ -8,3 +8,71 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
doc.show_doc(player:get_player_name())
|
||||
end
|
||||
end)
|
||||
|
||||
-- doc_items factoids
|
||||
|
||||
-- dig_by_water
|
||||
doc.sub.items.register_factoid("nodes", "drop_destroy", function(itemstring, def)
|
||||
if def.groups.dig_by_water then
|
||||
return "Water can flow into this block and cause it to drop as an item."
|
||||
end
|
||||
return ""
|
||||
end)
|
||||
|
||||
-- usable by hoes
|
||||
doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def)
|
||||
if def.groups.cultivatable == 2 then
|
||||
return "This block can be turned into dirt with a hoe."
|
||||
elseif def.groups.cultivatable == 2 then
|
||||
return "This block can be turned into farmland with a hoe."
|
||||
end
|
||||
return ""
|
||||
end)
|
||||
|
||||
-- soil
|
||||
doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def)
|
||||
local datastring = ""
|
||||
if def.groups.soil_sapling == 2 then
|
||||
datastring = datastring .. "This block acts as a soil for all saplings." .. "\n"
|
||||
elseif def.groups.soil_sapling == 1 then
|
||||
datastring = datastring .. "This block acts as a soil for some saplings." .. "\n"
|
||||
end
|
||||
if def.groups.soil_sugarcane then
|
||||
datastring = datastring .. "Sugar canes will grow on this block." .. "\n"
|
||||
end
|
||||
if def.groups.soil_nether_wart then
|
||||
datastring = datastring .. "Nether wart will grow on this block." .. "\n"
|
||||
end
|
||||
return datastring
|
||||
end)
|
||||
|
||||
-- flammable
|
||||
doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def)
|
||||
if def.groups.flammable then
|
||||
return "This block is flammable."
|
||||
end
|
||||
return ""
|
||||
end)
|
||||
|
||||
-- destroys_items
|
||||
doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def)
|
||||
if def.groups.destroys_items then
|
||||
return "This block destroys any item it touches."
|
||||
end
|
||||
return ""
|
||||
end)
|
||||
|
||||
|
||||
-- Comestibles
|
||||
doc.sub.items.register_factoid(nil, "use", function(itemstring, def)
|
||||
if def.groups.eatable and not def._doc_items_usagehelp then
|
||||
if def.groups.food == 2 then
|
||||
return "To eat it, wield it, then rightclick."
|
||||
elseif def.groups.food == 3 then
|
||||
return "To drink it, wield it, then rightclick."
|
||||
else
|
||||
return "To consume it, wield it, then rightclick."
|
||||
end
|
||||
end
|
||||
return ""
|
||||
end)
|
||||
|
@ -134,7 +134,7 @@ minetest.register_craftitem("mcl_core:apple", {
|
||||
stack_max = 64,
|
||||
on_place = minetest.item_eat(4),
|
||||
on_secondary_use = minetest.item_eat(4),
|
||||
groups = { food = 2 },
|
||||
groups = { food = 2, eatable = 4 },
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mcl_core:apple_gold", {
|
||||
@ -145,5 +145,5 @@ minetest.register_craftitem("mcl_core:apple_gold", {
|
||||
stack_max = 64,
|
||||
on_place = minetest.item_eat(8),
|
||||
on_secondary_use = minetest.item_eat(8),
|
||||
groups = { food = 2 },
|
||||
groups = { food = 2, eatable = 8 },
|
||||
})
|
||||
|
@ -1512,7 +1512,7 @@ minetest.register_node("mcl_core:lava_flowing", {
|
||||
minetest.register_node("mcl_core:lava_source", {
|
||||
description = "Still Lava",
|
||||
_doc_items_entry_name = "Lava",
|
||||
_doc_items_longdesc = "Lava is found deep underground and rather dangerous. Don't touch it, it will hurt you a lot and once you're in, it is hard to get out. Lava will also destroy all dropped items it touches. When a lava source meets water, it turns into obsidian. Flowing lava turns into stone instead.",
|
||||
_doc_items_longdesc = "Lava is found deep underground and rather dangerous. Don't touch it, it will hurt you a lot and once you're in, it is hard to get out. When a lava source meets water, it turns into obsidian. Flowing lava turns into stone instead.",
|
||||
inventory_image = minetest.inventorycube("default_lava.png"),
|
||||
drawtype = "liquid",
|
||||
tiles = {
|
||||
|
@ -245,6 +245,7 @@ minetest.register_node("mcl_end:chorus_plant", {
|
||||
-- Craftitems
|
||||
minetest.register_craftitem("mcl_end:chorus_fruit", {
|
||||
description = "Chorus Fruit",
|
||||
_doc_items_longdesc = "Chorus fruits can be eaten to restore 4 hunger points.",
|
||||
wield_image = "mcl_end_chorus_fruit.png",
|
||||
inventory_image = "mcl_end_chorus_fruit.png",
|
||||
-- TODO: Teleport player
|
||||
|
@ -104,10 +104,11 @@ minetest.register_craftitem("mcl_farming:carrot_item", {
|
||||
|
||||
minetest.register_craftitem("mcl_farming:carrot_item_gold", {
|
||||
description = "Golden Carrot",
|
||||
_doc_items_longdesc = "This is a food item which can be eaten for 6 hunger points.",
|
||||
inventory_image = "farming_carrot_gold.png",
|
||||
on_place = minetest.item_eat(3),
|
||||
on_secondary_use = minetest.item_eat(3),
|
||||
groups = { brewitem = 1, food = 2, eatable = 3 },
|
||||
on_place = minetest.item_eat(6),
|
||||
on_secondary_use = minetest.item_eat(6),
|
||||
groups = { brewitem = 1, food = 2, eatable = 6 },
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
@ -108,6 +108,7 @@ mcl_farming:add_gourd("mcl_farming:melontige_unconnect", "mcl_farming:melontige_
|
||||
minetest.register_craftitem("mcl_farming:melon_item", {
|
||||
-- Original name: “Melon”
|
||||
description = "Melon Slice",
|
||||
_doc_items_longdesc = "This is a food item which can be eaten for 2 hunger points.",
|
||||
stack_max = 64,
|
||||
inventory_image = "farming_melon.png",
|
||||
on_place = minetest.item_eat(2),
|
||||
|
@ -95,7 +95,6 @@ minetest.register_craftitem("mcl_farming:potato_item_baked", {
|
||||
minetest.register_craftitem("mcl_farming:potato_item_poison", {
|
||||
description = "Poisonous Potato",
|
||||
_doc_items_longdesc = "This potato doesn't look healthy. Eating it will only poison you.",
|
||||
_doc_items_usagehelp = "Hold it in your hand and rightclick to eat it. But why would you want to do this?",
|
||||
stack_max = 64,
|
||||
inventory_image = "farming_potato_poison.png",
|
||||
-- TODO: Cause status effects
|
||||
|
@ -139,6 +139,7 @@ minetest.register_craft({
|
||||
|
||||
minetest.register_craftitem("mcl_farming:cookie", {
|
||||
description = "Cookie",
|
||||
_doc_items_longdesc = "This is a food item which can be eaten for 2 hunger points.",
|
||||
inventory_image = "farming_cookie.png",
|
||||
groups = {food=2, eatable=2},
|
||||
on_place = minetest.item_eat(2),
|
||||
@ -148,6 +149,7 @@ minetest.register_craftitem("mcl_farming:cookie", {
|
||||
|
||||
minetest.register_craftitem("mcl_farming:bread", {
|
||||
description = "Bread",
|
||||
_doc_items_longdesc = "This is a food item which can be eaten for 5 hunger points.",
|
||||
inventory_image = "farming_bread.png",
|
||||
groups = {food=2, eatable=5},
|
||||
on_place = minetest.item_eat(5),
|
||||
|
@ -135,6 +135,7 @@ minetest.register_craft({
|
||||
-- Fish
|
||||
minetest.register_craftitem("mcl_fishing:fish_raw", {
|
||||
description = "Raw Fish",
|
||||
_doc_items_longdesc = "This is a raw food item which can be eaten for 2 hunger points. But cooking it is better.",
|
||||
inventory_image = "mcl_fishing_fish_raw.png",
|
||||
on_place = minetest.item_eat(2),
|
||||
on_secondary_use = minetest.item_eat(2),
|
||||
@ -144,6 +145,7 @@ minetest.register_craftitem("mcl_fishing:fish_raw", {
|
||||
|
||||
minetest.register_craftitem("mcl_fishing:fish_cooked", {
|
||||
description = "Cooked Fish",
|
||||
_doc_items_longdesc = "Mmh, fish! This food item can be eaten for 5 hunger points.",
|
||||
inventory_image = "mcl_fishing_fish_cooked.png",
|
||||
on_place = minetest.item_eat(5),
|
||||
on_secondary_use = minetest.item_eat(5),
|
||||
@ -161,6 +163,7 @@ minetest.register_craft({
|
||||
-- Salmon
|
||||
minetest.register_craftitem("mcl_fishing:salmon_raw", {
|
||||
description = "Raw Salmon",
|
||||
_doc_items_longdesc = "This is a raw food item which can be eaten for 2 hunger points. But cooking it is better.",
|
||||
inventory_image = "mcl_fishing_salmon_raw.png",
|
||||
on_place = minetest.item_eat(2),
|
||||
on_secondary_use = minetest.item_eat(2),
|
||||
@ -170,6 +173,7 @@ minetest.register_craftitem("mcl_fishing:salmon_raw", {
|
||||
|
||||
minetest.register_craftitem("mcl_fishing:salmon_cooked", {
|
||||
description = "Cooked Salmon",
|
||||
_doc_items_longdesc = "This is a food item which can be eaten for 6 hunger points.",
|
||||
inventory_image = "mcl_fishing_salmon_cooked.png",
|
||||
on_place = minetest.item_eat(6),
|
||||
on_secondary_use = minetest.item_eat(6),
|
||||
@ -187,6 +191,7 @@ minetest.register_craft({
|
||||
-- Clownfish
|
||||
minetest.register_craftitem("mcl_fishing:clownfish_raw", {
|
||||
description = "Clownfish",
|
||||
_doc_items_longdesc = "This is a food item which can be eaten for 1 hunger point.",
|
||||
inventory_image = "mcl_fishing_clownfish_raw.png",
|
||||
on_place = minetest.item_eat(1),
|
||||
on_secondary_use = minetest.item_eat(1),
|
||||
@ -198,6 +203,7 @@ minetest.register_craftitem("mcl_fishing:clownfish_raw", {
|
||||
-- TODO: Add status effect
|
||||
minetest.register_craftitem("mcl_fishing:pufferfish_raw", {
|
||||
description = "Pufferfish",
|
||||
_doc_items_longdesc = "Pufferfish are a common species of fish, but they are dangerous to eat. Eating a pufferfish restores 1 hunger point, but it makes you very sick (which drains your health non-fatally).",
|
||||
inventory_image = "mcl_fishing_pufferfish_raw.png",
|
||||
on_place = minetest.item_eat(1),
|
||||
on_secondary_use = minetest.item_eat(1),
|
||||
|
@ -37,6 +37,7 @@ minetest.register_node("mcl_mushrooms:mushroom_red", {
|
||||
|
||||
minetest.register_craftitem("mcl_mushrooms:mushroom_stew", {
|
||||
description = "Mushroom Stew",
|
||||
_doc_items_longdesc = "Mushroom stew is a healthy soup which can be consumed for 6 hunger points.",
|
||||
inventory_image = "farming_mushroom_stew.png",
|
||||
on_place = minetest.item_eat(6, "mcl_core:bowl"),
|
||||
on_secondary_use = minetest.item_eat(6, "mcl_core:bowl"),
|
||||
|
@ -14,6 +14,8 @@ minetest.register_craft({
|
||||
|
||||
minetest.register_craftitem("mcl_potions:glass_bottle", {
|
||||
description = "Glass Bottle",
|
||||
_doc_items_longdesc = "A glass bottle is used as a container for potions and can be used to collect water directly.",
|
||||
_doc_items_usagehelp = "To collect water, it on a cauldron with water (which removes a level of water) or a water source (which removes no water).",
|
||||
inventory_image = "mcl_potions_potion_bottle_empty.png",
|
||||
wield_image = "mcl_potions_potion_bottle_empty.png",
|
||||
groups = {brewitem=1},
|
||||
@ -89,6 +91,8 @@ end
|
||||
|
||||
minetest.register_craftitem("mcl_potions:potion_water", {
|
||||
description = "Water Bottle",
|
||||
_doc_items_longdesc = "Water bottles can be used to brew potions and to fill cauldron. Drinking water has no effect.",
|
||||
_doc_items_usagehelp = "Wield it and rightclick to drink it. Rightclick a cauldron to put the water into the cauldron.",
|
||||
stack_max = 1,
|
||||
inventory_image = potion_image("#0000FF"),
|
||||
wield_image = potion_image("#0000FF"),
|
||||
@ -123,8 +127,13 @@ minetest.register_craftitem("mcl_potions:potion_water", {
|
||||
end,
|
||||
on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"),
|
||||
})
|
||||
|
||||
local how_to_drink = "To drink it, wield it, then rightclick."
|
||||
|
||||
minetest.register_craftitem("mcl_potions:potion_awkward", {
|
||||
description = "Awkward Potion",
|
||||
_doc_items_longdesc = "This potion has an awkward taste and is used for brewing more potions. Drinking it has no effect.",
|
||||
_doc_items_usagehelp = how_to_drink,
|
||||
stack_max = 1,
|
||||
inventory_image = potion_image("#0000FF"),
|
||||
wield_image = potion_image("#0000FF"),
|
||||
@ -134,6 +143,8 @@ minetest.register_craftitem("mcl_potions:potion_awkward", {
|
||||
})
|
||||
minetest.register_craftitem("mcl_potions:potion_mundane", {
|
||||
description = "Mundane Potion",
|
||||
_doc_items_longdesc = "This potion has a clean taste and is used for brewing more potions. Drinking it has no effect.",
|
||||
_doc_items_usagehelp = how_to_drink,
|
||||
stack_max = 1,
|
||||
inventory_image = potion_image("#0000FF"),
|
||||
wield_image = potion_image("#0000FF"),
|
||||
@ -143,6 +154,8 @@ minetest.register_craftitem("mcl_potions:potion_mundane", {
|
||||
})
|
||||
minetest.register_craftitem("mcl_potions:potion_thick", {
|
||||
description = "Thick Potion",
|
||||
_doc_items_longdesc = "This potion has a bitter taste and is used for brewing more potions. Drinking it has no effect.",
|
||||
_doc_items_usagehelp = how_to_drink,
|
||||
stack_max = 1,
|
||||
inventory_image = potion_image("#0000FF"),
|
||||
wield_image = potion_image("#0000FF"),
|
||||
|
Loading…
Reference in New Issue
Block a user