Merge branch 'tt'

This commit is contained in:
Wuzzy 2020-03-10 18:21:32 +01:00
commit 070e928bf0
88 changed files with 758 additions and 42 deletions

View file

@ -282,6 +282,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"..

View file

@ -147,6 +147,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)

View file

@ -87,6 +87,7 @@ mesecon.register_node("mcl_observers:observer",
},
{
description = S("Observer"),
_tt_help = S("Emits redstone pulse when block in front 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."),

View file

@ -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,

View file

@ -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 =

View file

@ -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,

View file

@ -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 = {

View file

@ -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"..

View file

@ -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,

View file

@ -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,

View file

@ -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."),

View file

@ -186,12 +186,14 @@ mcl_torches.register_torch("mesecon_torch_on", S("Redstone Torch"),
rules = torch_get_input_rules,
action_on = torch_action_on,
},
}
},
_tt_help = S("Provides redstone power when it's not powered itself"),
}
)
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,

View file

@ -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)

View file

@ -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,