mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Add some basic doc_items help texts for some items
Requires doc_items (not part of MCL2)
This commit is contained in:
parent
aabb1e972d
commit
3db4148e7d
8 changed files with 43 additions and 6 deletions
|
@ -24,7 +24,7 @@ bucket.liquids = {}
|
|||
-- itemname = name of the new bucket item (or nil if liquid is not takeable)
|
||||
-- inventory_image = texture of the new bucket item (ignored if itemname == nil)
|
||||
-- This function can be called from any mod (that depends on bucket).
|
||||
function bucket.register_liquid(source, flowing, itemname, inventory_image, name)
|
||||
function bucket.register_liquid(source, flowing, itemname, inventory_image, name, longdesc, usagehelp)
|
||||
bucket.liquids[source] = {
|
||||
source = source,
|
||||
flowing = flowing,
|
||||
|
@ -35,6 +35,8 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
|||
if itemname ~= nil then
|
||||
minetest.register_craftitem(itemname, {
|
||||
description = name,
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_usagehelp = usagehelp,
|
||||
inventory_image = inventory_image,
|
||||
stack_max = 16,
|
||||
liquids_pointable = true,
|
||||
|
@ -133,6 +135,9 @@ end
|
|||
|
||||
minetest.register_craftitem("bucket:bucket_empty", {
|
||||
description = "Empty Bucket",
|
||||
_doc_items_longdesc = "A bucket can be used to collect and release liquids.",
|
||||
_doc_items_usagehelp = "Punch a liquid source to collect the liquid. With the filled bucket, you can right-click somewhere to empty the bucket which will create a liquid source at the position you've clicked at.",
|
||||
|
||||
inventory_image = "bucket.png",
|
||||
stack_max = 16,
|
||||
liquids_pointable = true,
|
||||
|
@ -193,7 +198,9 @@ bucket.register_liquid(
|
|||
"mcl_core:water_flowing",
|
||||
"bucket:bucket_water",
|
||||
"bucket_water.png",
|
||||
"Water Bucket"
|
||||
"Water Bucket",
|
||||
"A bucket can be used to collect and release liquids. This one is filled with water.",
|
||||
"Right-click on any block to empty the bucket and put a water source on this spot."
|
||||
)
|
||||
|
||||
bucket.register_liquid(
|
||||
|
@ -201,7 +208,9 @@ bucket.register_liquid(
|
|||
"mcl_core:lava_flowing",
|
||||
"bucket:bucket_lava",
|
||||
"bucket_lava.png",
|
||||
"Lava Bucket"
|
||||
"Lava Bucket",
|
||||
"A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution.",
|
||||
"Choose a place where you want to empty the bucket, then get in a safe spot somewhere above it. Be prepared to run away when something goes wrong as the lava will soon start to flow after placing. To empty the bucket (which places a lava source), right-click on your chosen place."
|
||||
)
|
||||
|
||||
minetest.register_craft({
|
||||
|
|
|
@ -21,17 +21,23 @@ if n == 1 then
|
|||
groups = {dig_immediate=3, picture=1, deco_block=1}
|
||||
end
|
||||
|
||||
local desc
|
||||
local desc, doc, longdesc, usagehelp
|
||||
if n == 1 then
|
||||
desc = "Painting"
|
||||
doc = true
|
||||
longdesc = "Paintings are decorations which can be placed on walls and cover a space of 3×3 blocks."
|
||||
usagehelp = "Rightclick the painting to change it."
|
||||
else
|
||||
desc = "Painting ("..n..")"
|
||||
doc = false
|
||||
end
|
||||
|
||||
-- inivisible node
|
||||
minetest.register_node("gemalde:node_"..n.."", {
|
||||
description = desc,
|
||||
_doc_items_create_entry = n == 1,
|
||||
_doc_items_create_entry = doc,
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_usagehelp = usagehelp,
|
||||
drawtype = "signlike",
|
||||
tiles = {"gemalde_"..n..".png","gemalde_bg.png"},
|
||||
visual_scale = 3.0,
|
||||
|
|
|
@ -88,6 +88,8 @@ end
|
|||
|
||||
minetest.register_node("itemframes:frame",{
|
||||
description = "Item Frame",
|
||||
_doc_items_longdesc = "Item frames are decorative blocks in which items can be placed.",
|
||||
_doc_items_usagehelp = "Hold any item in your hand and right-click the item frame to place the item into the frame. Rightclick the item frame again to retrieve the item.",
|
||||
drawtype = "nodebox",
|
||||
is_ground_content = false,
|
||||
node_box = { type = "fixed", fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5} },
|
||||
|
|
|
@ -29,6 +29,8 @@ minetest.register_craft({
|
|||
|
||||
minetest.register_node("mcl_cake:cake", {
|
||||
description = "Cake",
|
||||
_doc_items_longdesc = "Cakes can be placed and eaten to restore hunger points. Each cake has 7 slices and each slice restores 2 hunger points",
|
||||
_doc_items_usagehelp = "Place the cake anywhere, then rightclick it to eat a single slice",
|
||||
tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"},
|
||||
inventory_image = "cake.png",
|
||||
wield_image = "cake.png",
|
||||
|
|
|
@ -43,6 +43,8 @@ end
|
|||
-- Empty cauldron
|
||||
minetest.register_node("mcl_cauldrons:cauldron", {
|
||||
description = "Cauldron",
|
||||
_doc_items_longdesc = "Cauldrons are used to store water and slowly fill up under rain.",
|
||||
_doc_items_usagehelp = "Place a water pucket into the cauldron to fill it with water. Place an empty bucket on a full cauldron to retrieve the water. Place a water bottle into the cauldron to fill the cauldron to one third with water. Place a glass bottle in a cauldron with water to retrieve one third of the water.",
|
||||
wield_image = "mcl_cauldrons_cauldron.png",
|
||||
inventory_image = "mcl_cauldrons_cauldron.png",
|
||||
drawtype = "nodebox",
|
||||
|
|
|
@ -33,9 +33,16 @@ function watch.register_item(name, image, creative)
|
|||
g = 0
|
||||
end
|
||||
local doc = name == "mcl_clock:clock"
|
||||
local longdesc, usagehelp
|
||||
if doc then
|
||||
longdesc = "Clocks are tools which shows the current time of day in the Overworld."
|
||||
usagehelp = "The clock contains a rotating disc with a sun symbol (yellow disc) and moon symbol and a little “pointer” which shows the current time of day by estimating the real position of the sun and the moon in the sky. Noon is represented by the sun symbol and midnight is represented by the moon symbol."
|
||||
end
|
||||
minetest.register_craftitem(name, {
|
||||
description = "Clock",
|
||||
_doc_items_create_entry = doc,
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_usagehelp = usagehelp,
|
||||
inventory_image = image,
|
||||
groups = {not_in_creative_inventory=g, tool=1, clock=1},
|
||||
wield_image = "",
|
||||
|
|
|
@ -55,9 +55,16 @@ for i,img in ipairs(images) do
|
|||
if i == stereotype_frame then
|
||||
inv = 0
|
||||
end
|
||||
local doc, longdesc, usagehelp
|
||||
doc = i == stereotype_frame
|
||||
if doc then
|
||||
longdesc = "Compasses are tools which point to the world origin (X=0, Z=0) or the spawn point in the Overworld."
|
||||
end
|
||||
minetest.register_craftitem("mcl_compass:"..(i-1), {
|
||||
description = "Compass",
|
||||
_doc_items_create_entry = i == stereotype_frame,
|
||||
_doc_items_create_entry = doc,
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_usagehelp = usagehelp,
|
||||
inventory_image = img,
|
||||
wield_image = img,
|
||||
stack_max = 64,
|
||||
|
|
|
@ -10,6 +10,8 @@ local LAVA_VISC = 7
|
|||
|
||||
minetest.register_node("mcl_core:barrier", {
|
||||
description = "Barrier",
|
||||
_doc_items_longdesc = "Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.",
|
||||
_doc_items_usagehelp = "When you hold a barrier in hand, you reveal all placed barriers in a short distance around you.",
|
||||
drawtype = "airlike",
|
||||
paramtype = "light",
|
||||
inventory_image = "default_barrier.png",
|
||||
|
|
Loading…
Reference in a new issue