Merge branch 'master' into screwdriver

This commit is contained in:
Wuzzy 2019-12-09 15:09:49 +01:00
commit 3de818d2c2
741 changed files with 14827 additions and 8917 deletions

View file

@ -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 comparator can operate in two modes: Transmission mode and subtraction mode. It starts in transmission mode and the mode can be changed by using the block.").."\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,

View file

@ -0,0 +1,9 @@
# textdomain: mcl_comparators
Redstone comparators are multi-purpose redstone components.=Redstonekomparatoren sind Redstonekomponenten mit vielen Verwendungszwecken.
They can transmit a redstone signal, detect whether a block contains any items and compare multiple signals.=Sie können ein Redstonesignal übertragen, erkennen, ob ein Block Gegenstände enthält und mehrere Signale vergleichen.
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.=Ein Redstonekomparator hat 1 Haupteingang, 2 Seiteneingänge und 1 Ausgang. Der Ausgang ist in Pfeilrichtung, der Haupteingang ist in der gegenüberliegenden Richtung. Die anderen 2 Seiten sind die Seiteneingänge.
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.=Der Haupteingang kann auf 2 Weisen versorgt werden: Erstens, kann er direkt von Redstoneenergie wie bei jeder anderen Komponente versorgt werden. Zweitens wird er versorgt, wenn, und nur wenn ein Behälter (wie eine Truhe) vor dem Komporator platziert wurde und der Behälter mindestens einen Gegenstand enthält.
The side inputs are only powered by normal redstone power. The redstone comparator can operate in two modes: Transmission mode and subtraction mode. It starts in transmission mode and the mode can be changed by using the block.=Die Seiteneingänge akzeptieren nur normale Redstoneenergie. Der Redstonekomparator kann in zwei Modi agieren: Übertragungsmodus und Subtraktionsmodus. Er fängt im Übertragungsmodus an. Der Modus wird beim Benutzen des Blocks geändert.
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.=Übertragungsmodus:@nDie vordere Fackel ist eingefahren und leuchtet nicht auf. Die Ausgabe gibt ein Signal, wenn, nur nur wenn der Haupteingang bestromt wird. Die zwei Seiteneingänge werden ignoriert.
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.=Subtraktionsmodus:@nDie vordere Fackel leuchtet auf. Die Ausgabe gibt ein Signal wenn, nur nur wenn der Haupteingang versorgt wird und keiner der Seiteneingänge bestromt ist.
Redstone Comparator=Redstonekomparator

View file

@ -0,0 +1,9 @@
# textdomain: mcl_comparators
Redstone comparators are multi-purpose redstone components.=
They can transmit a redstone signal, detect whether a block contains any items and compare multiple signals.=
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.=
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.=
The side inputs are only powered by normal redstone power. The redstone comparator can operate in two modes: Transmission mode and subtraction mode. It starts in transmission mode and the mode can be changed by using the block.=
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.=
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.=
Redstone Comparator=

View file

@ -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)
@ -14,9 +15,10 @@ local setup_dispenser = function(pos)
local form = "size[9,8.75]"..
"background[-0.19,-0.25;9.41,9.49;crafting_inventory_9_slots.png]"..
mcl_vars.inventory_header..
"image[3,-0.2;5,0.75;mcl_dispensers_fnt_dispenser.png]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
"list[current_player;main;0,7.74;9,1;]"..
"label[3,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Dispenser"))).."]"..
"list[current_name;main;3,0.5;3,3;]"..
"listring[current_name;main]"..
"listring[current_player;main]"
@ -164,9 +166,6 @@ local dispenserdef = {
local dropinv = dropmeta:get_inventory()
if dropinv:room_for_item(armor_type, dropitem) then
dropinv:add_item(armor_type, dropitem)
--[[ FIXME: For some reason, this function is not called after calling add_item,
so we call it manually to update the armor stand entity.
This may need investigation and the following line may be a small hack. ]]
minetest.registered_nodes["3d_armor_stand:armor_stand"].on_metadata_inventory_put(standpos)
stack:take_item()
inv:set_stack("main", stack_id, stack)
@ -281,27 +280,27 @@ 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. 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"..
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
Eggs and snowballs: Are thrown
Fire charges: Are fired in a straight line
Armor: Will be equipped to players and armor stands
Boats: Are placed on water or are dropped
Minecart: Are placed on rails or are dropped
Bone meal: Is applied on the block it is facint
Empty buckets: Are used to collect a liquid source
Filled buckets: Are used to place a liquid source
Heads, pumpkins: Equipped to players and armor stands, or placed as a block
Shulker boxes: Are placed as a block
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]]
S("• Arrows: Are launched").."\n"..
S("• Eggs and snowballs: Are thrown").."\n"..
S("• Fire charges: Are fired in a straight line").."\n"..
S("• Armor: Will be equipped to players and armor stands").."\n"..
S("• Boats: Are placed on water or are dropped").."\n"..
S("• Minecart: Are placed on rails or are dropped").."\n"..
S("• Bone meal: Is applied on the block it is facing").."\n"..
S("• Empty buckets: Are used to collect a liquid source").."\n"..
S("• Filled buckets: Are used to place a liquid source").."\n"..
S("• Heads, pumpkins: Equipped to players and armor stands, or placed as a block").."\n"..
S("• Shulker boxes: Are placed as a block").."\n"..
S("• TNT: Is placed and ignited").."\n"..
S("• Flint and steel: Is used to ignite a fire in air and to ignite TNT").."\n"..
S("• Spawn eggs: Will summon the mob they contain").."\n"..
S("• Other items: Are simply dropped")
horizontal_def.after_place_node = function(pos, placer, itemstack, pointed_thing)
setup_dispenser(pos)
@ -319,7 +318,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 +333,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",
@ -357,3 +356,13 @@ if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mcl_dispensers:dispenser", "nodes", "mcl_dispensers:dispenser_down")
doc.add_entry_alias("nodes", "mcl_dispensers:dispenser", "nodes", "mcl_dispensers:dispenser_up")
end
minetest.register_lbm({
label = "Update dispenser formspecs (0.51.0)",
name = "mcl_dispensers:update_formspecs_0_51_0",
nodenames = { "mcl_dispensers:dispenser", "mcl_dispensers:dispenser_down", "mcl_dispensers:dispenser_up" },
action = function(pos, node)
setup_dispenser(pos)
minetest.log("action", "[mcl_dispenser] Node formspec updated at "..minetest.pos_to_string(pos))
end,
})

View file

@ -0,0 +1,23 @@
# textdomain: mcl_dispensers
Dispenser=Werfer
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.=Ein Werfer ist ein Block, der als eine Redstonekomponente fungiert, die, wenn sie mit Redstoneenergie versorgt ist, einen Gegenstand auswirft. Er hat einen Behälter mit 9 Inventarplätzen.
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.=Platzieren Sie den Werfer in einer von 6 möglichen Richtungen. Das „Loch“ ist die Stelle, aus der Dinge aus dem Werfer fliegen. Benutzen Sie den Werfer, um auf das Inventar zuzugreifen.
The dispenser will do different things, depending on the dispensed item:=Der Werfer wird, abhängig vom geworfenem Gegenstand, unterschiedliche Dinge tun:
• Arrows: Are launched=• Pfeile: Werden gefeuert
• Eggs and snowballs: Are thrown=• Eier und Schneebälle: Werden geworfen
• Fire charges: Are fired in a straight line=• Feuerkugeln: Werden schnurgerade abgefeuert
• Armor: Will be equipped to players and armor stands=• Rüstung: Spieler und Rüstungsständer werden ausgerüstet
• Boats: Are placed on water or are dropped=• Boote: Werden auf Wasser platziert oder abgeworfen
• Minecart: Are placed on rails or are dropped=• Loren: Werden auf Schienen platziert oder abgeworfen
• Bone meal: Is applied on the block it is facing=• Knochenmehl: Wird auf den Block, auf den er zeigt, angewandt
• Empty buckets: Are used to collect a liquid source=• Leere Eimer: Sammeln Flüssigkeitsquelle auf
• Filled buckets: Are used to place a liquid source=• Volle Eimer: Platzieren eine Flüssigkeitsquelle
• Heads, pumpkins: Equipped to players and armor stands, or placed as a block=• Köpfe, Kürbisse: Spieler und Rüstungsständer werden ausgerüstet, alternativ werden diese Gegenstände als Block platziert
• Shulker boxes: Are placed as a block=• Schulkerkisten: Werden als Block platziert
• TNT: Is placed and ignited=• TNT: Wird platziert und angezündet
• Flint and steel: Is used to ignite a fire in air and to ignite TNT=• Feuerzeuge: Endzündet ein Feuer in der Luft und zündet TNT an
• Spawn eggs: Will summon the mob they contain=• Spawn-Eier: Beschwören einen Mob
• Other items: Are simply dropped=• Andere Gegenstände: Werden fallen gelassen
Downwards-Facing Dispenser=Nach unten zeigender Werfer
Upwards-Facing Dispenser=Nach oben zeigender Werfer
Inventory=Inventar

View file

@ -0,0 +1,23 @@
# textdomain: mcl_dispensers
Dispenser=
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.=
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.=
The dispenser will do different things, depending on the dispensed item:=
• 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=
• Boats: Are placed on water or are dropped=
• Minecart: Are placed on rails or are dropped=
• Bone meal: Is applied on the block it is facing=
• Empty buckets: Are used to collect a liquid source=
• Filled buckets: Are used to place a liquid source=
• Heads, pumpkins: Equipped to players and armor stands, or placed as a block=
• Shulker boxes: Are placed as a block=
• 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=
Downwards-Facing Dispenser=
Upwards-Facing Dispenser=
Inventory=

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

View file

@ -8,15 +8,18 @@ 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
local form = "size[9,8.75]"..
"background[-0.19,-0.25;9.41,9.49;crafting_inventory_9_slots.png]"..
mcl_vars.inventory_header..
"image[3,-0.2;5,0.75;mcl_droppers_fnt_dropper.png]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
"list[current_player;main;0,7.74;9,1;]"..
"label[3,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Dropper"))).."]"..
"list[current_name;main;3,0.5;3,3;]"..
"listring[current_name;main]"..
"listring[current_player;main]"
@ -144,9 +147,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. 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)
setup_dropper(pos)
orientate_dropper(pos, placer)
@ -163,7 +166,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 +181,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",
@ -203,3 +206,13 @@ if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mcl_droppers:dropper", "nodes", "mcl_droppers:dropper_down")
doc.add_entry_alias("nodes", "mcl_droppers:dropper", "nodes", "mcl_droppers:dropper_up")
end
minetest.register_lbm({
label = "Update dropper formspecs (0.51.0)",
name = "mcl_droppers:update_formspecs_0_51_0",
nodenames = { "mcl_droppers:dropper", "mcl_droppers:dropper_down", "mcl_droppers:dropper_up" },
action = function(pos, node)
setup_dropper(pos)
minetest.log("action", "[mcl_droppers] Node formspec updated at "..minetest.pos_to_string(pos))
end,
})

View file

@ -0,0 +1,219 @@
--[[ This mod registers 3 nodes:
- One node for the horizontal-facing dropper (mcl_droppers:dropper)
- One node for the upwards-facing droppers (mcl_droppers:dropper_up)
- One node for the downwards-facing droppers (mcl_droppers:dropper_down)
3 node definitions are needed because of the way the textures are defined.
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
local form = "size[9,8.75]"..
"background[-0.19,-0.25;9.41,9.49;crafting_inventory_9_slots.png]"..
mcl_vars.inventory_header..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
"list[current_player;main;0,7.74;9,1;]"..
"label[3,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Dropper"))).."]"..
"list[current_name;main;3,0.5;3,3;]"..
"listring[current_name;main]"..
"listring[current_player;main]"
local meta = minetest.get_meta(pos)
meta:set_string("formspec", form)
local inv = meta:get_inventory()
inv:set_size("main", 9)
end
local orientate_dropper = function(pos, placer)
-- Not placed by player
if not placer then return end
-- Pitch in degrees
local pitch = placer:get_look_vertical() * (180 / math.pi)
if pitch > 55 then
minetest.swap_node(pos, {name="mcl_droppers:dropper_up"})
elseif pitch < -55 then
minetest.swap_node(pos, {name="mcl_droppers:dropper_down"})
end
end
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.rotate_simple
end
-- Shared core definition table
local dropperdef = {
is_ground_content = false,
sounds = mcl_sounds.node_sound_stone_defaults(),
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local meta = minetest.get_meta(pos)
local meta2 = meta
meta:from_table(oldmetadata)
local inv = meta:get_inventory()
for i=1, inv:get_size("main") do
local stack = inv:get_stack("main", i)
if not stack:is_empty() then
local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5}
minetest.add_item(p, stack)
end
end
meta:from_table(meta2:to_table())
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
else
return count
end
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
else
return stack:get_count()
end
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
else
return stack:get_count()
end
end,
_mcl_blast_resistance = 17.5,
_mcl_hardness = 3.5,
mesecons = {effector = {
-- Drop random item when triggered
action_on = function (pos, node)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local droppos
if node.name == "mcl_droppers:dropper" then
droppos = vector.subtract(pos, minetest.facedir_to_dir(node.param2))
elseif node.name == "mcl_droppers:dropper_up" then
droppos = {x=pos.x, y=pos.y+1, z=pos.z}
elseif node.name == "mcl_droppers:dropper_down" then
droppos = {x=pos.x, y=pos.y-1, z=pos.z}
end
local dropnode = minetest.get_node(droppos)
-- Do not drop into solid nodes, unless they are containers
local dropnodedef = minetest.registered_nodes[dropnode.name]
if dropnodedef.walkable and not dropnodedef.groups.container then
return
end
local stacks = {}
for i=1,inv:get_size("main") do
local stack = inv:get_stack("main", i)
if not stack:is_empty() then
table.insert(stacks, {stack = stack, stackpos = i})
end
end
if #stacks >= 1 then
local r = math.random(1, #stacks)
local stack = stacks[r].stack
local dropitem = ItemStack(stack)
dropitem:set_count(1)
local stack_id = stacks[r].stackpos
-- If it's a container, attempt to put it into the container
local dropped = mcl_util.move_item_container(pos, droppos, nil, stack_id)
-- No container?
if not dropped and not dropnodedef.groups.container then
-- Drop item normally
minetest.add_item(droppos, dropitem)
stack:take_item()
inv:set_stack("main", stack_id, stack)
end
end
end,
rules = mesecon.rules.alldirs,
}},
on_rotate = on_rotate,
}
-- Horizontal dropper
local horizontal_def = table.copy(dropperdef)
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. 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)
setup_dropper(pos)
orientate_dropper(pos, placer)
end
horizontal_def.tiles = {
"default_furnace_top.png", "default_furnace_bottom.png",
"default_furnace_side.png", "default_furnace_side.png",
"default_furnace_side.png", "mcl_droppers_dropper_front_horizontal.png"
}
horizontal_def.paramtype2 = "facedir"
horizontal_def.groups = {pickaxey=1, container=2, material_stone=1}
minetest.register_node("mcl_droppers:dropper", horizontal_def)
-- Down dropper
local down_def = table.copy(dropperdef)
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",
"default_furnace_side.png", "default_furnace_side.png",
"default_furnace_side.png", "default_furnace_side.png"
}
down_def.groups = {pickaxey=1, container=2,not_in_creative_inventory=1, material_stone=1}
down_def._doc_items_create_entry = false
down_def.drop = "mcl_droppers:dropper"
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 = 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",
"default_furnace_side.png", "default_furnace_side.png"
}
minetest.register_node("mcl_droppers:dropper_up", up_def)
-- Ladies and gentlemen, I present to you: the crafting recipe!
minetest.register_craft({
output = 'mcl_droppers:dropper',
recipe = {
{"mcl_core:cobble", "mcl_core:cobble", "mcl_core:cobble",},
{"mcl_core:cobble", "", "mcl_core:cobble",},
{"mcl_core:cobble", "mesecons:redstone", "mcl_core:cobble",},
}
})
-- Add entry aliases for the Help
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mcl_droppers:dropper", "nodes", "mcl_droppers:dropper_down")
doc.add_entry_alias("nodes", "mcl_droppers:dropper", "nodes", "mcl_droppers:dropper_up")
end
minetest.register_lbm({
label = "Update dropper formspecs (0.51.0)",
name = "mcl_droppers:update_formspecs_0_51_0",
nodenames = { "mcl_droppers:dropper", "mcl_droppers:dropper_down", "mcl_droppers:dropper_up" },
action = function(pos, node)
minetest.registered_nodes[node.name].on_construct(pos)
minetest.log("action", "[mcl_droppers] Node formspec updated at "..minetest.pos_to_string(pos))
end,
})

View file

@ -0,0 +1,7 @@
# textdomain: mcl_droppers
Dropper=Spender
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.=Ein Spender ist eine Redstonekomponente und ein Behälter mit 9 Inventarplätzen. Er wird, wenn mit Redstoneenergie versorgt, einen Gegenstand abwerfen oder in einen Behälter, auf den er zeigt, ablegen.
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.=Spender können in 6 mögliche Richtungen platziert werden, Gegenstände fallen aus dem Loch hinaus. Benutzen Sie den Spender, um auf sein Inventar zuzugreifen. Versorgen Sie ihn mit Redstoneenergie, um den Spender einen Gegenstand abwerfen oder in einen Behälter ablegen zu lassen.
Downwards-Facing Dropper=Nach unten zeigender Spender
Upwards-Facing Dropper=Nach oben zeigender Spender
Inventory=Inventar

View file

@ -0,0 +1,7 @@
# textdomain: mcl_droppers
Dropper=
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.=
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.=
Downwards-Facing Dropper=
Upwards-Facing Dropper=
Inventory=

Binary file not shown.

Before

Width:  |  Height:  |  Size: 491 B

View file

@ -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,10 @@ 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 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."),
groups = {pickaxey=1, material_stone=1, not_opaque=1, },
tiles = {
"mcl_observers_observer_top.png^[transformR180", "default_furnace_bottom.png",

View file

@ -0,0 +1,4 @@
# textdomain: mcl_observers
Observer=Wächter
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.=Ein Wächter ist eine Redstonekomponente, die den Block vor ihm beobachtet und einen sehr kurzen Redstoneimpuls sendet, wenn sich dieser Block ändert.
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.=Platzieren Sie den Wächter direkt vor dem Block, den Sie beobachten wollen, so dass das „Gesicht“ zum Block schaut. Der Pfeil zeigt auf die Seite des Signalausgangs, der sich gegenüber vom „Gesicht“ befindet. Hier können Sie Ihren Restonestaub oder eine beliebige andere Komponente platzieren.

View file

@ -0,0 +1,4 @@
# textdomain: mcl_observers
Observer=
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.=
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

@ -1,6 +1,7 @@
-- WALL BUTTON
-- A button that when pressed emits power for 1 second
-- and then turns off again
-- A button that when pressed emits power for a short moment and then turns off again
local S = minetest.get_translator("mesecons_button")
local button_get_output_rules = mesecon.rules.wallmounted_get
@ -78,7 +79,7 @@ local on_button_place = function(itemstack, placer, pointed_thing)
return itemstack
end
local buttonuse = "Rightclick the button to push it."
local buttonuse = S("Use the button to push it.")
mesecon.register_button = function(basename, description, texture, recipeitem, sounds, plusgroups, button_timer, push_by_arrow, longdesc)
local groups_off = table.copy(plusgroups)
@ -191,22 +192,22 @@ end
mesecon.register_button(
"stone",
"Stone Button",
S("Stone Button"),
"default_stone.png",
"mcl_core:stone",
mcl_sounds.node_sound_stone_defaults(),
{material_stone=1,handy=1,pickaxey=1},
1,
false,
"A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second. It can only be placed on solid opaque full cubes (like cobblestone).")
S("A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."))
local woods = {
{ "wood", "mcl_core:wood", "default_wood.png", "Oak Button" },
{ "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", "Acacia Button" },
{ "birchwood", "mcl_core:birchwood", "mcl_core_planks_birch.png", "Birch Button" },
{ "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", "Dark Oak Button" },
{ "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", "Spruce Button" },
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", "Jungle Button" },
{ "wood", "mcl_core:wood", "default_wood.png", S("Oak Button") },
{ "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", S("Acacia Button") },
{ "birchwood", "mcl_core:birchwood", "mcl_core_planks_birch.png", S("Birch Button") },
{ "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", S("Dark Oak Button") },
{ "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", S("Spruce Button") },
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Button") },
}
for w=1, #woods do
@ -219,7 +220,7 @@ for w=1, #woods do
{material_wood=1,handy=1,axey=1},
1.5,
true,
"A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. It can only be placed on solid opaque full cubes (like cobblestone). Wooden buttons may also be pushed by arrows.")
S("A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows."))
minetest.register_craft({
type = "fuel",

View file

@ -0,0 +1,11 @@
# textdomain: mesecons_button
Use the button to push it.=Benutzen Sie den Knopf, um ihn zu drücken.
Stone Button=Steinknopf
A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=Ein Steinknopf ist eine Redstonekomponente aus Stein. Er kann gedrückt werden, um ein Redstonesignal zu senden. Im gedrückten Zustand versorgt er benachbarte Redstonekomponenten für 1 Sekunde mit Redstoneenergie.
Oak Button=Eichenknopf
Acacia Button=Akazienknopf
Birch Button=Birkenknopf
Dark Oak Button=Schwarzeichenknopf
Spruce Button=Fichtenknopf
Jungle Button=Dschungelknopf
A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=Ein Holzknopf ist eine Redstonekomponente aus Holz. Er kann gedrückt werden, um ein Redstonesignal zu senden. Im gedrückten Zustand versorgt er benachbarte Redstonekomponenten für 1,5 Sekunden mit Redstoneenergie. Holzknöpfe können auch von Pfeilen gedrückt werden.

View file

@ -0,0 +1,11 @@
# textdomain: mesecons_button
Use the button to push it.=
Stone Button=
A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=
Oak Button=
Acacia Button=
Birch Button=
Dark Oak Button=
Spruce Button=
Jungle Button=
A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=

View file

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_commandblock")
local F = minetest.formspec_escape
local function construct(pos)
local meta = minetest.get_meta(pos)
@ -72,9 +74,9 @@ local function check_commands(commands, player_name)
local cmddef = minetest.chatcommands[cmd]
if not cmddef then
-- Invalid chat command
local msg = "Error: The command “"..cmd.."” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands."
local msg = S("Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands.", cmd)
if string.sub(cmd, 1, 1) == "/" then
msg = msg .. " Hint: Try to remove the trailing slash."
msg = S("Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands. Hint: Try to remove the leading slash.", cmd)
end
return false, minetest.colorize("#FF0000", msg)
end
@ -83,7 +85,7 @@ local function check_commands(commands, player_name)
for cmd_priv, _ in pairs(cmddef.privs) do
if player_privs[cmd_priv] ~= true then
local msg = "Error: You have insufficient privileges to use the command “"..cmd.."” (missing privilege: "..cmd_priv..")! The command block has not been changed."
local msg = S("Error: You have insufficient privileges to use the command “@1” (missing privilege: @2)! The command block has not been changed.", cmd, cmd_priv)
return false, minetest.colorize("#FF0000", msg)
end
end
@ -127,36 +129,53 @@ local function commandblock_action_off(pos, node)
end
local on_rightclick = function(pos, node, player, itemstack, pointed_thing)
-- Only allow access in Creative Mode
local can_edit = true
-- Only allow write access in Creative Mode
if not minetest.settings:get_bool("creative_mode") then
return
can_edit = false
end
local pname = player:get_player_name()
if minetest.is_protected(pos, pname) then
minetest.record_protection_violation(pos, pname)
return
can_edit = false
end
local privs = minetest.get_player_privs(pname)
if not privs.maphack then
minetest.chat_send_player(pname, "Access denied. You need the “maphack” privilege to edit command blocks.")
return
can_edit = false
end
local meta = minetest.get_meta(pos)
local commands = meta:get_string("commands")
if not commands then
commands = ""
end
local commander = meta:get_string("commander")
local commanderstr
if commander == "" or commander == nil then
commanderstr = "Error: No commander! Block must be replaced."
commanderstr = S("Error: No commander! Block must be replaced.")
else
commanderstr = "Commander: "..commander
commanderstr = S("Commander: @1", commander)
end
local textrea_name, submit, textarea
-- If editing is not allowed, only allow read-only access.
-- Player can still view the contents of the command block.
if can_edit then
textarea_name = "commands"
submit = "button_exit[3.3,4.5;2,1;submit;"..F(S("Submit")).."]"
else
textarea_name = ""
submit = ""
end
if not can_edit and commands == "" then
textarea = "label[0.5,0.5;"..F(S("No commands.")).."]"
else
textarea = "textarea[0.5,0.5;8.5,4;"..textarea_name..";"..F(S("Commands:"))..";"..F(commands).."]"
end
local formspec = "invsize[9,5;]" ..
"textarea[0.5,0.5;8.5,4;commands;Commands;"..commands.."]" ..
"button_exit[3.3,4.5;2,1;submit;Submit]" ..
textarea ..
submit ..
"image_button[8,4.5;1,1;doc_button_icon_lores.png;doc;]" ..
"label[0,4;"..minetest.formspec_escape(commanderstr).."]" ..
"tooltip[doc;Help]"
"tooltip[doc;"..F(S("Help")).."]" ..
"label[0,4;"..F(commanderstr).."]"
minetest.show_formspec(pname, "commandblock_"..pos.x.."_"..pos.y.."_"..pos.z, formspec)
end
@ -175,7 +194,7 @@ local on_place = function(itemstack, placer, pointed_thing)
local privs = minetest.get_player_privs(placer:get_player_name())
if not privs.maphack then
minetest.chat_send_player(placer:get_player_name(), "Placement denied. You need the “maphack” privilege to place command blocks.")
minetest.chat_send_player(placer:get_player_name(), S("Placement denied. You need the “maphack” privilege to place command blocks."))
return itemstack
end
@ -183,33 +202,30 @@ 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("Everyone can activate a command block and look at its commands, but not everyone can edit and place them.").."\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 view the commands in a command block, use it. To activate the command block, just supply it with redstone power. This will execute the commands once. To execute the commands again, turn the redstone power off and on again.")..
"\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("To be able 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. Use the command block (in Creative Mode!) to edit its commands. Read the help entry “Advanced topics > Server Commands” to understand how commands 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"..
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("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"..
Example 1:
time 12000
S("Command blocks support placeholders, insert one of these placeholders and they will be replaced by some other text:").."\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"..
Sets the game clock to 12:00
S("Example 1:\n time 12000\nSets the game clock to 12:00").."\n\n"..
Example 2:
give @n mcl_core:apple 5
Gives the nearest player 5 apples]],
S("Example 2:\n give @@n mcl_core:apple 5\nGives 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},
@ -250,12 +266,12 @@ minetest.register_node("mesecons_commandblock:commandblock_on", {
minetest.register_on_player_receive_fields(function(player, formname, fields)
if string.sub(formname, 1, 13) == "commandblock_" then
if not fields.submit and not fields.key_enter and not fields.doc then
if (not fields.submit and not fields.key_enter and not fields.doc) or (not fields.commands) then
return
end
local privs = minetest.get_player_privs(player:get_player_name())
if not privs.maphack then
minetest.chat_send_player(player:get_player_name(), "Access denied. You need the “maphack” privilege to edit command blocks.")
minetest.chat_send_player(player:get_player_name(), S("Access denied. You need the “maphack” privilege to edit command blocks."))
return
end
@ -268,7 +284,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local pos = {x=tonumber(x), y=tonumber(y), z=tonumber(z)}
local meta = minetest.get_meta(pos)
if not minetest.settings:get_bool("creative_mode") then
minetest.chat_send_player(player:get_player_name(), "Editing the command block has failed! You can only change the command block in Creative Mode!")
minetest.chat_send_player(player:get_player_name(), S("Editing the command block has failed! You can only change the command block in Creative Mode!"))
return
end
local check, error_message = check_commands(fields.commands, player:get_player_name())
@ -280,7 +296,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
meta:set_string("commands", fields.commands)
end
else
minetest.chat_send_player(player:get_player_name(), "Editing the command block has failed! The command block is gone.")
minetest.chat_send_player(player:get_player_name(), S("Editing the command block has failed! The command block is gone."))
end
end
end)

View file

@ -0,0 +1,28 @@
# textdomain: mesecons_commandblock
Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands.=Fehler: Der Befehl „@1“ existiert nicht; Ihr Befehlsblock bleibt unverändert. Benutzen Sie den Chatbefehl „help“ für eine Liste der verfügbaren Befehle.
Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands. Hint: Try to remove the leading slash.=Fehler: Der Befehl „@1“ existiert nicht; Ihr Befehlsblock bleibt unverändert. Benutzen Sie den Chatbefehl „help“ für eine Liste der verfügbaren Befehle. Tipp: Versuchen Sie, den Schrägstrich am Anfang zu entfernen.
Error: You have insufficient privileges to use the command “@1” (missing privilege: @2)! The command block has not been changed.=Fehler: Sie haben nicht die ausreichenden Privilegien, um den Befehl „@1“ zu benutzen (fehlendes Privileg: @2)! Der Befehlsblock bleibt unverändert.
Error: No commander! Block must be replaced.=Fehler: Kein Kommandant! Block muss ersetzt werden.
Commander: @1=Kommandant: @1
Submit=OK
No commands.=Keine Befehle.
Commands:=Befehle:
Help=Hilfe
Placement denied. You need the “maphack” privilege to place command blocks.=Platzierung fehlgeschlagen. Sie brauchen das „maphack“-Privileg, um Befehlsblöcke platzieren zu können.
Command Block=Befehlsblock
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.=Befehlsblöcke sind mächtige Redstonekomponenten, die das Gefüge der Realität selbst verändern können. Mit anderen Worten, sie lassen den Server Serverbefehle ausführen, wenn sie mit Redstoneenergie versorgt werden.
Everyone can activate a command block and look at its commands, but not everyone can edit and place them.=Jeder kann einen Befehlsblock aktivieren und sich seine Befehle ansehen, aber nicht jeder kann sie bearbeiten und platzieren.
To view the commands in a command block, use it. To activate the command block, just supply it with redstone power. This will execute the commands once. To execute the commands again, turn the redstone power off and on again.=Um die Befehle in einem Befehlsblock zu betrachten, benutzen Sie ihn. Um ihn zu aktivieren, versorgen Sie ihn einfach mit Redstoneenergie. Das wird die Befehle einmalig ausführen. Um sie erneut auszuführen, schalten Sie die Redstoneenergie aus und wieder ein.
To be able 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. Use the command block (in Creative Mode!) to edit its commands. Read the help entry “Advanced topics > Server Commands” to understand how commands 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.=Um einen Befehlsblock platzieren und die Befehle ändern zu können, müssen Sie im Kreativmodus sein und das „maphack“-Privileg haben. Ein neuer Befehlsblock hat keine Befehle und tut gar nichts. Benutzen Sie den Befehlsblock (im Kreativmodus!), um seine Befehle zu bearbeiten. Lesen Sie den Hilfeeintrag „Fortgeschrittenes > Serverbefehle“, um zu verstehen, wie Befehle funktionieren. Jede Zeile enthält einen einzigen Befehl. Sie geben Sie wie in der Konsole ein, aber ohne den Schrägstrich am Anfang.
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.=Alle Befehle werden im Namen des Spielers, der den Befehlsblock platziert hat, ausgeführt, als ob der Spieler die Befehle eingegeben hätte. Diesen Spieler nennen wir den „Kommandanten“ des Blocks.
Command blocks support placeholders, insert one of these placeholders and they will be replaced by some other text:=Befehlsblöcke unterstützen Platzhalter. Geben Sie einen dieser Platzhalter ein und sie werden durch einen anderen Text ersetzt:
• “@@c”: commander of this command block=• „@@c“: Kommandant dieses Befehlsblocks
• “@@n” or “@@p”: nearest player from the command block=• „@@n“ oder „@@p“: Nächster Spieler am Befehlsblock
• “@@f” farthest player from the command block=• „@@f“: Der vom Befehlsblock am weitesten entfernte Spieler
• “@@r”: random player currently in the world=• „@@r“: Zufälliger Spieler in der Welt
• “@@@@”: literal “@@” sign=• „@@@@“: Nur das „@@“-Zeichen
Example 1:@n time 12000@nSets the game clock to 12:00=1. Beispiel:@n time 12000@nSetzt die Spieluhr auf 12:00 Uhr
Example 2:@n give @@n mcl_core:apple 5@nGives the nearest player 5 apples=2. Beispiel:@n give @@n mcl_core:apple 5@nGibt dem nächsten Spieler 5 Äpfel
Access denied. You need the “maphack” privilege to edit command blocks.=Zugriff verweigert. Sie brauchen das „maphack“-Privileg, um Befehlsblöcke zu bearbeiten.
Editing the command block has failed! You can only change the command block in Creative Mode!=Bearbeitung des Befehlsblocks fehlgeschlagen! Sie können den Befehlsblock nur im Kreativmodus ändern!
Editing the command block has failed! The command block is gone.=Bearbeiten des Befehlsblocks fehlgeschlagen! Der Befehlsblock ist verschwunden.

View file

@ -0,0 +1,28 @@
# textdomain: mesecons_commandblock
Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands.=
Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands. Hint: Try to remove the leading slash.=
Error: You have insufficient privileges to use the command “@1” (missing privilege: @2)! The command block has not been changed.=
Error: No commander! Block must be replaced.=
Commander: @1=
Submit=
No commands.=
Commands:=
Help=
Placement denied. You need the “maphack” privilege to place command blocks.=
Command Block=
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.=
Everyone can activate a command block and look at its commands, but not everyone can edit and place them.=
To view the commands in a command block, use it. To activate the command block, just supply it with redstone power. This will execute the commands once. To execute the commands again, turn the redstone power off and on again.=
To be able 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. Use the command block (in Creative Mode!) to edit its commands. Read the help entry “Advanced topics > Server Commands” to understand how commands 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.=
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.=
Command blocks support placeholders, insert one of these placeholders and they will be replaced by some other text:=
• “@@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=
Example 1:@n time 12000@nSets the game clock to 12:00=
Example 2:@n give @@n mcl_core:apple 5@nGives the nearest player 5 apples=
Access denied. You need the “maphack” privilege to edit command blocks.=
Editing the command block has failed! You can only change the command block in Creative Mode!=
Editing the command block has failed! The command block is gone.=

View file

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

View file

@ -0,0 +1,8 @@
# textdomain: mesecons_delayer
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.=Redstoneverstärker sind vielseitige Komponenten mit den folgenden Verwendungszwecken: 1.: Sie lassen Signale nur in eine Richtung durch. 2.: Sie verzögern das Signal. 3.: Sie können optional ihr Ausgangssignal sperren
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.=Um einen Redstoneverstärker zu versorgen, senden Sie ein Signal in „Pfeilrichtung“ (dem Eingang). Das Signal geht aus der gegenüberliegenden Seite (dem Ausgang) mit einer Verzögerung hinaus. Um die Verzögerung zu ändern, benutzen Sie den Redstoneverstärker. Die Verzögerung ist zwischen 0,1 bis 0,4 Sekunden lang und kann in Schritten von 0,1 Sekunden geändert werden. Das wird mit der Position der verschiebbaren Redstonefackel angezeigt.
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.=Um einen Verstärker zu sperren, senden Sie ein Signal eines benachbarten Verstärkers in eines der Seiten. Im gesperrten Zustand verschwindet die verschiebbare Redstonefackel, die Ausgabe ändert sich nicht mehr und der Eingang wird ignoriert.
Redstone Repeater=Redstoneverstärker
Redstone Repeater (Powered)=Redstoneverstärker (bestromt)
Redstone Repeater (Locked)=Redstoneverstärker (gesperrt)
Redstone Repeater (Locked, Powered)=Redstoneverstärker (gesperrt, bestromt)

View file

@ -0,0 +1,8 @@
# textdomain: mesecons_delayer
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.=
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.=
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.=
Redstone Repeater=
Redstone Repeater (Powered)=
Redstone Repeater (Locked)=
Redstone Repeater (Locked, Powered)=

View file

@ -1,9 +1,11 @@
local S = minetest.get_translator("mesecons_lightstone")
minetest.register_node("mesecons_lightstone:lightstone_off", {
tiles = {"jeija_lightstone_gray_off.png"},
groups = {handy=1, mesecon_effector_off = 1, mesecon = 2},
is_ground_content = false,
description= "Redstone Lamp",
_doc_items_longdesc = "Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power.",
description= S("Redstone Lamp"),
_doc_items_longdesc = S("Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power."),
sounds = mcl_sounds.node_sound_glass_defaults(),
mesecons = {effector = {
action_on = function (pos, node)

View file

@ -0,0 +1,3 @@
# textdomain: mesecons_lightstone
Redstone Lamp=Redstonelampe
Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power.=Redstonelampen sind einfache Redstonekomponenten, die hell aufleuchten (Helligkeitspegel von 14), wenn sie Redstoneenergie erhalten.

View file

@ -0,0 +1,3 @@
# textdomain: mesecons_lightstone
Redstone Lamp=
Redstone lamps are simple redstone components which glow brightly (light level 14) when they receive redstone power.=

View file

@ -310,27 +310,29 @@ function mesecon.mvps_move_objects(pos, dir, nodestack)
local nn = minetest.get_node(np)
if not ((not minetest.registered_nodes[nn.name])
or minetest.registered_nodes[nn.name].walkable) then
obj:setpos(np)
obj:set_pos(np)
end
end
end
end
mesecon.register_mvps_stopper("mcl_core:obsidian")
mesecon.register_mvps_stopper("mcl_core:bedrock")
-- Unmovable by design
mesecon.register_mvps_stopper("mcl_core:barrier")
mesecon.register_mvps_stopper("mcl_core:realm_barrier")
mesecon.register_mvps_stopper("mcl_core:void")
mesecon.register_mvps_stopper("mcl_chests:chest")
mesecon.register_mvps_stopper("mcl_chests:chest_left")
mesecon.register_mvps_stopper("mcl_chests:chest_right")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_left")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_right")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_on")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_on_left")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_on_right")
mesecon.register_mvps_stopper("mcl_core:bedrock")
mesecon.register_mvps_stopper("mcl_core:obsidian")
mesecon.register_mvps_stopper("mcl_chests:ender_chest")
mesecon.register_mvps_stopper("mcl_mobspawners:spawner")
mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_off")
mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_on")
mesecon.register_mvps_stopper("mcl_portals:portal")
mesecon.register_mvps_stopper("mcl_portals:portal_end")
mesecon.register_mvps_stopper("mcl_portals:end_portal_frame")
mesecon.register_mvps_stopper("mcl_portals:end_portal_frame_eye")
-- Unmovable by technical restrictions.
-- Open formspec would screw up if node is destroyed (minor problem)
mesecon.register_mvps_stopper("mcl_furnaces:furnace")
mesecon.register_mvps_stopper("mcl_furnaces:furnace_active")
mesecon.register_mvps_stopper("mcl_hoppers:hopper")
@ -344,24 +346,9 @@ mesecon.register_mvps_stopper("mcl_dispensers:dispenser_down")
mesecon.register_mvps_stopper("mcl_anvils:anvil")
mesecon.register_mvps_stopper("mcl_anvils:anvil_damage_1")
mesecon.register_mvps_stopper("mcl_anvils:anvil_damage_2")
mesecon.register_mvps_stopper("mcl_jukebox:jukebox")
mesecon.register_mvps_stopper("mcl_mobspawners:spawner")
mesecon.register_mvps_stopper("mcl_signs:standing_sign")
mesecon.register_mvps_stopper("mcl_signs:wall_sign")
mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_off")
mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_on")
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_off")
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_on")
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_off")
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_on")
mesecon.register_mvps_stopper("mesecons_noteblock:noteblock")
mesecon.register_mvps_stopper("3d_armor_stand:armor_stand")
mesecon.register_mvps_stopper("mcl_banners:standing_banner")
mesecon.register_mvps_stopper("mcl_banners:hanging_banner")
mesecon.register_mvps_stopper("mcl_portals:portal")
mesecon.register_mvps_stopper("mcl_portals:portal_end")
mesecon.register_mvps_stopper("mcl_portals:end_portal_frame")
mesecon.register_mvps_stopper("mcl_portals:end_portal_frame_eye")
-- Would screw up on/off state of trapped chest (big problem)
-- Glazed terracotta: unpullable
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_red")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_orange")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_yellow")

View file

@ -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("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"..
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,
@ -20,7 +22,7 @@ The note block will only play a note when it is below air, otherwise, it stays s
minetest.record_protection_violation(pos, protname)
return
end
node.param2 = (node.param2+1)%24
node.param2 = (node.param2+1)%25
mesecon.noteblock_play(pos, node.param2)
minetest.set_node(pos, node)
end,
@ -80,6 +82,8 @@ local soundnames_piano = {
"mesecons_noteblock_asharp2",
"mesecons_noteblock_b2",
-- TODO: Add dedicated sound file?
"mesecons_noteblock_b2",
}
mesecon.noteblock_play = function (pos, param2)
@ -89,24 +93,32 @@ mesecon.noteblock_play = function (pos, param2)
return
end
-- Default: One of 24 piano notes
local soundname = soundnames_piano[param2]
local block_below_name = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if minetest.get_item_group(block_below_name, "material_glass") ~= 0 then
-- TODO: 24 sticks and clicks
soundname="mesecons_noteblock_temp_stick"
elseif minetest.get_item_group(block_below_name, "material_wood") ~= 0 then
-- TODO: 24 bass guitar sounds
soundname="mesecons_noteblock_temp_bass_guitar"
elseif minetest.get_item_group(block_below_name, "material_sand") ~= 0 then
-- TODO: 24 snare drum sounds
soundname="mesecons_noteblock_temp_snare"
elseif minetest.get_item_group(block_below_name, "material_stone") ~= 0 then
-- TODO: 24 bass drum sounds
soundname="mesecons_noteblock_temp_kick"
local param2_to_pitch = function(param2)
return 2^((param2-12)/12)
end
local soundname, pitch
if minetest.get_item_group(block_below_name, "material_glass") ~= 0 then
soundname="mesecons_noteblock_stick"
pitch = param2_to_pitch(param2)
elseif minetest.get_item_group(block_below_name, "material_wood") ~= 0 then
soundname="mesecons_noteblock_bass_guitar"
pitch = param2_to_pitch(param2)
elseif minetest.get_item_group(block_below_name, "material_sand") ~= 0 then
soundname="mesecons_noteblock_snare"
pitch = param2_to_pitch(param2)
elseif minetest.get_item_group(block_below_name, "material_stone") ~= 0 then
soundname="mesecons_noteblock_kick"
pitch = param2_to_pitch(param2)
else
-- Default: One of 25 piano notes
soundname = soundnames_piano[param2]
-- Workaround: Final sound gets automatic higher pitch instead
if param2 == 24 then
pitch = 2^(1/12)
end
end
minetest.sound_play(soundname,
{pos = pos, gain = 1.0, max_hear_distance = 48,})
{pos = pos, gain = 1.0, max_hear_distance = 48, pitch = pitch})
end

View file

@ -0,0 +1,10 @@
# textdomain: mesecons_noteblock
Note Block=Notenblock
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.=Ein Notenblock ist ein musikalischer Block, der eine von vielen Noten von verschiedenen Instrumenten spielt, wenn er geschlagen oder mit Redstoneenergie versorgt wird.
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:=Benutzen Sie den Notenblock, um die nächste Musiknote zu wählen (es gibt 25 Halbtöne, oder 2 Oktaven). Das gespielte Instrument hängt vom Material des Blocks unter dem Notenblock ab:
• Glass: Sticks=• Glas: Stöcke
• Wood: Bass guitar=• Holz: Bassgitarre
• Stone: Bass drum=• Stein: Basstrommel
• Sand or gravel: Snare drum=• Sand oder Kies: Kleine Trommel
• Anything else: Piano=• Alles andere: Klavier
The note block will only play a note when it is below air, otherwise, it stays silent.=Der Notenblock wird nur eine Note spielen, wenn er sich unter Luft befindet, sonst bleibt er stumm.

View file

@ -0,0 +1,10 @@
# textdomain: mesecons_noteblock
Note Block=
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.=
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:=
• Glass: Sticks=
• Wood: Bass guitar=
• Stone: Bass drum=
• Sand or gravel: Snare drum=
• Anything else: Piano=
The note block will only play a note when it is below air, otherwise, it stays silent.=

View file

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

View file

@ -0,0 +1,6 @@
# textdomain: mesecons_pistons
This block can have one of 6 possible orientations.=Dieser Block kann eine von 6 möglichen Richtungen annehmen.
Piston=Kolben
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.=Ein Kolben ist eine Redstonekomponente mit einem Schieber den Block oder die Blöcke vor ihm schieben wird, wenn er mit Redstoneenergie versorgt wird. Allerdings können nicht alle Blöcke können geschoben werden.
Sticky Piston=Klebriger Kolben
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.=Ein klebriger Kolben ist eine Redstonekomponente mit einem klebrigen Schieber, der ein- und ausgefahren werden kann. Er fährt aus, wenn er mit Redstoneenergie versorgt wird. Wenn der Schieber ausgefahren wird, schiebt er den Block oder die Blöcke vor ihm. Wird er eingefahren, zieht er den Block vor ihm zu sich. Nicht alle Blöcke können geschoben oder gezogen werden.

View file

@ -0,0 +1,6 @@
# textdomain: mesecons_pistons
This block can have one of 6 possible orientations.=
Piston=
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.=
Sticky Piston=
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.=

View file

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

View file

@ -0,0 +1,12 @@
# textdomain: mesecons_pressureplates
A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it.=Eine Druckplatte ist eine Redstonekomponente, die ihre benachbarten Blöcke mit Redstoneenergie versorgt, wenn sich jemand oder etwas auf ihr befindet.
Oak Pressure Plate=Eichendruckplatte
Acacia Pressure Plate=Akaziendruckplatte
Birch Pressure Plate=Birkendruckplatte
Dark Oak Pressure Plate=Schwarzeichendruckplatte
Spruce Pressure Plate=Fichtendruckplatte
Jungle Pressure Plate=Dschungeldruckplatte
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.=Eine Holzdruckplatte ist eine Redstonekomponente, die ihre benachbarten Blöcke mit Redstoneenergie versorgt, solange sich ein beliebiges bewegliches Objekt (wie Gegenstände, Spieler und Mobs) auf ihm befindet.
Stone Pressure Plate=Steindruckplatte
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.=Eine Steindruckplatte ist eine Redstonekomponente, die ihre benachbarten Blöcke mit Redstoneenergie versorgt, solange sich ein Spieler oder Mob auf ihm befindet. Sie wird von nichts anderem ausgelöst.

View file

@ -0,0 +1,11 @@
# textdomain: mesecons_pressureplates
A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it.=
Oak Pressure Plate=
Acacia Pressure Plate=
Birch Pressure Plate=
Dark Oak Pressure Plate=
Spruce Pressure Plate=
Jungle Pressure Plate=
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.=
Stone Pressure Plate=
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.=

View file

@ -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,9 +58,10 @@ 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.",
_doc_items_usagehelp = "Rightclick the daylight sensor to turn it into an inverted daylight sensor, which supplies redstone energy when it is in moonlight.",
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.").."\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."),
sounds = mcl_sounds.node_sound_glass_defaults(),
mesecons = {receptor = {
state = mesecon.state.off,
@ -136,7 +139,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,9 +177,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.",
_doc_items_usagehelp = "Rightclick the daylight sensor to turn it into a daylight sensor.",
description=S("Inverted Daylight Sensor"),
_doc_items_create_entry = false,
sounds = mcl_sounds.node_sound_glass_defaults(),
mesecons = {receptor = {
state = mesecon.state.off,
@ -233,5 +235,7 @@ minetest.register_craft({
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mesecons_solarpanel:solar_panel_off", "nodes", "mesecons_solarpanel:solar_panel_on")
doc.add_entry_alias("nodes", "mesecons_solarpanel:solar_panel_inverted_off", "nodes", "mesecons_solarpanel:solar_panel_inverted_on")
doc.add_entry_alias("nodes", "mesecons_solarpanel:solar_panel_off", "nodes", "mesecons_solarpanel:solar_panel_inverted_off")
doc.add_entry_alias("nodes", "mesecons_solarpanel:solar_panel_off", "nodes", "mesecons_solarpanel:solar_panel_inverted_off")
doc.add_entry_alias("nodes", "mesecons_solarpanel:solar_panel_off", "nodes", "mesecons_solarpanel:solar_panel_inverted_on")
end

View file

@ -0,0 +1,6 @@
# textdomain: mesecons_solarpanel
Daylight Sensor=Tageslichtsensor
Daylight sensors are redstone components which provide redstone power when they are in sunlight and no power otherwise. They can also be inverted.=Tageslichtsensoren sind Redstonekomponenten, die Redstoneenergie liefern, wenn sie im Sonnenlicht stehen, sonst nicht. Sie können auch invertiert werden.
Inverted Daylight Sensor=Invertierter Tageslichtsensor
Use the daylight sensor to toggle its state.=Benutzen Sie den Tageslichtsensor, um seinen Zustand umzuschalten.
In inverted state, they provide redstone power when they are not in sunlight and no power otherwise.=Im invertierten Zustand erzeugen sie Redstoneenergie, wenn sie sich nicht im Tageslicht befinden, ansonsten nicht.

View file

@ -0,0 +1,6 @@
# textdomain: mesecons_solarpanel
Daylight Sensor=
Daylight sensors are redstone components which provide redstone power when they are in sunlight and no power otherwise. They can also be inverted.=
Use the daylight sensor to toggle its state.=
Inverted Daylight Sensor=
In inverted state, they provide redstone power when they are not in sunlight and no power otherwise.=

View file

@ -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,9 @@ 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 be placed at the side and on the top of full solid opaque blocks."),
"jeija_torches_on.png",
"mcl_torches_torch_floor.obj", "mcl_torches_torch_wall.obj",
{"jeija_torches_on.png"},
@ -193,8 +191,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},

View file

@ -0,0 +1,6 @@
# textdomain: mesecons_torch
Redstone Torch=Redstonefackel
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.=Eine Redstonefackel ist eine Redstonekomponente, die benutzt werden kann, um ein Redstonesignal zu invertieren. Sie versorgt die benachbarten Blöcke mit Redstoneenergie, ausgenommen den Block, an dem sie befestigt wurde. Eine Redstonefackel leuchtet normalerweise, aber sie kann auch ausgeschaltet werden, indem der Block, an dem sie befestigt ist, bestromt wird. Wenn sie aus ist, wird sie nichts mit Redstoneenergie versorgen.
Redstone torches can be placed at the side and on the top of full solid opaque blocks.=Redstonefackeln können an der Seite und auf der Oberseite der meisten undurchsichtigen ganzen Blöcke platziert werden.
Block of Redstone=Redstoneblock
A block of redstone permanently supplies redstone power to its surrounding blocks.=Ein Redstoneblock versorgt seine benachbarten Blöcke beständig mit Redstoneenergie.

View file

@ -0,0 +1,6 @@
# textdomain: mesecons_torch
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 be placed at the side and on the top of full solid opaque blocks.=
Block of Redstone=
A block of redstone permanently supplies redstone power to its surrounding blocks.=

View file

@ -1,3 +1,5 @@
local S = minetest.get_translator("mesecons_wallever")
local lever_get_output_rules = mesecon.rules.buttonlike_get
-- LEVER
@ -20,9 +22,9 @@ 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.",
_doc_items_usagehelp = "Right-click the lever to flip it on or off.",
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 = S("Use 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})
mesecon.receptor_on(pos, lever_get_output_rules(node))
@ -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})

View file

@ -0,0 +1,4 @@
# textdomain: mesecons_wallever
Lever=Hebel
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.=Ein Hebel ist eine Redstonekomponente, die ein- und ausgeschaltet werden kann. Er versorgt seine benachbarten Blöcke mit Redstoneenergie, solange er sich im eingeschalteten Zustand befindet.
Use the lever to flip it on or off.=Benutzen Sie den Hebel, um ihn ein- oder auszuschalten.

View file

@ -0,0 +1,4 @@
# textdomain: mesecons_wallever
Lever=
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.=
Use the lever to flip it on or off.=

View file

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

View file

@ -0,0 +1,10 @@
# textdomain: mesecons_wires
Redstone is a versatile conductive mineral which transmits redstone power. It can be placed on the ground as a trail.=Redstone ist ein vielseitiges leitendes Mineral, der Redstoneenergie überträgt. Es kann auf dem Boden in Form einer Spur platziert werden.
A redstone trail can be in two states: Powered or not powered. A powered redstone trail will power (and thus activate) adjacent redstone components.=Eine Redstonespur kann einen von zwei Zuständen annehmen: Bestromt und unbestromt. Eine bestromte Redstonespur wird benachbarte Redstonekomponenten bestromen (und somit aktivieren).
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.=Redstoneenergie kann von verschiedenen Redstonekomponenten erhalten werden, wie zum Beispiel einem Redstoneblock oder einem Knopf. Redstoneenergie wird benutzt, um verschiedene Mechanismen zu aktivieren, wie Redstonelampen oder Kolben.
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.=Platzieren Sie Redstone auf dem Boden, um eine Redstonespur auszulegen. Die Spuren werden sich automatisch miteinander verbinden und sie können auch über Hügel gehen.
Read the help entries on the other redstone components to learn how redstone components interact.=Lesen Sie die Hilfeeinträge über andere Redstonekomponenten, um zu erfahren, wie sie interagieren.
Redstone=Redstone
Powered Redstone Spot (@1)=Bestromter Redstoneklecks (@1)
Redstone Trail (@1)=Redstonespur (@1)
Powered Redstone Trail (@1)=Bestromte Redstonespur (@1)

View file

@ -0,0 +1,10 @@
# textdomain: mesecons_wires
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.=
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.=
Read the help entries on the other redstone components to learn how redstone components interact.=
Redstone=
Powered Redstone Spot (@1)=
Redstone Trail (@1)=
Powered Redstone Trail (@1)=

View file

@ -1 +0,0 @@
The presence of this file indicates that the current folder is a modpack.

View file

@ -1,3 +1,5 @@
local S = minetest.get_translator("mcl_anvils")
local MAX_NAME_LENGTH = 30
local MAX_WEAR = 65535
local SAME_TOOL_REPAIR_BOOST = math.ceil(MAX_WEAR * 0.12) -- 12%
@ -16,14 +18,16 @@ local function get_anvil_formspec(set_name)
return "size[9,8.75]"..
"background[-0.19,-0.25;9.41,9.49;mcl_anvils_inventory.png]"..
mcl_vars.inventory_header..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
"list[current_player;main;0,7.74;9,1;]"..
"list[context;input;1,2.5;1,1;]"..
"list[context;input;4,2.5;1,1;1]"..
"list[context;output;8,2.5;1,1;]"..
"label[3,0.1;"..minetest.formspec_escape(minetest.colorize("#313131", S("Repair and Name"))).."]"..
"field[3.25,1;4,1;name;;"..minetest.formspec_escape(set_name).."]"..
"field_close_on_enter[name;false]"..
"button[7,0.7;2,1;name_button;Set Name]"..
"button[7,0.7;2,1;name_button;"..minetest.formspec_escape(S("Set Name")).."]"..
"listring[context;output]"..
"listring[current_player;main]"..
"listring[context;input]"..
@ -224,6 +228,7 @@ local function damage_anvil(pos)
drop_anvil_items(pos, meta)
minetest.sound_play(mcl_sounds.node_sound_metal_defaults().dug, {pos=pos, max_hear_distance=16})
minetest.remove_node(pos)
minetest.check_single_for_falling({x=pos.x, y=pos.y+1, z=pos.z})
return true
end
end
@ -433,20 +438,20 @@ if minetest.get_modpath("screwdriver") then
end
local anvildef0 = table.copy(anvildef)
anvildef0.description = "Anvil"
anvildef0.description = S("Anvil")
anvildef0._doc_items_longdesc =
[[The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!]]
S("The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!")
anvildef0._doc_items_usagehelp =
"To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.".."\n"..
"To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.".."\n"..
"There are two possibilities to repair tools (and armor):".."\n"..
"• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.".."\n"..
"• 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"..
"Armor counts as a tool. It is possible to repair and rename a tool in a single step.".."\n\n"..
"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."
S("To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.").."\n"..
S("To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.").."\n"..
S("There are two possibilities to repair tools (and armor):").."\n"..
S("• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.").."\n"..
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.")
local anvildef1 = table.copy(anvildef)
anvildef1.description = "Slightly Damaged Anvil"
anvildef1.description = S("Slightly Damaged Anvil")
anvildef1._doc_items_create_entry = false
anvildef1.groups.not_in_creative_inventory = 1
anvildef1.groups.anvil = 2
@ -454,7 +459,7 @@ anvildef1._doc_items_create_entry = false
anvildef1.tiles = {"mcl_anvils_anvil_top_damaged_1.png^[transformR90", "mcl_anvils_anvil_base.png", "mcl_anvils_anvil_side.png"}
local anvildef2 = table.copy(anvildef)
anvildef2.description = "Very Damaged Anvil"
anvildef2.description = S("Very Damaged Anvil")
anvildef2._doc_items_create_entry = false
anvildef2.groups.not_in_creative_inventory = 1
anvildef2.groups.anvil = 3

View file

@ -0,0 +1,15 @@
# textdomain: mcl_anvils
Set Name=Name setzen
Repair and Name=Reparieren und benennen
Inventory=Inventar
Anvil=Amboss
The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!=Der Amboss ermöglicht es, Werkzeuge und Rüstung zu reparieren und Gegenstände zu benennen. Er hat jedoch eine begrenzte Lebensdauer. Lassen Sie ihn nicht auf Ihren Kopf fallen, das könnte ziemlich schmerzhaft sein!
To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.=Um einen Amboss zu benutzen, rechtsklicken Sie auf ihn. Ein Amboss hat 2 Eingabeplätze (links) und einen Ausgabeplatz (rechts).
To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.=Um Gegenstände umzubenennen, platzieren Sie einen Gegenstand in einen der Eingangsplätze und lassen Sie den anderen frei. Geben Sie einen Namen ein und drücken Sie die Eingabetaste oder „Name setzen”, dann nehmen Sie den umbenannten Gegenstand an sich.
There are two possibilities to repair tools (and armor):=Es gibt zwei Möglichkeiten, Werkzeuge (und Rüstung) zu reparieren:
• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.=• Werkzeug + Werkzeug: Platzieren sie zwei gleiche Werkzeuge in die Eingangsplätze. Der Zustand des reparierten Werkzeugs ist die Summe des Zustands beider Eingangswerkzeuge, plus einem Bonus von 12%.
• 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%.=• Werkzeug + Material: Einige Werkzeuge können auch repariert werden, indem man sie mit einem Gegenstand, aus dem sie gemacht worden sind, kombiniert. Zum Beispiel können Eisenspitzhacken mit Eisenbarren repariert werden. Dadurch wird das Werkzeug um 25% repariert.
Armor counts as a tool. It is possible to repair and rename a tool in a single step.=Rüstung zählt als Werkzeug. Es ist möglich, ein Werkzeug in einem Arbeitsschritt zu reparieren und zu benennen.
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.=Der Amboss hat begrenze Lebensdauer und 3 Schadensstufen: Kein Schaden, leicht beschädigt, und stark beschädigt. Jedes mal, wenn Sie etwas reparieren oder umbenennen, gibt es eine 12%-ige Chance, dass der Amboss Schaden nimmt. Ambosse können auch beschädigt werden, wenn sie um mehr als 1 Block fallen. Wenn ein sehr beschädigter Amboss erneut beschädigt wird, wird er zerstört.
Slightly Damaged Anvil=Leicht beschädigter Amboss
Very Damaged Anvil=Stark beschädigter Amboss

View file

@ -0,0 +1,15 @@
# textdomain: mcl_anvils
Set Name=
Repair and Name=
Inventory=
Anvil=
The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!=
To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.=
To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.=
There are two possibilities to repair tools (and armor):=
• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.=
• 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%.=
Armor counts as a tool. It is possible to repair and rename a tool in a single step.=
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.=
Slightly Damaged Anvil=
Very Damaged Anvil=

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

View file

@ -1,3 +1,6 @@
local S = minetest.get_translator("mcl_banners")
local N = function(s) return s end
local node_sounds
if minetest.get_modpath("mcl_sounds") then
node_sounds = mcl_sounds.node_sound_wood_defaults()
@ -14,22 +17,22 @@ mcl_banners = {}
mcl_banners.colors = {
-- Format:
-- [ID] = { banner description, wool, unified dyes color group, overlay color, dye, color name for emblazonings }
["unicolor_white"] = {"white", "White Banner", "mcl_wool:white", "#FFFFFF", "mcl_dye:white", "White" },
["unicolor_darkgrey"] = {"grey", "Grey Banner", "mcl_wool:grey", "#303030", "mcl_dye:dark_grey", "Grey" },
["unicolor_grey"] = {"silver", "Light Grey Banner", "mcl_wool:silver", "#5B5B5B", "mcl_dye:grey", "Light Grey" },
["unicolor_black"] = {"black", "Black Banner", "mcl_wool:black", "#000000", "mcl_dye:black", "Black" },
["unicolor_red"] = {"red", "Red Banner", "mcl_wool:red", "#BC0000", "mcl_dye:red", "Red" },
["unicolor_yellow"] = {"yellow", "Yellow Banner", "mcl_wool:yellow", "#E6CD00", "mcl_dye:yellow", "Yellow" },
["unicolor_dark_green"] = {"green", "Green Banner", "mcl_wool:green", "#006000", "mcl_dye:dark_green", "Green" },
["unicolor_cyan"] = {"cyan", "Cyan Banner", "mcl_wool:cyan", "#00ACAC", "mcl_dye:cyan", "Cyan" },
["unicolor_blue"] = {"blue", "Blue Banner", "mcl_wool:blue", "#0000AC", "mcl_dye:blue", "Blue" },
["unicolor_red_violet"] = {"magenta", "Magenta Banner", "mcl_wool:magenta", "#AC007C", "mcl_dye:magenta", "Magenta"},
["unicolor_orange"] = {"orange", "Orange Banner", "mcl_wool:orange", "#E67300", "mcl_dye:orange", "Orange" },
["unicolor_violet"] = {"purple", "Purple Banner", "mcl_wool:purple", "#6400AC", "mcl_dye:violet", "Violet" },
["unicolor_brown"] = {"brown", "Brown Banner", "mcl_wool:brown", "#603000", "mcl_dye:brown", "Brown" },
["unicolor_pink"] = {"pink", "Pink Banner", "mcl_wool:pink", "#DE557C", "mcl_dye:pink", "Pink" },
["unicolor_lime"] = {"lime", "Lime Banner", "mcl_wool:lime", "#30AC00", "mcl_dye:green", "Lime" },
["unicolor_light_blue"] = {"light_blue", "Light Blue Banner", "mcl_wool:light_blue", "#4040CF", "mcl_dye:lightblue", "Light Blue" },
["unicolor_white"] = {"white", S("White Banner"), "mcl_wool:white", "#FFFFFF", "mcl_dye:white", N("White") },
["unicolor_darkgrey"] = {"grey", S("Grey Banner"), "mcl_wool:grey", "#303030", "mcl_dye:dark_grey", N("Grey") },
["unicolor_grey"] = {"silver", S("Light Grey Banner"), "mcl_wool:silver", "#5B5B5B", "mcl_dye:grey", N("Light Grey") },
["unicolor_black"] = {"black", S("Black Banner"), "mcl_wool:black", "#000000", "mcl_dye:black", N("Black") },
["unicolor_red"] = {"red", S("Red Banner"), "mcl_wool:red", "#BC0000", "mcl_dye:red", N("Red") },
["unicolor_yellow"] = {"yellow", S("Yellow Banner"), "mcl_wool:yellow", "#E6CD00", "mcl_dye:yellow", N("Yellow") },
["unicolor_dark_green"] = {"green", S("Green Banner"), "mcl_wool:green", "#006000", "mcl_dye:dark_green", N("Green") },
["unicolor_cyan"] = {"cyan", S("Cyan Banner"), "mcl_wool:cyan", "#00ACAC", "mcl_dye:cyan", N("Cyan") },
["unicolor_blue"] = {"blue", S("Blue Banner"), "mcl_wool:blue", "#0000AC", "mcl_dye:blue", N("Blue") },
["unicolor_red_violet"] = {"magenta", S("Magenta Banner"), "mcl_wool:magenta", "#AC007C", "mcl_dye:magenta", N("Magenta")},
["unicolor_orange"] = {"orange", S("Orange Banner"), "mcl_wool:orange", "#E67300", "mcl_dye:orange", N("Orange") },
["unicolor_violet"] = {"purple", S("Purple Banner"), "mcl_wool:purple", "#6400AC", "mcl_dye:violet", N("Violet") },
["unicolor_brown"] = {"brown", S("Brown Banner"), "mcl_wool:brown", "#603000", "mcl_dye:brown", N("Brown") },
["unicolor_pink"] = {"pink", S("Pink Banner"), "mcl_wool:pink", "#DE557C", "mcl_dye:pink", N("Pink") },
["unicolor_lime"] = {"lime", S("Lime Banner"), "mcl_wool:lime", "#30AC00", "mcl_dye:green", N("Lime") },
["unicolor_light_blue"] = {"light_blue", S("Light Blue Banner"), "mcl_wool:light_blue", "#4040CF", "mcl_dye:lightblue", N("Light Blue") },
}
local colors_reverse = {}
@ -47,6 +50,25 @@ local layer_ratio = 255
local standing_banner_entity_offset = { x=0, y=-0.499, z=0 }
local hanging_banner_entity_offset = { x=0, y=-1.7, z=0 }
local on_dig_banner = function(pos, node, digger)
-- Check protection
local name = digger:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
-- Drop item
local meta = minetest.get_meta(pos)
local item = meta:get_inventory():get_stack("banner", 1)
if not item:is_empty() then
minetest.handle_node_drops(pos, {item:to_string()}, digger)
else
minetest.handle_node_drops(pos, {"mcl_bannes:banner_item_white"}, digger)
end
-- Remove node
minetest.remove_node(pos)
end
local on_destruct_banner = function(pos, hanging)
local offset, nodename
if hanging then
@ -56,7 +78,7 @@ local on_destruct_banner = function(pos, hanging)
offset = standing_banner_entity_offset
nodename = "mcl_banners:standing_banner"
end
-- Find this node's banner entity and make it drop as an item
-- Find this node's banner entity and remove it
local checkpos = vector.add(pos, offset)
local objects = minetest.get_objects_inside_radius(checkpos, 0.5)
for _, v in ipairs(objects) do
@ -65,14 +87,6 @@ local on_destruct_banner = function(pos, hanging)
v:remove()
end
end
-- Drop item
local meta = minetest.get_meta(pos)
local item = meta:get_inventory():get_stack("banner", 1)
if not item:is_empty() then
minetest.add_item(pos, item)
else
minetest.add_item(pos, "mcl_banners:banner_item_white")
end
end
local on_destruct_standing_banner = function(pos)
@ -181,8 +195,9 @@ end
minetest.register_node("mcl_banners:standing_banner", {
_doc_items_entry_name = "Banner",
_doc_items_image = "mcl_banners_item_base.png^mcl_banners_item_overlay.png",
_doc_items_longdesc = "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.",
_doc_items_usagehelp = "Use crafting to draw a pattern on top of the banner. Emblazoned banners can be emblazoned again to combine various patterns. You can draw up to 6 layers on a banner that way. You can copy the pattern of a banner by placing two banners of the same color in the crafting grid—one needs to be emblazoned, the other one must be clean. Finally, you can use a banner on a cauldron with water to wash off its top-most layer.",
_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."),
_doc_items_usagehelp = S("Use crafting to draw a pattern on top of the banner. Emblazoned banners can be emblazoned again to combine various patterns. You can draw up to 12 layers on a banner that way. If the banner includes a gradient, only 3 layers are possible.").."\n"..
S("You can copy the pattern of a banner by placing two banners of the same color in the crafting grid—one needs to be emblazoned, the other one must be clean. Finally, you can use a banner on a cauldron with water to wash off its top-most layer."),
walkable = false,
is_ground_content = false,
paramtype = "light",
@ -202,11 +217,12 @@ minetest.register_node("mcl_banners:standing_banner", {
wield_image = "mcl_banners_item_base.png",
selection_box = {type = "fixed", fixed= {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} },
groups = {axey=1,handy=1, attached_node = 1, not_in_creative_inventory = 1, not_in_craft_guide = 1, material_wood=1 },
groups = {axey=1,handy=1, attached_node = 1, not_in_creative_inventory = 1, not_in_craft_guide = 1, material_wood=1, dig_by_piston=1 },
stack_max = 16,
sounds = node_sounds,
drop = "", -- Item drops are handled in entity code
on_dig = on_dig_banner,
on_destruct = on_destruct_standing_banner,
on_punch = function(pos, node)
respawn_banner_entity(pos, node)
@ -238,6 +254,7 @@ minetest.register_node("mcl_banners:hanging_banner", {
sounds = node_sounds,
drop = "", -- Item drops are handled in entity code
on_dig = on_dig_banner,
on_destruct = on_destruct_hanging_banner,
on_punch = function(pos, node)
respawn_banner_entity(pos, node)
@ -454,7 +471,7 @@ local entity_standing = {
mesh = "amc_banner.b3d",
visual_size = { x=2.499, y=2.499 },
textures = make_banner_texture(),
collisionbox = { 0, 0, 0, 0, 0, 0 },
pointable = false,
_base_color = nil, -- base color of banner
_layers = nil, -- table of layers painted over the base color.

View file

@ -0,0 +1,76 @@
# textdomain: mcl_banners
White Banner=Weißes Banner
White=weiß
Grey Banner=Graues Banner
Grey=grau
Light Grey Banner=Hellgraues Banner
Light Grey=hellgrau
Black Banner=Schwarzes Banner
Black=schwarz
Red Banner=Rotes Banner
Red=rot
Yellow Banner=Gelbes Banner
Yellow=gelb
Green Banner=Grünes Banner
Green=grün
Cyan Banner=Türkises Banner
Cyan=türkis
Blue Banner=Blaues Banner
Blue=blau
Magenta Banner=Magenta Banner
Magenta=magenta
Orange Banner=Orange Banner
Orange=orange
Purple Banner=Violettes Banner
Purple=violett
Brown Banner=Braunes Banner
Brown=braun
Pink Banner=Rosa Banner
Pink=rosa
Lime Banner=Lindgrünes Banner
Lime=lindgrün
Light Blue Banner=Hellblaues Banner
Light Blue=hellblau
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.=Banner sind hohe farbige dekorative Blöcke. Sie können auf dem Boden und an Wände platziert werden. Banner können mit einer Vielzahl von Mustern mit Hilfe von Farbstoffen in der Fertigung bemalt werden.
Use crafting to draw a pattern on top of the banner. Emblazoned banners can be emblazoned again to combine various patterns. You can draw up to 12 layers on a banner that way. If the banner includes a gradient, only 3 layers are possible.=Benutzen Sie die Fertigung, um ein Muster auf einem Banner zu malen. Bemalte Banner können erneut bemalt werden, um verschiedene Muster zu ergeben. Sie können bis zu 12 Schichten auf einen Banner malen. Wenn ein Banner einen Farbverlauf hat, sind nur 3 Schichten möglich.
You can copy the pattern of a banner by placing two banners of the same color in the crafting grid—one needs to be emblazoned, the other one must be clean. Finally, you can use a banner on a cauldron with water to wash off its top-most layer.=Sie können ein Muster eines Banners kopieren, indem Sie zwei Banner der selben Grundfarbe in das Fertigungsgitter platzieren: Das eine muss bemalt sein, das andere leer. Außerdem können Sie ein Banner an einem Kessel mit Wasser benutzen, um seine oberste Schicht abzuwaschen.
@1 Bordure=Bord (@1)
@1 Bricks=Ziegel (@1)
@1 Roundel=Kugel (@1)
@1 Creeper Charge=Creeper-Figur (@1)
@1 Saltire=Andreaskreuz (@1)
@1 Bordure Indented=Gewellter Bord (@1)
@1 Per Bend Inverted=Schräglinke umgekehrte Teilung (@1)
@1 Per Bend Sinister Inverted=Schrägrechte umgekehrte Teilung (@1)
@1 Per Bend=Schräglinke Teilung (@1)
@1 Per Bend Sinister=Schrägrechte Teilung (@1)
@1 Flower Charge=Blumenfigur (@1)
@1 Gradient=Farbverlauf (@1)
@1 Base Gradient=Fußfarbverlauf (@1)
@1 Per Fess Inverted=Umgekehrte Teilung (@1)
@1 Per Fess=Teilung (@1)
@1 Per Pale=Spaltung (@1)
@1 Per Pale Inverted=Umgekehrte Spaltung (@1)
@1 Thing Charge=Dingsfigur (@1)
@1 Lozenge=Raute (@1)
@1 Skull Charge=Totenkopffigur (@1)
@1 Paly=Pfähle (@1)
@1 Base Dexter Canton=Rechtes Untereck (@1)
@1 Base Sinister Canton=Linkes Untereck (@1)
@1 Chief Dexter Canton=Rechtes Obereck (@1)
@1 Chief Sinister Canton=Linkes Obereck (@1)
@1 Cross=Kreuz (@1)
@1 Base=Fuß (@1)
@1 Pale=Pfahl (@1)
@1 Bend Sinister=Schräglinksbalken (@1)
@1 Bend=Schrägbalken (@1)
@1 Pale Dexter=Rechte Flanke (@1)
@1 Fess=Balken (@1)
@1 Pale Sinister=Linke Flanke (@1)
@1 Chief=Haupt (@1)
@1 Chevron=Sparren (@1)
@1 Chevron Inverted=Gegensparren (@1)
@1 Base Indented=Gezackter Fuß (@1)
@1 Chief Indented=Gezacktes Haupt (@1)
And one additional layer=Und eine zusätzliche Schicht
And @1 additional layers=Und @1 zusätzliche Schichten

View file

@ -0,0 +1,76 @@
# textdomain: mcl_banners
White Banner=
White=
Grey Banner=
Grey=
Light Grey Banner=
Light Grey=
Black Banner=
Black=
Red Banner=
Red=
Yellow Banner=
Yellow=
Green Banner=
Green=
Cyan Banner=
Cyan=
Blue Banner=
Blue=
Magenta Banner=
Magenta=
Orange Banner=
Orange=
Purple Banner=
Violet=
Brown Banner=
Brown=
Pink Banner=
Pink=
Lime Banner=
Lime=
Light Blue Banner=
Light Blue=
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.=
Use crafting to draw a pattern on top of the banner. Emblazoned banners can be emblazoned again to combine various patterns. You can draw up to 12 layers on a banner that way. If the banner includes a gradient, only 3 layers are possible.=
You can copy the pattern of a banner by placing two banners of the same color in the crafting grid—one needs to be emblazoned, the other one must be clean. Finally, you can use a banner on a cauldron with water to wash off its top-most layer.=
@1 Bordure=
@1 Bricks=
@1 Roundel=
@1 Creeper Charge=
@1 Saltire=
@1 Bordure Indented=
@1 Per Bend Inverted=
@1 Per Bend Sinister Inverted=
@1 Per Bend=
@1 Per Bend Sinister=
@1 Flower Charge=
@1 Gradient=
@1 Base Gradient=
@1 Per Fess Inverted=
@1 Per Fess=
@1 Per Pale=
@1 Per Pale Inverted=
@1 Thing Charge=
@1 Lozenge=
@1 Skull Charge=
@1 Paly=
@1 Base Dexter Canton=
@1 Base Sinister Canton=
@1 Chief Dexter Canton=
@1 Chief Sinister Canton=
@1 Cross=
@1 Base=
@1 Pale=
@1 Bend Sinister=
@1 Bend=
@1 Pale Dexter=
@1 Fess=
@1 Pale Sinister=
@1 Chief=
@1 Chevron=
@1 Chevron Inverted=
@1 Base Indented=
@1 Chief Indented=
And one additional layer=
And @1 additional layer(s)=

View file

@ -1,9 +1,15 @@
local S = minetest.get_translator("mcl_banners")
local N = function(s) return s end
-- Pattern crafting. This file contains the code for crafting all the
-- emblazonings you can put on the banners. It's quite complicated;
-- normal 08/15 crafting won't work here.
-- run-of-the-mill crafting won't work here.
-- Maximum number of layers which can be put on a banner by crafting.
local max_layers_crafting = 6
local max_layers_crafting = 12
-- Maximum number of layers when banner includes a gradient (workaround, see below).
local max_layers_gradient = 3
-- Max. number lines in the descriptions for the banner layers.
-- This is done to avoid huge tooltips.
@ -14,99 +20,99 @@ local d = "group:dye" -- dye
local e = "" -- empty slot (one of them must contain the banner)
local patterns = {
["border"] = {
name = "%s Bordure",
name = N("@1 Bordure"),
{ d, d, d },
{ d, e, d },
{ d, d, d },
},
["bricks"] = {
name = "%s Bricks",
name = N("@1 Bricks"),
type = "shapeless",
{ e, "mcl_core:brick_block", d },
},
["circle"] = {
name = "%s Roundel",
name = N("@1 Roundel"),
{ e, e, e },
{ e, d, e },
{ e, e, e },
},
["creeper"] = {
name = "%s Creeper Charge",
name = N("@1 Creeper Charge"),
type = "shapeless",
{ e, "mcl_heads:creeper", d },
},
["cross"] = {
name = "%s Saltire",
name = N("@1 Saltire"),
{ d, e, d },
{ e, d, e },
{ d, e, d },
},
["curly_border"] = {
name = "%s Bordure Indented",
name = N("@1 Bordure Indented"),
type = "shapeless",
{ e, "mcl_core:vine", d },
},
["diagonal_up_left"] = {
name = "%s Per Bend Inverted",
name = N("@1 Per Bend Inverted"),
{ e, e, e },
{ d, e, e },
{ d, d, e },
},
["diagonal_up_right"] = {
name = "%s Per Bend Sinister Inverted",
name = N("@1 Per Bend Sinister Inverted"),
{ e, e, e },
{ e, e, d },
{ e, d, d },
},
["diagonal_right"] = {
name = "%s Per Bend",
name = N("@1 Per Bend"),
{ e, d, d },
{ e, e, d },
{ e, e, e },
},
["diagonal_left"] = {
name = "%s Per Bend Sinister",
name = N("@1 Per Bend Sinister"),
{ d, d, e },
{ d, e, e },
{ e, e, e },
},
["flower"] = {
name = "%s Flower Charge",
name = N("@1 Flower Charge"),
type = "shapeless",
{ e, "mcl_flowers:oxeye_daisy", d },
},
["gradient"] = {
name = "%s Gradient",
name = N("@1 Gradient"),
{ d, e, d },
{ e, d, e },
{ e, d, e },
},
["gradient_up"] = {
name = "%s Base Gradient",
name = N("@1 Base Gradient"),
{ e, d, e },
{ e, d, e },
{ d, e, d },
},
["half_horizontal_bottom"] = {
name = "%s Per Fess Inverted",
name = N("@1 Per Fess Inverted"),
{ e, e, e },
{ d, d, d },
{ d, d, d },
},
["half_horizontal"] = {
name = "%s Per Fess",
name = N("@1 Per Fess"),
{ d, d, d },
{ d, d, d },
{ e, e, e },
},
["half_vertical"] = {
name = "%s Per Pale",
name = N("@1 Per Pale"),
{ d, d, e },
{ d, d, e },
{ d, d, e },
},
["half_vertical_right"] = {
name = "%s Per Pale Inverted",
name = N("@1 Per Pale Inverted"),
{ e, d, d },
{ e, d, d },
{ e, d, d },
@ -114,126 +120,126 @@ local patterns = {
["thing"] = {
-- Symbol used for the “Thing”: U+1F65D 🙝
name = "%s Thing Charge",
name = N("@1 Thing Charge"),
type = "shapeless",
-- TODO: Replace with enchanted golden apple
{ e, "mcl_core:apple_gold", d },
},
["rhombus"] = {
name = "%s Lozenge",
name = N("@1 Lozenge"),
{ e, d, e },
{ d, e, d },
{ e, d, e },
},
["skull"] = {
name = "%s Skull Charge",
name = N("@1 Skull Charge"),
type = "shapeless",
{ e, "mcl_heads:wither_skeleton", d },
},
["small_stripes"] = {
name = "%s Paly",
name = N("@1 Paly"),
{ d, e, d },
{ d, e, d },
{ e, e, e },
},
["square_bottom_left"] = {
name = "%s Base Dexter Canton",
name = N("@1 Base Dexter Canton"),
{ e, e, e },
{ e, e, e },
{ d, e, e },
},
["square_bottom_right"] = {
name = "%s Base Sinister Canton",
name = N("@1 Base Sinister Canton"),
{ e, e, e },
{ e, e, e },
{ e, e, d },
},
["square_top_left"] = {
name = "%s Chief Dexter Canton",
name = N("@1 Chief Dexter Canton"),
{ d, e, e },
{ e, e, e },
{ e, e, e },
},
["square_top_right"] = {
name = "%s Chief Sinister Canton",
name = N("@1 Chief Sinister Canton"),
{ e, e, d },
{ e, e, e },
{ e, e, e },
},
["straight_cross"] = {
name = "%s Cross",
name = N("@1 Cross"),
{ e, d, e },
{ d, d, d },
{ e, d, e },
},
["stripe_bottom"] = {
name = "%s Base",
name = N("@1 Base"),
{ e, e, e },
{ e, e, e },
{ d, d, d },
},
["stripe_center"] = {
name = "%s Pale",
name = N("@1 Pale"),
{ e, d, e },
{ e, d, e },
{ e, d, e },
},
["stripe_downleft"] = {
name = "%s Bend Sinister",
name = N("@1 Bend Sinister"),
{ e, e, d },
{ e, d, e },
{ d, e, e },
},
["stripe_downright"] = {
name = "%s Bend",
name = N("@1 Bend"),
{ d, e, e },
{ e, d, e },
{ e, e, d },
},
["stripe_left"] = {
name = "%s Pale Dexter",
name = N("@1 Pale Dexter"),
{ d, e, e },
{ d, e, e },
{ d, e, e },
},
["stripe_middle"] = {
name = "%s Fess",
name = N("@1 Fess"),
{ e, e, e },
{ d, d, d },
{ e, e, e },
},
["stripe_right"] = {
name = "%s Pale Sinister",
name = N("@1 Pale Sinister"),
{ e, e, d },
{ e, e, d },
{ e, e, d },
},
["stripe_top"] = {
name = "%s Chief",
name = N("@1 Chief"),
{ d, d, d },
{ e, e, e },
{ e, e, e },
},
["triangle_bottom"] = {
name = "%s Chevron",
name = N("@1 Chevron"),
{ e, e, e },
{ e, d, e },
{ d, e, d },
},
["triangle_top"] = {
name = "%s Chevron Inverted",
name = N("@1 Chevron Inverted"),
{ d, e, d },
{ e, d, e },
{ e, e, e },
},
["triangles_bottom"] = {
name = "%s Base Indented",
name = N("@1 Base Indented"),
{ e, e, e },
{ d, e, d },
{ e, d, e },
},
["triangles_top"] = {
name = "%s Chief Indented",
name = N("@1 Chief Indented"),
{ e, d, e },
{ d, e, d },
{ e, e, e },
@ -262,14 +268,15 @@ mcl_banners.make_advanced_banner_description = function(description, layers)
-- Layer text line.
local color = mcl_banners.colors[layers[l].color][6]
local pattern_name = patterns[layers[l].pattern].name
-- The pattern name is a format string (e.g. “%s Base”)
table.insert(layerstrings, string.format(pattern_name, color))
-- The pattern name is a format string
-- (e.g. “@1 Base” → “Yellow Base”)
table.insert(layerstrings, S(pattern_name, S(color)))
end
-- Warn about missing information
if #layers == max_layer_lines + 1 then
table.insert(layerstrings, "And one addional layer")
table.insert(layerstrings, S("And one additional layer"))
elseif #layers > max_layer_lines + 1 then
table.insert(layerstrings, string.format("And %d addional layers", #layers - max_layer_lines))
table.insert(layerstrings, S("And @1 additional layers", #layers - max_layer_lines))
end
-- Final string concatenations: Just a list of strings
@ -386,6 +393,16 @@ local banner_pattern_craft = function(itemstack, player, old_craft_grid, craft_i
if #layers >= max_layers_crafting then
return ItemStack("")
end
-- Lower layer limit when banner includes any gradient.
-- Workaround to circumvent Minetest bug (https://github.com/minetest/minetest/issues/6210)
-- TODO: Remove this restriction when bug #6210 is fixed.
if #layers >= max_layers_gradient then
for l=1, #layers do
if layers[l].pattern == "gradient" or layers[l].pattern == "gradient_up" then
return ItemStack("")
end
end
end
local matching_pattern
local max_i = player:get_inventory():get_size("craft")

View file

@ -1,3 +1,4 @@
local S = minetest.get_translator("mcl_beds")
local reverse = true
@ -32,22 +33,24 @@ local function kick_player_after_destruct(destruct_pos)
end
end
local beddesc = "Beds allow you to sleep at night and make the time pass faster."
local beduse = "To use a bed, stand close to it and right-click the bed to sleep in it. Sleeping only works when the sun sets, at night or during a thunderstorm. The bed must also be clear of any danger."
local beddesc = S("Beds allow you to sleep at night and make the time pass faster.")
local beduse = S("To use a bed, stand close to it and right-click the bed to sleep in it. Sleeping only works when the sun sets, at night or during a thunderstorm. The bed must also be clear of any danger.")
if minetest.settings:get_bool("enable_bed_respawn") == false then
beddesc = beddesc .. "\n" .. "In local folklore, legends are told of other worlds where setting the start point for your next life would be possible. But this world is not one of them."
beddesc = beddesc .. "\n" .. S("You have heard of other worlds in which a bed would set the start point for your next life. But this world is not one of them.")
else
beddesc = beddesc .. "\n" .. "By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed."
beddesc = beddesc .. "\n" .. S("By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed.")
end
if minetest.settings:get_bool("enable_bed_night_skip") == false then
beddesc = beddesc .. "\n" .. "In this strange world, going to bed won't skip the night, but you can skip thunderstorms."
beddesc = beddesc .. "\n" .. S("In this world, going to bed won't skip the night, but it will skip thunderstorms.")
else
beddesc = beddesc .. "\n" .. "Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner."
beddesc = beddesc .. "\n" .. S("Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner.")
end
local default_sounds
if minetest.get_modpath("mcl_sounds") then
default_sounds = mcl_sounds.node_sound_wood_defaults()
default_sounds = mcl_sounds.node_sound_wood_defaults({
footstep = { gain = 0.5, name = "mcl_sounds_cloth" },
})
end
function mcl_beds.register_bed(name, def)
@ -65,6 +68,8 @@ function mcl_beds.register_bed(name, def)
description = def.description,
_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,
_doc_items_entry_name = def._doc_items_entry_name,
inventory_image = def.inventory_image,
wield_image = def.wield_image,
drawtype = "nodebox",

View file

@ -1,4 +1,5 @@
-- 3D bed
local S = minetest.get_translator("mcl_beds")
local mod_doc = minetest.get_modpath("doc")
local nodebox = {
bottom = {
@ -15,26 +16,28 @@ local nodebox = {
local colors = {
-- { ID, decription, wool, dye }
{ "red", "Red Bed", "mcl_wool:red", "mcl_dye:red" },
{ "blue", "Blue Bed", "mcl_wool:blue", "mcl_dye:blue" },
{ "cyan", "Cyan Bed", "mcl_wool:cyan", "mcl_dye:cyan" },
{ "grey", "Grey Bed", "mcl_wool:grey", "mcl_dye:dark_grey" },
{ "silver", "Light Grey Bed", "mcl_wool:silver", "mcl_dye:grey" },
{ "black", "Black Bed", "mcl_wool:black", "mcl_dye:black" },
{ "yellow", "Yellow Bed", "mcl_wool:yellow", "mcl_dye:yellow" },
{ "green", "Green Bed", "mcl_wool:green", "mcl_dye:dark_green" },
{ "magenta", "Magenta Bed", "mcl_wool:magenta", "mcl_dye:magenta" },
{ "orange", "Orange Bed", "mcl_wool:orange", "mcl_dye:orange" },
{ "purple", "Purple Bed", "mcl_wool:purple", "mcl_dye:violet" },
{ "brown", "Brown Bed", "mcl_wool:brown", "mcl_dye:brown" },
{ "pink", "Pink Bed", "mcl_wool:pink", "mcl_dye:pink" },
{ "lime", "Lime Bed", "mcl_wool:lime", "mcl_dye:green" },
{ "light_blue", "Light Blue Bed", "mcl_wool:light_blue", "mcl_dye:lightblue" },
{ "white", "White Bed", "mcl_wool:white", "mcl_dye:white" },
{ "red", S("Red Bed"), "mcl_wool:red", "mcl_dye:red" },
{ "blue", S("Blue Bed"), "mcl_wool:blue", "mcl_dye:blue" },
{ "cyan", S("Cyan Bed"), "mcl_wool:cyan", "mcl_dye:cyan" },
{ "grey", S("Grey Bed"), "mcl_wool:grey", "mcl_dye:dark_grey" },
{ "silver", S("Light Grey Bed"), "mcl_wool:silver", "mcl_dye:grey" },
{ "black", S("Black Bed"), "mcl_wool:black", "mcl_dye:black" },
{ "yellow", S("Yellow Bed"), "mcl_wool:yellow", "mcl_dye:yellow" },
{ "green", S("Green Bed"), "mcl_wool:green", "mcl_dye:dark_green" },
{ "magenta", S("Magenta Bed"), "mcl_wool:magenta", "mcl_dye:magenta" },
{ "orange", S("Orange Bed"), "mcl_wool:orange", "mcl_dye:orange" },
{ "purple", S("Purple Bed"), "mcl_wool:purple", "mcl_dye:violet" },
{ "brown", S("Brown Bed"), "mcl_wool:brown", "mcl_dye:brown" },
{ "pink", S("Pink Bed"), "mcl_wool:pink", "mcl_dye:pink" },
{ "lime", S("Lime Bed"), "mcl_wool:lime", "mcl_dye:green" },
{ "light_blue", S("Light Blue Bed"), "mcl_wool:light_blue", "mcl_dye:lightblue" },
{ "white", S("White Bed"), "mcl_wool:white", "mcl_dye:white" },
}
local canonical_color = "red"
for c=1, #colors do
local colorid = colors[c][1]
local is_canonical = colorid == canonical_color
-- Recoloring recipe for white bed
if minetest.get_modpath("mcl_dye") then
@ -54,9 +57,19 @@ for c=1, #colors do
}
end
local entry_name, create_entry
if mod_doc then
if is_canonical then
entry_name = S("Bed")
else
create_entry = false
end
end
-- Register bed
mcl_beds.register_bed("mcl_beds:bed_"..colorid, {
description = colors[c][2],
_doc_items_entry_name = entry_name,
_doc_items_create_entry = create_entry,
inventory_image = "mcl_beds_bed_"..colorid..".png",
wield_image = "mcl_beds_bed_"..colorid..".png",
tiles = {
@ -89,6 +102,10 @@ for c=1, #colors do
},
recipe = main_recipe,
})
if mod_doc and not is_canonical then
doc.add_entry_alias("nodes", "mcl_beds:bed_"..canonical_color.."_bottom", "nodes", "mcl_beds:bed_"..colorid.."_bottom")
doc.add_entry_alias("nodes", "mcl_beds:bed_"..canonical_color.."_bottom", "nodes", "mcl_beds:bed_"..colorid.."_top")
end
end

View file

@ -6,3 +6,4 @@ mcl_dye?
mcl_tnt?
mcl_weather?
mcl_spawn?
doc?

View file

@ -1,3 +1,6 @@
local S = minetest.get_translator("mcl_beds")
local F = minetest.formspec_escape
local pi = math.pi
local player_in_bed = 0
local is_sp = minetest.is_singleplayer()
@ -67,20 +70,20 @@ local function lay_down(player, pos, bed_pos, state, skip)
if bed_pos then
-- No sleeping if too far away
if vector.distance(bed_pos, pos) > 2 then
minetest.chat_send_player(name, "You can't sleep, the bed's too far away!")
minetest.chat_send_player(name, S("You can't sleep, the bed's too far away!"))
return false
end
for _, other_pos in pairs(mcl_beds.bed_pos) do
if vector.distance(bed_pos, other_pos) < 0.1 then
minetest.chat_send_player(name, "This bed is already occupied!")
minetest.chat_send_player(name, S("This bed is already occupied!"))
return false
end
end
-- No sleeping while moving. Slightly different behaviour than in MC.
if vector.length(player:get_player_velocity()) > 0.001 then
minetest.chat_send_player(name, "You have to stop moving before going to bed!")
minetest.chat_send_player(name, S("You have to stop moving before going to bed!"))
return false
end
@ -96,7 +99,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
-- Approximation of monster detection range
if def._cmi_is_mob and ((mobname ~= "mobs_mc:pigman" and def.type == "monster" and not monster_exceptions[mobname]) or (mobname == "mobs_mc:pigman" and ent.state == "attack")) then
if math.abs(bed_pos.y - obj:get_pos().y) <= 5 then
minetest.chat_send_player(name, "You can't sleep now, monsters are nearby!")
minetest.chat_send_player(name, S("You can't sleep now, monsters are nearby!"))
end
return false
end
@ -127,7 +130,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
mcl_player.player_attached[name] = false
playerphysics.remove_physics_factor(player, "speed", "mcl_beds:sleeping")
playerphysics.remove_physics_factor(player, "jump", "mcl_beds:sleeping")
player:set_attribute("mcl_beds:sleeping", "false")
player:get_meta():set_string("mcl_beds:sleeping", "false")
hud_flags.wielditem = true
mcl_player.player_set_animation(player, "stand" , 30)
mcl_beds.pos[name] = nil
@ -143,10 +146,10 @@ local function lay_down(player, pos, bed_pos, state, skip)
local def1 = minetest.registered_nodes[n1.name]
local def2 = minetest.registered_nodes[n2.name]
if def1.walkable or def2.walkable then
minetest.chat_send_player(name, "You can't sleep, the bed is obstructed!")
minetest.chat_send_player(name, S("You can't sleep, the bed is obstructed!"))
return false
elseif (def1.damage_per_second ~= nil and def1.damage_per_second > 0) or (def2.damage_per_second ~= nil and def2.damage_per_second > 0) then
minetest.chat_send_player(name, "It's too dangerous to sleep here!")
minetest.chat_send_player(name, S("It's too dangerous to sleep here!"))
return false
end
@ -162,14 +165,14 @@ local function lay_down(player, pos, bed_pos, state, skip)
-- Values taken from Minecraft Wiki with offset of +6000
if tod < 18541 and tod > 5458 and (not weather_mod or (mcl_weather.get_weather() ~= "thunder")) then
if spawn_changed then
minetest.chat_send_player(name, "New respawn position set! But you can only sleep at night or during a thunderstorm.")
minetest.chat_send_player(name, S("New respawn position set! But you can only sleep at night or during a thunderstorm."))
else
minetest.chat_send_player(name, "You can only sleep at night or during a thunderstorm.")
minetest.chat_send_player(name, S("You can only sleep at night or during a thunderstorm."))
end
return false
end
if spawn_changed then
minetest.chat_send_player(name, "New respawn position set!")
minetest.chat_send_player(name, S("New respawn position set!"))
end
mcl_beds.player[name] = 1
@ -181,7 +184,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
player:set_look_horizontal(yaw)
player:set_look_vertical(0)
player:set_attribute("mcl_beds:sleeping", "true")
player:get_meta():set_string("mcl_beds:sleeping", "true")
playerphysics.add_physics_factor(player, "speed", "mcl_beds:sleeping", 0)
playerphysics.add_physics_factor(player, "jump", "mcl_beds:sleeping", 0)
player:set_pos(p)
@ -199,8 +202,8 @@ local function update_formspecs(finished)
local form_n = "size[8,15;true]"
local all_in_bed = ges == player_in_bed
local night_skip = is_night_skip_enabled()
local button_leave = "button_exit[2,12;4,0.75;leave;Leave bed]"
local button_abort = "button_exit[2,12;4,0.75;leave;Abort sleep]"
local button_leave = "button_exit[2,12;4,0.75;leave;"..F(S("Leave bed")).."]"
local button_abort = "button_exit[2,12;4,0.75;leave;"..F(S("Abort sleep")).."]"
local bg_presleep = "bgcolor[#00000080;true]"
local bg_sleep = "bgcolor[#000000FF;true]"
@ -210,33 +213,33 @@ local function update_formspecs(finished)
end
return
elseif not is_sp then
local text = string.format("Players in bed: %d/%d", player_in_bed, ges)
local text = S("Players in bed: @1/@2", player_in_bed, ges)
if not night_skip then
text = text .. "\n" .. "Note: Night skip is disabled."
text = text .. "\n" .. S("Note: Night skip is disabled.")
form_n = form_n .. bg_presleep
form_n = form_n .. button_leave
elseif all_in_bed then
text = text .. "\n" .. "You're sleeping."
text = text .. "\n" .. S("You're sleeping.")
form_n = form_n .. bg_sleep
form_n = form_n .. button_abort
else
text = text .. "\n" .. "You will fall asleep when all players are in bed."
text = text .. "\n" .. S("You will fall asleep when all players are in bed.")
form_n = form_n .. bg_presleep
form_n = form_n .. button_leave
end
form_n = form_n .. "label[2.2,7.5;"..minetest.formspec_escape(text).."]"
form_n = form_n .. "label[2.2,7.5;"..F(text).."]"
else
local text
if night_skip then
text = "You're sleeping."
text = S("You're sleeping.")
form_n = form_n .. bg_sleep
form_n = form_n .. button_abort
else
text = "You're in bed." .. "\n" .. "Note: Night skip is disabled."
text = S("You're in bed.") .. "\n" .. S("Note: Night skip is disabled.")
form_n = form_n .. bg_presleep
form_n = form_n .. button_leave
end
form_n = form_n .. "label[2.2,7.5;"..minetest.formspec_escape(text).."]"
form_n = form_n .. "label[2.2,7.5;"..F(text).."]"
end
for name,_ in pairs(mcl_beds.player) do
@ -296,7 +299,7 @@ end
function mcl_beds.on_rightclick(pos, player, is_top)
-- Anti-Inception: Don't allow to sleep while you're sleeping
if player:get_attribute("mcl_beds:sleeping") == "true" then
if player:get_meta():get_string("mcl_beds:sleeping") == "true" then
return
end
if minetest.get_modpath("mcl_worlds") then
@ -343,9 +346,10 @@ end
-- Callbacks
minetest.register_on_joinplayer(function(player)
if player:get_attribute("mcl_beds:sleeping") == "true" then
local meta = player:get_meta()
if meta:get_string("mcl_beds:sleeping") == "true" then
-- Make player awake on joining server
player:set_attribute("mcl_beds:sleeping", "false")
meta:set_string("mcl_beds:sleeping", "false")
end
playerphysics.remove_physics_factor(player, "speed", "mcl_beds:sleeping")
playerphysics.remove_physics_factor(player, "jump", "mcl_beds:sleeping")

View file

@ -0,0 +1,40 @@
# textdomain: mcl_beds
Beds allow you to sleep at night and make the time pass faster.=Mit Betten können Sie in der Nacht schlafen und die Zeit schneller verstreichen lassen.
To use a bed, stand close to it and right-click the bed to sleep in it. Sleeping only works when the sun sets, at night or during a thunderstorm. The bed must also be clear of any danger.=Um ein Bett zu benutzen, stellen Sie sich direkt davor und rechtsklicken Sie darauf, um darin zu schlafen. Schlafen funktioniert nur, wenn die Sonne untergeht, in der Nacht oder während eines Gewittersturms. Das Bett muss außerdem fern von Gefahren sein.
You have heard of other worlds in which a bed would set the start point for your next life. But this world is not one of them.=Sie hörten von anderen Welten, in denen ein Bett den Startpunkt für Ihr nächstes Leben setzen würde. Aber diese Welt ist keine solche.
By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed.=Indem Sie ein Bett benutzen, setzen Sie den Startpunkt Ihres nächsten Lebens. Wenn Sie sterben, werden Sie Ihr nächstes Leben auf diesem Bett beginnen, es sei denn, es ist blockiert oder zerstört.
In this world, going to bed won't skip the night, but it will skip thunderstorms.=In dieser Welt können mit dem Bett Nächte nicht übersprungen werden, nur Gewitterstürme.
Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner.=Mit Schlaf können Sie die Nacht überspringen. Die Nacht wird übersprungen, wenn alle Spieler in dieser Welt sich schlafen gelegt haben. Die Nacht wird dann nach ein paar Sekunden übersprungen. Gewitterstürme werden auf die gleiche Weise übersprungen.
Bed=Bett
Red Bed=Rotes Bett
Blue Bed=Blaues Bett
Cyan Bed=Türkises Bett
Grey Bed=Graues Bett
Light Grey Bed=Hellgraues Bett
Black Bed=Schwarzes Bett
Yellow Bed=Gelbes Bett
Green Bed=Grünes Bett
Magenta Bed=Magenta Bett
Orange Bed=Orange Bett
Purple Bed=Violettes Bett
Brown Bed=Braunes Bett
Pink Bed=Rosa Bett
Lime Bed=Lindgrünes Bett
Light Blue Bed=Hellblaues Bett
White Bed=Weißes Bett
You can't sleep, the bed's too far away!=Sie können nicht schlafen, das Bett ist zu weit weg!
This bed is already occupied!=Dieses Bett ist schon belegt!
You have to stop moving before going to bed!=Sie müssen anhalten, bevor Sie zu Bett gehen!
You can't sleep now, monsters are nearby!=Sie können jetzt nicht schlafen, Monster sind in der Nähe!
You can't sleep, the bed is obstructed!=Sie können nicht schlafen, das Bett ist blockiert!
It's too dangerous to sleep here!=Es ist zu gefährlich, hier zu schlafen!
New respawn position set! But you can only sleep at night or during a thunderstorm.=Neue Wiedereinstiegsposition gesetzt! Aber Sie können nur nachts oder während eines Gewittersturms schlafen.
You can only sleep at night or during a thunderstorm.=Sie können nur nachts oder während eines Gewittersturms schlafen.
New respawn position set!=Neue Wiedereinstiegsposition gesetzt!
Leave bed=Bett verlassen
Abort sleep=Schlaf abbrechen
Players in bed: @1/@2=Spieler im Bett: @1/@2
Note: Night skip is disabled.=Anmerkung: Überspringen der Nacht deaktiviert.
You're sleeping.=Sie schlafen.
You will fall asleep when all players are in bed.=Sie werden einschlafen, wenn alle Spieler im Bett sind.
You're in bed.=Sie sind im Bett.

View file

@ -0,0 +1,40 @@
# textdomain: mcl_beds
Beds allow you to sleep at night and make the time pass faster.=
To use a bed, stand close to it and right-click the bed to sleep in it. Sleeping only works when the sun sets, at night or during a thunderstorm. The bed must also be clear of any danger.=
You have heard of other worlds in which a bed would set the start point for your next life. But this world is not one of them.
By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed.=
In this world, going to bed won't skip the night, but it will skip thunderstorms.=
Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner.=
Bed=
Red Bed=
Blue Bed=
Cyan Bed=
Grey Bed=
Light Grey Bed=
Black Bed=
Yellow Bed=
Green Bed=
Magenta Bed=
Orange Bed=
Purple Bed=
Brown Bed=
Pink Bed=
Lime Bed=
Light Blue Bed=
White Bed=
You can't sleep, the bed's too far away!=
This bed is already occupied!=
You have to stop moving before going to bed!=
You can't sleep now, monsters are nearby!=
You can't sleep, the bed is obstructed!=
It's too dangerous to sleep here!=
New respawn position set! But you can only sleep at night or during a thunderstorm.=
You can only sleep at night or during a thunderstorm.=
New respawn position set!=
Leave bed=
Abort sleep=
Players in bed: @1/@2=
Note: Night skip is disabled.=
You're sleeping.=
You will fall asleep when all players are in bed.=
You're in bed.=

View file

@ -1,10 +1,12 @@
local S =minetest.get_translator("mcl_books")
local max_text_length = 4500 -- TODO: Increase to 12800 when scroll bar was added to written book
local max_title_length = 64
-- Book
minetest.register_craftitem("mcl_books:book", {
description = "Book",
_doc_items_longdesc = "Books are used to make bookshelves and book and quills.",
description = S("Book"),
_doc_items_longdesc = S("Books are used to make bookshelves and book and quills."),
inventory_image = "default_book.png",
stack_max = 64,
groups = { book=1, craftitem = 1 },
@ -50,15 +52,15 @@ end
local make_description = function(title, author, generation)
local desc
if generation == 0 then
desc = string.format("“%s", title)
desc = S("“@1", title)
elseif generation == 1 then
desc = string.format("Copy of “%s", title)
desc = S("Copy of “@1", title)
elseif generation == 2 then
desc = string.format("Copy of Copy of “%s", title)
desc = S("Copy of Copy of “@1", title)
else
desc = "Tattered Book"
desc = S("Tattered Book")
end
desc = desc .. "\n" .. core.colorize("#AAAAAA", string.format("by %s", author))
desc = desc .. "\n" .. core.colorize("#AAAAAA", S("by @1", author))
return desc
end
@ -81,8 +83,8 @@ local write = function(itemstack, user, pointed_thing)
local formspec = "size[8,9]"..
"background[-0.5,-0.5;9,10;mcl_books_book_bg.png]"..
"textarea[0.75,0.1;7.25,9;text;;"..minetest.formspec_escape(text).."]"..
"button[0.75,7.95;3,1;sign;Sign]"..
"button_exit[4.25,7.95;3,1;ok;Done]"
"button[0.75,7.95;3,1;sign;"..minetest.formspec_escape(S("Sign")).."]"..
"button_exit[4.25,7.95;3,1;ok;"..minetest.formspec_escape(S("Done")).."]"
minetest.show_formspec(user:get_player_name(), "mcl_books:writable_book", formspec)
end
@ -101,16 +103,16 @@ local read = function(itemstack, user, pointed_thing)
local formspec = "size[8,9]"..
"background[-0.5,-0.5;9,10;mcl_books_book_bg.png]"..
"textarea[0.75,0.1;7.25,9;;"..core.colorize("#000000", minetest.formspec_escape(text))..";]"..
"button_exit[2.25,7.95;3,1;ok;Done]"
"button_exit[2.25,7.95;3,1;ok;"..minetest.formspec_escape(S("Done")).."]"
minetest.show_formspec(user:get_player_name(), "mcl_books:written_book", formspec)
end
-- Book and Quill
minetest.register_craftitem("mcl_books:writable_book", {
description = "Book and Quill",
_doc_items_longdesc = "This item can be used to write down some notes.",
_doc_items_usagehelp = "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"..
"A book can hold up to 4500 characters. The title length is limited to 64 characters.",
description = S("Book and Quill"),
_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."),
inventory_image = "mcl_books_book_writable.png",
groups = { book=1 },
stack_max = 1,
@ -134,11 +136,11 @@ minetest.register_on_player_receive_fields(function ( player, formname, fields )
local name = player:get_player_name()
local formspec = "size[8,9]"..
"background[-0.5,-0.5;9,10;mcl_books_book_bg.png]"..
"field[0.75,1;7.25,1;title;"..core.colorize("#000000", "Enter book title:")..";]"..
"label[0.75,1.5;"..core.colorize("#404040", minetest.formspec_escape("by " .. name)).."]"..
"label[0.75,6.95;"..core.colorize("#000000", "Note: The book will no longer") .. "\n" .. core.colorize("#000000", "be editable after signing.").."]"..
"button_exit[0.75,7.95;3,1;sign;Sign and Close]"..
"button[4.25,7.95;3,1;cancel;Cancel]"
"field[0.75,1;7.25,1;title;"..minetest.formspec_escape(core.colorize("#000000", S("Enter book title:")))..";]"..
"label[0.75,1.5;"..minetest.formspec_escape(core.colorize("#404040", S("by @1", name))).."]"..
"button_exit[0.75,7.95;3,1;sign;"..minetest.formspec_escape(S("Sign and Close")).."]"..
"tooltip[sign;"..minetest.formspec_escape(S("Note: The book will no longer be editable after signing")).."]"..
"button[4.25,7.95;3,1;cancel;"..minetest.formspec_escape(S("Cancel")).."]"
minetest.show_formspec(player:get_player_name(), "mcl_books:signing", formspec)
end
end
@ -149,7 +151,7 @@ minetest.register_on_player_receive_fields(function ( player, formname, fields )
if book:get_name() == "mcl_books:writable_book" then
local title = fields.title
if string.len(title) == 0 then
title = "Nameless Book"
title = S("Nameless Book")
end
title = cap_text_length(title, max_title_length)
local meta = newbook:get_meta()
@ -184,11 +186,11 @@ end
-- Written Book
minetest.register_craftitem("mcl_books:written_book", {
description = "Written Book",
_doc_items_longdesc = "Written books contain some text written by someone. They can be read and copied, but not edited.",
_doc_items_usagehelp = [[Hold it in your hand, then rightclick to read the book.
description = S("Written Book"),
_doc_items_longdesc = S("Written books contain some text written by someone. They can be read and copied, but not edited."),
_doc_items_usagehelp = S("Hold it in your hand, then rightclick to read the book.").."\n\n"..
To copy the text of the written book, place it into the crafting grid together with a book and quill (or multiple of those) and craft. The written book will not be consumed. Copies of copies can not be copied.]],
S("To copy the text of the written book, place it into the crafting grid together with a book and quill (or multiple of those) and craft. The written book will not be consumed. Copies of copies can not be copied."),
inventory_image = "mcl_books_book_written.png",
groups = { not_in_creative_inventory=1, book=1, no_rename=1 },
stack_max = 16,
@ -322,8 +324,8 @@ end
-- Bookshelf
minetest.register_node("mcl_books:bookshelf", {
description = "Bookshelf",
_doc_items_longdesc = "Bookshelves are used for decoration.",
description = S("Bookshelf"),
_doc_items_longdesc = S("Bookshelves are used for decoration."),
tiles = {"mcl_books_bookshelf_top.png", "mcl_books_bookshelf_top.png", "default_bookshelf.png"},
stack_max = 64,
is_ground_content = false,

View file

@ -0,0 +1,25 @@
# textdomain: mcl_books
Book=Buch
Books are used to make bookshelves and book and quills.=Bücher werden zur Herstellung von Bücherregalen und Büchern mit Federkiel gebraucht.
“@1”=„@1“
Copy of “@1”=Kopie von „@1“
Copy of Copy of “@1”=Kopie von Kopie von „@1“
Tattered Book=Zerfleddertes Buch
by @1=von @1
Sign=Signieren
Done=Fertig
This item can be used to write down some notes.=Dies kann benutzt werden, um ein paar Notizen aufzuschreiben.
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.=Halten Sie es in der Hand, dann rechtsklicken Sie, um die Notizen zu sehen und zu ändern. Sie können den Text beliebig ändern. Sie können das Buch auch signieren und in ein geschriebenes Buch verwandeln, das gestapelt, aber nicht mehr geändert werden kann.
A book can hold up to 4500 characters. The title length is limited to 64 characters.=Ein Buch kann bis zu 4500 Zeichen enthalten. Die Titellänge ist begrenzt auf 64 Zeichen.
Enter book title:=Buchtitel eingeben:
Note: The book will no longer be editable after signing=Anmerkung: Das Buch kann nach der Signierung nicht länger@nbearbeitet werden
Sign and Close=Signieren und schließen
Cancel=Abbrechen
Nameless Book=Namenloses Buch
Written Book=Geschriebenes Buch
Written books contain some text written by someone. They can be read and copied, but not edited.=Geschriebene Bücher enthalten etwas Text, den jemand geschrieben hat. Sie können gelesen und kopiert, aber nicht geändert werden.
Hold it in your hand, then rightclick to read the book.=Halten Sie es in Ihrer Hand und rechtsklicken Sie, um das Buch zu lesen.
To copy the text of the written book, place it into the crafting grid together with a book and quill (or multiple of those) and craft. The written book will not be consumed. Copies of copies can not be copied.=Um den Text zu kopieren, platzieren Sie es ins Fertigungsgitter mit einem Buch mit Federkiel (oder mehreren) und fertigen Sie die Kopie an. Das geschriebene Buch bleibt. Kopien von Kopien können nicht kopiert werden.
Bookshelf=Bücherregal
Bookshelves are used for decoration.=Bücherregale werden zur Dekoration benutzt.
Book and Quill=Buch und Federkiel

View file

@ -0,0 +1,27 @@
# textdomain: mcl_books
Book=
Books are used to make bookshelves and book and quills.=
“@1”=
Copy of “@1”=
Copy of Copy of “@1”=
Tattered Book=
by @1=
# as in “to sign a book”
Sign=
Done=
This item can be used to write down some notes.=
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.=
A book can hold up to 4500 characters. The title length is limited to 64 characters.=
Enter book title:=
by @1=
Note: The book will no longer be editable after signing=
Sign and Close=
Cancel=
Nameless Book=
Written Book=
Written books contain some text written by someone. They can be read and copied, but not edited.=
Hold it in your hand, then rightclick to read the book.=
To copy the text of the written book, place it into the crafting grid together with a book and quill (or multiple of those) and craft. The written book will not be consumed. Copies of copies can not be copied.=
Bookshelf=
Bookshelves are used for decoration.=
Book and Quill=

View file

@ -1,3 +1,5 @@
local S = minetest.get_translator("mcl_bows")
-- Time in seconds after which a stuck arrow is deleted
local ARROW_TIMEOUT = 60
-- Time after which stuck arrow is rechecked for being stuck
@ -7,16 +9,21 @@ local GRAVITY = 9.81
local YAW_OFFSET = -math.pi/2
local mod_mcl_hunger = minetest.get_modpath("mcl_hunger")
local dir_to_pitch = function(dir)
local dir2 = vector.normalize(dir)
local xz = math.abs(dir.x) + math.abs(dir.z)
return -math.atan2(-dir.y, xz)
end
local mod_awards = minetest.get_modpath("awards") and minetest.get_modpath("mcl_achievements")
local mod_button = minetest.get_modpath("mesecons_button")
minetest.register_craftitem("mcl_bows:arrow", {
description = "Arrow",
_doc_items_longdesc = [[Arrows are ammunition for bows and dispensers.
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.
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.]],
_doc_items_usagehelp = "To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.",
description = S("Arrow"),
_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."),
_doc_items_usagehelp = S("To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it."),
inventory_image = "mcl_bows_arrow_inv.png",
groups = { ammo=1, ammo_bow=1 },
_on_dispense = function(itemstack, dispenserpos, droppos, dropnode, dropdir)
@ -60,6 +67,12 @@ minetest.register_node("mcl_bows:arrow_box", {
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {not_in_creative_inventory=1, dig_immediate=3},
drop = "",
node_placement_prediction = "",
on_construct = function(pos)
minetest.log("error", "[mcl_bows] Trying to construct mcl_bows:arrow_box at "..minetest.pos_to_string(pos))
minetest.remove_node(pos)
end,
})
local ARROW_ENTITY={
@ -107,7 +120,7 @@ ARROW_ENTITY.on_step = function(self, dtime)
return
end
-- Drop arrow as item when it is no longer stuck
-- FIXME: Arrows are a bit slot to react and continue to float in mid air for a few seconds.
-- FIXME: Arrows are a bit slow to react and continue to float in mid air for a few seconds.
if self._stuckrechecktimer > STUCK_RECHECK_TIME then
local stuckin_def
if self._stuckin then
@ -183,29 +196,28 @@ ARROW_ENTITY.on_step = function(self, dtime)
local is_player = obj:is_player()
local lua = obj:get_luaentity()
if obj ~= self._shooter and (is_player or (lua and lua._cmi_is_mob)) then
obj:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups={fleshy=self._damage},
}, nil)
if obj:get_hp() > 0 then
obj:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups={fleshy=self._damage},
}, nil)
if is_player then
if self._shooter and self._shooter:is_player() then
-- “Ding” sound for hitting another player
minetest.sound_play({name="mcl_bows_hit_player", gain=0.1}, {to_player=self._shooter})
if is_player then
if self._shooter and self._shooter:is_player() then
-- “Ding” sound for hitting another player
minetest.sound_play({name="mcl_bows_hit_player", gain=0.1}, {to_player=self._shooter})
end
end
if mod_mcl_hunger then
mcl_hunger.exhaust(obj:get_player_name(), mcl_hunger.EXHAUST_DAMAGE)
end
end
if lua then
local entity_name = lua.name
-- Achievement for hitting skeleton, wither skeleton or stray (TODO) with an arrow at least 50 meters away
-- NOTE: Range has been reduced because mobs unload much earlier than that ... >_>
-- TODO: This achievement should be given for the kill, not just a hit
if self._shooter and self._shooter:is_player() and vector.distance(pos, self._startpos) >= 20 then
if mod_awards and (entity_name == "mobs_mc:skeleton" or entity_name == "mobs_mc:stray" or entity_name == "mobs_mc:witherskeleton") then
awards.unlock(self._shooter:get_player_name(), "mcl:snipeSkeleton")
if lua then
local entity_name = lua.name
-- Achievement for hitting skeleton, wither skeleton or stray (TODO) with an arrow at least 50 meters away
-- NOTE: Range has been reduced because mobs unload much earlier than that ... >_>
-- TODO: This achievement should be given for the kill, not just a hit
if self._shooter and self._shooter:is_player() and vector.distance(pos, self._startpos) >= 20 then
if mod_awards and (entity_name == "mobs_mc:skeleton" or entity_name == "mobs_mc:stray" or entity_name == "mobs_mc:witherskeleton") then
awards.unlock(self._shooter:get_player_name(), "mcl:snipeSkeleton")
end
end
end
end
@ -290,7 +302,9 @@ ARROW_ENTITY.on_step = function(self, dtime)
-- Update yaw
if not self._stuck then
local vel = self.object:get_velocity()
self.object:set_yaw(minetest.dir_to_yaw(vel)+YAW_OFFSET)
local yaw = minetest.dir_to_yaw(vel)+YAW_OFFSET
local pitch = dir_to_pitch(vel)
self.object:set_rotation({ x = 0, y = yaw, z = pitch })
end
-- Update internal variable

View file

@ -1,3 +1,5 @@
local S = minetest.get_translator("mcl_bows")
mcl_bows = {}
local arrows = {
@ -41,13 +43,13 @@ mcl_bows.shoot_arrow = function(arrow_item, pos, dir, yaw, shooter, power, damag
end
obj:set_velocity({x=dir.x*power, y=dir.y*power, z=dir.z*power})
obj:set_acceleration({x=0, y=-GRAVITY, z=0})
obj:setyaw(yaw-math.pi/2)
obj:set_yaw(yaw-math.pi/2)
local le = obj:get_luaentity()
le._shooter = shooter
le._damage = damage
le._startpos = pos
minetest.sound_play("mcl_bows_bow_shoot", {pos=pos})
if shooter ~= nil then
if shooter ~= nil and shooter:is_player() then
if obj:get_luaentity().player == "" then
obj:get_luaentity().player = shooter
end
@ -95,10 +97,10 @@ end
-- Bow item, uncharged state
minetest.register_tool("mcl_bows:bow", {
description = "Bow",
_doc_items_longdesc = [[Bows are ranged weapons to shoot arrows at your foes.
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 = [[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.]],
description = S("Bow"),
_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."),
_doc_items_durability = BOW_DURABILITY,
inventory_image = "mcl_bows_bow.png",
stack_max = 1,
@ -138,7 +140,7 @@ end
-- Bow in charging state
for level=0, 2 do
minetest.register_tool("mcl_bows:bow_"..level, {
description = "Bow",
description = S("Bow"),
_doc_items_create_entry = false,
inventory_image = "mcl_bows_bow_"..level..".png",
stack_max = 1,

View file

@ -1,7 +1,6 @@
controls
awards?
mcl_achievements?
mcl_hunger?
mcl_core?
mcl_mobitems?
playerphysics?

View file

@ -0,0 +1,11 @@
# textdomain: mcl_bows
Arrow=Pfeil
Arrows are ammunition for bows and dispensers.=Pfeile sind Munition für Bögen und Werfer.
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.=Ein Bogen von einem Pfeil richtet regulär 1-9 Schaden an. Mit voller Zugkraft gibt es eine 20%-ige Chance auf einen kritischen Treffer mit 10 Schaden. Ein Pfeil aus einem Werfer richtet immer 3 Schaden an.
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Pfeile können in festen Blöcken stecken bleiben und wieder aufgesammelt werden. Sie können auf Holzknöpfe drücken.
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=Um Pfeile als Munition für dne Bogen zu benutzen, platzieren Sie sie einfach irgendwo im Inventar, sie werden automatisch benutzt. Um Pfeile als Munition für Werfer zu benutzen, platzieren Sie sie ins Inventar eines Werferr. Um einen steckengebliebenen Pfeil aufzusammeln, gehen Sie einfach zu ihm hin.
Bow=Bogen
Bows are ranged weapons to shoot arrows at your foes.=Bogen sind Fernwaffen, um Pfeile auf Ihre Feinde zu schießen.
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.=Die Geschwindigkeit und der Schaden des Bogens erhöht sich, je länger sie den Bogen spannen. Der reguläre Schaden des Pfeiles ist zwischen 1 und 9. Ist der Bogen voll gespannt, gibt es eine 20%-ig Change für einen kritischen Treffer, der 10 Schaden anrichtet.
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.=Um den Bogen zu benutzen, muss sich im Inventar mindestens ein Pfeil befinden (außer im Kreativmodus). Halten sie die rechte Maustaste gedrückt zum Spannen, lassen Sie sie los zum Schießen.
Bow=Bogen

View file

@ -0,0 +1,11 @@
# textdomain: mcl_bows
Arrow=
Arrows are ammunition for bows and dispensers.=
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.=
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=
Bow=
Bows are ranged weapons to shoot arrows at your foes.=
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.=
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.=
Bow=

View file

@ -1,3 +1,5 @@
local S = minetest.get_translator("mcl_buckets")
-- Minetest 0.4 mod: bucket
-- See README.txt for licensing and other information.
@ -26,14 +28,14 @@ mcl_buckets.liquids = {}
local sound_place = function(itemname, pos)
local def = minetest.registered_nodes[itemname]
if def and def.sounds and def.sounds.place then
minetest.sound_play(def.sounds.place, {gain=1.0, pos = pos})
minetest.sound_play(def.sounds.place, {gain=1.0, pos = pos, pitch = 1 + math.random(-10, 10)*0.005})
end
end
local sound_take = function(itemname, pos)
local def = minetest.registered_nodes[itemname]
if def and def.sounds and def.sounds.dug then
minetest.sound_play(def.sounds.dug, {gain=1.0, pos = pos})
minetest.sound_play(def.sounds.dug, {gain=1.0, pos = pos, pitch = 1 + math.random(-10, 10)*0.005})
end
end
@ -182,9 +184,9 @@ function mcl_buckets.register_liquid(source_place, source_take, itemname, invent
end
minetest.register_craftitem("mcl_buckets:bucket_empty", {
description = "Empty Bucket",
_doc_items_longdesc = "A bucket can be used to collect and release liquids.",
_doc_items_usagehelp = "Punch a liquid source to collect the liquid. With the filled bucket, you can right-click somewhere to empty the bucket which will create a liquid source at the position you've clicked at.",
description = S("Empty Bucket"),
_doc_items_longdesc = S("A bucket can be used to collect and release liquids."),
_doc_items_usagehelp = S("Punch a liquid source to collect it. You can then use the filled bucket to place the liquid somewhere else."),
inventory_image = "bucket.png",
stack_max = 16,
@ -302,9 +304,9 @@ if mod_mcl_core then
{"mcl_core:lava_source", "mcl_nether:nether_lava_source"},
"mcl_buckets:bucket_lava",
"bucket_lava.png",
"Lava Bucket",
"A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution.",
"Choose a place where you want to empty the bucket, then get in a safe spot somewhere above it. Be prepared to run away when something goes wrong as the lava will soon start to flow after placing. To empty the bucket (which places a lava source), right-click on your chosen place."
S("Lava Bucket"),
S("A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution."),
S("Get in a safe distance and place the bucket to empty it and create a lava source at this spot. Don't burn yourself!")
)
-- Water bucket
@ -313,9 +315,9 @@ if mod_mcl_core then
{"mcl_core:water_source"},
"mcl_buckets:bucket_water",
"bucket_water.png",
"Water Bucket",
"A bucket can be used to collect and release liquids. This one is filled with water.",
"Right-click on any block to empty the bucket and put a water source on this spot.",
S("Water Bucket"),
S("A bucket can be used to collect and release liquids. This one is filled with water."),
S("Place it to empty the bucket and create a water source."),
function(pos, placer)
-- Check protection
local placer_name = ""
@ -355,9 +357,9 @@ if mod_mclx_core then
{"mclx_core:river_water_source"},
"mcl_buckets:bucket_river_water",
"bucket_river_water.png",
"River Water Bucket",
"A bucket can be used to collect and release liquids. This one is filled with river water.",
"Right-click on any block to empty the bucket and put a river water source on this spot.",
S("River Water Bucket"),
S("A bucket can be used to collect and release liquids. This one is filled with river water."),
S("Place it to empty the bucket and create a river water source."),
function(pos, placer)
-- Check protection
local placer_name = ""

View file

@ -0,0 +1,13 @@
# textdomain: mcl_buckets
Empty Bucket=Leerer Eimer
A bucket can be used to collect and release liquids.=Ein Eimer kann benutzt werden, um Flüssigkeiten aufzusammeln und wieder freizulassen.
Punch a liquid source to collect it. You can then use the filled bucket to place the liquid somewhere else.=Hauen Sie auf eine Flüssigkeitsquelle, um sie aufzusammeln. Sie können den vollen Eimer dann benutzen, um die Flüssigkeit woanders zu platzieren.
Lava Bucket=Lavaeimer
A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution.=Ein Eimer kann benutzt werden, um Flüssigkeiten aufzusammeln und wieder freizulassen. Dieser hier ist voller heißer Lava, die sicher in ihm verstaut ist. Mit Vorsicht zu handhaben.
Get in a safe distance and place the bucket to empty it and create a lava source at this spot. Don't burn yourself!=Gehen Sie zu einer sicheren Stelle und platzieren Sie den Eimer, um ihn zu leeren und eine Lavaquelle an dieser Stelle zu erzeugen. Verbrennen Sie sich nicht!
Water Bucket=Wassereimer
A bucket can be used to collect and release liquids. This one is filled with water.=Ein Eimer kann benutzt werden, um Flüssigkeiten aufzusammeln und wieder freizulassen. Dieser hier ist mit Wasser gefüllt.
Place it to empty the bucket and create a water source.=Platzieren Sie ihn, um den Eimer zu leeren und eine Wasserquelle zu erzeugen.
River Water Bucket=Flusswassereimer
A bucket can be used to collect and release liquids. This one is filled with river water.=Ein Eimer kann benutzt werden, um Flüssigkeiten aufzusammeln und wieder freizulassen. Dieser hier ist mit Flusswasser gefüllt.
Place it to empty the bucket and create a river water source.=Platzieren Sie ihn, um den Eimer zu leeren und eine Flusswasserquelle zu erzeugen.

View file

@ -0,0 +1,13 @@
# textdomain: mcl_buckets
Empty Bucket=
A bucket can be used to collect and release liquids.=
Punch a liquid source to collect it. You can then use the filled bucket to place the liquid somewhere else.=
Lava Bucket=
A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution.=
Get in a safe distance and place the bucket to empty it and create a lava source at this spot. Don't burn yourself!=
Water Bucket=
A bucket can be used to collect and release liquids. This one is filled with water.=
Place it to empty the bucket and create a water source.=
River Water Bucket=
A bucket can be used to collect and release liquids. This one is filled with river water.=
Place it to empty the bucket and create a river water source.=

View file

@ -3,6 +3,8 @@
#!#!#!#Released under CC Attribution-ShareAlike 3.0 Unported #!#!#
]]--
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"}
local slice_1 = { -7/16, -8/16, -7/16, -5/16, 0/16, 7/16}
local slice_2 = { -7/16, -8/16, -7/16, -3/16, 0/16, 7/16}
@ -28,9 +30,9 @@ minetest.register_craft({
})
minetest.register_node("mcl_cake:cake", {
description = "Cake",
_doc_items_longdesc = "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 = "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.",
description = S("Cake"),
_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"},
inventory_image = "cake.png",
wield_image = "cake.png",
@ -134,9 +136,9 @@ local register_slice = function(level, nodebox, desc)
end
end
register_slice(6, slice_6, "Cake (6 Slices Left)")
register_slice(5, slice_5, "Cake (5 Slices Left)")
register_slice(4, slice_4, "Cake (4 Slices Left)")
register_slice(3, slice_3, "Cake (3 Slices Left)")
register_slice(2, slice_2, "Cake (2 Slices Left)")
register_slice(1, slice_1, "Cake (1 Slice Left)")
register_slice(6, slice_6, S("Cake (6 Slices Left)"))
register_slice(5, slice_5, S("Cake (5 Slices Left)"))
register_slice(4, slice_4, S("Cake (4 Slices Left)"))
register_slice(3, slice_3, S("Cake (3 Slices Left)"))
register_slice(2, slice_2, S("Cake (2 Slices Left)"))
register_slice(1, slice_1, S("Cake (1 Slice Left)"))

View file

@ -0,0 +1,10 @@
# textdomain: mcl_cake
Cake=Kuchen
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.=Kuchen können platziert und gegessen werden, um Hungerpunkte wiederherzustellen. Ein Kuchen hat 7 Stücke. Jedes Stück stellt 2 Hungerpunkte und 0,4 Sättigungspunkte wieder her. Kuchen werden zerstört, wenn sie abgebaut werden oder der Block unter ihnen bricht.
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.=Platzieren Sie ihn irgendwo, dann rechtsklicken Sie auf ihn, um ein Stück zu essen. Sie können nicht vom Kuchen naschen, wenn ihre Hungerleiste voll ist.
Cake (6 Slices Left)=Kuchen (6 Stücke übrig)
Cake (5 Slices Left)=Kuchen (5 Stücke übrig)
Cake (4 Slices Left)=Kuchen (4 Stücke übrig)
Cake (3 Slices Left)=Kuchen (3 Stücke übrig)
Cake (2 Slices Left)=Kuchen (2 Stücke übrig)
Cake (1 Slice Left)=Kuchen (1 Stück übrig)

View file

@ -0,0 +1,10 @@
# textdomain: mcl_cake
Cake=
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.=
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.=
Cake (6 Slices Left)=
Cake (5 Slices Left)=
Cake (4 Slices Left)=
Cake (3 Slices Left)=
Cake (2 Slices Left)=
Cake (1 Slice Left)=

View file

@ -1,3 +1,5 @@
local S = minetest.get_translator("mcl_cauldron")
-- Cauldron mod, adds cauldrons.
-- TODO: Extinguish fire of burning entities
@ -42,9 +44,9 @@ end
-- Empty cauldron
minetest.register_node("mcl_cauldrons:cauldron", {
description = "Cauldron",
_doc_items_longdesc = "Cauldrons are used to store water and slowly fill up under rain. They can also be used to wash off banners.",
_doc_items_usagehelp = "Place a water pucket into the cauldron to fill it with water. Place an empty bucket on a full cauldron to retrieve the water. Place a water bottle into the cauldron to fill the cauldron to one third with water. Place a glass bottle in a cauldron with water to retrieve one third of the water. Use an emblazoned banner on a cauldron with water to wash off its top layer.",
description = S("Cauldron"),
_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",
inventory_image = "mcl_cauldrons_cauldron.png",
drawtype = "nodebox",
@ -101,14 +103,14 @@ local register_filled_cauldron = function(water_level, description, river_water)
end
-- Filled cauldrons (3 levels)
register_filled_cauldron(1, "Cauldron (1/3 Water)")
register_filled_cauldron(2, "Cauldron (2/3 Water)")
register_filled_cauldron(3, "Cauldron (3/3 Water)")
register_filled_cauldron(1, S("Cauldron (1/3 Water)"))
register_filled_cauldron(2, S("Cauldron (2/3 Water)"))
register_filled_cauldron(3, S("Cauldron (3/3 Water)"))
if minetest.get_modpath("mclx_core") then
register_filled_cauldron(1, "Cauldron (1/3 River Water)", true)
register_filled_cauldron(2, "Cauldron (2/3 River Water)", true)
register_filled_cauldron(3, "Cauldron (3/3 River Water)", true)
register_filled_cauldron(1, S("Cauldron (1/3 River Water)"), true)
register_filled_cauldron(2, S("Cauldron (2/3 River Water)"), true)
register_filled_cauldron(3, S("Cauldron (3/3 River Water)"), true)
end
minetest.register_craft({

View file

@ -0,0 +1,10 @@
# textdomain: mcl_cauldron
Cauldron=Kessel
Cauldrons are used to store water and slowly fill up under rain.=Kessel werden benutzt, um Wasser zu lagern, im Regen werden sie langsam aufgefüllt.
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.=Platzieren Sie einen Wassereinmer in den Kessel, um ihn mit Wasser zu füllen. Platzieren Sie einen leeren Eimer auf einen vollen Kessel, um das Wasser aufzusammeln. Platzieren Sie eine Wasserflasche in den Kessel, um ihn zu einem Drittel mit Wasser zu füllen.
Cauldron (1/3 Water)=Kessel (1/3 Wasser)
Cauldron (2/3 Water)=Kessel (2/3 Wasser)
Cauldron (3/3 Water)=Kessel (3/3 Wasser)
Cauldron (1/3 River Water)=Kessel (1/3 Wasser)
Cauldron (2/3 River Water)=Kessel (2/3 Flusswasser)
Cauldron (3/3 River Water)=Kessel (3/3 Flusswasser)

View file

@ -0,0 +1,10 @@
# textdomain: mcl_cauldron
Cauldron=
Cauldrons are used to store water and slowly fill up under rain. They can also be used to wash off banners.=
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. Use an emblazoned banner on a cauldron with water to wash off its top layer.=
Cauldron (1/3 Water)=
Cauldron (2/3 Water)=
Cauldron (3/3 Water)=
Cauldron (1/3 River Water)=
Cauldron (2/3 River Water)=
Cauldron (3/3 River Water)=

View file

@ -1,3 +1,6 @@
local S = minetest.get_translator("mcl_chests")
local mod_doc = minetest.get_modpath("doc")
local no_rotate, simple_rotate
if minetest.get_modpath("screwdriver") then
no_rotate = screwdriver.disallow
@ -37,13 +40,8 @@ end
local trapped_chest_mesecons_rules = mesecon.rules.pplate
-- To be called if a player closed a chest
local player_chest_close = function(player)
local name = player:get_player_name()
if open_chests[name] == nil then
return
end
local pos = open_chests[name].pos
-- To be called when a chest is closed (only relevant for trapped chest atm)
local chest_update_after_close = function(pos)
local node = minetest.get_node(pos)
if node.name == "mcl_chests:trapped_chest_on" then
@ -64,20 +62,32 @@ local player_chest_close = function(player)
minetest.swap_node(pos_other, {name="mcl_chests:trapped_chest_left", param2 = node.param2})
mesecon.receptor_off(pos_other, trapped_chest_mesecons_rules)
end
end
-- To be called if a player closed a chest
local player_chest_close = function(player)
local name = player:get_player_name()
if open_chests[name] == nil then
return
end
local pos = open_chests[name].pos
chest_update_after_close(pos)
open_chests[name] = nil
end
-- This is a helper function to register both chests and trapped chests. Trapped chests will make use of the additional parameters
local register_chest = function(basename, desc, longdesc, usagehelp, tiles_table, hidden, mesecons, on_rightclick_addendum, on_rightclick_addendum_left, on_rightclick_addendum_right, drop, formspec_basename)
local register_chest = function(basename, desc, longdesc, usagehelp, tiles_table, hidden, mesecons, on_rightclick_addendum, on_rightclick_addendum_left, on_rightclick_addendum_right, drop, canonical_basename)
-- START OF register_chest FUNCTION BODY
if not drop then
drop = "mcl_chests:"..basename
else
drop = "mcl_chests:"..drop
end
if not formspec_basename then
formspec_basename = basename
-- The basename of the "canonical" version of the node, if set (e.g.: trapped_chest_on → trapped_chest).
-- Used to get a shared formspec ID and to swap the node back to the canonical version in on_construct.
if not canonical_basename then
canonical_basename = basename
end
minetest.register_node("mcl_chests:"..basename, {
@ -118,14 +128,16 @@ minetest.register_node("mcl_chests:"..basename, {
-- BEGIN OF LISTRING WORKAROUND
inv:set_size("input", 1)
-- END OF LISTRING WORKAROUND
if minetest.get_node(mcl_util.get_double_container_neighbor_pos(pos, param2, "right")).name == "mcl_chests:"..basename then
minetest.swap_node(pos, {name="mcl_chests:"..basename.."_right",param2=param2})
if minetest.get_node(mcl_util.get_double_container_neighbor_pos(pos, param2, "right")).name == "mcl_chests:"..canonical_basename then
minetest.swap_node(pos, {name="mcl_chests:"..canonical_basename.."_right",param2=param2})
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "right")
minetest.swap_node(p, { name = "mcl_chests:"..basename.."_left", param2 = param2 })
elseif minetest.get_node(mcl_util.get_double_container_neighbor_pos(pos, param2, "left")).name == "mcl_chests:"..basename then
minetest.swap_node(pos, {name="mcl_chests:"..basename.."_left",param2=param2})
minetest.swap_node(p, { name = "mcl_chests:"..canonical_basename.."_left", param2 = param2 })
elseif minetest.get_node(mcl_util.get_double_container_neighbor_pos(pos, param2, "left")).name == "mcl_chests:"..canonical_basename then
minetest.swap_node(pos, {name="mcl_chests:"..canonical_basename.."_left",param2=param2})
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "left")
minetest.swap_node(p, { name = "mcl_chests:"..basename.."_right", param2 = param2 })
minetest.swap_node(p, { name = "mcl_chests:"..canonical_basename.."_right", param2 = param2 })
else
minetest.swap_node(pos, { name = "mcl_chests:"..canonical_basename, param2 = param2 })
end
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
@ -168,12 +180,13 @@ minetest.register_node("mcl_chests:"..basename, {
on_rightclick = function(pos, node, clicker)
minetest.show_formspec(clicker:get_player_name(),
"mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z,
"mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z,
"size[9,8.75]"..
mcl_vars.inventory_header..
"background[-0.19,-0.25;9.41,10.48;mcl_chests_inventory_chest.png]"..
"image[0,-0.2;5,0.75;mcl_chests_fnt_chest.png]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Chest"))).."]"..
"list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0.5;9,3;]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
"list[current_player;main;0,7.74;9,1;]"..
"listring[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main]"..
@ -187,7 +200,7 @@ minetest.register_node("mcl_chests:"..basename, {
on_destruct = function(pos)
local players = minetest.get_connected_players()
for p=1, #players do
minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z)
minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z)
end
end,
mesecons = mesecons,
@ -202,6 +215,15 @@ minetest.register_node("mcl_chests:"..basename.."_left", {
drop = drop,
is_ground_content = false,
sounds = mcl_sounds.node_sound_wood_defaults(),
on_construct = function(pos)
local n = minetest.get_node(pos)
local param2 = n.param2
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "left")
if not p or minetest.get_node(p).name ~= "mcl_chests:"..canonical_basename.."_right" then
n.name = "mcl_chests:"..canonical_basename
minetest.swap_node(pos, n)
end
end,
on_destruct = function(pos)
local n = minetest.get_node(pos)
if n.name == "mcl_chests:"..basename then
@ -210,7 +232,7 @@ minetest.register_node("mcl_chests:"..basename.."_left", {
local players = minetest.get_connected_players()
for p=1, #players do
minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z)
minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z)
end
local param2 = n.param2
@ -218,6 +240,9 @@ minetest.register_node("mcl_chests:"..basename.."_left", {
if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_right" then
return
end
for pl=1, #players do
minetest.close_formspec(players[pl]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..p.x.."_"..p.y.."_"..p.z)
end
minetest.swap_node(p, { name = "mcl_chests:"..basename, param2 = param2 })
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
@ -290,12 +315,14 @@ minetest.register_node("mcl_chests:"..basename.."_left", {
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "left")
minetest.show_formspec(clicker:get_player_name(),
"mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z,
"mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z,
"size[9,11.5]"..
"background[-0.19,-0.25;9.41,12.5;mcl_chests_inventory_chest_large.png]"..
mcl_vars.inventory_header..
"label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Large Chest"))).."]"..
"list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0.5;9,3;]"..
"list[nodemeta:"..pos_other.x..","..pos_other.y..","..pos_other.z..";main;0,3.5;9,3;]"..
"label[0,7;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"list[current_player;main;0,7.5;9,3;9]"..
"list[current_player;main;0,10.75;9,1;]"..
-- BEGIN OF LISTRING WORKAROUND
@ -323,6 +350,15 @@ minetest.register_node("mcl_chests:"..basename.."_right", {
drop = drop,
is_ground_content = false,
sounds = mcl_sounds.node_sound_wood_defaults(),
on_construct = function(pos)
local n = minetest.get_node(pos)
local param2 = n.param2
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "right")
if not p or minetest.get_node(p).name ~= "mcl_chests:"..canonical_basename.."_left" then
n.name = "mcl_chests:"..canonical_basename
minetest.swap_node(pos, n)
end
end,
on_destruct = function(pos)
local n = minetest.get_node(pos)
if n.name == "mcl_chests:"..basename then
@ -331,7 +367,7 @@ minetest.register_node("mcl_chests:"..basename.."_right", {
local players = minetest.get_connected_players()
for p=1, #players do
minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z)
minetest.close_formspec(players[p]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z)
end
local param2 = n.param2
@ -339,6 +375,9 @@ minetest.register_node("mcl_chests:"..basename.."_right", {
if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_left" then
return
end
for pl=1, #players do
minetest.close_formspec(players[pl]:get_player_name(), "mcl_chests:"..canonical_basename.."_"..p.x.."_"..p.y.."_"..p.z)
end
minetest.swap_node(p, { name = "mcl_chests:"..basename, param2 = param2 })
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
@ -411,13 +450,15 @@ minetest.register_node("mcl_chests:"..basename.."_right", {
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "right")
minetest.show_formspec(clicker:get_player_name(),
"mcl_chests:"..formspec_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z,
"mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z,
"size[9,11.5]"..
"background[-0.19,-0.25;9.41,12.5;mcl_chests_inventory_chest_large.png]"..
mcl_vars.inventory_header..
"label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Large Chest"))).."]"..
"list[nodemeta:"..pos_other.x..","..pos_other.y..","..pos_other.z..";main;0,0.5;9,3;]"..
"list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,3.5;9,3;]"..
"label[0,7;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"list[current_player;main;0,7.5;9,3;9]"..
"list[current_player;main;0,10.75;9,1;]"..
-- BEGIN OF LISTRING WORKAROUND
@ -437,7 +478,7 @@ minetest.register_node("mcl_chests:"..basename.."_right", {
on_rotate = no_rotate,
})
if minetest.get_modpath("doc") then
if mod_doc then
doc.add_entry_alias("nodes", "mcl_chests:"..basename, "nodes", "mcl_chests:"..basename.."_left")
doc.add_entry_alias("nodes", "mcl_chests:"..basename, "nodes", "mcl_chests:"..basename.."_right")
end
@ -445,10 +486,12 @@ end
-- END OF register_chest FUNCTION BODY
end
local chestusage = S("To access its inventory, rightclick it. When broken, the items will drop out.")
register_chest("chest",
"Chest",
"Chests are containers which provide 27 inventory slots. Chests can be turned into large chests with double the capacity by placing two chests next to each other.",
"To access the chest's inventory, rightclick the chest. When broken, the items of the chest will drop out.",
S("Chest"),
S("Chests are containers which provide 27 inventory slots. Chests can be turned into large chests with double the capacity by placing two chests next to each other."),
chestusage,
{
small = {"default_chest_top.png", "mcl_chests_chest_bottom.png",
"mcl_chests_chest_right.png", "mcl_chests_chest_left.png",
@ -476,9 +519,9 @@ local traptiles = {
}
register_chest("trapped_chest",
"Trapped Chest",
"A trapped chest is a container which provides 27 inventory slots. When it is opened, it sends a redstone signal to its adjacent blocks as long it stays open. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other.",
"To access the inventory of a trapped chest, rightclick it. When broken, the items will drop out.",
S("Trapped Chest"),
S("A trapped chest is a container which provides 27 inventory slots. When it is opened, it sends a redstone signal to its adjacent blocks as long it stays open. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other."),
chestusage,
traptiles,
nil,
{receptor = {
@ -599,9 +642,9 @@ minetest.register_craft({
})
minetest.register_node("mcl_chests:ender_chest", {
description = "Ender Chest",
_doc_items_longdesc = "Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players.",
_doc_items_usagehelp = "Rightclick the ender chest to access your personal interdimensional inventory.",
description = S("Ender Chest"),
_doc_items_longdesc = S("Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players."),
_doc_items_usagehelp = S("Rightclick the ender chest to access your personal interdimensional inventory."),
tiles = {"mcl_chests_ender_chest_top.png", "mcl_chests_ender_chest_bottom.png",
"mcl_chests_ender_chest_right.png", "mcl_chests_ender_chest_left.png",
"mcl_chests_ender_chest_back.png", "mcl_chests_ender_chest_front.png"},
@ -620,8 +663,9 @@ minetest.register_node("mcl_chests:ender_chest", {
"size[9,8.75]"..
mcl_vars.inventory_header..
"background[-0.19,-0.25;9.41,10.48;mcl_chests_inventory_chest.png]"..
"image[0,-0.2;5,0.75;mcl_chests_fnt_ender_chest.png]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Ender Chest"))).."]"..
"list[current_player;enderchest;0,0.5;9,3;]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
"list[current_player;main;0,7.74;9,1;]"..
"listring[current_player;enderchest]"..
@ -632,6 +676,16 @@ minetest.register_node("mcl_chests:ender_chest", {
on_rotate = simple_rotate,
})
minetest.register_lbm({
label = "Update ender chest + shulker box formspecs (0.51.0)",
name = "mcl_chests:update_formspecs_0_51_0",
nodenames = { "mcl_chests:ender_chest", "group:shulker_box" },
action = function(pos, node)
minetest.registered_nodes[node.name].on_construct(pos)
minetest.log("action", "[mcl_chests] Node formspec updated at "..minetest.pos_to_string(pos))
end,
})
minetest.register_on_joinplayer(function(player)
local inv = player:get_inventory()
inv:set_size("enderchest", 9*3)
@ -648,22 +702,22 @@ minetest.register_craft({
-- Shulker boxes
local boxtypes = {
white = "White Shulker Box",
grey = "Light Grey Shulker Box",
orange = "Orange Shulker Box",
cyan = "Cyan Shulker Box",
magenta = "Magenta Shulker Box",
violet = "Purple Shulker Box",
lightblue = "Light Blue Shulker Box",
blue = "Blue Shulker Box",
yellow = "Yellow Shulker Box",
brown = "Brown Shulker Box",
green = "Lime Shulker Box",
dark_green = "Green Shulker Box",
pink = "Pink Shulker Box",
red = "Red Shulker Box",
dark_grey = "Grey Shulker Box",
black = "Black Shulker Box",
white = S("White Shulker Box"),
grey = S("Light Grey Shulker Box"),
orange = S("Orange Shulker Box"),
cyan = S("Cyan Shulker Box"),
magenta = S("Magenta Shulker Box"),
violet = S("Purple Shulker Box"),
lightblue = S("Light Blue Shulker Box"),
blue = S("Blue Shulker Box"),
yellow = S("Yellow Shulker Box"),
brown = S("Brown Shulker Box"),
green = S("Lime Shulker Box"),
dark_green = S("Green Shulker Box"),
pink = S("Pink Shulker Box"),
red = S("Red Shulker Box"),
dark_grey = S("Grey Shulker Box"),
black = S("Black Shulker Box"),
}
local shulker_mob_textures = {
@ -684,13 +738,28 @@ local shulker_mob_textures = {
dark_grey = "mobs_mc_shulker_gray.png",
black = "mobs_mc_shulker_black.png",
}
local canonical_shulker_color = "violet"
for color, desc in pairs(boxtypes) do
local mob_texture = shulker_mob_textures[color]
local is_canonical = color == canonical_shulker_color
local longdesc, usagehelp, create_entry, entry_name
if mod_doc then
if is_canonical then
longdesc = S("A shulker box is a portable container which provides 27 inventory slots for any item except shulker boxes. Shulker boxes keep their inventory when broken, so shulker boxes as well as their contents can be taken as a single item. Shulker boxes come in many different colors.")
usagehelp = S("To access the inventory of a shulker box, place and right-click it. To take a shulker box and its contents with you, just break and collect it, the items will not fall out.")
entry_name = S("Shulker Box")
else
create_entry = false
end
end
minetest.register_node("mcl_chests:"..color.."_shulker_box", {
description = desc,
_doc_items_longdesc = "A shulker box is a portable container which provides 27 inventory slots for any item except shulker boxes. Shulker boxes keep their inventory when broken, so shulker boxes as well as their contents can be taken as a single item. Shulker boxes come in many different colors.",
_doc_items_usagehelp = "To access the inventory of a shulker box, place and right-click it. To take a shulker box and its contents with you, just break and collect it, the items will not fall out. Place the shulker box again to be able to retrieve its contents.",
_doc_items_create_entry = create_entry,
_doc_items_entry_name = entry_name,
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usagehelp,
tiles = {
"mcl_chests_"..color.."_shulker_box_top.png", -- top
"[combine:16x16:-32,-28="..mob_texture, -- bottom
@ -715,8 +784,9 @@ for color, desc in pairs(boxtypes) do
"size[9,8.75]"..
mcl_vars.inventory_header..
"background[-0.19,-0.25;9.41,10.48;mcl_chests_inventory_chest.png]"..
"image[0,-0.2;5,0.75;mcl_chests_fnt_shulker_box.png]"..
"label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Shulker Box"))).."]"..
"list[current_name;main;0,0.5;9,3;]"..
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]"..
"list[current_player;main;0,4.5;9,3;9]"..
"list[current_player;main;0,7.74;9,1;]"..
"listring[current_name;main]"..
@ -793,6 +863,10 @@ for color, desc in pairs(boxtypes) do
_mcl_hardness = 6,
})
if mod_doc and not is_canonical then
doc.add_entry_alias("nodes", "mcl_chests:"..canonical_shulker_color.."_shulker_box", "nodes", "mcl_chests:"..color.."_shulker_box")
end
minetest.register_craft({
type = "shapeless",
output = 'mcl_chests:'..color..'_shulker_box',
@ -809,3 +883,16 @@ minetest.register_craft({
}
})
minetest.register_lbm({
-- Disable active/open trapped chests when loaded because nobody could
-- have them open at loading time.
-- Fixes redstone weirdness.
label = "Disable active trapped chests",
name = "mcl_chests:reset_trapped_chests",
nodenames = { "mcl_chests:trapped_chest_on", "mcl_chests:trapped_chest_on_left", "mcl_chests:trapped_chest_on_right" },
run_at_every_load = true,
action = function(pos, node)
minetest.log("error", "lbm!" ..minetest.pos_to_string(pos))
chest_update_after_close(pos)
end,
})

View file

@ -0,0 +1,30 @@
# textdomain: mcl_chests
Chest=Truhe
Chests are containers which provide 27 inventory slots. Chests can be turned into large chests with double the capacity by placing two chests next to each other.=Truhen sind Behälter, die 27 Inventarplätze Platz bieten. Truhen verwandeln sich in große Truhen mit der doppelten Kapazität, wenn zwei Truhen nebeneinander platziert werden.
To access its inventory, rightclick it. When broken, the items will drop out.=Um auf das Inventar zuzugreifen, rechtsklicken Sie darauf. Wenn abgebaut, wird der Inhalt hinausfallen.
Trapped Chest=Mechanismustruhe
A trapped chest is a container which provides 27 inventory slots. When it is opened, it sends a redstone signal to its adjacent blocks as long it stays open. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other.=Mechanismustruhen sind Behälter, die 27 Inventarplätze Platz bieten. Wenn sie geöffnet wird, sendet sie ein Redstone-Signal zu benachbarten Blöcken, solange sie geöffnet bleibt. Mechanismustruhen verwandeln sich in große Mechanismustruhen mit der doppelten Kapazität, wenn zwei Mechanismustruhen nebeneinander platziert werden.
Ender Chest=Endertruhe
Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players.=Endertruhen gewähren Ihnen Zugriff zu einem einzigartigen persönlichen interdimensionalen Inventar mit 27 Plätzen. Dieses Inventar ist das selbe, egal, welche Endertruhe sie benutzen. Wenn Sie einen Gegenstand in eine Endertruhe platzieren, werden Sie sie in allen anderen Endertruhen vorhinden. Jeder Spieler wird nur seine eigenen Gegenstände sehen, aber nicht die der anderen Spieler.
Rightclick the ender chest to access your personal interdimensional inventory.=Rechtsklicken Sie die Endertruhe, um auf Ihr persönliches interdimensionales Inventar zuzugreifen.
White Shulker Box=Weiße Schulkerkiste
Light Grey Shulker Box=Hellgraue Schulkerkiste
Orange Shulker Box=Orange Schulkerkiste
Cyan Shulker Box=Türkise Schulkerkiste
Magenta Shulker Box=Magenta Schulkerkiste
Purple Shulker Box=Violette Schulkerkiste
Light Blue Shulker Box=Hellblaue Schulkerkiste
Blue Shulker Box=Blaue Schulkerkiste
Yellow Shulker Box=Gelbe Schulkerkiste
Brown Shulker Box=Braune Schulkerkiste
Lime Shulker Box=Lindgrüne Schulkerkiste
Green Shulker Box=Grüne Schulkerkiste
Pink Shulker Box=Rosa Schulkerkiste
Red Shulker Box=Rote Schulkerkiste
Grey Shulker Box=Graue Schulkerkiste
Black Shulker Box=Schwarze Schulkerkiste
A shulker box is a portable container which provides 27 inventory slots for any item except shulker boxes. Shulker boxes keep their inventory when broken, so shulker boxes as well as their contents can be taken as a single item. Shulker boxes come in many different colors.=Eine Schulkerkiste ist ein tragbarer Behälter, der 27 Inventarplätze für alle Gegenstände außer Schulkerkisten bietet. Schulkerkisten behalten ihr Inventar, wenn sie abgebaut werden, also können Schulkerkisten so wie ihr Inhalt als einzelne Gegenstände mitgenommen werden. Schulkerkisten gibt es in vielen verschiedenen Farben.
To access the inventory of a shulker box, place and right-click it. To take a shulker box and its contents with you, just break and collect it, the items will not fall out.=Um auf das Inventar einer Schulkerkiste zuzugreifen, platzieren Sie sie und rechtsklicken sie auf ihr. Um eine Schulkerkiste und ihren Inhalt mitzunehmen, bauen Sie sie einfach ab und sammeln Sie sie auf, der Inhalt will nicht hinausfallen.
Shulker Box=Schulkerkiste
Large Chest=Große Truhe
Inventory=Inventar

View file

@ -0,0 +1,30 @@
# textdomain: mcl_chests
Chest=
Chests are containers which provide 27 inventory slots. Chests can be turned into large chests with double the capacity by placing two chests next to each other.=
To access its inventory, rightclick it. When broken, the items will drop out.=
Trapped Chest=
A trapped chest is a container which provides 27 inventory slots. When it is opened, it sends a redstone signal to its adjacent blocks as long it stays open. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other.=
Ender Chest=
Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players.=
Rightclick the ender chest to access your personal interdimensional inventory.=
White Shulker Box=
Light Grey Shulker Box=
Orange Shulker Box=
Cyan Shulker Box=
Magenta Shulker Box=
Purple Shulker Box=
Light Blue Shulker Box=
Blue Shulker Box=
Yellow Shulker Box=
Brown Shulker Box=
Lime Shulker Box=
Green Shulker Box=
Pink Shulker Box=
Red Shulker Box=
Grey Shulker Box=
Black Shulker Box=
A shulker box is a portable container which provides 27 inventory slots for any item except shulker boxes. Shulker boxes keep their inventory when broken, so shulker boxes as well as their contents can be taken as a single item. Shulker boxes come in many different colors.=
To access the inventory of a shulker box, place and right-click it. To take a shulker box and its contents with you, just break and collect it, the items will not fall out. Place the shulker box again to be able to retrieve its contents.=
Shulker Box=
Large Chest=
Inventory=

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before After
Before After

View file

@ -1,3 +1,5 @@
local S = minetest.get_translator("mcl_clock")
--[[
mcl_clock, renew of the renew of the watch mod
@ -54,11 +56,11 @@ function watch.register_item(name, image, creative, frame)
end
local longdesc, usagehelp
if use_doc then
longdesc = "Clocks are tools which shows the current time of day in the Overworld."
usagehelp = "The clock contains a rotating disc with a sun symbol (yellow disc) and moon symbol and a little “pointer” which shows the current time of day by estimating the real position of the sun and the moon in the sky. Noon is represented by the sun symbol and midnight is represented by the moon symbol."
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.")
end
minetest.register_craftitem(name, {
description = "Clock",
description = S("Clock"),
_doc_items_create_entry = use_doc,
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usagehelp,

View file

@ -0,0 +1,4 @@
# textdomain: mcl_clock
Clocks are tools which shows the current time of day in the Overworld.=Uhren sind Werkzeuge, die die Tageszeit in der Oberwelt anzeigen.
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.=Die Uhr enthält eine rotierende Scheibe mit einem Sonnensymbol (gelbe Scheibe) und einem Mondsymbol, und sie hat einem kleinen „Pfeil“, der die jetzige Tageszeit anzeigt, indem die reale Position von Sonne und Mond im Himmel abgeschätzt wird. Die Sonne repräsentiert die Mittagszeit und der Mond repräsentiert Mitternacht.
Clock=Uhr

View file

@ -0,0 +1,4 @@
# textdomain: mcl_clock
Clocks are tools which shows the current time of day in the Overworld.=
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.=
Clock=

View file

@ -1,3 +1,5 @@
local S = minetest.get_translator("mcl_cocoas")
mcl_cocoas = {}
-- Place cocoa
@ -70,9 +72,9 @@ end
--[[ TODO: Use a mesh for cocoas for perfect texture compability. ]]
local crop_def = {
description = "Premature Cocoa",
description = S("Premature Cocoa Pod"),
_doc_items_create_entry = true,
_doc_items_longdesc = "Cocoas are plants which grow on the side of jungle trees in 3 stages.",
_doc_items_longdesc = S("Cocoa pods grow on the side of jungle trees in 3 stages."),
drawtype = "nodebox",
tiles = {
"[combine:16x16:6,1=mcl_cocoas_cocoa_stage_0.png", "[combine:16x16:6,11=mcl_cocoas_cocoa_stage_0.png",
@ -115,7 +117,7 @@ local crop_def = {
-- 2nd stage
minetest.register_node("mcl_cocoas:cocoa_1", table.copy(crop_def))
crop_def.description = "Medium Cocoa"
crop_def.description = S("Medium Cocoa Pod")
crop_def._doc_items_create_entry = false
crop_def.groups.cocoa = 2
crop_def.tiles = {
@ -146,8 +148,8 @@ crop_def.selection_box = {
minetest.register_node("mcl_cocoas:cocoa_2", table.copy(crop_def))
-- Final stage
crop_def.description = "Mature Cocoa"
crop_def._doc_items_longdesc = "A mature cocoa is a plant which grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further."
crop_def.description = S("Mature Cocoa Pod")
crop_def._doc_items_longdesc = S("A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further.")
crop_def._doc_items_create_entry = true
crop_def.groups.cocoa = 3
crop_def.tiles = {
@ -181,7 +183,7 @@ minetest.register_node("mcl_cocoas:cocoa_3", table.copy(crop_def))
minetest.register_abm({
label = "Cocoa growth",
label = "Cocoa pod growth",
nodenames = {"mcl_cocoas:cocoa_1", "mcl_cocoas:cocoa_2"},
-- Same as potatoes
-- TODO: Tweak/balance the growth speed

View file

@ -0,0 +1,6 @@
# textdomain: mcl_cocoas
Premature Cocoa Pod=Junge Kakaoschote
Cocoa pods grow on the side of jungle trees in 3 stages.=Kakaoschoten wachsen an der Seite von Dschungelbäumen in 3 Stufen.
Medium Cocoa Pod=Mittelgroße Kakaoschote
Mature Cocoa Pod=Ausgewachsene Kakaoschote
A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further.=Eine ausgewachsene Kakaoschote wuchs an einem Dschugelbaum zur vollen Größe heran. Sie ist erntereif und kann für Kakaobohnen geerntet werden. Sie wird nicht weiter wachsen.

View file

@ -0,0 +1,6 @@
# textdomain: mcl_cocoas
Premature Cocoa Pod=
Cocoa pods grow on the side of jungle trees in 3 stages.=
Medium Cocoa Pod=
Mature Cocoa Pod=
A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further.=

Some files were not shown because too many files have changed in this diff Show more