forked from MineClone5/MineClone5
Add extended tooltips
This commit is contained in:
parent
71cee9920a
commit
ba74546d48
|
@ -279,7 +279,7 @@ local images = { "oak", "spruce", "birch", "jungle", "acacia", "dark_oak" }
|
|||
for b=1, #boat_ids do
|
||||
local itemstring = "mcl_boats:"..boat_ids[b]
|
||||
|
||||
local longdesc, usagehelp, help, helpname
|
||||
local longdesc, usagehelp, tt_help, help, helpname
|
||||
help = false
|
||||
-- Only create one help entry for all boats
|
||||
if b == 1 then
|
||||
|
@ -288,9 +288,11 @@ for b=1, #boat_ids do
|
|||
usagehelp = S("Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.")
|
||||
helpname = S("Boat")
|
||||
end
|
||||
tt_help = S("Water vehicle")
|
||||
|
||||
minetest.register_craftitem(itemstring, {
|
||||
description = names[b],
|
||||
_tt_help = tt_help,
|
||||
_doc_items_create_entry = help,
|
||||
_doc_items_entry_name = helpname,
|
||||
_doc_items_longdesc = longdesc,
|
||||
|
|
|
@ -526,7 +526,7 @@ mcl_minecarts.place_minecart = function(itemstack, pointed_thing)
|
|||
end
|
||||
|
||||
|
||||
local register_craftitem = function(itemstring, entity_id, description, longdesc, usagehelp, icon, creative)
|
||||
local register_craftitem = function(itemstring, entity_id, description, tt_help, longdesc, usagehelp, icon, creative)
|
||||
entity_mapping[itemstring] = entity_id
|
||||
|
||||
local groups = { minecart = 1, transport = 1 }
|
||||
|
@ -566,6 +566,7 @@ local register_craftitem = function(itemstring, entity_id, description, longdesc
|
|||
groups = groups,
|
||||
}
|
||||
def.description = description
|
||||
def._tt_help = tt_help
|
||||
def._doc_items_longdesc = longdesc
|
||||
def._doc_items_usagehelp = usagehelp
|
||||
def.inventory_image = icon
|
||||
|
@ -588,9 +589,9 @@ Register a minecart
|
|||
* on_activate_by_rail: Called when above activator rail
|
||||
* creative: If false, don't show in Creative Inventory
|
||||
]]
|
||||
local function register_minecart(itemstring, entity_id, description, longdesc, usagehelp, mesh, textures, icon, drop, on_rightclick, on_activate_by_rail, creative)
|
||||
local function register_minecart(itemstring, entity_id, description, tt_help, longdesc, usagehelp, mesh, textures, icon, drop, on_rightclick, on_activate_by_rail, creative)
|
||||
register_entity(entity_id, mesh, textures, drop, on_rightclick, on_activate_by_rail)
|
||||
register_craftitem(itemstring, entity_id, description, longdesc, usagehelp, icon, creative)
|
||||
register_craftitem(itemstring, entity_id, description, tt_help, longdesc, usagehelp, icon, creative)
|
||||
if minetest.get_modpath("doc_identifier") ~= nil then
|
||||
doc.sub.identifier.register_object(entity_id, "craftitems", itemstring)
|
||||
end
|
||||
|
@ -601,6 +602,7 @@ register_minecart(
|
|||
"mcl_minecarts:minecart",
|
||||
"mcl_minecarts:minecart",
|
||||
S("Minecart"),
|
||||
S("Vehicle for fast travel on rails"),
|
||||
S("Minecarts can be used for a quick transportion on rails.") .. "\n" ..
|
||||
S("Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type."),
|
||||
S("You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.") .. "\n" ..
|
||||
|
@ -640,7 +642,7 @@ register_minecart(
|
|||
"mcl_minecarts:chest_minecart",
|
||||
"mcl_minecarts:chest_minecart",
|
||||
S("Minecart with Chest"),
|
||||
nil, nil,
|
||||
nil, nil, nil,
|
||||
"mcl_minecarts_minecart_chest.b3d",
|
||||
{ "mcl_chests_normal.png", "mcl_minecarts_minecart.png" },
|
||||
"mcl_minecarts_minecart_chest.png",
|
||||
|
@ -652,6 +654,7 @@ register_minecart(
|
|||
"mcl_minecarts:furnace_minecart",
|
||||
"mcl_minecarts:furnace_minecart",
|
||||
S("Minecart with Furnace"),
|
||||
nil,
|
||||
S("A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel."),
|
||||
S("Place it on rails. If you give it some coal, the furnace will start burning for a long time and the minecart will be able to move itself. Punch it to get it moving.") .. "\n" ..
|
||||
S("To obtain the minecart and furnace, punch them while holding down the sneak key."),
|
||||
|
@ -705,7 +708,7 @@ register_minecart(
|
|||
"mcl_minecarts:command_block_minecart",
|
||||
"mcl_minecarts:command_block_minecart",
|
||||
S("Minecart with Command Block"),
|
||||
nil, nil,
|
||||
nil, nil, nil,
|
||||
"mcl_minecarts_minecart_block.b3d",
|
||||
{
|
||||
"jeija_commandblock_off.png^[verticalframe:2:0",
|
||||
|
@ -726,7 +729,7 @@ register_minecart(
|
|||
"mcl_minecarts:hopper_minecart",
|
||||
"mcl_minecarts:hopper_minecart",
|
||||
S("Minecart with Hopper"),
|
||||
nil, nil,
|
||||
nil, nil, nil,
|
||||
"mcl_minecarts_minecart_hopper.b3d",
|
||||
{
|
||||
"mcl_hoppers_hopper_inside.png",
|
||||
|
@ -744,6 +747,7 @@ register_minecart(
|
|||
"mcl_minecarts:tnt_minecart",
|
||||
"mcl_minecarts:tnt_minecart",
|
||||
S("Minecart with TNT"),
|
||||
S("Vehicle for fast travel on rails").."\n"..S("Can be ignited by tools or powered activator rail"),
|
||||
S("A minecart with TNT is an explosive vehicle that travels on rail."),
|
||||
S("Place it on rails. Punch it to move it. The TNT is ignited with a flint and steel or when the minecart is on an powered activator rail.") .. "\n" ..
|
||||
S("To obtain the minecart and TNT, punch them while holding down the sneak key. You can't do this if the TNT was ignited."),
|
||||
|
|
|
@ -73,6 +73,7 @@ register_rail("mcl_minecarts:rail",
|
|||
{"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"},
|
||||
{
|
||||
description = S("Rail"),
|
||||
_tt_help = S("Track for minecarts"),
|
||||
_doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction."),
|
||||
_doc_items_usagehelp = railuse,
|
||||
}
|
||||
|
@ -83,6 +84,7 @@ register_rail("mcl_minecarts:golden_rail",
|
|||
{"mcl_minecarts_rail_golden.png", "mcl_minecarts_rail_golden_curved.png", "mcl_minecarts_rail_golden_t_junction.png", "mcl_minecarts_rail_golden_crossing.png"},
|
||||
{
|
||||
description = S("Powered Rail"),
|
||||
_tt_help = S("Track for minecarts").."\n"..S("Speed up when powered, slow down when not powered"),
|
||||
_doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts."),
|
||||
_doc_items_usagehelp = railuse .. "\n" .. S("Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power."),
|
||||
_rail_acceleration = -3,
|
||||
|
@ -121,6 +123,7 @@ register_rail("mcl_minecarts:activator_rail",
|
|||
{"mcl_minecarts_rail_activator.png", "mcl_minecarts_rail_activator_curved.png", "mcl_minecarts_rail_activator_t_junction.png", "mcl_minecarts_rail_activator_crossing.png"},
|
||||
{
|
||||
description = S("Activator Rail"),
|
||||
_tt_help = S("Track for minecarts").."\n"..S("Activates minecarts when powered"),
|
||||
_doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts."),
|
||||
_doc_items_usagehelp = railuse .. "\n" .. S("To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail."),
|
||||
mesecons = {
|
||||
|
@ -172,6 +175,7 @@ register_rail("mcl_minecarts:detector_rail",
|
|||
{"mcl_minecarts_rail_detector.png", "mcl_minecarts_rail_detector_curved.png", "mcl_minecarts_rail_detector_t_junction.png", "mcl_minecarts_rail_detector_crossing.png"},
|
||||
{
|
||||
description = S("Detector Rail"),
|
||||
_tt_help = S("Track for minecarts").."\n"..S("Emits redstone power when a minecart is detected"),
|
||||
_doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms."),
|
||||
_doc_items_usagehelp = railuse .. "\n" .. S("To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail."),
|
||||
mesecons = {
|
||||
|
|
|
@ -4,6 +4,7 @@ local S = minetest.get_translator("mcl_mobs")
|
|||
-- name tag
|
||||
minetest.register_craftitem("mcl_mobs:nametag", {
|
||||
description = S("Name Tag"),
|
||||
_tt_help = S("Give names to mobs").."\n"..S("Set name at anvil"),
|
||||
_doc_items_longdesc = S("A name tag is an item to name a mob."),
|
||||
_doc_items_usagehelp = S("Before you use the name tag, you need to set a name at an anvil. Then you can use the name tag to name a mob. This uses up the name tag."),
|
||||
inventory_image = "mobs_nametag.png",
|
||||
|
|
|
@ -532,6 +532,7 @@ if c("totem") then
|
|||
-- Totem of Undying
|
||||
minetest.register_craftitem("mobs_mc:totem", {
|
||||
description = S("Totem of Undying"),
|
||||
_tt_help = S("Protects you from death while wielding it"),
|
||||
_doc_items_longdesc = S("A totem of undying is a rare artifact which may safe you from certain death."),
|
||||
_doc_items_usagehelp = S("The totem only works while you hold it in your hand. If you receive fatal damage, you are saved from death and you get a second chance with 1 HP. The totem is destroyed in the process, however."),
|
||||
inventory_image = "mcl_totems_totem.png",
|
||||
|
|
|
@ -161,6 +161,7 @@ end
|
|||
|
||||
minetest.register_tool("doc_identifier:identifier_solid", {
|
||||
description = S("Lookup Tool"),
|
||||
_tt_help = S("Show help for pointed thing"),
|
||||
_doc_items_longdesc = S("This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used."),
|
||||
_doc_items_usagehelp = S("Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by using. In liquid mode, this tool points to liquids as well while in solid mode this is not the case."),
|
||||
_doc_items_hidden = false,
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
tt
|
|
@ -0,0 +1,103 @@
|
|||
local S = minetest.get_translator("mcl_tt")
|
||||
|
||||
-- Armor
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
local s = ""
|
||||
local head = minetest.get_item_group(itemstring, "armor_head")
|
||||
local torso = minetest.get_item_group(itemstring, "armor_torso")
|
||||
local legs = minetest.get_item_group(itemstring, "armor_legs")
|
||||
local feet = minetest.get_item_group(itemstring, "armor_feet")
|
||||
if head > 0 then
|
||||
s = s .. S("Head armor")
|
||||
end
|
||||
if torso > 0 then
|
||||
s = s .. S("Torso armor")
|
||||
end
|
||||
if legs > 0 then
|
||||
s = s .. S("Legs armor")
|
||||
end
|
||||
if feet > 0 then
|
||||
s = s .. S("Feet armor")
|
||||
end
|
||||
if s == "" then
|
||||
s = nil
|
||||
end
|
||||
return s
|
||||
end)
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
local s = ""
|
||||
local use = minetest.get_item_group(itemstring, "mcl_armor_uses")
|
||||
local pts = minetest.get_item_group(itemstring, "mcl_armor_points")
|
||||
if pts > 0 then
|
||||
s = s .. S("Armor points: @1", pts)
|
||||
s = s .. "\n"
|
||||
end
|
||||
if use > 0 then
|
||||
s = s .. S("Armor durability: @1", use)
|
||||
end
|
||||
if s == "" then
|
||||
s = nil
|
||||
end
|
||||
return s
|
||||
end)
|
||||
-- Horse armor
|
||||
tt.register_snippet(function(itemstring)
|
||||
local armor_g = minetest.get_item_group(itemstring, "horse_armor")
|
||||
if armor_g and armor_g > 0 then
|
||||
return S("Protection: @1%", 100 - armor_g)
|
||||
end
|
||||
end)
|
||||
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
local s = ""
|
||||
if def.groups.eatable and def.groups.eatable > 0 then
|
||||
s = s .. S("Hunger points: +@1", def.groups.eatable)
|
||||
end
|
||||
if def._mcl_saturation and def._mcl_saturation > 0 then
|
||||
if s ~= "" then
|
||||
s = s .. "\n"
|
||||
end
|
||||
s = s .. S("Saturation points: +@1", string.format("%.1f", def._mcl_saturation))
|
||||
end
|
||||
if s == "" then
|
||||
s = nil
|
||||
end
|
||||
return s
|
||||
end)
|
||||
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
if minetest.get_item_group(itemstring, "crush_after_fall") == 1 then
|
||||
return S("Deals damage when falling")
|
||||
end
|
||||
end)
|
||||
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
if def.groups.place_flowerlike == 1 then
|
||||
return S("Grows on grass blocks or dirt")
|
||||
elseif def.groups.place_flowerlike == 2 then
|
||||
return S("Grows on grass blocks, podzol, dirt or coarse dirt")
|
||||
end
|
||||
end)
|
||||
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
if def.groups.flammable then
|
||||
return S("Flammable")
|
||||
end
|
||||
end)
|
||||
|
||||
tt.register_snippet(function(itemstring)
|
||||
if itemstring == "mcl_heads:zombie" then
|
||||
return S("Zombie view range: -50%")
|
||||
elseif itemstring == "mcl_heads:skeleton" then
|
||||
return S("Skeleton view range: -50%")
|
||||
elseif itemstring == "mcl_heads:creeper" then
|
||||
return S("Creeper view range: -50%")
|
||||
end
|
||||
end)
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
# Tooltip API
|
||||
This API explains how to handle the extended item tooltips (`description` field).
|
||||
|
||||
## Fields
|
||||
|
||||
Add these to the item definition.
|
||||
|
||||
* `_tt_ignore`: If `true`, the `description` of this item won't be altered at all
|
||||
* `_tt_help`: Custom help text
|
||||
* `_tt_food`: If `true`, item is a food item that can be consumed by the player
|
||||
* `_tt_food_hp`: Health increase (in HP) for player when consuming food item
|
||||
|
||||
Once this mod had overwritten the `description` field of an item was overwritten, it will save the original (unaltered) `description` in the `_tt_original_description` field.
|
||||
|
||||
## `tt.register_snippet(func)`
|
||||
|
||||
Register a custom snippet function.
|
||||
`func` is a function of the form `func(itemstring)`.
|
||||
It will be called for (nearly) every itemstring.
|
||||
|
||||
Returns: Two values, the first one is required.
|
||||
1st return value: A string you want to append to this item or `nil` if nothing shall be appended.
|
||||
2nd return value: If nil, `tt` will take of the text color. If a ColorString in `"#RRGGBB"` format, entire text is colorized in this color. Return `false` to force `tt` to not apply text any colorization (useful if you want to call `minetest.colorize` yourself.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
tt.register_snippet(function(itemstring)
|
||||
if minetest.get_item_group(itemstring, "magic") == 1 then
|
||||
return "This item is magic"
|
||||
end
|
||||
end)
|
||||
```
|
|
@ -0,0 +1,12 @@
|
|||
# Extended Tooltip (`tt`)
|
||||
This mod extends the tooltip of items to add more informative texts.
|
||||
|
||||
It displays the following useful information:
|
||||
* Weapon damage and speed
|
||||
* Tool properties
|
||||
* Noteworthy block properties
|
||||
* Food satiation
|
||||
* Custom help text (added by mods)
|
||||
|
||||
## License
|
||||
MIT License.
|
|
@ -0,0 +1,55 @@
|
|||
local S = minetest.get_translator("tt")
|
||||
|
||||
tt = {}
|
||||
tt.COLOR_DEFAULT = "#d0ffd0"
|
||||
tt.COLOR_DANGER = "#ffff00"
|
||||
tt.COLOR_GOOD = "#00ff00"
|
||||
|
||||
-- API
|
||||
tt.registered_snippets = {}
|
||||
|
||||
tt.register_snippet = function(func)
|
||||
table.insert(tt.registered_snippets, func)
|
||||
end
|
||||
|
||||
-- Register core snippets
|
||||
|
||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/snippets_core.lua")
|
||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/snippets_builtin.lua")
|
||||
|
||||
-- Apply item description updates
|
||||
|
||||
local function append_snippets()
|
||||
for itemstring, def in pairs(minetest.registered_items) do
|
||||
if itemstring ~= "" and itemstring ~= "air" and itemstring ~= "ignore" and itemstring ~= "unknown" and def ~= nil and def.description ~= nil and def.description ~= "" and def._tt_ignore ~= true then
|
||||
local desc = def.description
|
||||
local orig_desc = desc
|
||||
local first = true
|
||||
-- Apply snippets
|
||||
for s=1, #tt.registered_snippets do
|
||||
local str, snippet_color = tt.registered_snippets[s](itemstring)
|
||||
if snippet_color == nil then
|
||||
snippet_color = tt.COLOR_DEFAULT
|
||||
elseif snippet_color == false then
|
||||
snippet_color = false
|
||||
end
|
||||
if str then
|
||||
if first then
|
||||
first = false
|
||||
end
|
||||
desc = desc .. "\n"
|
||||
if snippet_color then
|
||||
desc = desc .. minetest.colorize(snippet_color, str)
|
||||
else
|
||||
desc = desc .. str
|
||||
end
|
||||
end
|
||||
end
|
||||
if desc ~= def.description then
|
||||
minetest.override_item(itemstring, { description = desc, _tt_original_description = orig_desc })
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_on_mods_loaded(append_snippets)
|
|
@ -0,0 +1,27 @@
|
|||
# textdomain:tt
|
||||
Damage: @1=
|
||||
Damage (@1): @2=
|
||||
Healing: @1=
|
||||
Healing (@1): @2=
|
||||
Full punch interval: @1s=
|
||||
Food item=
|
||||
+@1 satiation=
|
||||
@1 satiation=
|
||||
+@1 food points=
|
||||
Contact damage: @1 per second=
|
||||
Contact healing: @1 per second=
|
||||
Drowning damage: @1=
|
||||
Bouncy (@1%)=
|
||||
Luminance: @1=
|
||||
Slippery=
|
||||
Climbable=
|
||||
Climbable (only downwards)=
|
||||
No jumping=
|
||||
No swimming upwards=
|
||||
No rising=
|
||||
Fall damage: @1%=
|
||||
Fall damage: +@1%=
|
||||
No fall damage=
|
||||
Digs @1 blocks=
|
||||
Digs @1 blocks instantly=
|
||||
Minimum dig time: @1s=
|
|
@ -0,0 +1,27 @@
|
|||
# textdomain:tt
|
||||
Damage: @1=Schaden: @1
|
||||
Damage (@1): @2=Schaden (@1): @2
|
||||
Healing: @1=Heilung: @1
|
||||
Healing (@1): @2=Heilung (@1): @2
|
||||
Full punch interval: @1s=Zeit zum Ausholen: @1s
|
||||
Food item=Lebensmittel
|
||||
+@1 satiation=+@1 Sättigung
|
||||
@1 satiation=@1 Sättigung
|
||||
+@1 food points=+@1 Nahrungspunkte
|
||||
Contact damage: @1 per second=Kontaktschaden: @1 pro Sekunde
|
||||
Contact healing: @1 per second=Kontaktheilung: @1 pro Sekunde
|
||||
Drowning damage: @1=Ertrinkensschaden: @1
|
||||
Bouncy (@1%)=Sprunghaft (@1%)
|
||||
Luminance: @1=Lichtstärke: @1
|
||||
Slippery=Rutschig
|
||||
Climbable=Erkletterbar
|
||||
Climbable (only downwards)=Erkletterbar (nur nach unten)
|
||||
No jumping=Kein Springen
|
||||
No swimming upwards=Kein nach oben schwimmen
|
||||
No rising=Kein Aufsteigen
|
||||
Fall damage: @1%=Fallschaden: @1%
|
||||
Fall damage: +@1%=Fallschaden: +@1%
|
||||
No fall damage=Kein Fallschaden
|
||||
Digs @1 blocks=Gräbt „@1“-Blöcke
|
||||
Digs @1 blocks instantly=Gräbt „@1“-Blöcke sofort
|
||||
Minimum dig time: @1s=Minimale Grabezeit: @1s
|
|
@ -0,0 +1,2 @@
|
|||
name = tt
|
||||
description = Appends a helpful tooltip to the item description
|
|
@ -0,0 +1,210 @@
|
|||
local S = minetest.get_translator("tt")
|
||||
|
||||
local function get_min_digtime(caps)
|
||||
local mintime
|
||||
local unique = true
|
||||
local maxlevel = caps.maxlevel
|
||||
if not maxlevel then
|
||||
maxlevel = 1
|
||||
end
|
||||
if maxlevel > 1 then
|
||||
unique = false
|
||||
end
|
||||
if caps.times then
|
||||
for r=1,3 do
|
||||
local time = caps.times[r]
|
||||
if time and maxlevel > 1 then
|
||||
time = time / maxlevel
|
||||
end
|
||||
if time and ((not mintime) or (time < mintime)) then
|
||||
if mintime and (time < mintime) then
|
||||
unique = false
|
||||
end
|
||||
mintime = time
|
||||
end
|
||||
end
|
||||
end
|
||||
return mintime, unique
|
||||
end
|
||||
|
||||
local function newline(str)
|
||||
if str ~= "" then
|
||||
str = str .. "\n"
|
||||
end
|
||||
return str
|
||||
end
|
||||
|
||||
-- Digging capabilities of tool
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
if not def.tool_capabilities then
|
||||
return
|
||||
end
|
||||
local groupcaps = def.tool_capabilities.groupcaps
|
||||
if not groupcaps then
|
||||
return
|
||||
end
|
||||
local formstring = ""
|
||||
local capstr = ""
|
||||
local caplines = 0
|
||||
for k,v in pairs(groupcaps) do
|
||||
local speedstr = ""
|
||||
local miningusesstr = ""
|
||||
-- Mining capabilities
|
||||
caplines = caplines + 1
|
||||
local maxlevel = v.maxlevel
|
||||
if not maxlevel then
|
||||
-- Default from tool.h
|
||||
maxlevel = 1
|
||||
end
|
||||
|
||||
-- Digging speed
|
||||
local speed_class = def.groups and def.groups.dig_speed_class
|
||||
if speed_class == 1 then
|
||||
speedstr = S("Painfully slow")
|
||||
elseif speed_class == 2 then
|
||||
speedstr = S("Very slow")
|
||||
elseif speed_class == 3 then
|
||||
speedstr = S("Slow")
|
||||
elseif speed_class == 4 then
|
||||
speedstr = S("Fast")
|
||||
elseif speed_class == 5 then
|
||||
speedstr = S("Very fast")
|
||||
elseif speed_class == 6 then
|
||||
speedstr = S("Extremely fast")
|
||||
elseif speed_class == 7 then
|
||||
speedstr = S("Instantaneous")
|
||||
end
|
||||
|
||||
-- Number of mining uses
|
||||
local base_uses = v.uses
|
||||
if not base_uses then
|
||||
-- Default from tool.h
|
||||
base_uses = 20
|
||||
end
|
||||
if def._doc_items_durability == nil and base_uses > 0 then
|
||||
local real_uses = base_uses * math.pow(3, maxlevel)
|
||||
if real_uses < 65535 then
|
||||
miningusesstr = S("@1 uses", real_uses)
|
||||
else
|
||||
miningusesstr = S("Unlimited uses")
|
||||
end
|
||||
end
|
||||
|
||||
if speedstr ~= "" then
|
||||
capstr = capstr .. S("Mining speed: @1", speedstr) .. "\n"
|
||||
end
|
||||
if miningusesstr ~= "" then
|
||||
capstr = capstr .. S("Mining durability: @1", miningusesstr) .. "\n"
|
||||
end
|
||||
|
||||
-- Only show one group at max
|
||||
break
|
||||
end
|
||||
if caplines > 0 then
|
||||
-- Capabilities
|
||||
formstring = formstring .. capstr
|
||||
-- Max. drop level
|
||||
local mdl = def.tool_capabilities.max_drop_level
|
||||
if not def.tool_capabilities.max_drop_level then
|
||||
mdl = 0
|
||||
end
|
||||
formstring = formstring .. S("Block breaking strength: @1", mdl)
|
||||
end
|
||||
if formstring == "" then
|
||||
formstring = nil
|
||||
end
|
||||
return formstring
|
||||
end)
|
||||
|
||||
-- Food
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
local desc
|
||||
if def._tt_food then
|
||||
desc = S("Food item")
|
||||
if def._tt_food_hp then
|
||||
local msg = S("+@1 food points", def._tt_food_hp)
|
||||
desc = desc .. "\n" .. msg
|
||||
end
|
||||
end
|
||||
return desc
|
||||
end)
|
||||
|
||||
-- Node info
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
local desc = ""
|
||||
|
||||
-- Health-related node facts
|
||||
if def.damage_per_second then
|
||||
if def.damage_per_second > 0 then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DANGER, S("Contact damage: @1 per second", def.damage_per_second))
|
||||
elseif def.damage_per_second < 0 then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_GOOD, S("Contact healing: @1 per second", math.abs(def.damage_per_second)))
|
||||
end
|
||||
end
|
||||
if def.drowning and def.drowning ~= 0 then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DANGER, S("Drowning damage: @1", def.drowning))
|
||||
end
|
||||
local tmp = minetest.get_item_group(itemstring, "fall_damage_add_percent")
|
||||
if tmp > 0 then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DANGER, S("Fall damage: +@1%", tmp))
|
||||
elseif tmp == -100 then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_GOOD, S("No fall damage"))
|
||||
elseif tmp < 0 then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DEFAULT, S("Fall damage: @1%", tmp))
|
||||
end
|
||||
|
||||
-- Movement-related node facts
|
||||
if minetest.get_item_group(itemstring, "disable_jump") == 1 and not def.climbable then
|
||||
if def.liquidtype == "none" then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DEFAULT, S("No jumping"))
|
||||
elseif minetest.get_item_group(itemstring, "fake_liquid") == 0 then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DEFAULT, S("No swimming upwards"))
|
||||
else
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DEFAULT, S("No rising"))
|
||||
end
|
||||
end
|
||||
if def.climbable then
|
||||
if minetest.get_item_group(itemstring, "disable_jump") == 1 then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DEFAULT, S("Climbable (only downwards)"))
|
||||
else
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DEFAULT, S("Climbable"))
|
||||
end
|
||||
end
|
||||
if minetest.get_item_group(itemstring, "slippery") >= 1 then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DEFAULT, S("Slippery"))
|
||||
end
|
||||
local tmp = minetest.get_item_group(itemstring, "bouncy")
|
||||
if tmp >= 1 then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DEFAULT, S("Bouncy (@1%)", tmp))
|
||||
end
|
||||
|
||||
-- Node appearance
|
||||
tmp = def.light_source
|
||||
if tmp and tmp >= 1 then
|
||||
desc = newline(desc)
|
||||
desc = desc .. minetest.colorize(tt.COLOR_DEFAULT, S("Luminance: @1", tmp))
|
||||
end
|
||||
|
||||
|
||||
if desc == "" then
|
||||
desc = nil
|
||||
end
|
||||
return desc, false
|
||||
end)
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
-- CORE SNIPPETS --
|
||||
|
||||
-- Custom text (_tt_help)
|
||||
tt.register_snippet(function(itemstring)
|
||||
local def = minetest.registered_items[itemstring]
|
||||
if def._tt_help then
|
||||
return def._tt_help
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
@ -283,6 +283,7 @@ local dispenserdef = {
|
|||
|
||||
local horizontal_def = table.copy(dispenserdef)
|
||||
horizontal_def.description = S("Dispenser")
|
||||
horizontal_def._tt_help = S("9 inventory slots").."\n"..S("Launches item when powered with redstone power")
|
||||
horizontal_def._doc_items_longdesc = S("A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.")
|
||||
horizontal_def._doc_items_usagehelp = S("Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.").."\n\n"..
|
||||
|
||||
|
|
|
@ -148,6 +148,7 @@ local dropperdef = {
|
|||
|
||||
local horizontal_def = table.copy(dropperdef)
|
||||
horizontal_def.description = S("Dropper")
|
||||
horizontal_def._tt_help = S("9 inventory slots").."\n"..S("Drops item when powered with redstone power")
|
||||
horizontal_def._doc_items_longdesc = S("A dropper is a redstone component and a container with 9 inventory slots which, when supplied with redstone power, drops an item or puts it into a container in front of it.")
|
||||
horizontal_def._doc_items_usagehelp = S("Droppers can be placed in 6 possible directions, items will be dropped out of the hole. Use the dropper to access its inventory. Supply it with redstone energy once to make the dropper drop or transfer a random item.")
|
||||
horizontal_def.after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
|
|
|
@ -87,6 +87,7 @@ mesecon.register_node("mcl_observers:observer",
|
|||
},
|
||||
{
|
||||
description = S("Observer"),
|
||||
_tt_help = S("Observes block in front of it and sends a brief redstone pulse when it changes"),
|
||||
_doc_items_longdesc = S("An observer is a redstone component which observes the block in front of it and sends a very short redstone pulse whenever this block changes."),
|
||||
_doc_items_usagehelp = S("Place the observer directly in front of the block you want to observe with the “face” looking at the block. The arrow points to the side of the output, which is at the opposite side of the “face”. You can place your redstone dust or any other component here."),
|
||||
|
||||
|
|
|
@ -97,7 +97,11 @@ mesecon.register_button = function(basename, description, texture, recipeitem, s
|
|||
groups_off.button_push_by_arrow = 1
|
||||
groups_on.button_push_by_arrow = 1
|
||||
end
|
||||
|
||||
local tt = S("Provides redstone power when pushed")
|
||||
tt = tt .. "\n" .. S("Push duration: @1s", string.format("%.1f", button_timer))
|
||||
if push_by_arrow then
|
||||
tt = tt .. "\n" .. S("Pushable by arrow")
|
||||
end
|
||||
minetest.register_node("mesecons_button:button_"..basename.."_off", {
|
||||
drawtype = "nodebox",
|
||||
tiles = {texture},
|
||||
|
@ -113,6 +117,7 @@ mesecon.register_button = function(basename, description, texture, recipeitem, s
|
|||
node_box = boxes_off,
|
||||
groups = groups_off,
|
||||
description = description,
|
||||
_tt_help = tt,
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_usagehelp = buttonuse,
|
||||
on_place = on_button_place,
|
||||
|
|
|
@ -204,6 +204,7 @@ end
|
|||
minetest.register_node("mesecons_commandblock:commandblock_off", {
|
||||
description = S("Command Block"),
|
||||
|
||||
_tt_help = S("Executes server commands when powered by redstone power"),
|
||||
_doc_items_longdesc =
|
||||
S("Command blocks are mighty redstone components which are able to alter reality itself. In other words, they cause the server to execute server commands when they are supplied with redstone power."),
|
||||
_doc_items_usagehelp =
|
||||
|
|
|
@ -181,9 +181,10 @@ boxes = {
|
|||
}
|
||||
end
|
||||
|
||||
local help, longdesc, usagehelp, icon, on_construct
|
||||
local help, tt, longdesc, usagehelp, icon, on_construct
|
||||
if i == 1 then
|
||||
help = true
|
||||
tt = S("Redstone component").."\n"..S("Restricts power to one direction").."\n"..S("Delays signal").."\n"..S("Output can be locked")
|
||||
longdesc = S("Redstone repeaters are versatile redstone components with multiple purposes: 1. They only allow signals to travel in one direction. 2. They delay the signal. 3. Optionally, they can lock their output in one state.")
|
||||
usagehelp = S("To power a redstone repeater, send a signal in “arrow” direction (the input). The signal goes out on the opposite side (the output) with a delay. To change the delay, use the redstone repeater. The delay is between 0.1 and 0.4 seconds long and can be changed in steps of 0.1 seconds. It is indicated by the position of the moving redstone torch.").."\n"..
|
||||
S("To lock a repeater, send a signal from an adjacent repeater into one of its sides. While locked, the moving redstone torch disappears, the output doesn't change and the input signal is ignored.")
|
||||
|
@ -231,6 +232,7 @@ minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), {
|
|||
description = desc_off,
|
||||
inventory_image = icon,
|
||||
wield_image = icon,
|
||||
_tt_help = tt,
|
||||
_doc_items_create_entry = help,
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_usagehelp = usagehelp,
|
||||
|
|
|
@ -7,6 +7,7 @@ minetest.register_node("mesecons_lightstone:lightstone_off", {
|
|||
groups = {handy=1, mesecon_effector_off = 1, mesecon = 2},
|
||||
is_ground_content = false,
|
||||
description= S("Redstone Lamp"),
|
||||
_tt_help = S("Glows when powered by redstone power"),
|
||||
_doc_items_longdesc = S("Redstone lamps are simple redstone components which glow brightly (light level @1) when they receive redstone power.", light),
|
||||
sounds = mcl_sounds.node_sound_glass_defaults(),
|
||||
mesecons = {effector = {
|
||||
|
|
|
@ -2,6 +2,7 @@ local S = minetest.get_translator("mesecons_noteblock")
|
|||
|
||||
minetest.register_node("mesecons_noteblock:noteblock", {
|
||||
description = S("Note Block"),
|
||||
_tt_help = S("Plays a musical note when powered by redstone power"),
|
||||
_doc_items_longdesc = S("A note block is a musical block which plays one of many musical notes and different intruments when it is punched or supplied with redstone power."),
|
||||
_doc_items_usagehelp = S("Use the note block to choose the next musical note (there are 25 semitones, or 2 octaves). The intrument played depends on the material of the block below the note block:").."\n\n"..
|
||||
|
||||
|
|
|
@ -178,6 +178,7 @@ local usagehelp_piston = S("This block can have one of 6 possible orientations."
|
|||
-- offstate
|
||||
minetest.register_node("mesecons_pistons:piston_normal_off", {
|
||||
description = S("Piston"),
|
||||
_tt_help = S("Pushes block when powered by redstone power"),
|
||||
_doc_items_longdesc = S("A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however."),
|
||||
_doc_items_usagehelp = usagehelp_piston,
|
||||
tiles = {
|
||||
|
@ -280,6 +281,7 @@ local pistonspec_sticky = {
|
|||
-- offstate
|
||||
minetest.register_node("mesecons_pistons:piston_sticky_off", {
|
||||
description = S("Sticky Piston"),
|
||||
_tt_help = S("Pushes or pulls block when powered by redstone power"),
|
||||
_doc_items_longdesc = S("A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled."),
|
||||
_doc_items_usagehelp = usagehelp_piston,
|
||||
|
||||
|
|
|
@ -99,6 +99,16 @@ function mesecon.register_pressure_plate(basename, description, textures_off, te
|
|||
if not longdesc then
|
||||
longdesc = S("A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it.")
|
||||
end
|
||||
local tt = S("Provides redstone power when pushed")
|
||||
if not activated_by then
|
||||
tt = tt .. "\n" .. S("Pushed by players, mobs and objects")
|
||||
elseif activated_by.mob and activated_by.player then
|
||||
tt = tt .. "\n" .. S("Pushed by players and mobs")
|
||||
elseif activated_by.mob then
|
||||
tt = tt .. "\n" .. S("Pushed by mobs")
|
||||
elseif activated_by.player then
|
||||
tt = tt .. "\n" .. S("Pushed by players")
|
||||
end
|
||||
|
||||
mesecon.register_node(basename, {
|
||||
drawtype = "nodebox",
|
||||
|
@ -125,6 +135,7 @@ function mesecon.register_pressure_plate(basename, description, textures_off, te
|
|||
|
||||
mesecons = {receptor = { state = mesecon.state.off, rules = mesecon.rules.pplate }},
|
||||
_doc_items_longdesc = longdesc,
|
||||
_tt_help = tt,
|
||||
},{
|
||||
node_box = pp_box_on,
|
||||
selection_box = pp_box_on,
|
||||
|
|
|
@ -58,6 +58,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_off", {
|
|||
},
|
||||
groups = {handy=1,axey=1, material_wood=1},
|
||||
description=S("Daylight Sensor"),
|
||||
_tt_help = S("Provides redstone power when in sunlight") .. "\n" ..S("Can be inverted"),
|
||||
_doc_items_longdesc = S("Daylight sensors are redstone components which provide redstone power when they are in sunlight and no power otherwise. They can also be inverted.").."\n"..
|
||||
S("In inverted state, they provide redstone power when they are not in sunlight and no power otherwise."),
|
||||
_doc_items_usagehelp = S("Use the daylight sensor to toggle its state."),
|
||||
|
|
|
@ -192,6 +192,7 @@ mcl_torches.register_torch("mesecon_torch_on", S("Redstone Torch"),
|
|||
|
||||
minetest.register_node("mesecons_torch:redstoneblock", {
|
||||
description = S("Block of Redstone"),
|
||||
_tt_help = S("Provides redstone power"),
|
||||
_doc_items_longdesc = S("A block of redstone permanently supplies redstone power to its surrounding blocks."),
|
||||
tiles = {"redstone_redstone_block.png"},
|
||||
stack_max = 64,
|
||||
|
|
|
@ -47,6 +47,7 @@ minetest.register_node("mesecons_walllever:wall_lever_off", {
|
|||
groups = {handy=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, attached_node_facedir=1},
|
||||
is_ground_content = false,
|
||||
description=S("Lever"),
|
||||
_tt_help = S("Provides redstone power when flipped on"),
|
||||
_doc_items_longdesc = S("A lever is a redstone component which can be flipped on and off. It supplies redstone power to adjacent blocks while it is in the “on” state."),
|
||||
_doc_items_usagehelp = S("Use the lever to flip it on or off."),
|
||||
on_rightclick = function (pos, node)
|
||||
|
|
|
@ -217,7 +217,7 @@ local function register_wires()
|
|||
local tiles_off = { crossing_off, crossing_off, straight0_off, straight1_off, straight0_off, straight1_off }
|
||||
local tiles_on = { crossing_on, crossing_on, straight0_on, straight1_on, straight0_on, straight1_on }
|
||||
|
||||
local wirehelp, longdesc, usagehelp, img, desc_off, desc_on
|
||||
local wirehelp, tt, longdesc, usagehelp, img, desc_off, desc_on
|
||||
if nodeid == "00000000" then
|
||||
-- Non-connected redstone wire
|
||||
nodebox.fixed = {-8/16, -.5, -8/16, 8/16, -.5+1/64, 8/16}
|
||||
|
@ -225,6 +225,7 @@ local function register_wires()
|
|||
tiles_off = { dot_off, dot_off, "blank.png", "blank.png", "blank.png", "blank.png" }
|
||||
tiles_on = { dot_on, dot_on, "blank.png", "blank.png", "blank.png", "blank.png" }
|
||||
|
||||
tt = S("Transmits redstone power, powers mechanisms")
|
||||
longdesc = S("Redstone is a versatile conductive mineral which transmits redstone power. It can be placed on the ground as a trail.").."\n"..
|
||||
S("A redstone trail can be in two states: Powered or not powered. A powered redstone trail will power (and thus activate) adjacent redstone components.").."\n"..
|
||||
S("Redstone power can be received from various redstone components, such as a block of redstone or a button. Redstone power is used to activate numerous mechanisms, such as redstone lamps or pistons.")
|
||||
|
@ -259,6 +260,7 @@ S("Read the help entries on the other redstone components to learn how redstone
|
|||
description = desc_off,
|
||||
inventory_image = img,
|
||||
wield_image = img,
|
||||
_tt_help = tt,
|
||||
_doc_items_create_entry = wirehelp,
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_usagehelp = usagehelp,
|
||||
|
|
|
@ -449,6 +449,7 @@ S("• Tool + Tool: Place two tools of the same type in the input slots. The “
|
|||
S("• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.").."\n"..
|
||||
S("Armor counts as a tool. It is possible to repair and rename a tool in a single step.").."\n\n"..
|
||||
S("The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.")
|
||||
anvildef0._tt_help = S("Repair and rename items")
|
||||
|
||||
local anvildef1 = table.copy(anvildef)
|
||||
anvildef1.description = S("Slightly Damaged Anvil")
|
||||
|
|
|
@ -89,6 +89,7 @@ end
|
|||
-- TODO: The armor stand should be an entity
|
||||
minetest.register_node("mcl_armor_stand:armor_stand", {
|
||||
description = S("Armor Stand"),
|
||||
_tt_help = S("Display pieces of armor"),
|
||||
_doc_items_longdesc = S("An armor stand is a decorative object which can display different pieces of armor. Anything which players can wear as armor can also be put on an armor stand."),
|
||||
_doc_items_usagehelp = S("Just place an armor item on the armor stand. To take the top piece of armor from the armor stand, select your hand and use the place key on the armor stand."),
|
||||
drawtype = "mesh",
|
||||
|
|
|
@ -195,6 +195,7 @@ end
|
|||
-- Standing banner node
|
||||
-- This one is also used for the help entry to avoid spamming the help with 16 entries.
|
||||
minetest.register_node("mcl_banners:standing_banner", {
|
||||
_tt_help = S("Paintable"),
|
||||
_doc_items_entry_name = "Banner",
|
||||
_doc_items_image = "mcl_banners_item_base.png^mcl_banners_item_overlay.png",
|
||||
_doc_items_longdesc = S("Banners are tall colorful decorative blocks. They can be placed on the floor and at walls. Banners can be emblazoned with a variety of patterns using a lot of dye in crafting."),
|
||||
|
|
|
@ -66,6 +66,7 @@ function mcl_beds.register_bed(name, def)
|
|||
end
|
||||
minetest.register_node(name .. "_bottom", {
|
||||
description = def.description,
|
||||
_tt_help = S("Allows you to sleep"),
|
||||
_doc_items_longdesc = def._doc_items_longdesc or beddesc,
|
||||
_doc_items_usagehelp = def._doc_items_usagehelp or beduse,
|
||||
_doc_items_create_entry = def._doc_items_create_entry,
|
||||
|
|
|
@ -110,6 +110,7 @@ end
|
|||
-- Book and Quill
|
||||
minetest.register_craftitem("mcl_books:writable_book", {
|
||||
description = S("Book and Quill"),
|
||||
_tt_help = S("Write down some notes"),
|
||||
_doc_items_longdesc = S("This item can be used to write down some notes."),
|
||||
_doc_items_usagehelp = S("Hold it in the hand, then rightclick to read the current notes and edit then. You can edit the text as often as you like. You can also sign the book which turns it into a written book which you can stack, but it can't be edited anymore.").."\n"..
|
||||
S("A book can hold up to 4500 characters. The title length is limited to 64 characters."),
|
||||
|
|
|
@ -20,6 +20,7 @@ local mod_button = minetest.get_modpath("mesecons_button")
|
|||
|
||||
minetest.register_craftitem("mcl_bows:arrow", {
|
||||
description = S("Arrow"),
|
||||
_tt_help = S("Ammunition").."\n"..S("Damage from bow: 1-10").."\n"..S("Damage from dispenser: 3"),
|
||||
_doc_items_longdesc = S("Arrows are ammunition for bows and dispensers.").."\n"..
|
||||
S("An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.").."\n"..
|
||||
S("Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons."),
|
||||
|
|
|
@ -98,6 +98,7 @@ end
|
|||
-- Bow item, uncharged state
|
||||
minetest.register_tool("mcl_bows:bow", {
|
||||
description = S("Bow"),
|
||||
_tt_help = S("Launch arrows"),
|
||||
_doc_items_longdesc = S("Bows are ranged weapons to shoot arrows at your foes.").."\n"..
|
||||
S("The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead."),
|
||||
_doc_items_usagehelp = S("To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot."),
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#!#!#!#Released under CC Attribution-ShareAlike 3.0 Unported #!#!#
|
||||
]]--
|
||||
|
||||
local CAKE_HUNGER_POINTS = 2
|
||||
|
||||
local S = minetest.get_translator("mcl_cake")
|
||||
|
||||
local cake_texture = {"cake_top.png","cake_bottom.png","cake_inner.png","cake_side.png","cake_side.png","cake_side.png"}
|
||||
|
@ -31,6 +33,7 @@ minetest.register_craft({
|
|||
|
||||
minetest.register_node("mcl_cake:cake", {
|
||||
description = S("Cake"),
|
||||
_tt_help = S("With 7 tasty slices!").."\n"..S("Hunger points: +@1 per slice", CAKE_HUNGER_POINTS),
|
||||
_doc_items_longdesc = S("Cakes can be placed and eaten to restore hunger points. A cake has 7 slices. Each slice restores 2 hunger points and 0.4 saturation points. Cakes will be destroyed when dug or when the block below them is broken."),
|
||||
_doc_items_usagehelp = S("Place the cake anywhere, then rightclick it to eat a single slice. You can't eat from the cake when your hunger bar is full."),
|
||||
tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"},
|
||||
|
@ -82,7 +85,7 @@ local register_slice = function(level, nodebox, desc)
|
|||
minetest.record_protection_violation(pos, name)
|
||||
return
|
||||
end
|
||||
local newcake = minetest.do_item_eat(2, ItemStack(after_eat), ItemStack(this), clicker, {type="nothing"})
|
||||
local newcake = minetest.do_item_eat(CAKE_HUNGER_POINTS, ItemStack(after_eat), ItemStack(this), clicker, {type="nothing"})
|
||||
-- Check if we were allowed to eat
|
||||
if newcake:get_name() ~= this or minetest.settings:get_bool("creative_mode") == true then
|
||||
minetest.add_node(pos,{type="node",name=after_eat,param2=0})
|
||||
|
@ -96,7 +99,7 @@ local register_slice = function(level, nodebox, desc)
|
|||
minetest.record_protection_violation(pos, name)
|
||||
return
|
||||
end
|
||||
local newcake = minetest.do_item_eat(2, ItemStack("mcl:cake:cake 0"), ItemStack("mcl_cake:cake_1"), clicker, {type="nothing"})
|
||||
local newcake = minetest.do_item_eat(CAKE_HUNGER_POINTS, ItemStack("mcl:cake:cake 0"), ItemStack("mcl_cake:cake_1"), clicker, {type="nothing"})
|
||||
-- Check if we were allowed to eat
|
||||
if newcake:get_name() ~= this or minetest.settings:get_bool("creative_mode") == true then
|
||||
minetest.remove_node(pos)
|
||||
|
|
|
@ -45,6 +45,7 @@ end
|
|||
-- Empty cauldron
|
||||
minetest.register_node("mcl_cauldrons:cauldron", {
|
||||
description = S("Cauldron"),
|
||||
_tt_help = S("Stores water"),
|
||||
_doc_items_longdesc = S("Cauldrons are used to store water and slowly fill up under rain."),
|
||||
_doc_items_usagehelp = S("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",
|
||||
|
|
|
@ -54,13 +54,15 @@ function watch.register_item(name, image, creative, frame)
|
|||
if doc_mod and not use_doc then
|
||||
doc.add_entry_alias("craftitems", mcl_clock.stereotype, "craftitems", name)
|
||||
end
|
||||
local longdesc, usagehelp
|
||||
local longdesc, usagehelp, tt
|
||||
if use_doc then
|
||||
longdesc = S("Clocks are tools which shows the current time of day in the Overworld.")
|
||||
usagehelp = S("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.")
|
||||
tt = S("Displays time of day in the Overworld")
|
||||
end
|
||||
minetest.register_craftitem(name, {
|
||||
description = S("Clock"),
|
||||
_tt_help = tt,
|
||||
_doc_items_create_entry = use_doc,
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_usagehelp = usagehelp,
|
||||
|
|
|
@ -28,6 +28,7 @@ local hc_desc = S("Terracotta is a basic building material. It comes in many dif
|
|||
local gt_desc = S("Glazed terracotta is a decorative block with a complex pattern. It can be rotated by placing it in different directions.")
|
||||
local cp_desc = S("Concrete powder is used for creating concrete, but it can also be used as decoration itself. It comes in different colors. Concrete powder turns into concrete of the same color when it comes in contact with water.")
|
||||
local c_desc = S("Concrete is a decorative block which comes in many different colors. It is notable for having a very strong and clean color.")
|
||||
local cp_tt = S("Turns into concrete on water contact")
|
||||
|
||||
minetest.register_node("mcl_colorblocks:hardened_clay", {
|
||||
description = S("Terracotta"),
|
||||
|
@ -62,6 +63,7 @@ for _, row in ipairs(block.dyes) do
|
|||
local ldesc_hc, ldesc_gt, ldesc_cp, ldesc_c
|
||||
local create_entry
|
||||
local ename_hc, ename_gt, ename_cp, ename_c
|
||||
local ltt_cp = cp_tt
|
||||
if is_canonical then
|
||||
ldesc_hc = hc_desc
|
||||
ldesc_gt = gt_desc
|
||||
|
@ -91,6 +93,7 @@ for _, row in ipairs(block.dyes) do
|
|||
|
||||
minetest.register_node("mcl_colorblocks:concrete_powder_"..name, {
|
||||
description = sdesc_cp,
|
||||
_tt_help = ltt_cp,
|
||||
_doc_items_longdesc = ldesc_cp,
|
||||
_doc_items_create_entry = create_entry,
|
||||
_doc_items_entry_name = ename_cp,
|
||||
|
|
|
@ -78,14 +78,16 @@ for i,img in ipairs(images) do
|
|||
if i == stereotype_frame then
|
||||
inv = 0
|
||||
end
|
||||
local use_doc, longdesc, usagehelp
|
||||
local use_doc, longdesc, usagehelp, tt
|
||||
use_doc = i == stereotype_frame
|
||||
if use_doc then
|
||||
tt = S("Points to the world origin")
|
||||
longdesc = S("Compasses are tools which point to the world origin (X=0, Z=0) or the spawn point in the Overworld.")
|
||||
end
|
||||
local itemstring = "mcl_compass:"..(i-1)
|
||||
minetest.register_craftitem(itemstring, {
|
||||
description = S("Compass"),
|
||||
_tt_help = tt,
|
||||
_doc_items_create_entry = use_doc,
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_usagehelp = usagehelp,
|
||||
|
|
|
@ -4,6 +4,7 @@ local S = minetest.get_translator("mcl_core")
|
|||
|
||||
minetest.register_node("mcl_core:cactus", {
|
||||
description = S("Cactus"),
|
||||
_tt_help = S("Grows on sand").."\n"..S("Contact damage: @1 per half second", 1),
|
||||
_doc_items_longdesc = S("This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well."),
|
||||
_doc_items_usagehelp = S("A cactus can only be placed on top of another cactus or any sand."),
|
||||
drawtype = "nodebox",
|
||||
|
@ -47,6 +48,7 @@ minetest.register_node("mcl_core:cactus", {
|
|||
|
||||
minetest.register_node("mcl_core:reeds", {
|
||||
description = S("Sugar Canes"),
|
||||
_tt_help = S("Grows on sand or dirt next to water"),
|
||||
_doc_items_longdesc = S("Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well."),
|
||||
_doc_items_usagehelp = S("Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow."),
|
||||
drawtype = "plantlike",
|
||||
|
|
|
@ -56,6 +56,7 @@ minetest.register_node("mcl_core:slimeblock", {
|
|||
|
||||
minetest.register_node("mcl_core:cobweb", {
|
||||
description = S("Cobweb"),
|
||||
_tt_help = S("Slows down movement"),
|
||||
_doc_items_longdesc = S("Cobwebs can be walked through, but significantly slow you down."),
|
||||
drawtype = "plantlike",
|
||||
paramtype2 = "degrotate",
|
||||
|
|
|
@ -2,6 +2,7 @@ local S = minetest.get_translator("mcl_crafting_table")
|
|||
|
||||
minetest.register_node("mcl_crafting_table:crafting_table", {
|
||||
description = S("Crafting Table"),
|
||||
_tt_help = S("Gives access to 3×3 crafting grid"),
|
||||
_doc_items_longdesc = S("A crafting table is a block which grants you access to a 3×3 crafting grid which allows you to perform advanced crafts."),
|
||||
_doc_items_usagehelp = S("Rightclick the crafting table to access the 3×3 crafting grid."),
|
||||
_doc_items_hidden = false,
|
||||
|
|
|
@ -322,6 +322,7 @@ end
|
|||
minetest.register_craftitem("mcl_dye:white", {
|
||||
inventory_image = "mcl_dye_white.png",
|
||||
description = S("Bone Meal"),
|
||||
_tt_help = S("Speeds up plant growth"),
|
||||
_doc_items_longdesc = S("Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants."),
|
||||
_doc_items_usagehelp = S("Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place."),
|
||||
stack_max = 64,
|
||||
|
@ -359,6 +360,7 @@ minetest.register_craftitem("mcl_dye:white", {
|
|||
|
||||
minetest.register_craftitem("mcl_dye:brown", {
|
||||
inventory_image = "mcl_dye_brown.png",
|
||||
_tt_help = S("Grows at the side of jungle trees"),
|
||||
_doc_items_longdesc = S("Cocoa beans are a brown dye and can be used to plant cocoas."),
|
||||
_doc_items_usagehelp = S("Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa."),
|
||||
description = S("Cocoa Beans"),
|
||||
|
|
|
@ -116,6 +116,7 @@ end
|
|||
|
||||
minetest.register_node("mcl_end:chorus_flower", {
|
||||
description = S("Chorus Flower"),
|
||||
_tt_help = S("Grows on end stone"),
|
||||
_doc_items_longdesc = S("A chorus flower is the living part of a chorus plant. It can grow into a tall chorus plant, step by step. When it grows, it may die on old age eventually. It also dies when it is unable to grow."),
|
||||
_doc_items_usagehelp = S("Place it and wait for it to grow. It can only be placed on top of end stone, on top of a chorus plant stem, or at the side of exactly one chorus plant stem."),
|
||||
tiles = {
|
||||
|
@ -205,6 +206,7 @@ minetest.register_node("mcl_end:chorus_flower", {
|
|||
|
||||
minetest.register_node("mcl_end:chorus_flower_dead", {
|
||||
description = S("Dead Chorus Flower"),
|
||||
_tt_help = S("Grows on end stone"),
|
||||
_doc_items_longdesc = S("This is a part of a chorus plant. It doesn't grow. Chorus flowers die of old age or when they are unable to grow. A dead chorus flower can be harvested to obtain a fresh chorus flower which is able to grow again."),
|
||||
tiles = {
|
||||
"mcl_end_chorus_flower_dead.png",
|
||||
|
@ -543,6 +545,7 @@ end
|
|||
|
||||
minetest.register_craftitem("mcl_end:chorus_fruit", {
|
||||
description = S("Chorus Fruit"),
|
||||
_tt_help = S("Randomly teleports you when eaten"),
|
||||
_doc_items_longdesc = S("A chorus fruit is an edible fruit from the chorus plant which is home to the End. Eating it teleports you to the top of a random solid block nearby, provided you won't end up inside a liquid, solid or harmful blocks. Teleportation might fail if there are very few or no places to teleport to."),
|
||||
wield_image = "mcl_end_chorus_fruit.png",
|
||||
inventory_image = "mcl_end_chorus_fruit.png",
|
||||
|
|
|
@ -74,6 +74,7 @@ minetest.register_entity("mcl_end:ender_eye", {
|
|||
|
||||
minetest.register_craftitem("mcl_end:ender_eye", {
|
||||
description = S("Eye of Ender"),
|
||||
_tt_help = S("Guides you to an End portal shrine"),
|
||||
_doc_items_longdesc = S("This item is used to locate End portal shrines in the Overworld and to activate End portals.") .. "\n" .. S("NOTE: The End dimension is currently incomplete and might change in future versions."),
|
||||
_doc_items_usagehelp = S("Use the attack key to release the eye of ender. It will rise and fly in the horizontal direction of the closest end portal shrine. If you're very close, the eye of ender will take the direct path to the End portal shrine instead. After a few seconds, it stops. It may drop as an item, but there's a 20% chance it shatters.") .. "\n" .. S("To activate an End portal, eyes of ender need to be placed into each block of an intact End portal frame."),
|
||||
wield_image = "mcl_end_ender_eye.png",
|
||||
|
|
|
@ -2,6 +2,7 @@ local S = minetest.get_translator("mcl_farming")
|
|||
|
||||
minetest.register_craftitem("mcl_farming:beetroot_seeds", {
|
||||
description = S("Beetroot Seeds"),
|
||||
_tt_help = S("Can be sown on farmland"),
|
||||
_doc_items_longdesc = S("Grows into a beetroot plant. Chickens like beetroot seeds."),
|
||||
_doc_items_usagehelp = S("Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds."),
|
||||
groups = { craftitem=1 },
|
||||
|
|
|
@ -82,6 +82,7 @@ minetest.register_node("mcl_farming:carrot", {
|
|||
|
||||
minetest.register_craftitem("mcl_farming:carrot_item", {
|
||||
description = S("Carrot"),
|
||||
_tt_help = S("Can be planted on farmland"),
|
||||
_doc_items_longdesc = S("Carrots can be eaten and planted. Pigs and rabbits like carrots."),
|
||||
_doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."),
|
||||
inventory_image = "farming_carrot.png",
|
||||
|
|
|
@ -49,16 +49,26 @@ local hoe_on_place_function = function(wear_divisor)
|
|||
end
|
||||
end
|
||||
|
||||
local uses = {
|
||||
wood = 60,
|
||||
stone = 132,
|
||||
iron = 251,
|
||||
gold = 33,
|
||||
diamond = 1562,
|
||||
}
|
||||
|
||||
local hoe_tt = S("Turns block into farmland")
|
||||
local hoe_longdesc = S("Hoes are essential tools for growing crops. They are used to create farmland in order to plant seeds on it. Hoes can also be used as very weak weapons in a pinch.")
|
||||
local hoe_usagehelp = S("Use the hoe on a cultivatable block (by rightclicking it) to turn it into farmland. Dirt, grass blocks and grass paths are cultivatable blocks. Using a hoe on coarse dirt turns it into dirt.")
|
||||
|
||||
minetest.register_tool("mcl_farming:hoe_wood", {
|
||||
description = S("Wood Hoe"),
|
||||
_tt_help = hoe_tt.."\n"..S("Uses: @1", uses.wood),
|
||||
_doc_items_longdesc = hoe_longdesc,
|
||||
_doc_items_usagehelp = hoe_usagehelp,
|
||||
_doc_items_hidden = false,
|
||||
inventory_image = "farming_tool_woodhoe.png",
|
||||
on_place = hoe_on_place_function(60),
|
||||
on_place = hoe_on_place_function(uses.wood),
|
||||
groups = { tool=1, hoe=1 },
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1,
|
||||
|
@ -91,10 +101,11 @@ minetest.register_craft({
|
|||
|
||||
minetest.register_tool("mcl_farming:hoe_stone", {
|
||||
description = S("Stone Hoe"),
|
||||
_tt_help = hoe_tt.."\n"..S("Uses: @1", uses.stone),
|
||||
_doc_items_longdesc = hoe_longdesc,
|
||||
_doc_items_usagehelp = hoe_usagehelp,
|
||||
inventory_image = "farming_tool_stonehoe.png",
|
||||
on_place = hoe_on_place_function(132),
|
||||
on_place = hoe_on_place_function(uses.stone),
|
||||
groups = { tool=1, hoe=1 },
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.5,
|
||||
|
@ -122,10 +133,11 @@ minetest.register_craft({
|
|||
|
||||
minetest.register_tool("mcl_farming:hoe_iron", {
|
||||
description = S("Iron Hoe"),
|
||||
_tt_help = hoe_tt.."\n"..S("Uses: @1", uses.iron),
|
||||
_doc_items_longdesc = hoe_longdesc,
|
||||
_doc_items_usagehelp = hoe_usagehelp,
|
||||
inventory_image = "farming_tool_steelhoe.png",
|
||||
on_place = hoe_on_place_function(251),
|
||||
on_place = hoe_on_place_function(uses.iron),
|
||||
groups = { tool=1, hoe=1 },
|
||||
tool_capabilities = {
|
||||
-- 1/3
|
||||
|
@ -161,10 +173,11 @@ minetest.register_craft({
|
|||
|
||||
minetest.register_tool("mcl_farming:hoe_gold", {
|
||||
description = S("Golden Hoe"),
|
||||
_tt_help = hoe_tt.."\n"..S("Uses: @1", uses.gold),
|
||||
_doc_items_longdesc = hoe_longdesc,
|
||||
_doc_items_usagehelp = hoe_usagehelp,
|
||||
inventory_image = "farming_tool_goldhoe.png",
|
||||
on_place = hoe_on_place_function(33),
|
||||
on_place = hoe_on_place_function(uses.gold),
|
||||
groups = { tool=1, hoe=1 },
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1,
|
||||
|
@ -201,10 +214,11 @@ minetest.register_craft({
|
|||
|
||||
minetest.register_tool("mcl_farming:hoe_diamond", {
|
||||
description = S("Diamond Hoe"),
|
||||
_tt_help = hoe_tt.."\n"..S("Uses: @1", uses.diamond),
|
||||
_doc_items_longdesc = hoe_longdesc,
|
||||
_doc_items_usagehelp = hoe_usagehelp,
|
||||
inventory_image = "farming_tool_diamondhoe.png",
|
||||
on_place = hoe_on_place_function(1562),
|
||||
on_place = hoe_on_place_function(uses.diamond),
|
||||
groups = { tool=1, hoe=1 },
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.25,
|
||||
|
|
|
@ -3,6 +3,7 @@ local S = minetest.get_translator("mcl_farming")
|
|||
-- Seeds
|
||||
minetest.register_craftitem("mcl_farming:melon_seeds", {
|
||||
description = S("Melon Seeds"),
|
||||
_tt_help = S("Can be sown on farmland"),
|
||||
_doc_items_longdesc = S("Grows into a melon stem which in turn grows melons. Chickens like melon seeds."),
|
||||
_doc_items_usagehelp = S("Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melon stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem will attempt to grow a melon at the side. Rightclick an animal to feed it melon seeds."),
|
||||
stack_max = 64,
|
||||
|
|
|
@ -87,6 +87,7 @@ minetest.register_node("mcl_farming:potato", {
|
|||
|
||||
minetest.register_craftitem("mcl_farming:potato_item", {
|
||||
description = S("Potato"),
|
||||
_tt_help = S("Can be planted on farmland"),
|
||||
_doc_items_longdesc = S("Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes."),
|
||||
_doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."),
|
||||
inventory_image = "farming_potato.png",
|
||||
|
|
|
@ -9,6 +9,7 @@ end
|
|||
-- Seeds
|
||||
minetest.register_craftitem("mcl_farming:pumpkin_seeds", {
|
||||
description = S("Pumpkin Seeds"),
|
||||
_tt_help = S("Can be sown on farmland"),
|
||||
_doc_items_longdesc = S("Grows into a pumpkin stem which in turn grows pumpkins. Chickens like pumpkin seeds."),
|
||||
_doc_items_usagehelp = S("Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkin stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem attempts to grow a pumpkin next to it. Rightclick an animal to feed it pumpkin seeds."),
|
||||
stack_max = 64,
|
||||
|
|
|
@ -3,6 +3,7 @@ local S = minetest.get_translator("mcl_farming")
|
|||
minetest.register_node("mcl_farming:soil", {
|
||||
tiles = {"mcl_farming_farmland_dry.png", "default_dirt.png"},
|
||||
description = S("Farmland"),
|
||||
_tt_help = S("Surface for farming plants").."\n"..S("Can become wet"),
|
||||
_doc_items_longdesc = S("Farmland is used for farming, a necessary surface to plant crops. It is created when a hoe is used on dirt or a similar block. Plants are able to grow on farmland, but slowly. Farmland will become hydrated farmland (on which plants grow faster) when it rains or a water source is nearby. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it."),
|
||||
drop = "mcl_core:dirt",
|
||||
drawtype = "nodebox",
|
||||
|
|
|
@ -3,6 +3,7 @@ local S = minetest.get_translator("mcl_farming")
|
|||
minetest.register_craftitem("mcl_farming:wheat_seeds", {
|
||||
-- Original Minecraft name: “Seeds”
|
||||
description = S("Wheat Seeds"),
|
||||
_tt_help = S("Can be sown on farmland"),
|
||||
_doc_items_longdesc = S("Grows into a wheat plant. Chickens like wheat seeds."),
|
||||
_doc_items_usagehelp = S("Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds."),
|
||||
groups = { craftitem=1 },
|
||||
|
|
|
@ -3,6 +3,7 @@ local S = minetest.get_translator("mcl_fire")
|
|||
-- Fire Charge
|
||||
minetest.register_craftitem("mcl_fire:fire_charge", {
|
||||
description = S("Fire Charge"),
|
||||
_tt_help = S("Dispenser projectile").."\n"..S("Starts fires and ignites blocks"),
|
||||
_doc_items_longdesc = S("Fire charges are primarily projectiles which can be launched from dispensers, they will fly in a straight line and burst into a fire on impact. Alternatively, they can be used to ignite fires directly."),
|
||||
_doc_items_usagehelp = S("Put the fire charge into a dispenser and supply it with redstone power to launch it. To ignite a fire directly, simply place the fire charge on the ground, which uses it up."),
|
||||
inventory_image = "mcl_fire_fire_charge.png",
|
||||
|
|
|
@ -3,6 +3,7 @@ local S = minetest.get_translator("mcl_fire")
|
|||
-- Flint and Steel
|
||||
minetest.register_tool("mcl_fire:flint_and_steel", {
|
||||
description = S("Flint and Steel"),
|
||||
_tt_help = S("Starts fires and ignites blocks"),
|
||||
_doc_items_longdesc = S("Flint and steel is a tool to start fires and ignite blocks."),
|
||||
_doc_items_usagehelp = S("Rightclick the surface of a block to attempt to light a fire in front of it or ignite the block. A few blocks have an unique reaction when ignited."),
|
||||
inventory_image = "mcl_fire_flint_and_steel.png",
|
||||
|
|
|
@ -308,6 +308,7 @@ end)
|
|||
-- Fishing Rod
|
||||
minetest.register_tool("mcl_fishing:fishing_rod", {
|
||||
description = S("Fishing Rod"),
|
||||
_tt_help = S("Catch fish in water"),
|
||||
_doc_items_longdesc = S("Fishing rods can be used to catch fish."),
|
||||
_doc_items_usagehelp = S("Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?"),
|
||||
groups = { tool=1 },
|
||||
|
|
|
@ -29,6 +29,7 @@ local cubes = {
|
|||
|
||||
minetest.register_node("mcl_flowerpots:flower_pot", {
|
||||
description = S("Flower Pot"),
|
||||
_tt_help = S("Can holds a small flower or plant"),
|
||||
_doc_items_longdesc = S("Flower pots are decorative blocks in which flowers and other small plants can be placed."),
|
||||
_doc_items_usagehelp = S("Just place a plant on the flower pot. Flower pots can hold small flowers (not higher than 1 block), saplings, ferns, dead bushes, mushrooms and cacti. Rightclick a potted plant to retrieve the plant."),
|
||||
drawtype = "mesh",
|
||||
|
|
|
@ -295,6 +295,7 @@ end
|
|||
|
||||
minetest.register_node("mcl_furnaces:furnace", {
|
||||
description = S("Furnace"),
|
||||
_tt_help = S("Uses fuel to smelt or cook items"),
|
||||
_doc_items_longdesc = S("Furnaces cook or smelt several items, using a furnace fuel, into something else."),
|
||||
_doc_items_usagehelp =
|
||||
S("Use the furnace to open the furnace menu. Place a furnace fuel in the lower slot and the source material in the upper slot. The furnace will slowly use its fuel to smelt the item. The result will be placed into the output slot at the right side.").."\n"..
|
||||
|
|
|
@ -125,6 +125,7 @@ local def_hopper = {
|
|||
-- Enabled downwards hopper
|
||||
local def_hopper_enabled = table.copy(def_hopper)
|
||||
def_hopper_enabled.description = S("Hopper")
|
||||
def_hopper_enabled._tt_help = S("5 inventory slots").."\n"..S("Collects items from above, moves items to container below").."\n"..S("Can be disabled with redstone power")
|
||||
def_hopper_enabled._doc_items_longdesc = S("Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempt to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers.").."\n\n"..
|
||||
|
||||
S("Hoppers interact with containers the following way:").."\n"..
|
||||
|
|
|
@ -101,6 +101,7 @@ end
|
|||
|
||||
minetest.register_node("mcl_itemframes:item_frame",{
|
||||
description = S("Item Frame"),
|
||||
_tt_help = S("Holds an item"),
|
||||
_doc_items_longdesc = S("Item frames are decorative blocks in which items can be placed."),
|
||||
_doc_items_usagehelp = S("Just place any item on the item frame. Use the item frame again to retrieve the item."),
|
||||
drawtype = "mesh",
|
||||
|
|
|
@ -126,6 +126,7 @@ end
|
|||
-- Jukebox
|
||||
minetest.register_node("mcl_jukebox:jukebox", {
|
||||
description = S("Jukebox"),
|
||||
_tt_help = S("Uses music discs to play music"),
|
||||
_doc_items_longdesc = S("Jukeboxes play music when they're supplied with a music disc."),
|
||||
_doc_items_usagehelp = S("Place a music disc into an empty jukebox to insert the music disc and play music. If the jukebox already has a music disc, you will retrieve this music disc first. The music can only be heard by you, not by other players."),
|
||||
tiles = {"mcl_jukebox_top.png", "mcl_jukebox_side.png", "mcl_jukebox_side.png"},
|
||||
|
|
|
@ -34,6 +34,7 @@ minetest.register_craftitem("mcl_maps:empty_map", {
|
|||
-- has a very greatly zoomed-out version and even a radar mode
|
||||
minetest.register_craftitem("mcl_maps:filled_map", {
|
||||
description = S("Map"),
|
||||
_tt_help = S("Enables minimap"),
|
||||
_doc_items_longdesc = S("Maps show your surroundings as you explore the world."),
|
||||
_doc_items_usagehelp = S("Hold the map in any of the hotbar slots. This allows you to access the minimap by pressing the minimap key (see controls settings).").."\n"..
|
||||
S("In Creative Mode, you don't need this item; the minimap is always available."),
|
||||
|
|
|
@ -146,6 +146,7 @@ end
|
|||
-- TODO: Clear *all* status effects
|
||||
minetest.register_craftitem("mcl_mobitems:milk_bucket", {
|
||||
description = S("Milk"),
|
||||
_tt_help = S("Cures poison"),
|
||||
_doc_items_longdesc = S("Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will cure all forms of poisoning, but restores no hunger points."),
|
||||
_doc_items_usagehelp = "Rightclick to drink the milk.",
|
||||
inventory_image = "mcl_mobitems_bucket_milk.png",
|
||||
|
@ -272,6 +273,7 @@ minetest.register_craftitem("mcl_mobitems:rabbit_foot", {
|
|||
|
||||
minetest.register_craftitem("mcl_mobitems:saddle", {
|
||||
description = S("Saddle"),
|
||||
_tt_help = S("Can be placed on animals to ride them"),
|
||||
_doc_items_longdesc = S("Saddles can be put on some animals in order to mount them."),
|
||||
_doc_items_usagehelp = "Rightclick an animal (with the saddle in your hand) to try put on the saddle. Saddles fit on horses, mules, donkeys and pigs. Horses, mules and donkeys need to be tamed first, otherwise they'll reject the saddle. Saddled animals can be mounted by rightclicking them again.",
|
||||
wield_image = "mcl_mobitems_saddle.png",
|
||||
|
@ -316,6 +318,7 @@ minetest.register_craftitem("mcl_mobitems:gunpowder", {
|
|||
|
||||
minetest.register_tool("mcl_mobitems:carrot_on_a_stick", {
|
||||
description = S("Carrot on a Stick"),
|
||||
_tt_help = S("Lets you ride a saddled pig"),
|
||||
_doc_items_longdesc = S("A carrot on a stick can be used on saddled pigs to ride them."),
|
||||
_doc_items_usagehelp = S("Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick."),
|
||||
wield_image = "mcl_mobitems_carrot_on_a_stick.png",
|
||||
|
|
|
@ -266,6 +266,7 @@ minetest.register_node("mcl_mobspawners:spawner", {
|
|||
paramtype = "light",
|
||||
walkable = true,
|
||||
description = S("Mob Spawner"),
|
||||
_tt_help = S("Makes mobs appear"),
|
||||
_doc_items_longdesc = S("A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light."),
|
||||
_doc_items_usagehelp = S("If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level."),
|
||||
groups = {pickaxey=1, material_stone=1, deco_block=1},
|
||||
|
|
|
@ -23,6 +23,7 @@ local register_block = function(subname, description, tiles, is_ground_content)
|
|||
is_ground_content = false,
|
||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||
after_dig_node = spawn_silverfish,
|
||||
_tt_help = S("Hides a silverfish"),
|
||||
_doc_items_longdesc = S("An infested block is a block from which a silverfish will pop out when it is broken. It looks identical to its normal counterpart."),
|
||||
_mcl_hardness = 0,
|
||||
_mcl_blast_resistance = 3.75,
|
||||
|
|
|
@ -23,12 +23,15 @@ local longdesc_intro_red = S("Red mushrooms are fungi which grow and spread in d
|
|||
local longdesc_append = S("A single mushroom of this species will slowly spread over time towards a random solid opaque block with a light level of 12 or lower in a 3×3×3 cube around the mushroom. It stops spreading when there are 5 or more mushrooms of the same species within an area of 9×3×9 blocks around the mushroom.").."\n"..
|
||||
S("Mushrooms will eventually uproot at a light level of 12 or higher. On mycelium or podzol, they survive and spread at any light level.")
|
||||
|
||||
local tt_help = S("Grows on podzol, mycelium and other blocks").."\n"..S("Spreads in darkness")
|
||||
|
||||
local usagehelp = S("This mushroom can be placed on mycelium and podzol at any light level. It can also be placed on blocks which are both solid and opaque, as long as the light level at daytime is not higher than 12.")
|
||||
|
||||
minetest.register_node("mcl_mushrooms:mushroom_brown", {
|
||||
description = S("Brown Mushroom"),
|
||||
_doc_items_longdesc = longdesc_intro_brown .. "\n\n" .. longdesc_append,
|
||||
_doc_items_usagehelp = usagehelp,
|
||||
_tt_help = tt_help,
|
||||
drawtype = "plantlike",
|
||||
tiles = { "farming_mushroom_brown.png" },
|
||||
inventory_image = "farming_mushroom_brown.png",
|
||||
|
@ -52,6 +55,7 @@ minetest.register_node("mcl_mushrooms:mushroom_red", {
|
|||
description = S("Red Mushroom"),
|
||||
_doc_items_longdesc = longdesc_intro_red .. "\n\n" .. longdesc_append,
|
||||
_doc_items_usagehelp = usagehelp,
|
||||
_tt_help = tt_help,
|
||||
drawtype = "plantlike",
|
||||
tiles = { "farming_mushroom_red.png" },
|
||||
inventory_image = "farming_mushroom_red.png",
|
||||
|
|
|
@ -85,6 +85,7 @@ minetest.register_node("mcl_nether:netherrack", {
|
|||
|
||||
minetest.register_node("mcl_nether:magma", {
|
||||
description = S("Magma Block"),
|
||||
_tt_help = S("Deals damage when standing on it"),
|
||||
_doc_items_longdesc = S("Magma blocks are hot solid blocks which hurt anyone standing on it, unless they have fire resistance. Starting a fire on this block will create an eternal fire."),
|
||||
stack_max = 64,
|
||||
tiles = {{name="mcl_nether_magma.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.5}}},
|
||||
|
@ -113,6 +114,7 @@ minetest.register_node("mcl_nether:magma", {
|
|||
|
||||
minetest.register_node("mcl_nether:soul_sand", {
|
||||
description = S("Soul Sand"),
|
||||
_tt_help = S("Reduces walking speed"),
|
||||
_doc_items_longdesc = S("Soul sand is a block from the Nether. One can only slowly walk on soul sand. The slowing effect is amplified when the soul sand is on top of ice, packed ice or a slime block."),
|
||||
stack_max = 64,
|
||||
tiles = {"mcl_nether_soul_sand.png"},
|
||||
|
|
|
@ -97,6 +97,7 @@ minetest.register_node("mcl_nether:nether_wart", {
|
|||
|
||||
minetest.register_craftitem("mcl_nether:nether_wart_item", {
|
||||
description = S("Nether Wart"),
|
||||
_tt_help = S("Grows on soul sand"),
|
||||
_doc_items_longdesc = S("Nether warts are plants home to the Nether. They can be planted on soul sand and grow in 4 stages."),
|
||||
_doc_items_usagehelp = S("Place this item on soul sand to plant it and watch it grow."),
|
||||
inventory_image = "mcl_nether_nether_wart.png",
|
||||
|
|
|
@ -76,11 +76,15 @@ for c=1, #corals do
|
|||
local doc_desc_block = S("Coral blocks live in the oceans and need a water source next to them to survive. Without water, they die off.")
|
||||
local doc_desc_coral = S("Corals grow on top of coral blocks and need to be inside a water source to survive. Without water, it will die off, as well as the coral block below.")
|
||||
local doc_desc_fan = S("Corals fans grow on top of coral blocks and need to be inside a water source to survive. Without water, it will die off, as well as the coral block below.")
|
||||
local tt_block = S("Needs water to live")
|
||||
local tt_coral_dead = S("Grows on coral block of same species")
|
||||
local tt_coral = tt_coral_dead .. S("Needs water to live")
|
||||
|
||||
-- Coral Block
|
||||
minetest.register_node("mcl_ocean:"..id.."_coral_block", {
|
||||
description = corals[c][2],
|
||||
_doc_items_longdesc = doc_desc_block,
|
||||
_tt_help = tt_block,
|
||||
tiles = { "mcl_ocean_"..id.."_coral_block.png" },
|
||||
groups = { pickaxey = 1, building_block = 1, coral=1, coral_block=1, coral_species=c, },
|
||||
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
||||
|
@ -102,6 +106,7 @@ for c=1, #corals do
|
|||
minetest.register_node("mcl_ocean:"..id.."_coral", {
|
||||
description = corals[c][4],
|
||||
_doc_items_longdesc = doc_desc_coral,
|
||||
_tt_help = tt_coral,
|
||||
drawtype = "plantlike_rooted",
|
||||
paramtype = "light",
|
||||
paramtype2 = "meshoptions",
|
||||
|
@ -134,6 +139,7 @@ for c=1, #corals do
|
|||
minetest.register_node("mcl_ocean:dead_"..id.."_coral", {
|
||||
description = corals[c][5],
|
||||
_doc_items_create_entry = false,
|
||||
_tt_help = tt_coral_dead,
|
||||
drawtype = "plantlike_rooted",
|
||||
paramtype = "light",
|
||||
paramtype2 = "meshoptions",
|
||||
|
@ -167,6 +173,7 @@ for c=1, #corals do
|
|||
minetest.register_node("mcl_ocean:"..id.."_coral_fan", {
|
||||
description = corals[c][6],
|
||||
_doc_items_longdesc = doc_desc_fan,
|
||||
_tt_help = tt_coral,
|
||||
drawtype = "plantlike_rooted",
|
||||
paramtype = "light",
|
||||
paramtype2 = "meshoptions",
|
||||
|
@ -199,6 +206,7 @@ for c=1, #corals do
|
|||
minetest.register_node("mcl_ocean:dead_"..id.."_coral_fan", {
|
||||
description = corals[c][7],
|
||||
_doc_items_create_entry = false,
|
||||
_tt_help = tt_coral_dead,
|
||||
drawtype = "plantlike_rooted",
|
||||
paramtype = "light",
|
||||
paramtype2 = "meshoptions",
|
||||
|
|
|
@ -152,9 +152,10 @@ for s=1, #surfaces do
|
|||
sounds.dig = leaf_sounds.dig
|
||||
sounds.dug = leaf_sounds.dug
|
||||
sounds.place = leaf_sounds.place
|
||||
local doc_longdesc, doc_img, desc
|
||||
local tt_help, doc_longdesc, doc_img, desc
|
||||
if surfaces[s][1] == "dirt" then
|
||||
doc_longdesc = S("Kelp grows inside water on top of dirt, sand or gravel.")
|
||||
tt_help = S("Grows in water on dirt, sand, gravel")
|
||||
desc = S("Kelp")
|
||||
doc_create = true
|
||||
doc_img = "mcl_ocean_kelp_item.png"
|
||||
|
@ -162,6 +163,7 @@ for s=1, #surfaces do
|
|||
doc_create = false
|
||||
end
|
||||
minetest.register_node("mcl_ocean:kelp_"..surfaces[s][1], {
|
||||
_tt_help = tt_help,
|
||||
_doc_items_entry_name = desc,
|
||||
_doc_items_longdesc = doc_longdesc,
|
||||
_doc_items_create_entry = doc_create,
|
||||
|
|
|
@ -67,11 +67,12 @@ local ontop = "dead_brain_coral_block"
|
|||
local canonical = "mcl_ocean:sea_pickle_1_"..ontop
|
||||
|
||||
for s=1,4 do
|
||||
local desc, doc_desc, doc_use, doc_create, nici, img, img_off, on_place
|
||||
local desc, doc_desc, doc_use, doc_create, tt_help, nici, img, img_off, on_place
|
||||
if s == 1 then
|
||||
desc = S("Sea Pickle")
|
||||
doc_desc = S("Sea pickles grow on dead brain coral blocks and provide light when underwater. They come in 4 sizes that vary in brightness.")
|
||||
doc_use = S("It can only be placed on top of dead brain coral blocks. Placing a sea pickle on another sea pickle will make it grow and brighter.")
|
||||
tt_help = S("Glows when underwater").."\n"..S("4 possible sizes").."\n"..S("Grows on dead brain coral block")
|
||||
img = "mcl_ocean_sea_pickle_item.png"
|
||||
on_place = sea_pickle_on_place
|
||||
else
|
||||
|
@ -88,6 +89,7 @@ for s=1,4 do
|
|||
|
||||
minetest.register_node("mcl_ocean:sea_pickle_"..s.."_"..ontop, {
|
||||
description = desc,
|
||||
_tt_help = tt_help,
|
||||
_doc_items_create_entry = doc_create,
|
||||
_doc_items_longdesc = doc_desc,
|
||||
_doc_items_usagehelp = doc_use,
|
||||
|
|
|
@ -99,9 +99,10 @@ for s=1, #surfaces do
|
|||
sounds.dig = leaf_sounds.dig
|
||||
sounds.dug = leaf_sounds.dug
|
||||
sounds.place = leaf_sounds.place
|
||||
local doc_longdesc, doc_img, desc
|
||||
local tt_help, doc_longdesc, doc_img, desc
|
||||
if surfaces[s][1] == "dirt" then
|
||||
doc_longdesc = S("Seagrass grows inside water on top of dirt, sand or gravel.")
|
||||
tt_help = S("Grows in water on dirt, sand, gravel")
|
||||
desc = S("Seagrass")
|
||||
doc_create = true
|
||||
doc_img = "mcl_ocean_seagrass.png"
|
||||
|
@ -109,6 +110,7 @@ for s=1, #surfaces do
|
|||
doc_create = false
|
||||
end
|
||||
minetest.register_node("mcl_ocean:seagrass_"..surfaces[s][1], {
|
||||
_tt_help = tt_help,
|
||||
_doc_items_entry_name = desc,
|
||||
_doc_items_longdesc = doc_longdesc,
|
||||
_doc_items_create_entry = doc_create,
|
||||
|
|
|
@ -24,6 +24,7 @@ end
|
|||
-- End portal
|
||||
minetest.register_node("mcl_portals:portal_end", {
|
||||
description = S("End Portal"),
|
||||
_tt_help = S("Used to construct end portals"),
|
||||
_doc_items_longdesc = S("An End portal teleports creatures and objects to the mysterious End dimension (and back!)."),
|
||||
_doc_items_usagehelp = S("Hop into the portal to teleport. Entering an End portal in the Overworld teleports you to a fixed position in the End dimension and creates a 5×5 obsidian platform at your destination. End portals in the End will lead back to your spawn point in the Overworld."),
|
||||
tiles = {
|
||||
|
@ -309,6 +310,7 @@ end
|
|||
|
||||
minetest.register_node("mcl_portals:end_portal_frame", {
|
||||
description = S("End Portal Frame"),
|
||||
_tt_help = S("Used to construct end portals"),
|
||||
_doc_items_longdesc = S("End portal frames are used in the construction of End portals. Each block has a socket for an eye of ender.") .. "\n" .. S("NOTE: The End dimension is currently incomplete and might change in future versions."),
|
||||
_doc_items_usagehelp = S("To create an End portal, you need 12 end portal frames and 12 eyes of ender. The end portal frames have to be arranged around a horizontal 3×3 area with each block facing inward. Any other arrangement will fail.") .. "\n" .. S("Place an eye of ender into each block. The end portal appears in the middle after placing the final eye.") .. "\n" .. S("Once placed, an eye of ender can not be taken back."),
|
||||
groups = { creative_breakable = 1, deco_block = 1, end_portal_frame = 1 },
|
||||
|
|
|
@ -20,6 +20,7 @@ minetest.register_craft({
|
|||
|
||||
minetest.register_craftitem("mcl_potions:glass_bottle", {
|
||||
description = S("Glass Bottle"),
|
||||
_tt_help = S("Liquid container"),
|
||||
_doc_items_longdesc = S("A glass bottle is used as a container for liquids and can be used to collect water directly."),
|
||||
_doc_items_usagehelp = S("To collect water, it on a cauldron with water (which removes a level of water) or any water source (which removes no water)."),
|
||||
inventory_image = "mcl_potions_potion_bottle_empty.png",
|
||||
|
@ -159,6 +160,7 @@ end
|
|||
|
||||
minetest.register_craftitem("mcl_potions:potion_water", {
|
||||
description = S("Water Bottle"),
|
||||
_tt_help = S("No effect"),
|
||||
_doc_items_longdesc = S("Water bottles can be used to fill cauldrons. Drinking water has no effect."),
|
||||
_doc_items_usagehelp = S("Use the “Place” key to drink. Place this item on a cauldron to pour the water into the cauldron."),
|
||||
stack_max = 1,
|
||||
|
@ -203,6 +205,7 @@ minetest.register_craftitem("mcl_potions:potion_water", {
|
|||
|
||||
minetest.register_craftitem("mcl_potions:potion_river_water", {
|
||||
description = S("River Water Bottle"),
|
||||
_tt_help = S("No effect"),
|
||||
_doc_items_longdesc = S("River water bottles can be used to fill cauldrons. Drinking it has no effect."),
|
||||
_doc_items_usagehelp = S("Use the “Place” key to drink. Place this item on a cauldron to pour the river water into the cauldron."),
|
||||
|
||||
|
@ -252,6 +255,7 @@ local how_to_drink = S("Use the “Place” key to drink it.")
|
|||
|
||||
minetest.register_craftitem("mcl_potions:potion_awkward", {
|
||||
description = S("Awkward Potion"),
|
||||
_tt_help = S("No effect"),
|
||||
_doc_items_longdesc = S("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,
|
||||
|
@ -264,6 +268,7 @@ minetest.register_craftitem("mcl_potions:potion_awkward", {
|
|||
})
|
||||
minetest.register_craftitem("mcl_potions:potion_mundane", {
|
||||
description = S("Mundane Potion"),
|
||||
_tt_help = S("No effect"),
|
||||
_doc_items_longdesc = S("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,
|
||||
|
@ -276,6 +281,7 @@ minetest.register_craftitem("mcl_potions:potion_mundane", {
|
|||
})
|
||||
minetest.register_craftitem("mcl_potions:potion_thick", {
|
||||
description = S("Thick Potion"),
|
||||
_tt_help = S("No effect"),
|
||||
_doc_items_longdesc = S("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,
|
||||
|
|
|
@ -278,6 +278,7 @@ end
|
|||
|
||||
minetest.register_node("mcl_signs:wall_sign", {
|
||||
description = S("Sign"),
|
||||
_tt_help = S("Can be written"),
|
||||
_doc_items_longdesc = S("Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them."),
|
||||
_doc_items_usagehelp = S("After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again."),
|
||||
inventory_image = "default_sign.png",
|
||||
|
|
|
@ -37,6 +37,7 @@ end
|
|||
|
||||
minetest.register_node("mcl_sponges:sponge", {
|
||||
description = S("Sponge"),
|
||||
_tt_help = S("Removes water on contact"),
|
||||
_doc_items_longdesc = S("Sponges are blocks which remove water around them when they are placed or come in contact with water, turning it into a wet sponge."),
|
||||
drawtype = "normal",
|
||||
is_ground_content = false,
|
||||
|
@ -95,6 +96,7 @@ minetest.register_node("mcl_sponges:sponge", {
|
|||
|
||||
minetest.register_node("mcl_sponges:sponge_wet", {
|
||||
description = S("Waterlogged Sponge"),
|
||||
_tt_help = S("Can be dried in furnace"),
|
||||
_doc_items_longdesc = S("A waterlogged sponge can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of a furnace, the water will pour into the bucket."),
|
||||
drawtype = "normal",
|
||||
is_ground_content = false,
|
||||
|
@ -113,6 +115,7 @@ minetest.register_node("mcl_sponges:sponge_wet", {
|
|||
if minetest.get_modpath("mclx_core") then
|
||||
minetest.register_node("mcl_sponges:sponge_wet_river_water", {
|
||||
description = S("Riverwaterlogged Sponge"),
|
||||
_tt_help = S("Can be dried in furnace"),
|
||||
_doc_items_longdesc = S("This is a sponge soaking wet with river water. It can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of the furnace, the river water will pour into the bucket.") .. "\n" .. S("A sponge becomes riverwaterlogged (instead of waterlogged) if it sucks up more river water than (normal) water."),
|
||||
drawtype = "normal",
|
||||
is_ground_content = false,
|
||||
|
|
|
@ -393,6 +393,7 @@ local how_to_throw = S("Use the punch key to throw.")
|
|||
-- Snowball
|
||||
minetest.register_craftitem("mcl_throwing:snowball", {
|
||||
description = S("Snowball"),
|
||||
_tt_help = S("Throwable"),
|
||||
_doc_items_longdesc = S("Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing."),
|
||||
_doc_items_usagehelp = how_to_throw,
|
||||
inventory_image = "mcl_throwing_snowball.png",
|
||||
|
@ -405,6 +406,7 @@ minetest.register_craftitem("mcl_throwing:snowball", {
|
|||
-- Egg
|
||||
minetest.register_craftitem("mcl_throwing:egg", {
|
||||
description = S("Egg"),
|
||||
_tt_help = S("Throwable").."\n"..S("Chance to hatch chicks when broken"),
|
||||
_doc_items_longdesc = S("Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg."),
|
||||
_doc_items_usagehelp = how_to_throw,
|
||||
inventory_image = "mcl_throwing_egg.png",
|
||||
|
@ -417,6 +419,7 @@ minetest.register_craftitem("mcl_throwing:egg", {
|
|||
-- Ender Pearl
|
||||
minetest.register_craftitem("mcl_throwing:ender_pearl", {
|
||||
description = S("Ender Pearl"),
|
||||
_tt_help = S("Throwable").."\n"..S("Teleports you on impact for cost of 5 HP"),
|
||||
_doc_items_longdesc = S("An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points."),
|
||||
_doc_items_usagehelp = how_to_throw,
|
||||
wield_image = "mcl_throwing_ender_pearl.png",
|
||||
|
|
|
@ -98,6 +98,7 @@ minetest.register_node("mcl_tnt:tnt", {
|
|||
description = S("TNT"),
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
_tt_help = S("Ignited by tools, explosions, fire, lava, redstone").."\n"..S("Explosion radius: @1", tostring(TNT_RANGE)),
|
||||
_doc_items_longdesc = longdesc,
|
||||
_doc_items_usagehelp = S("Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds."),
|
||||
groups = { dig_immediate = 3, tnt = 1, enderman_takable=1 },
|
||||
|
|
Loading…
Reference in New Issue