New translation system, part 11: Redstone
This commit is contained in:
parent
44fcf6eb34
commit
3cfdb85926
|
@ -1,3 +1,5 @@
|
|||
local S = minetest.get_translator("mcl_comparators")
|
||||
|
||||
-- Functions that get the input/output rules of the comparator
|
||||
|
||||
local comparator_get_output_rules = function(node)
|
||||
|
@ -223,25 +225,20 @@ for _, state in pairs{mesecon.state.on, mesecon.state.off} do
|
|||
-- Help
|
||||
local longdesc, usagehelp, use_help
|
||||
if state_strs[state] == "off" and mode == "comp" then
|
||||
longdesc = "Redstone comparators are multi-purpose redstone components. "..
|
||||
"They can transmit a redstone signal, detect whether a block contains any items and compare multiple signals."
|
||||
longdesc = S("Redstone comparators are multi-purpose redstone components.").."\n"..
|
||||
S("They can transmit a redstone signal, detect whether a block contains any items and compare multiple signals.")
|
||||
|
||||
usagehelp = "A redstone comparator has 1 main input, 2 side inputs and 1 output. The output is in "..
|
||||
"arrow direction, the main input is in the opposite direction. The other 2 sides are the side inputs.".."\n"..
|
||||
"The main input can powered in 2 ways: First, it can be powered directly by redstone power like any other component. Second, it is powered if, and only if a container (like chest) is placed in front of it and the container contains at least one item."..
|
||||
"The side inputs are only powered by normal redstone power."..
|
||||
"The redstone can operate in two modes: Transmission mode and subtraction mode. It "..
|
||||
"starts in transmission mode and the mode can be changed by a rightclick.".."\n\n"..
|
||||
"Transmission mode:"..
|
||||
"The front torch is unlit and lowered. The output is powered if, and only if the main input is powered. The two side inputs are ignored.".."\n"..
|
||||
"Subtraction mode:"..
|
||||
"The front torch is lit. The output is powered if, and only if the main input is powered and none of the side inputs is powered."
|
||||
usagehelp = S("A redstone comparator has 1 main input, 2 side inputs and 1 output. The output is in arrow direction, the main input is in the opposite direction. The other 2 sides are the side inputs.").."\n"..
|
||||
S("The main input can powered in 2 ways: First, it can be powered directly by redstone power like any other component. Second, it is powered if, and only if a container (like a chest) is placed in front of it and the container contains at least one item.").."\n"..
|
||||
S("The side inputs are only powered by normal redstone power. The redstone can operate in two modes: Transmission mode and subtraction mode. It starts in transmission mode and the mode can be changed by a rightclick.").."\n\n"..
|
||||
S("Transmission mode:\nThe front torch is unlit and lowered. The output is powered if, and only if the main input is powered. The two side inputs are ignored.").."\n"..
|
||||
S("Subtraction mode:\nThe front torch is lit. The output is powered if, and only if the main input is powered and none of the side inputs is powered.")
|
||||
else
|
||||
use_help = false
|
||||
end
|
||||
|
||||
local nodedef = {
|
||||
description = "Redstone Comparator",
|
||||
description = S("Redstone Comparator"),
|
||||
inventory_image = icon,
|
||||
wield_image = icon,
|
||||
_doc_items_create_entry = use_help,
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
All node definitions share a lot of code, so this is the reason why there
|
||||
are so many weird tables below.
|
||||
]]
|
||||
local S = minetest.get_translator("mcl_dispensers")
|
||||
|
||||
-- For after_place_node
|
||||
local setup_dispenser = function(pos)
|
||||
|
@ -281,13 +282,13 @@ local dispenserdef = {
|
|||
-- Horizontal dispenser
|
||||
|
||||
local horizontal_def = table.copy(dispenserdef)
|
||||
horizontal_def.description = "Dispenser"
|
||||
horizontal_def._doc_items_longdesc = "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 = [[Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Rightclick the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a single random item.
|
||||
horizontal_def.description = S("Dispenser")
|
||||
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. Rightclick the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a single random item.").."\n\n"..
|
||||
|
||||
The dispenser will do different things, depending on the dispensed item:
|
||||
S("The dispenser will do different things, depending on the dispensed item:").."\n\n"..
|
||||
|
||||
• Arrows: Are launched
|
||||
S([[• Arrows: Are launched
|
||||
• Eggs and snowballs: Are thrown
|
||||
• Fire charges: Are fired in a straight line
|
||||
• Armor: Will be equipped to players and armor stands
|
||||
|
@ -301,7 +302,7 @@ The dispenser will do different things, depending on the dispensed item:
|
|||
• TNT: Is placed and ignited
|
||||
• Flint and steel: Is used to ignite a fire in air and to ignite TNT
|
||||
• Spawn eggs: Will summon the mob they contain
|
||||
• Other items: Are simply dropped]]
|
||||
• Other items: Are simply dropped]])
|
||||
|
||||
horizontal_def.after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
setup_dispenser(pos)
|
||||
|
@ -319,7 +320,7 @@ minetest.register_node("mcl_dispensers:dispenser", horizontal_def)
|
|||
|
||||
-- Down dispenser
|
||||
local down_def = table.copy(dispenserdef)
|
||||
down_def.description = "Downwards-Facing Dispenser"
|
||||
down_def.description = S("Downwards-Facing Dispenser")
|
||||
down_def.after_place_node = setup_dispenser
|
||||
down_def.tiles = {
|
||||
"default_furnace_top.png", "mcl_dispensers_dispenser_front_vertical.png",
|
||||
|
@ -334,7 +335,7 @@ minetest.register_node("mcl_dispensers:dispenser_down", down_def)
|
|||
-- Up dispenser
|
||||
-- The up dispenser is almost identical to the down dispenser , it only differs in textures
|
||||
local up_def = table.copy(down_def)
|
||||
up_def.description = "Upwards-Facing Dispenser"
|
||||
up_def.description = S("Upwards-Facing Dispenser")
|
||||
up_def.tiles = {
|
||||
"mcl_dispensers_dispenser_front_vertical.png", "default_furnace_bottom.png",
|
||||
"default_furnace_side.png", "default_furnace_side.png",
|
||||
|
|
|
@ -8,6 +8,8 @@ All node definitions share a lot of code, so this is the reason why there
|
|||
are so many weird tables below.
|
||||
]]
|
||||
|
||||
local S = minetest.get_translator("mcl_droppers")
|
||||
|
||||
-- For after_place_node
|
||||
local setup_dropper = function(pos)
|
||||
-- Set formspec and inventory
|
||||
|
@ -144,9 +146,9 @@ local dropperdef = {
|
|||
-- Horizontal dropper
|
||||
|
||||
local horizontal_def = table.copy(dropperdef)
|
||||
horizontal_def.description = "Dropper"
|
||||
horizontal_def._doc_items_longdesc = "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 = "Droppers can be placed in 6 possible directions, items will be dropped out of the hole. Rightclick the dropper to access its inventory. Supply it with redstone energy once to make the dropper drop or transfer a random item."
|
||||
horizontal_def.description = S("Dropper")
|
||||
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. Rightclick 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)
|
||||
setup_dropper(pos)
|
||||
orientate_dropper(pos, placer)
|
||||
|
@ -163,7 +165,7 @@ minetest.register_node("mcl_droppers:dropper", horizontal_def)
|
|||
|
||||
-- Down dropper
|
||||
local down_def = table.copy(dropperdef)
|
||||
down_def.description = "Downwards-Facing Dropper"
|
||||
down_def.description = S("Downwards-Facing Dropper")
|
||||
down_def.after_place_node = setup_dropper
|
||||
down_def.tiles = {
|
||||
"default_furnace_top.png", "mcl_droppers_dropper_front_vertical.png",
|
||||
|
@ -178,7 +180,7 @@ minetest.register_node("mcl_droppers:dropper_down", down_def)
|
|||
-- Up dropper
|
||||
-- The up dropper is almost identical to the down dropper, it only differs in textures
|
||||
local up_def = table.copy(down_def)
|
||||
up_def.description = "Upwards-Facing Dropper"
|
||||
up_def.description = S("Upwards-Facing Dropper")
|
||||
up_def.tiles = {
|
||||
"mcl_droppers_dropper_front_vertical.png", "default_furnace_bottom.png",
|
||||
"default_furnace_side.png", "default_furnace_side.png",
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
local S = minetest.get_translator("mcl_observers")
|
||||
|
||||
local rules_flat = {
|
||||
{ x = 0, y = 0, z = -1, spread = true },
|
||||
}
|
||||
|
@ -84,9 +86,9 @@ mesecon.register_node("mcl_observers:observer",
|
|||
_mcl_hardness = 3.5,
|
||||
},
|
||||
{
|
||||
description = "Observer",
|
||||
_doc_items_longdesc = "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 = "Place the observer directly in front of the block you want to observe with the “face” looking at the block. The arrow shows you the side of the output, which is at the opposite side of the “face”. The arrow points to it. You need to place your redstone wire or any other component you want to power here.",
|
||||
description = S("Observer"),
|
||||
_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 shows you the side of the output, which is at the opposite side of the “face”. The arrow points to it. You need to place your redstone wire or any other component you want to power here."),
|
||||
groups = {pickaxey=1, material_stone=1, not_opaque=1, },
|
||||
tiles = {
|
||||
"mcl_observers_observer_top.png^[transformR180", "default_furnace_bottom.png",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
local S = minetest.get_translator("mesecons_commandblock")
|
||||
|
||||
local function construct(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
@ -183,33 +184,27 @@ local on_place = function(itemstack, placer, pointed_thing)
|
|||
end
|
||||
|
||||
minetest.register_node("mesecons_commandblock:commandblock_off", {
|
||||
description = "Command Block",
|
||||
description = S("Command Block"),
|
||||
|
||||
_doc_items_longdesc =
|
||||
"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.",
|
||||
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 =
|
||||
[[To use an already existing command block, just supply it with redstone power and see what happens. This will execute the commands once. To execute the commands again, turn the redstone power off and on again.
|
||||
S("To use an already existing command block, just supply it with redstone power and see what happens. This will execute the commands once. To execute the commands again, turn the redstone power off and on again.").."\n\n"..
|
||||
|
||||
To place a command block and change the commands, you need to be in Creative Mode and must have the “maphack” privilege. A new command block does not have any commands and does nothing. Rightclick the command block (in Creative Mode!) to edit its commands. Read the help entry “Advanced topics > Server Commands” to understand how they work. Each line contains a single command. You enter them like you would in the console, but without the leading slash. The commands will be executed from top to bottom.
|
||||
S("To place a command block and change the commands, you need to be in Creative Mode and must have the “maphack” privilege. A new command block does not have any commands and does nothing. Rightclick the command block (in Creative Mode!) to edit its commands. Read the help entry “Advanced topics > Server Commands” to understand how they work. Each line contains a single command. You enter them like you would in the console, but without the leading slash. The commands will be executed from top to bottom.").."\n\n"..
|
||||
|
||||
All commands will be executed on behalf of the player who placed the command block, as if the player typed in the commands. This player is said to be the “commander” of the block.
|
||||
S("All commands will be executed on behalf of the player who placed the command block, as if the player typed in the commands. This player is said to be the “commander” of the block.").."\n\n"..
|
||||
|
||||
Command blocks support placeholders, insert one of these placerholders and they will be replaced by a player name:
|
||||
• “@c”: commander of this command block
|
||||
• “@n” or “@p”: nearest player from the command block
|
||||
• “@f” farthest player from the command block
|
||||
• “@r”: random player currently in the world
|
||||
• “@@”: literal “@” sign
|
||||
S("Command blocks support placeholders, insert one of these placerholders and they will be replaced by a player name:").."\n"..
|
||||
S("• “@c”: commander of this command block").."\n"..
|
||||
S("• “@n” or “@p”: nearest player from the command block").."\n"..
|
||||
S("• “@f” farthest player from the command block").."\n"..
|
||||
S("• “@r”: random player currently in the world").."\n"..
|
||||
S("• “@@”: literal “@” sign").."\n\n"..
|
||||
|
||||
Example 1:
|
||||
time 12000
|
||||
S("Example 1:\n time 12000\nSets the game clock to 12:00").."\n\n"..
|
||||
|
||||
Sets the game clock to 12:00
|
||||
|
||||
Example 2:
|
||||
give @n mcl_core:apple 5
|
||||
|
||||
→ Gives the nearest player 5 apples]],
|
||||
S("Example 2:\n give @n mcl_core:apple 5\n→ Gives the nearest player 5 apples"),
|
||||
|
||||
tiles = {{name="jeija_commandblock_off.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=2}}},
|
||||
groups = {creative_breakable=1, mesecon_effector_off=1},
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
local S = minetest.get_translator("mesecons_delayer")
|
||||
|
||||
local DELAYS = { 0.1, 0.2, 0.3, 0.4 }
|
||||
local DEFAULT_DELAY = DELAYS[1]
|
||||
|
||||
|
@ -182,9 +184,9 @@ end
|
|||
local help, longdesc, usagehelp, icon, on_construct
|
||||
if i == 1 then
|
||||
help = true
|
||||
longdesc = "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 = "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, rightclick 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"..
|
||||
"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."
|
||||
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, rightclick 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.")
|
||||
icon = "mesecons_delayer_item.png"
|
||||
|
||||
-- Check sides of constructed repeater and lock it, if required
|
||||
|
@ -219,7 +221,7 @@ else
|
|||
end
|
||||
|
||||
minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), {
|
||||
description = "Redstone Repeater",
|
||||
description = S("Redstone Repeater"),
|
||||
inventory_image = icon,
|
||||
wield_image = icon,
|
||||
_doc_items_create_entry = help,
|
||||
|
@ -292,7 +294,7 @@ minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), {
|
|||
|
||||
|
||||
minetest.register_node("mesecons_delayer:delayer_on_"..tostring(i), {
|
||||
description = "Redstone Repeater (Powered)",
|
||||
description = S("Redstone Repeater (Powered)"),
|
||||
_doc_items_create_entry = false,
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
|
@ -366,7 +368,7 @@ end
|
|||
-- Locked repeater
|
||||
|
||||
minetest.register_node("mesecons_delayer:delayer_off_locked", {
|
||||
description = "Redstone Repeater (Locked)",
|
||||
description = S("Redstone Repeater (Locked)"),
|
||||
_doc_items_create_entry = false,
|
||||
drawtype = "nodebox",
|
||||
-- FIXME: Textures of torch and the lock bar overlap. Nodeboxes are (sadly) not suitable for this.
|
||||
|
@ -420,7 +422,7 @@ minetest.register_node("mesecons_delayer:delayer_off_locked", {
|
|||
})
|
||||
|
||||
minetest.register_node("mesecons_delayer:delayer_on_locked", {
|
||||
description = "Redstone Repeater (Locked, Powered)",
|
||||
description = S("Redstone Repeater (Locked, Powered)"),
|
||||
_doc_items_create_entry = false,
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
local S = minetest.get_translator("mesecons_noteblock")
|
||||
|
||||
minetest.register_node("mesecons_noteblock:noteblock", {
|
||||
description = "Note Block",
|
||||
_doc_items_longdesc = "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 = [[Rightclick the note block to choose the next musical note (there are 24 half notes, or 2 octaves). The intrument played depends on the material of the block below the note block:
|
||||
description = S("Note Block"),
|
||||
_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("Rightclick the note block to choose the next musical note (there are 24 half notes, or 2 octaves). The intrument played depends on the material of the block below the note block:").."\n\n"..
|
||||
|
||||
• Glass: Sticks
|
||||
• Wood: Bass guitar
|
||||
• Stone: Bass drum
|
||||
• Sand or gravel: Snare drum
|
||||
• Anything else: Piano
|
||||
S("• Glass: Sticks").."\n"..
|
||||
S("• Wood: Bass guitar").."\n"..
|
||||
S("• Stone: Bass drum").."\n"..
|
||||
S("• Sand or gravel: Snare drum").."\n"..
|
||||
S("• Anything else: Piano").."\n\n"..
|
||||
|
||||
The note block will only play a note when it is below air, otherwise, it stays silent.]],
|
||||
S("The note block will only play a note when it is below air, otherwise, it stays silent."),
|
||||
tiles = {"mesecons_noteblock.png"},
|
||||
groups = {handy=1,axey=1, material_wood=1},
|
||||
is_ground_content = false,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
local S = minetest.get_translator("mesecons_pistons")
|
||||
|
||||
local PISTON_MAXIMUM_PUSH = 12
|
||||
|
||||
-- Get mesecon rules of pistons
|
||||
|
@ -171,7 +173,7 @@ local pistonspec_normal = {
|
|||
piston_up = "mesecons_pistons:piston_up_normal_off",
|
||||
}
|
||||
|
||||
local usagehelp_piston = "This block can have one of 6 possible orientations. On placement, the pusher will face you."
|
||||
local usagehelp_piston = S("This block can have one of 6 possible orientations. On placement, the pusher will face you.")
|
||||
|
||||
local on_rotate
|
||||
if minetest.get_modpath("screwdriver") then
|
||||
|
@ -180,8 +182,8 @@ end
|
|||
|
||||
-- offstate
|
||||
minetest.register_node("mesecons_pistons:piston_normal_off", {
|
||||
description = "Piston",
|
||||
_doc_items_longdesc = "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.",
|
||||
description = S("Piston"),
|
||||
_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 = {
|
||||
"mesecons_piston_bottom.png^[transformR180",
|
||||
|
@ -275,8 +277,8 @@ local pistonspec_sticky = {
|
|||
|
||||
-- offstate
|
||||
minetest.register_node("mesecons_pistons:piston_sticky_off", {
|
||||
description = "Sticky Piston",
|
||||
_doc_items_longdesc = "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.",
|
||||
description = S("Sticky Piston"),
|
||||
_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,
|
||||
|
||||
tiles = {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
local S = minetest.get_translator("mesecons_pressureplates")
|
||||
|
||||
local PRESSURE_PLATE_INTERVAL = 0.04
|
||||
|
||||
local pp_box_off = {
|
||||
|
@ -95,7 +97,7 @@ function mesecon.register_pressure_plate(basename, description, textures_off, te
|
|||
groups_on.not_in_creative_inventory = 1
|
||||
groups_on.pressure_plate = 2
|
||||
if not longdesc then
|
||||
longdesc = "A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it."
|
||||
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
|
||||
|
||||
mesecon.register_node(basename, {
|
||||
|
@ -144,12 +146,12 @@ function mesecon.register_pressure_plate(basename, description, textures_off, te
|
|||
end
|
||||
|
||||
local woods = {
|
||||
{ "wood", "mcl_core:wood", "default_wood.png", "Oak Pressure Plate" },
|
||||
{ "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", "Acacia Pressure Plate" },
|
||||
{ "birchwood", "mcl_core:birchwood", "mcl_core_planks_birch.png", "Birch Pressure Plate" },
|
||||
{ "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", "Dark Oak Pressure Plate" },
|
||||
{ "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", "Spruce Pressure Plate" },
|
||||
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", "Jungle Pressure Plate" },
|
||||
{ "wood", "mcl_core:wood", "default_wood.png", S("Oak Pressure Plate") },
|
||||
{ "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", S("Acacia Pressure Plate") },
|
||||
{ "birchwood", "mcl_core:birchwood", "mcl_core_planks_birch.png", S("Birch Pressure Plate") },
|
||||
{ "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", S("Dark Oak Pressure Plate" )},
|
||||
{ "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", S("Spruce Pressure Plate") },
|
||||
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Pressure Plate") },
|
||||
}
|
||||
|
||||
for w=1, #woods do
|
||||
|
@ -164,7 +166,7 @@ for w=1, #woods do
|
|||
mcl_sounds.node_sound_wood_defaults(),
|
||||
{axey=1, material_wood=1},
|
||||
nil,
|
||||
"A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.")
|
||||
S("A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it."))
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
|
@ -176,7 +178,7 @@ end
|
|||
|
||||
mesecon.register_pressure_plate(
|
||||
"mesecons_pressureplates:pressure_plate_stone",
|
||||
"Stone Pressure Plate",
|
||||
S("Stone Pressure Plate"),
|
||||
{"default_stone.png"},
|
||||
{"default_stone.png"},
|
||||
"default_stone.png",
|
||||
|
@ -185,6 +187,6 @@ mesecon.register_pressure_plate(
|
|||
mcl_sounds.node_sound_stone_defaults(),
|
||||
{pickaxey=1, material_stone=1},
|
||||
{ player = true, mob = true },
|
||||
"A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.")
|
||||
S("A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else."))
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
local S = minetest.get_translator("mesecons_solarpanel")
|
||||
|
||||
local boxes = { -8/16, -8/16, -8/16, 8/16, -2/16, 8/16 }
|
||||
|
||||
-- Daylight Sensor
|
||||
|
@ -18,7 +20,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_on", {
|
|||
fixed = boxes
|
||||
},
|
||||
drop = "mesecons_solarpanel:solar_panel_off",
|
||||
description="Daylight Sensor",
|
||||
description=S("Daylight Sensor"),
|
||||
_doc_items_create_entry = false,
|
||||
groups = {handy=1,axey=1, not_in_creative_inventory = 1, material_wood=1},
|
||||
sounds = mcl_sounds.node_sound_glass_defaults(),
|
||||
|
@ -56,8 +58,8 @@ minetest.register_node("mesecons_solarpanel:solar_panel_off", {
|
|||
fixed = boxes
|
||||
},
|
||||
groups = {handy=1,axey=1, material_wood=1},
|
||||
description="Daylight Sensor",
|
||||
_doc_items_longdesc = "Daylight sensors are redstone components which provide redstone power when they are in sunlight and no power otherwise. They can also be inverted.",
|
||||
description=S("Daylight Sensor"),
|
||||
_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."),
|
||||
_doc_items_usagehelp = "Rightclick the daylight sensor to turn it into an inverted daylight sensor, which supplies redstone energy when it is in moonlight.",
|
||||
sounds = mcl_sounds.node_sound_glass_defaults(),
|
||||
mesecons = {receptor = {
|
||||
|
@ -136,7 +138,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_inverted_on", {
|
|||
},
|
||||
drop = "mesecons_solarpanel:solar_panel_off",
|
||||
groups = {handy=1,axey=1, not_in_creative_inventory = 1, material_wood=1},
|
||||
description="Inverted Daylight Sensor",
|
||||
description=S("Inverted Daylight Sensor"),
|
||||
_doc_items_create_entry = false,
|
||||
sounds = mcl_sounds.node_sound_glass_defaults(),
|
||||
mesecons = {receptor = {
|
||||
|
@ -174,8 +176,8 @@ minetest.register_node("mesecons_solarpanel:solar_panel_inverted_off", {
|
|||
},
|
||||
drop = "mesecons_solarpanel:solar_panel_off",
|
||||
groups = {handy=1,axey=1, not_in_creative_inventory=1, material_wood=1},
|
||||
description="Inverted Daylight Sensor",
|
||||
_doc_items_longdesc = "An inverted daylight sensor is a variant of the daylight sensor. It is a redstone component which provides redstone power when it in moonlight and no power otherwise. It can turned back into an ordinary daylight sensor.",
|
||||
description=S("Inverted Daylight Sensor"),
|
||||
_doc_items_longdesc = S("An inverted daylight sensor is a variant of the daylight sensor. It is a redstone component which provides redstone power when it in moonlight and no power otherwise. It can turned back into an ordinary daylight sensor."),
|
||||
_doc_items_usagehelp = "Rightclick the daylight sensor to turn it into a daylight sensor.",
|
||||
sounds = mcl_sounds.node_sound_glass_defaults(),
|
||||
mesecons = {receptor = {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
-- REDSTONE TORCHES
|
||||
-- REDSTONE TORCH AND BLOCK OF REDSTONE
|
||||
|
||||
local S = minetest.get_translator("mesecons_torch")
|
||||
|
||||
local TORCH_COOLOFF = 120 -- Number of seconds it takes for a burned-out torch to reactivate
|
||||
|
||||
|
@ -164,13 +166,13 @@ mcl_torches.register_torch("mesecon_torch_overheated", "Redstone Torch (overheat
|
|||
|
||||
|
||||
|
||||
mcl_torches.register_torch("mesecon_torch_on", "Redstone Torch",
|
||||
"A redstone torch is a redstone component which can be used to invert a redstone signal. It supplies its surrounding blocks with redstone power, except for the block it is attached to. A redstone torch is normally lit, but it can also be turned off by powering the block it is attached to. While unlit, a redstone torch does not power anything.",
|
||||
[[Redstone torches can generally be placed at the side and on the top of full solid opaque blocks. The following exceptions apply:
|
||||
• Glass, fence, wall, hopper: Can only be placed on top
|
||||
• Upside-down slab/stair: Can only be placed on top
|
||||
• Soul sand, mob spawner: Placement possible
|
||||
• Glowstone and pistons: No placement possible]],
|
||||
mcl_torches.register_torch("mesecon_torch_on", S("Redstone Torch"),
|
||||
S("A redstone torch is a redstone component which can be used to invert a redstone signal. It supplies its surrounding blocks with redstone power, except for the block it is attached to. A redstone torch is normally lit, but it can also be turned off by powering the block it is attached to. While unlit, a redstone torch does not power anything."),
|
||||
S("Redstone torches can generally be placed at the side and on the top of full solid opaque blocks. The following exceptions apply:").."\n"..
|
||||
S("• Glass, fence, wall, hopper: Can only be placed on top")..
|
||||
S("• Upside-down slab/stair: Can only be placed on top")..
|
||||
S("• Soul sand, mob spawner: Placement possible")..
|
||||
S("• Glowstone and pistons: No placement possible"),
|
||||
"jeija_torches_on.png",
|
||||
"mcl_torches_torch_floor.obj", "mcl_torches_torch_wall.obj",
|
||||
{"jeija_torches_on.png"},
|
||||
|
@ -193,8 +195,8 @@ mcl_torches.register_torch("mesecon_torch_on", "Redstone Torch",
|
|||
)
|
||||
|
||||
minetest.register_node("mesecons_torch:redstoneblock", {
|
||||
description = "Block of Redstone",
|
||||
_doc_items_longdesc = "A block of redstone permanently supplies redstone power to its surrounding blocks.",
|
||||
description = S("Block of Redstone"),
|
||||
_doc_items_longdesc = S("A block of redstone permanently supplies redstone power to its surrounding blocks."),
|
||||
tiles = {"redstone_redstone_block.png"},
|
||||
stack_max = 64,
|
||||
groups = {pickaxey=1},
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
local S = minetest.get_translator("mesecons_wallever")
|
||||
|
||||
local lever_get_output_rules = mesecon.rules.buttonlike_get
|
||||
|
||||
-- LEVER
|
||||
|
@ -20,8 +22,8 @@ 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="Lever",
|
||||
_doc_items_longdesc = "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.",
|
||||
description=S("Lever"),
|
||||
_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 = "Right-click the lever to flip it on or off.",
|
||||
on_rightclick = function (pos, node)
|
||||
minetest.swap_node(pos, {name="mesecons_walllever:wall_lever_on", param2=node.param2})
|
||||
|
@ -122,7 +124,7 @@ minetest.register_node("mesecons_walllever:wall_lever_on", {
|
|||
groups = {handy=1, not_in_creative_inventory = 1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, attached_node_facedir=1},
|
||||
is_ground_content = false,
|
||||
drop = '"mesecons_walllever:wall_lever_off" 1',
|
||||
description="Lever",
|
||||
description=S("Lever"),
|
||||
_doc_items_create_entry = false,
|
||||
on_rightclick = function (pos, node)
|
||||
minetest.swap_node(pos, {name="mesecons_walllever:wall_lever_off", param2=node.param2})
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
-- Where 0 means the wire has no visual connection to that direction and
|
||||
-- 1 means that the wire visually connects to that other node.
|
||||
|
||||
local S = minetest.get_translator("mesecons_wires")
|
||||
|
||||
-- #######################
|
||||
-- ## Update wire looks ##
|
||||
-- #######################
|
||||
|
@ -223,23 +225,23 @@ 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" }
|
||||
|
||||
longdesc = [[Redstone is a versatile conductive mineral which transmits redstone power. It can be placed on the ground as a trail.
|
||||
A redstone trail can be in two states: Powered or not powered. A powered redstone trail will power (and thus activate) adjacent redstone components.
|
||||
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.]]
|
||||
usagehelp = [[Place redstone on the ground to build a redstone trail. The trails will connect to each other automatically and it can also go over hills. An easy way to power a redstone trail is by placing a redstone torch.
|
||||
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.")
|
||||
usagehelp = S("Place redstone on the ground to build a redstone trail. The trails will connect to each other automatically and it can also go over hills. An easy way to power a redstone trail is by placing a redstone torch.").."\n\n"..
|
||||
|
||||
Read the help entries on the other redstone components to learn how redstone components interact.]]
|
||||
S("Read the help entries on the other redstone components to learn how redstone components interact.")
|
||||
img = "redstone_redstone_dust.png"
|
||||
desc_off = "Redstone"
|
||||
desc_on = "Powered Redstone Spot ("..nodeid..")"
|
||||
desc_off = S("Redstone")
|
||||
desc_on = S("Powered Redstone Spot (@1)", nodeid)
|
||||
else
|
||||
-- Connected redstone wire
|
||||
table.insert(nodebox, box_center)
|
||||
tiles_off = { crossing_off, crossing_off, straight0_off, straight1_off, straight0_off, straight1_off, }
|
||||
tiles_on = { crossing_on, crossing_on, straight0_on, straight1_on, straight0_on, straight1_on, }
|
||||
wirehelp = false
|
||||
desc_off = "Redstone Trail ("..nodeid..")"
|
||||
desc_on = "Powered Redstone Trail ("..nodeid..")"
|
||||
desc_off = S("Redstone Trail (@1)", nodeid)
|
||||
desc_on = S("Powered Redstone Trail (@1)", nodeid)
|
||||
end
|
||||
|
||||
mesecon.register_node(":mesecons:wire_"..nodeid, {
|
||||
|
|
Loading…
Reference in New Issue
Block a user