Merge branch 'master' into fix_inventory_depends

This commit is contained in:
cora 2021-06-25 15:12:05 +00:00
commit f1ac39eaad
25 changed files with 286 additions and 111 deletions

102
.luacheckrc Normal file
View File

@ -0,0 +1,102 @@
std = "min"
read_globals = {
"ItemStack",
"dump", "dump2",
"vector",
"VoxelArea",
"minetest",
"PseudoRandom",
"PerlinNoise",
"PcgRandom",
string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn", "indexof", "insert_all"}},
math = {fields = {"hypot", "round"}},
}
-- A config option to allow r/w access to mods which contain
-- this one. It only avoids a couple warnings, and may not be
-- the behavior we want, so it's disabled by default.
local allow_parents=false
local lfs = require "lfs"
-- Seed the queue with the mods/ directory
local queue={ {"mods"} }
local function check(dir)
-- Get the string of the directory path
local sdir=table.concat(dir, "/")
-- Save the top-level directory name as a
-- fallback in case there's no mod.conf,
-- or no name= directive.
local name=dir[#dir]
-- Is there a mod.conf?
if lfs.attributes(sdir.."/mod.conf", "mode") == "file" then
local deps={}
for line in io.lines(sdir.."/mod.conf") do
-- Use name= if it's there
name=string.match(line, "name *= *([a-zA-Z0-9_]+)") or name
-- Get the dependency entries (if they're there)
local ents=string.match(line, "depends *=(.*)$")
if ents then
-- Split them in to the comma-separated names
for m in string.gmatch(ents, "([a-zA-Z0-9_]+),?") do
table.insert(deps, m)
end
end
end
local glb={ name }
if allow_parents then
for _, v in pairs(dir) do
-- Skip ALL-CAPS names since those tend
-- to be collections of mods instead of
-- mods themselves.
if not string.match(v, "^[A-Z]+$") then
table.insert(glb, v)
end
end
end
-- Tell Luacheck what the directory is allowed to do
files[sdir]={
globals = glb,
read_globals = deps,
}
elseif lfs.attributes(sdir.."/init.lua", "mode") == "file" then
-- No mod.conf, but there's an init.lua here.
local glb={ name }
if allow_parents then
for _, v in pairs(dir) do
-- Again, skip ALL-CAPS.
if not string.match(v, "^[A-Z]+$") then
table.insert(glb, v)
end
end
end
files[sdir]={ globals=glb }
end
-- Queue any child directories
for d in lfs.dir(sdir) do
-- Skip hidden directories and parent/current directories.
if lfs.attributes(sdir.."/"..d, "mode") == "directory" and not string.match(d, "^%.") then
-- Copy dir in to nd (New Dir)
local nd={}
for k, v in pairs(dir) do
nd[k]=v
end
nd[#nd+1]=d
table.insert(queue, nd)
end
end
end
while #queue > 0 do
-- Pop an entry and process it.
check(table.remove(queue, 1))
end

View File

@ -149,7 +149,7 @@ These groups are used mostly for informational purposes
* `trapdoor=2`: Open trapdoor * `trapdoor=2`: Open trapdoor
* `glass=1`: Glass (full cubes only) * `glass=1`: Glass (full cubes only)
* `rail=1`: Rail * `rail=1`: Rail
* `music_record`: Music Disc (rating is track ID) * `music_record=1`: Music Disc
* `tnt=1`: Block is TNT * `tnt=1`: Block is TNT
* `boat=1`: Boat * `boat=1`: Boat
* `minecart=1`: Minecart * `minecart=1`: Minecart

View File

@ -207,6 +207,10 @@ end
function mcl_autogroup.can_harvest(nodename, toolname) function mcl_autogroup.can_harvest(nodename, toolname)
local ndef = minetest.registered_nodes[nodename] local ndef = minetest.registered_nodes[nodename]
if not ndef then
return false
end
if minetest.get_item_group(nodename, "dig_immediate") >= 2 then if minetest.get_item_group(nodename, "dig_immediate") >= 2 then
return true return true
end end

View File

@ -243,7 +243,7 @@ function boat.on_step(self, dtime, moveresult)
else else
local ctrl = self._passenger:get_player_control() local ctrl = self._passenger:get_player_control()
if ctrl and ctrl.sneak then if ctrl and ctrl.sneak then
detach_player(self._passenger, true) detach_object(self._passenger, true)
self._passenger = nil self._passenger = nil
end end
end end

View File

@ -10,6 +10,7 @@
@1 drowned.=@1 ertrank. @1 drowned.=@1 ertrank.
@1 ran out of oxygen.=@1 ging die Luft aus. @1 ran out of oxygen.=@1 ging die Luft aus.
@1 was killed by @2.=@1 wurde von @2 getötet. @1 was killed by @2.=@1 wurde von @2 getötet.
@1 was slain by @2.=@1 wurde von @2 getötet.
@1 was killed.=@1 wurde getötet. @1 was killed.=@1 wurde getötet.
@1 was killed by a mob.=@1 wurde von einem Mob getötet. @1 was killed by a mob.=@1 wurde von einem Mob getötet.
@1 was burned to death by a blaze's fireball.=@1 wurde von einem Feuerball einer Lohe zu Tode verbrannt. @1 was burned to death by a blaze's fireball.=@1 wurde von einem Feuerball einer Lohe zu Tode verbrannt.

View File

@ -10,6 +10,7 @@
@1 drowned.= @1 drowned.=
@1 ran out of oxygen.= @1 ran out of oxygen.=
@1 was killed by @2.= @1 was killed by @2.=
@1 was slain by @2.=
@1 was killed.= @1 was killed.=
@1 was killed by a mob.= @1 was killed by a mob.=
@1 was burned to death by a blaze's fireball.= @1 was burned to death by a blaze's fireball.=

View File

@ -129,6 +129,19 @@ local dispenserdef = {
local stack_id = stacks[r].stackpos local stack_id = stacks[r].stackpos
local stackdef = stack:get_definition() local stackdef = stack:get_definition()
local iname = stack:get_name() local iname = stack:get_name()
if not minetest.registered_items[iname] then
minetest.log(
"warning",
"Trying to dispense unknown item " ..
"" .. iname .. "" ..
"near (" ..
pos.x .. ", " ..
pos.y .. ", " ..
pos.z ..
")"
)
return
end
local igroups = minetest.registered_items[iname].groups local igroups = minetest.registered_items[iname].groups
--[===[ Dispense item ]===] --[===[ Dispense item ]===]

View File

@ -483,11 +483,13 @@ function mesecon.turnoff(pos, link)
for _, r in ipairs(mesecon.rule2meta(f.link, mesecon.rules.mcl_alldirs_spread)) do for _, r in ipairs(mesecon.rule2meta(f.link, mesecon.rules.mcl_alldirs_spread)) do
local np = vector.add(f.pos, r) local np = vector.add(f.pos, r)
local n = mesecon.get_node_force(np) local n = mesecon.get_node_force(np)
if mesecon.is_receptor_on(n.name) then if not (mesecon.get_node_force(np) == nil) then
local receptorrules = mesecon.receptor_get_rules(n) if mesecon.is_receptor_on(n.name) then
for _, rr in pairs(receptorrules) do local receptorrules = mesecon.receptor_get_rules(n)
if rr.spread and vector.equals(mesecon.invertRule(rr), r) then for _, rr in pairs(receptorrules) do
return false if rr.spread and vector.equals(mesecon.invertRule(rr), r) then
return false
end
end end
end end
end end

View File

@ -8,9 +8,6 @@ local N = function(s) return s end
-- Maximum number of layers which can be put on a banner by crafting. -- Maximum number of layers which can be put on a banner by crafting.
local max_layers_crafting = 12 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. -- Max. number lines in the descriptions for the banner layers.
-- This is done to avoid huge tooltips. -- This is done to avoid huge tooltips.
local max_layer_lines = 6 local max_layer_lines = 6
@ -398,16 +395,6 @@ local banner_pattern_craft = function(itemstack, player, old_craft_grid, craft_i
if #layers >= max_layers_crafting then if #layers >= max_layers_crafting then
return ItemStack("") return ItemStack("")
end 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 matching_pattern
local max_i = player:get_inventory():get_size("craft") local max_i = player:get_inventory():get_size("craft")

View File

@ -22,7 +22,7 @@ minetest.register_craftitem("mcl_bows:arrow", {
description = S("Arrow"), description = S("Arrow"),
_tt_help = S("Ammunition").."\n"..S("Damage from bow: 1-10").."\n"..S("Damage from dispenser: 3"), _tt_help = S("Ammunition").."\n"..S("Damage from bow: 1-10").."\n"..S("Damage from dispenser: 3"),
_doc_items_longdesc = S("Arrows are ammunition for bows and dispensers.").."\n".. _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("An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 25% 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."), 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."), _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", inventory_image = "mcl_bows_arrow_inv.png",

View File

@ -129,7 +129,7 @@ minetest.register_tool("mcl_bows:bow", {
description = S("Bow"), description = S("Bow"),
_tt_help = S("Launches arrows"), _tt_help = S("Launches arrows"),
_doc_items_longdesc = S("Bows are ranged weapons to shoot arrows at your foes.").."\n".. _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."), 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 25% 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_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, _doc_items_durability = BOW_DURABILITY,
inventory_image = "mcl_bows_bow.png", inventory_image = "mcl_bows_bow.png",
@ -256,9 +256,9 @@ controls.register_on_release(function(player, key, time)
local is_critical = false local is_critical = false
if charge >= BOW_CHARGE_TIME_FULL then if charge >= BOW_CHARGE_TIME_FULL then
speed = BOW_MAX_SPEED speed = BOW_MAX_SPEED
local r = math.random(1,5) local r = math.random(1,4)
if r == 1 then if r == 1 then
-- 20% chance for critical hit -- 25% chance for critical hit
damage = 10 damage = 10
is_critical = true is_critical = true
else else

View File

@ -1,15 +1,14 @@
# textdomain: mcl_bows # textdomain: mcl_bows
Arrow=Pfeil 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
Ammunition=Munition Ammunition=Munition
Damage from bow: 1-10=Schaden vom Bogen: 1-10 Damage from bow: 1-10=Schaden vom Bogen: 1-10
Damage from dispenser: 3=Schaden vom Werfer: 3 Damage from dispenser: 3=Schaden vom Werfer: 3
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 25% 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 25%-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
Launches arrows=Verschießt Pfeile Launches arrows=Verschießt Pfeile
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 25% 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 25%-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.

View File

@ -1,11 +1,14 @@
# textdomain: mcl_bows # textdomain: mcl_bows
Arrow=Flecha Arrow=Flecha
Ammunition=Munición
Damage from bow: 1-10=Daño del arco: 1-10
Damage from dispenser: 3=Daño del dispensador: 3
Arrows are ammunition for bows and dispensers.=Las flechas son municiones para arcos y dispensadores. Arrows are ammunition for bows and dispensers.=Las flechas son municiones para arcos y dispensadores.
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.=Una flecha disparada desde un arco tiene un daño regular de 1-9. A plena carga, hay un 20% de posibilidades de que un golpe crítico inflija 10 daños en su lugar. Una flecha disparada desde un dispensador siempre causa 3 de daño. An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 25% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Una flecha disparada desde un arco tiene un daño regular de 1-9. A plena carga, hay un 25% de posibilidades de que un golpe crítico inflija 10 daños en su lugar. Una flecha disparada desde un dispensador siempre causa 3 de daño.
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Las flechas pueden atascarse en bloques sólidos y pueden recuperarse nuevamente. También son capaces de presionar botones de madera. Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Las flechas pueden atascarse en bloques sólidos y pueden recuperarse nuevamente. También son capaces de presionar botones de madera.
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.=Para usar flechas como municiones para un arco, simplemente colóquelas en cualquier parte de su inventario, se usarán automáticamente. Para usar flechas como municiones para un dispensador, colóquelas en el inventario del dispensador. Para recuperar una flecha que se pega en un bloque, simplemente camine cerca de ella. 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.=Para usar flechas como municiones para un arco, simplemente colóquelas en cualquier parte de su inventario, se usarán automáticamente. Para usar flechas como municiones para un dispensador, colóquelas en el inventario del dispensador. Para recuperar una flecha que se pega en un bloque, simplemente camine cerca de ella.
Bow=Arco Bow=Arco
Launches arrows=Dispara flechas
Bows are ranged weapons to shoot arrows at your foes.=Los arcos son armas a distancia para disparar flechas a tus enemigos. Bows are ranged weapons to shoot arrows at your foes.=Los arcos son armas a distancia para disparar flechas a tus enemigos.
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.=La velocidad y el daño de la flecha aumentan cuanto más tiempo tenses. El daño regular de la flecha está entre 1 y 9. A plena carga, también hay un 20% de un golpe crítico, que en vez de eso causa 10 de daño. 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 25% of a critical hit, dealing 10 damage instead.=La velocidad y el daño de la flecha aumentan cuanto más tiempo tenses. El daño regular de la flecha está entre 1 y 9. A plena carga, también hay un 25% de un golpe crítico, que en vez de eso causa 10 de daño.
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.=Para usar el arco, primero debes de tener al menos una flecha en cualquier parte de su inventario (a menos que esté en modo creativo). Mantenga presionado el botón derecho del mouse para tensar, suelte para disparar. 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.=Para usar el arco, primero debes de tener al menos una flecha en cualquier parte de su inventario (a menos que esté en modo creativo). Mantenga presionado el botón derecho del mouse para tensar, suelte para disparar.
Bow=Arco

View File

@ -1,15 +1,14 @@
# textdomain: mcl_bows # textdomain: mcl_bows
Arrow=Flèche Arrow=Flèche
Arrows are ammunition for bows and dispensers.=Les flèches sont des munitions pour les arcs et les distributeurs.
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.=Une flèche tirée d'un arc a des dégâts réguliers de 1 à 9. À pleine charge, il y a 20% de chances qu'un coup critique inflige 10 dégâts à la place. Une flèche tirée depuis un distributeur inflige toujours 3 dégâts.
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Les flèches peuvent se coincer sur des blocs solides et peuvent être récupérées à nouveau. Ils sont également capables de pousser des boutons en bois.
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.=Pour utiliser des flèches comme munitions pour un arc, il suffit de les placer n'importe où dans votre inventaire, elles seront utilisées automatiquement. Pour utiliser des flèches comme munitions pour un distributeur, placez-les dans l'inventaire du distributeur. Pour récupérer une flèche qui colle dans un bloc, il vous suffit de vous en approcher.
Bow=Arc
Bows are ranged weapons to shoot arrows at your foes.=Les arcs sont des armes à distance pour tirer des flèches sur vos ennemis.
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.=La vitesse et les dégâts de la flèche augmentent plus vous chargez. Les dégâts réguliers de la flèche sont compris entre 1 et 9. À pleine charge, il y a également 20% d'un coup critique, infligeant 10 dégâts à la place.
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.=Pour utiliser l'arc, vous devez d'abord avoir au moins une flèche n'importe où dans votre inventaire (sauf en mode créatif). Maintenez enfoncé le bouton droit de la souris pour charger, relâchez pour tirer.
Bow=Arc
Ammunition=Munition Ammunition=Munition
Damage from bow: 1-10=Dégâts de l'arc: 1-10 Damage from bow: 1-10=Dégâts de l'arc: 1-10
Damage from dispenser: 3=Dégâts du distributeur: 3 Damage from dispenser: 3=Dégâts du distributeur: 3
Arrows are ammunition for bows and dispensers.=Les flèches sont des munitions pour les arcs et les distributeurs.
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 25% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Une flèche tirée d'un arc a des dégâts réguliers de 1 à 9. À pleine charge, il y a 25% de chances qu'un coup critique inflige 10 dégâts à la place. Une flèche tirée depuis un distributeur inflige toujours 3 dégâts.
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Les flèches peuvent se coincer sur des blocs solides et peuvent être récupérées à nouveau. Ils sont également capables de pousser des boutons en bois.
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.=Pour utiliser des flèches comme munitions pour un arc, il suffit de les placer n'importe où dans votre inventaire, elles seront utilisées automatiquement. Pour utiliser des flèches comme munitions pour un distributeur, placez-les dans l'inventaire du distributeur. Pour récupérer une flèche qui colle dans un bloc, il vous suffit de vous en approcher.
Bow=Arc
Launches arrows=Lance des flèches Launches arrows=Lance des flèches
Bows are ranged weapons to shoot arrows at your foes.=Les arcs sont des armes à distance pour tirer des flèches sur vos ennemis.
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 25% of a critical hit, dealing 10 damage instead.=La vitesse et les dégâts de la flèche augmentent plus vous chargez. Les dégâts réguliers de la flèche sont compris entre 1 et 9. À pleine charge, il y a également 25% d'un coup critique, infligeant 10 dégâts à la place.
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.=Pour utiliser l'arc, vous devez d'abord avoir au moins une flèche n'importe où dans votre inventaire (sauf en mode créatif). Maintenez enfoncé le bouton droit de la souris pour charger, relâchez pour tirer.

View File

@ -1,15 +1,14 @@
# textdomain: mcl_bows # textdomain: mcl_bows
Arrow=Стрела 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.=Стрела, выпущенная из лука, обычно наносит урон 1-9. При полном натяжении есть 20-процентный шанс критического удара с уроном 10. Стрела из диспенсера всегда наносит урон уровня 3.
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.=Скорость и урон стрелы увеличиваются, пока вы её натягиваете. Обычный урон стрелы находится между 1 и 9. При полном натяжении есть 20-процентный шанс критического удара с уроном 10.
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=Лук
Ammunition=Боеприпасы Ammunition=Боеприпасы
Damage from bow: 1-10=Урон от лука: 1-10 Damage from bow: 1-10=Урон от лука: 1-10
Damage from dispenser: 3=Урон от диспенсера: 3 Damage from dispenser: 3=Урон от диспенсера: 3
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 25% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Стрела, выпущенная из лука, обычно наносит урон 1-9. При полном натяжении есть 25-процентный шанс критического удара с уроном 10. Стрела из диспенсера всегда наносит урон уровня 3.
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=Лук
Launches arrows=Пускает стрелы Launches arrows=Пускает стрелы
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 25% of a critical hit, dealing 10 damage instead.=Скорость и урон стрелы увеличиваются, пока вы её натягиваете. Обычный урон стрелы находится между 1 и 9. При полном натяжении есть 25-процентный шанс критического удара с уроном 10.
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.=Чтобы использовать лук, нужно иметь хотя бы одну стрелу в вашем инвентаре (за исключением творческого режима). Удерживайте правую клавишу мыши, чтобы натягивать тетиву, затем отпустите, чтобы выстрелить.

View File

@ -1,15 +1,14 @@
# textdomain: mcl_bows # textdomain: mcl_bows
Arrow= 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=
Ammunition= Ammunition=
Damage from bow: 1-10= Damage from bow: 1-10=
Damage from dispenser: 3= Damage from dispenser: 3=
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 25% 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=
Launches arrows= Launches arrows=
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 25% 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.=

View File

@ -1032,7 +1032,7 @@ for i=1,8 do
drop = "mcl_throwing:snowball "..(i+1), drop = "mcl_throwing:snowball "..(i+1),
_mcl_blast_resistance = 0.1, _mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1, _mcl_hardness = 0.1,
_mcl_silk_touch_drop = {"mcl_core:snow " .. (i+1)}, _mcl_silk_touch_drop = {"mcl_core:snow " .. i},
}) })
end end

View File

@ -97,4 +97,12 @@ The target item is not enchantable.=Der Zielgegenstand ist nicht verzauberbar.
'@1' is not a valid number.='@1' ist keine gültige Zahl. '@1' is not a valid number.='@1' ist keine gültige Zahl.
Enchanted Book=Verzaubertes Buch Enchanted Book=Verzaubertes Buch
Enchanting Table=Zaubertisch Enchanting Table=Zaubertisch
Spend experience, and lapis to enchant various items.=Verbrauche Erfahrung und Lapislazuli, um verschiedene Gegenstände zu verzaubern.
Enchanting Tables will let you enchant armors, tools, weapons, and books with various abilities. But, at the cost of some experience, and lapis lazuli.=Mit Zaubertischen kannst Du Rüstungen, Werkzeuge, Waffen und Bücher mit verschiedenen Fähigkeiten verzaubern. Das kostet aber Erfahrung und Lapislazuli.
Rightclick the Enchanting Table to open the enchanting menu.=Rechtsklick auf den Zaubertisch öffnet das Verzaubern-Menü
Place a tool, armor, weapon or book into the top left slot, and then place 1-3 Lapis Lazuli in the slot to the right.=Platziere ein Werkzeug, eine Waffe oder ein Buch im oberen linken Slot und platziere dann 1-3 Lapislazuli im rechten Slot.
After placing your items in the slots, the enchanting options will be shown. Hover over the options to read what is available to you.=Nachdem Du Deine Gegenstände in den Slots platziert hast, werden die Verzauberungs-Optionen angezeigt. Fahre mit der Maus über die Optionen, um die angebotenen Verzauberungen zu sehen.
These options are randomized, and dependent on experience level; but the enchantment strength can be increased.=Die Auswahl wird zufällig generiert und hängt von Deinem Erfahrungslevel ab; Du kannst die Stärker der Verzauberung aber erhöhen.
To increase the enchantment strength, place bookshelves around the enchanting table. However, you will need to keep 1 air node between the table, & the bookshelves to empower the enchanting table.=Um die Stärker der Verzauberung zu erhöhen, platziere Bücherregale um den Zaubertisch. Damit die Verstärkung funktioniert, muss zwischen Tisch und Bücherregalen aber ein Block Freiraum sein.
After finally selecting your enchantment; left-click on the selection, and you will see both the lapis lazuli and your experience levels consumed. And, an enchanted item left in its place.=Nachdem Du Deine Verzauberung ausgewählt hast, klicke links auf die Auswahl. Nun werden Lapislazuli und Erfahrung verbraucht und durch einen verzauberten Gegenstand ersetzt.
Enchant=Verzaubern Enchant=Verzaubern

View File

@ -1,4 +1,5 @@
# textdomain: mcl_enchanting # textdomain: mcl_enchanting
# Disclaimer: Some of these texts were machine-translated and should be reviewed by someone competent
Aqua Affinity=Affinité aquatique Aqua Affinity=Affinité aquatique
Increases underwater mining speed.=Augmente la vitesse de minage sous-marine. Increases underwater mining speed.=Augmente la vitesse de minage sous-marine.
Bane of Arthropods=Fléau des arthropodes Bane of Arthropods=Fléau des arthropodes
@ -76,8 +77,8 @@ Reflects some of the damage taken when hit, at the cost of reducing durability w
Unbreaking=Solidité Unbreaking=Solidité
Increases item durability.=Augmente la durabilité des objets. Increases item durability.=Augmente la durabilité des objets.
Inventory=Inventaire Inventory=Inventaire
@1 × Lapis Lazuli=@1 × Lapis Lazuli @1 Lapis Lazuli=@1 Lapis Lazuli
Enchantment levels: @1=Niveaux d'enchantement: @1 @1 Enchantment Levels=Niveaux d'enchantement: @1
Level requirement: @1=Niveau requis: @1 Level requirement: @1=Niveau requis: @1
Enchant an item=Enchanter un objet Enchant an item=Enchanter un objet
<player> <enchantment> [<level>]=<joueur> <enchantement> [<niveau>] <player> <enchantment> [<level>]=<joueur> <enchantement> [<niveau>]
@ -97,4 +98,12 @@ The target item is not enchantable.=L'objet cible n'est pas enchantable.
'@1' is not a valid number.='@1' n'est pas un nombre valide. '@1' is not a valid number.='@1' n'est pas un nombre valide.
Enchanted Book=Livre enchanté Enchanted Book=Livre enchanté
Enchanting Table=Table d'enchantement Enchanting Table=Table d'enchantement
Spend experience, and lapis to enchant various items.=Dépensez de l'expérience et du lapis pour enchanter divers objets.
Enchanting Tables will let you enchant armors, tools, weapons, and books with various abilities. But, at the cost of some experience, and lapis lazuli.=Les tables d'enchantement vous permettront d'enchanter des armures, des outils, des armes et des livres avec diverses capacités. Mais, au prix d'un peu d'expérience, et de lapis-lazuli.
Rightclick the Enchanting Table to open the enchanting menu.=Faites un clic droit sur la table d'enchantement pour ouvrir le menu d'enchantement.
Place a tool, armor, weapon or book into the top left slot, and then place 1-3 Lapis Lazuli in the slot to the right.=Placez un outil, une armure, une arme ou un livre dans la fente supérieure gauche, puis placez 1-3 Lapis Lazuli dans la fente de droite.
After placing your items in the slots, the enchanting options will be shown. Hover over the options to read what is available to you.=Après avoir placé vos objets dans les emplacements, les options d'enchantement s'afficheront. Passez la souris sur les options pour lire ce qui est disponible pour vous.
These options are randomized, and dependent on experience level; but the enchantment strength can be increased.=Ces options sont aléatoires et dépendent du niveau d'expérience, mais la force de l'enchantement peut être augmentée.
To increase the enchantment strength, place bookshelves around the enchanting table. However, you will need to keep 1 air node between the table, & the bookshelves to empower the enchanting table.=Pour augmenter la puissance de l'enchantement, placez des étagères autour de la table d'enchantement. Cependant, vous devrez garder un nœud aérien entre la table et les étagères pour renforcer la table d'enchantement.
After finally selecting your enchantment; left-click on the selection, and you will see both the lapis lazuli and your experience levels consumed. And, an enchanted item left in its place.=Après avoir finalement sélectionné votre enchantement, cliquez avec le bouton gauche de la souris sur la sélection, et vous verrez le lapis-lazuli et vos niveaux d'expérience consommés. Et, un objet enchanté laissé à sa place.
Enchant=Enchantement Enchant=Enchantement

View File

@ -1,4 +1,5 @@
# textdomain: mcl_enchanting # textdomain: mcl_enchanting
# Disclaimer: Some of these texts were machine-translated and should be reviewed by someone competent
Aqua Affinity=Родство с водой Aqua Affinity=Родство с водой
Increases underwater mining speed.=Увеличивает скорость добычи под водой. Increases underwater mining speed.=Увеличивает скорость добычи под водой.
Bane of Arthropods=Бич членистоногих Bane of Arthropods=Бич членистоногих
@ -76,8 +77,8 @@ Reflects some of the damage taken when hit, at the cost of reducing durability w
Unbreaking=Нерушимость Unbreaking=Нерушимость
Increases item durability.=Увеличивает прочность предмета. Increases item durability.=Увеличивает прочность предмета.
Inventory=Инвентарь Inventory=Инвентарь
@1 × Lapis Lazuli=@1 × Ляпис-лазурь @1 Lapis Lazuli=@1 Ляпис-лазурь
Enchantment levels: @1=Уровень зачаровывания: @1 @1 Enchantment Levels=@1 Уровень зачаровывания
Level requirement: @1=Требуемый уровень: @1 Level requirement: @1=Требуемый уровень: @1
Enchant an item=Зачаровать предмет Enchant an item=Зачаровать предмет
<player> <enchantment> [<level>]=<игрок> <зачарование> [<уровень>] <player> <enchantment> [<level>]=<игрок> <зачарование> [<уровень>]
@ -97,4 +98,18 @@ The target item is not enchantable.=Указана незачаровываем
'@1' is not a valid number.='@1' не является допустимым числом. '@1' is not a valid number.='@1' не является допустимым числом.
Enchanted Book=Зачарованная книга Enchanted Book=Зачарованная книга
Enchanting Table=Стол зачаровывания Enchanting Table=Стол зачаровывания
Spend experience, and lapis to enchant various items.=Проведите время, и ляпис, чтобы очаровать различные предметы.
Enchanting Tables will let you enchant armors, tools, weapons, and books with various abilities. But, at the cost of some experience, and lapis lazuli.=Волшебные столы позволят вам очаровать доспехами, инструментами, оружием и книгами с различными способностями. Но, ценой некоторого опыта, и ляпис-лазурь.
Rightclick the Enchanting Table to open the enchanting menu.=Щелкните правой кнопкой мыши Зачаровывающий стол, чтобы открыть зачаровывающее меню.
Place a tool, armor, weapon or book into the top left slot, and then place 1-3 Lapis Lazuli in the slot to the right.=Поместите инструмент, броню, оружие или книгу в верхний левый паз, а затем поместите 1-3 лазурита в паз справа.
After placing your items in the slots, the enchanting options will be shown. Hover over the options to read what is available to you.=После размещения Ваших элементов в слотах, будут показаны волшебные опции. Наведите курсор на опции, чтобы прочитать, что доступно для вас.
These options are randomized, and dependent on experience level; but the enchantment strength can be increased.=Эти варианты рандомизированы и зависят от уровня опыта; но сила очарования может быть увеличена.
To increase the enchantment strength, place bookshelves around the enchanting table. However, you will need to keep 1 air node between the table, & the bookshelves to empower the enchanting table.=Чтобы увеличить силу очарования, разместите книжные полки вокруг очаровательного стола. Однако, вам нужно будет держать 1 воздушный узел между столом и книжными полками, чтобы придать силу очаровательному столу.
After finally selecting your enchantment; left-click on the selection, and you will see both the lapis lazuli and your experience levels consumed. And, an enchanted item left in its place.=После того, как вы, наконец, выбрали свое очарование; щелкните левой кнопкой мыши по выбору, и вы увидите, как лазурь ляпис и ваш уровень опыта потребляется. И очарованная вещь, оставленная на своем месте.
Enchant=Зачарование Enchant=Зачарование
##### not used anymore #####
@1 × Lapis Lazuli=@1 × Ляпис-лазурь
Enchantment levels: @1=Уровень зачаровывания: @1

View File

@ -76,8 +76,8 @@ Reflects some of the damage taken when hit, at the cost of reducing durability w
Unbreaking= Unbreaking=
Increases item durability.= Increases item durability.=
Inventory= Inventory=
@1 × Lapis Lazuli= @1 Lapis Lazuli=
Enchantment levels: @1= @1 Enchantment Levels=
Level requirement: @1= Level requirement: @1=
Enchant an item= Enchant an item=
<player> <enchantment> [<level>]= <player> <enchantment> [<level>]=
@ -97,4 +97,12 @@ The target item is not enchantable.=
'@1' is not a valid number.= '@1' is not a valid number.=
Enchanted Book= Enchanted Book=
Enchanting Table= Enchanting Table=
Spend experience, and lapis to enchant various items.=
Enchanting Tables will let you enchant armors, tools, weapons, and books with various abilities. But, at the cost of some experience, and lapis lazuli.=
Rightclick the Enchanting Table to open the enchanting menu.=
Place a tool, armor, weapon or book into the top left slot, and then place 1-3 Lapis Lazuli in the slot to the right.=
After placing your items in the slots, the enchanting options will be shown. Hover over the options to read what is available to you.=
These options are randomized, and dependent on experience level; but the enchantment strength can be increased.=
To increase the enchantment strength, place bookshelves around the enchanting table. However, you will need to keep 1 air node between the table, & the bookshelves to empower the enchanting table.=
After finally selecting your enchantment; left-click on the selection, and you will see both the lapis lazuli and your experience levels consumed. And, an enchanted item left in its place.=
Enchant= Enchant=

View File

@ -98,14 +98,15 @@ minetest.register_node("mcl_farming:beetroot", {
drawtype = "plantlike", drawtype = "plantlike",
drop = { drop = {
--[[ drops 1 beetroot guaranteed. --[[ drops 1 beetroot guaranteed.
drops 0-3 beetroot seeds: drops 1-4 beetroot seeds:
0 seeds: 42.18% 1 seed: 42.18%
1 seed: 14.06% 2 seeds: 14.06%
2 seeds: 18.75% 3 seeds: 18.75%
3 seeds: 25% ]] 4 seeds: 25% ]]
max_items = 2, max_items = 3,
items = { items = {
{ items = {"mcl_farming:beetroot_item"}, rarity = 1 }, { items = {"mcl_farming:beetroot_item"}, rarity = 1 },
{ items = {"mcl_farming:beetroot_seeds 1"}, rarity = 1 },
{ items = {"mcl_farming:beetroot_seeds 3"}, rarity = 4 }, { items = {"mcl_farming:beetroot_seeds 3"}, rarity = 4 },
{ items = {"mcl_farming:beetroot_seeds 2"}, rarity = 4 }, { items = {"mcl_farming:beetroot_seeds 2"}, rarity = 4 },
{ items = {"mcl_farming:beetroot_seeds 1"}, rarity = 4 }, { items = {"mcl_farming:beetroot_seeds 1"}, rarity = 4 },

View File

@ -0,0 +1,18 @@
# mcl_jukebox
## mcl_jukebox.register_record(title, author, identifier, image, sound)
* title: title of the track
* author: author of the track
* identifier: short string used in the item registration
* image: the texture of the track
* sound: sound file of the track
## mcl_jukebox.registered_records
Table indexed by item name containing:
* title: title of the track
* author: author of the track
* identifier: short string used in the item registration
* image: the texture of the track
* sound: sound file of the track

View File

@ -1,5 +1,8 @@
local S = minetest.get_translator("mcl_jukebox") local S = minetest.get_translator("mcl_jukebox")
mcl_jukebox = {}
mcl_jukebox.registered_records = {}
-- Player name-indexed table containing the currently heard track -- Player name-indexed table containing the currently heard track
local active_tracks = {} local active_tracks = {}
@ -10,47 +13,30 @@ local active_huds = {}
-- Used to make sure that minetest.after only applies to the latest HUD change event -- Used to make sure that minetest.after only applies to the latest HUD change event
local hud_sequence_numbers = {} local hud_sequence_numbers = {}
-- List of music function mcl_jukebox.register_record(title, author, identifier, image, sound)
local recorddata = { mcl_jukebox.registered_records["mcl_jukebox:record_"..identifier] = {title, author, identifier, image, sound}
-- { title, author, identifier } local entryname = S("Music Disc")
{ "The Evil Sister (Jordach's Mix)", "SoundHelix", "13" } , local longdesc = S("A music disc holds a single music track which can be used in a jukebox to play music.")
{ "The Energetic Rat (Jordach's Mix)", "SoundHelix", "wait" }, local usagehelp = S("Place a music disc into an empty jukebox to play the music. Use the jukebox again to retrieve the music disc. The music can only be heard by you, not by other players.")
{ "Eastern Feeling", "Jordach", "blocks"}, minetest.register_craftitem(":mcl_jukebox:record_"..identifier, {
{ "Minetest", "Jordach", "far" },
{ "Credit Roll (Jordach's HD Mix)", "Junichi Masuda", "chirp" },
{ "Winter Feeling", "Tom Peter", "strad" },
{ "Synthgroove (Jordach's Mix)", "HeroOfTheWinds", "mellohi" },
{ "The Clueless Frog (Jordach's Mix)", "SoundHelix", "mall" },
}
local records = #recorddata
for r=1, records do
local doc = false
local entryname, longdesc, usagehelp
if r == 1 then
doc = true
entryname = S("Music Disc")
longdesc = S("A music disc holds a single music track which can be used in a jukebox to play music.")
usagehelp = S("Place a music disc into an empty jukebox to play the music. Use the jukebox again to retrieve the music disc. The music can only be heard by you, not by other players.")
end
minetest.register_craftitem("mcl_jukebox:record_"..r, {
description = description =
core.colorize("#55FFFF", S("Music Disc")) .. "\n" .. core.colorize("#55FFFF", S("Music Disc")) .. "\n" ..
core.colorize("#989898", S("@1—@2", recorddata[r][2], recorddata[r][1])), core.colorize("#989898", S("@1—@2", author, title)),
_doc_items_create_entry = doc, _doc_items_create_entry = true,
_doc_items_entry_name = entryname, _doc_items_entry_name = entryname,
_doc_items_longdesc = longdesc, _doc_items_longdesc = longdesc,
_doc_items_usagehelp = usagehelp, _doc_items_usagehelp = usagehelp,
inventory_image = "mcl_jukebox_record_"..recorddata[r][3]..".png", --inventory_image = "mcl_jukebox_record_"..recorddata[r][3]..".png",
inventory_image = image,
stack_max = 1, stack_max = 1,
groups = { music_record = r }, groups = { music_record = 1 },
}) })
end end
local function now_playing(player, track_id) local function now_playing(player, name)
local playername = player:get_player_name() local playername = player:get_player_name()
local hud = active_huds[playername] local hud = active_huds[playername]
local text = S("Now playing: @1—@2", recorddata[track_id][2], recorddata[track_id][1]) local text = S("Now playing: @1—@2", mcl_jukebox.registered_records[name][2], mcl_jukebox.registered_records[name][1])
if not hud_sequence_numbers[playername] then if not hud_sequence_numbers[playername] then
hud_sequence_numbers[playername] = 1 hud_sequence_numbers[playername] = 1
@ -106,18 +92,20 @@ minetest.register_craft({
}) })
local play_record = function(pos, itemstack, player) local play_record = function(pos, itemstack, player)
local record_id = minetest.get_item_group(itemstack:get_name(), "music_record") local item_name = itemstack:get_name()
if record_id ~= 0 then -- ensure the jukebox uses the new record names for old records
local name = minetest.registered_aliases[item_name] or item_name
if mcl_jukebox.registered_records[name] then
local cname = player:get_player_name() local cname = player:get_player_name()
if active_tracks[cname] ~= nil then if active_tracks[cname] ~= nil then
minetest.sound_stop(active_tracks[cname]) minetest.sound_stop(active_tracks[cname])
active_tracks[cname] = nil active_tracks[cname] = nil
end end
active_tracks[cname] = minetest.sound_play("mcl_jukebox_track_"..record_id, { active_tracks[cname] = minetest.sound_play(mcl_jukebox.registered_records[name][5], {
to_player = cname, to_player = cname,
gain = 1, gain = 1,
}) })
now_playing(player, record_id) now_playing(player, name)
return true return true
end end
return false return false
@ -239,3 +227,22 @@ minetest.register_craft({
recipe = "mcl_jukebox:jukebox", recipe = "mcl_jukebox:jukebox",
burntime = 15, burntime = 15,
}) })
mcl_jukebox.register_record("The Evil Sister (Jordach's Mix)", "SoundHelix", "13", "mcl_jukebox_record_13.png", "mcl_jukebox_track_1")
mcl_jukebox.register_record("The Energetic Rat (Jordach's Mix)", "SoundHelix", "wait", "mcl_jukebox_record_wait.png", "mcl_jukebox_track_2")
mcl_jukebox.register_record("Eastern Feeling", "Jordach", "blocks", "mcl_jukebox_record_blocks.png", "mcl_jukebox_track_3")
mcl_jukebox.register_record("Minetest", "Jordach", "far", "mcl_jukebox_record_far.png", "mcl_jukebox_track_4")
mcl_jukebox.register_record("Credit Roll (Jordach's HD Mix)", "Junichi Masuda", "chirp", "mcl_jukebox_record_chirp.png", "mcl_jukebox_track_5")
mcl_jukebox.register_record("Winter Feeling", "Tom Peter", "strad", "mcl_jukebox_record_strad.png", "mcl_jukebox_track_6")
mcl_jukebox.register_record("Synthgroove (Jordach's Mix)", "HeroOfTheWinds", "mellohi", "mcl_jukebox_record_mellohi.png", "mcl_jukebox_track_7")
mcl_jukebox.register_record("The Clueless Frog (Jordach's Mix)", "SoundHelix", "mall", "mcl_jukebox_record_mall.png", "mcl_jukebox_track_8")
--add backward compatibility
minetest.register_alias("mcl_jukebox:record_1", "mcl_jukebox:record_13")
minetest.register_alias("mcl_jukebox:record_2", "mcl_jukebox:record_wait")
minetest.register_alias("mcl_jukebox:record_3", "mcl_jukebox:record_blocks")
minetest.register_alias("mcl_jukebox:record_4", "mcl_jukebox:record_far")
minetest.register_alias("mcl_jukebox:record_5", "mcl_jukebox:record_chirp")
minetest.register_alias("mcl_jukebox:record_6", "mcl_jukebox:record_strad")
minetest.register_alias("mcl_jukebox:record_7", "mcl_jukebox:record_mellohi")
minetest.register_alias("mcl_jukebox:record_8", "mcl_jukebox:record_mall")

View File

@ -176,7 +176,7 @@ minetest.register_tool("screwdriver:screwdriver", {
description = S("Screwdriver"), description = S("Screwdriver"),
inventory_image = "screwdriver.png", inventory_image = "screwdriver.png",
wield_image = "screwdriver.png^[transformFX", wield_image = "screwdriver.png^[transformFX",
groups = { tool = 1, not_in_creative_inventory = 1 }, groups = { tool = 1 },
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_FACE, 200) screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_FACE, 200)
return itemstack return itemstack