mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-15 23:51:05 +01:00
Merge branch 'translations-to-spanish' of ssh://git.minetest.land:29418/megustanlosfrijoles/MineClone2 into translations-to-spanish
This commit is contained in:
commit
0a5dcea4b2
17 changed files with 435 additions and 222 deletions
|
@ -8,3 +8,6 @@ Jungle Boat=Barca de la selva
|
|||
Oak Boat=Barca de roble
|
||||
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=Haga clic derecho en una fuente de agua para colocar el barco. Haga clic derecho en el barco para entrar. Utilice [Izquierda] y [Derecha] para dirigir, [Adelante] para acelerar y [Atrás] para reducir la velocidad o retroceder. Haga clic derecho en el barco nuevamente para dejarlo, golpee el barco para que se caiga como un artículo.
|
||||
Spruce Boat=Barca de abeto
|
||||
Water vehicle=Vehículo acuático
|
||||
Sneak to dismount=Agáchate para bajar
|
||||
Obsidian Boat=Barca de obsidiana
|
||||
|
|
2
mods/ENTITIES/mcl_paintings/locale/mcl_paintings.es.tr
Normal file
2
mods/ENTITIES/mcl_paintings/locale/mcl_paintings.es.tr
Normal file
|
@ -0,0 +1,2 @@
|
|||
# textdomain:mcl_paintings
|
||||
Painting=Cuadro
|
|
@ -47,3 +47,68 @@ Use a crafting table to craft a wooden hoe from wooden planks and sticks.=Usa un
|
|||
Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.=Usa una mesa de trabajo para hacer un pico de madera con tablas de madera procesada y palos de madera.
|
||||
Use obsidian and a fire starter to construct a Nether portal.=Usa obsidiana y un iniciador de fuego para construir un portal abisal.
|
||||
Use wheat to craft a bread.=Usa trigo para elaborar pan.
|
||||
Who is Cutting Onions?=¿Quién esta cortando cebollas?
|
||||
Pick up a crying obsidian from the floor.=Recoge una obsidiana llorosa del suelo
|
||||
Hidden in the Depths=Oculto en las profundidades
|
||||
Pick up an Ancient Debris from the floor.=Recoge un Escombro Ancestral del suelo
|
||||
The Nether=El Nether
|
||||
Bring summer clothes.@nHint: Enter the Nether.=Tráete ropa de verano.@nSugerencia: Entra al Nether
|
||||
Isn't It Iron Pick=¿No es hierrónico?
|
||||
Craft a iron pickaxe using sticks and iron.=Crea un pico de hierro usando palos y hierro.
|
||||
Postmortal=Post mortem
|
||||
Use a Totem of Undying to cheat death.=Usa un tótem de inmortalidad para engañar a la muerte
|
||||
Sweet Dreams=Dulces sueños
|
||||
Sleep in a bed to change your respawn point.=Duerme en una cama para cambiar tu punto de reaparición.
|
||||
Not Quite "Nine" Lives=No "siete" vidas exactamente
|
||||
Charge a Respawn Anchor to the maximum.=Carga un nexo de reaparición al máximo.
|
||||
What A Deal!=¡Qué buen trato!
|
||||
Successfully trade with a Villager.=Comercia con un aldeano.
|
||||
Withering Heights=Dr. Witherstein
|
||||
Summon the wither from the dead.=Invoca al wither desde los muertos.
|
||||
The Cutest Predator=El depredador más lindo
|
||||
Catch an Axolotl with a bucket!=Atrapa a un ajolote en un cubo
|
||||
Fishy Business=Un asuno escamoso
|
||||
Catch a fish.@nHint: Catch a fish, salmon, clownfish, or pufferfish.=Atrapa un pez.@nSugerencia: Atrapa un pez, salmón, pez payaso, o pez globo.
|
||||
Country Lode, Take Me Home=Magnetita llévame a casita
|
||||
Use a compass on a Lodestone.=Usa una brújula sobre una magnetita
|
||||
Serious Dedication=Dedicación seria
|
||||
Use a Netherite Ingot to upgrade a hoe, and then completely reevaluate your life choices.=Usa un lingote de netherita para mejorar una azada, y luego revalúa lo que estás haciendo con tu vida.
|
||||
Local Brewery=Destilería local
|
||||
Brew a Potion.@nHint: Take a potion or glass bottle out of the brewing stand.=Prepara una poción.@nSugerencia: Saca una poción o botella de vidrio de la destiladora
|
||||
Enchanter=Aprendiz de mago
|
||||
Enchant an item using an Enchantment Table.=Encanta un objeto usando la mesa de encantamientos
|
||||
Bring Home the Beacon=Hágase la luz
|
||||
Use a beacon.=Usa un faro.
|
||||
Beaconator=Faroneitor
|
||||
Use a fully powered beacon.=Utiliza un faro a máxima potencia.
|
||||
The Next Generation=La nueva generación
|
||||
Hold the Dragon Egg.@nHint: Pick up the egg from the ground and have it in your inventory.=Consigue el huevo de dragón.@nSugerencia: Recoge el huevo del suelo, y colócalo en tu inventario.
|
||||
The End... Again...=El fin... de nuevo...
|
||||
Respawn the Ender Dragon.=Vuelve a invocar al Enderdragón.
|
||||
Sky's the Limit=El cielo es el límite
|
||||
Find the elytra and prepare to fly above and beyond!=¿Encuentra los élitros y prepárate para volar al infinito y más allá!
|
||||
Free the End=Libera el End
|
||||
Kill the ender dragon. Good Luck!=Mata al Enderdragón. Buena suerte!
|
||||
Bee Our Guest=Abelante, esta es tu casa
|
||||
Use a campfire to collect a bottle of honey from a beehive without aggrivating the bees inside.=Usa una fogata y una botella para obtener miel de una colmena sin enojar a las abejas.
|
||||
Total Beelocation=Abejémonos de aquí
|
||||
Move a bee nest, with 3 bees inside, using a silk touch enchanted tool.=Mueve una colmena que tenga 3 abejas usando una herramienta con toque de seda.
|
||||
Wax On=Encerando ando
|
||||
Apply honeycomb to a copper block to protect it from the elements.=Encera un bloque de cobre con un panal de abejas para protegerlo de los elementos.
|
||||
Wax Off=Pulir cera
|
||||
Scrape wax off of a copper block.=Quita la cera de un bloque de cobre
|
||||
The End?=¿El End?
|
||||
Or the beginning?@nHint: Enter an end portal.=¿O el principio?@nSugerencia: Entra al portal del End
|
||||
Stone Age=La edad de piedra
|
||||
Mine a stone with new pickaxe.=Mina piedra con tu nuevo pico.
|
||||
Ice Bucket Challenge=Mente fría
|
||||
Obtain an obsidian block.=Consigue un bloque de obsidiana.
|
||||
Hot Stuff=¡La cosa está que arde!
|
||||
Put lava in a bucket.=Pon lava en un cubo.
|
||||
Hero of the Village=Héroe de la aldea
|
||||
Successfully defend a village from a raid=Defiende una aldea de una invasión
|
||||
Voluntary Exile=Exilio voluntario
|
||||
Kill a raid captain. Maybe consider staying away from the local villages for the time being...=Mata al capitán de una invasión.
|
||||
Sería mejor alejarte de las aldeas por un tiempo...
|
||||
Tactical Fishing=Pesca táctica
|
||||
Catch a fish... without a fishing rod!=Atrapa a un pez... ¡sin una caña de pescar!
|
||||
|
|
|
@ -1,55 +1,8 @@
|
|||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local function path_to_sunlight_exists(position, light_level)
|
||||
local neighbours = {
|
||||
{ x = 0, y = 0, z =-1 },
|
||||
{ x = 0, y = 0, z = 1 },
|
||||
{ x = 0, y =-1, z = 0 },
|
||||
{ x = 0, y = 1, z = 0 },
|
||||
{ x =-1, y = 0, z = 0 },
|
||||
{ x = 1, y = 0, z = 0 },
|
||||
}
|
||||
for i=1, #neighbours do
|
||||
local offset = neighbours[i]
|
||||
local position_new = vector.add(
|
||||
position,
|
||||
offset
|
||||
)
|
||||
local light_level_new = minetest.get_node_light(
|
||||
position_new,
|
||||
nil
|
||||
)
|
||||
if 15 == light_level_new then
|
||||
-- found the sunlight
|
||||
return true
|
||||
elseif light_level_new > light_level then
|
||||
-- search where light is brighter
|
||||
if path_to_sunlight_exists(
|
||||
position_new,
|
||||
light_level_new
|
||||
) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function sunlight_visible(position)
|
||||
local light_level = mcl_util.get_natural_light (position)
|
||||
if light_level >= 12 then
|
||||
--minetest.log("Light is greater than 12")
|
||||
return true
|
||||
else
|
||||
local time = minetest.get_timeofday() * 24000
|
||||
-- only check light level during day
|
||||
if time > 6000 and time < 18000 then
|
||||
light_level = minetest.get_node_light(position, nil)
|
||||
if light_level >= 12 then
|
||||
return path_to_sunlight_exists(position, 12)
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
local light_level = mcl_util.get_natural_light(position)
|
||||
return light_level ~= nil and light_level >= 12
|
||||
end
|
||||
|
||||
local boxes = { -8/16, -8/16, -8/16, 8/16, -2/16, 8/16 }
|
||||
|
|
|
@ -219,7 +219,7 @@ minetest.register_tool("mcl_armor:elytra", {
|
|||
_doc_items_longdesc = mcl_armor.longdesc,
|
||||
_doc_items_usagehelp = mcl_armor.usage,
|
||||
inventory_image = "mcl_armor_inv_elytra.png",
|
||||
groups = {armor = 1, non_combat_armor = 1, armor_torso = 1, non_combat_torso = 1, mcl_armor_uses = 10},
|
||||
groups = {armor = 1, non_combat_armor = 1, armor_torso = 1, non_combat_torso = 1, mcl_armor_uses = 10, enchantability = 1, elytra = 1},
|
||||
sounds = {
|
||||
_mcl_armor_equip = "mcl_armor_equip_leather",
|
||||
_mcl_armor_unequip = "mcl_armor_unequip_leather",
|
||||
|
|
|
@ -178,6 +178,22 @@ local function beacon_blockcheck(pos)
|
|||
end
|
||||
end
|
||||
|
||||
local function clear_obstructed_beam(pos)
|
||||
for y=pos.y+1, pos.y+100 do
|
||||
local nodename = minetest.get_node({x=pos.x,y=y, z = pos.z}).name
|
||||
if nodename ~= "mcl_core:bedrock" and nodename ~= "air" and nodename ~= "mcl_core:void" and nodename ~= "ignore" then --ignore means not loaded, let's just assume that's air
|
||||
if nodename ~="mcl_beacons:beacon_beam" then
|
||||
if minetest.get_item_group(nodename,"glass") == 0 and minetest.get_item_group(nodename,"material_glass") == 0 then
|
||||
remove_beacon_beam(pos)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
local function effect_player(effect,pos,power_level, effect_level,player)
|
||||
local distance = vector.distance(player:get_pos(), pos)
|
||||
if distance > (power_level+1)*10 then return end
|
||||
|
@ -192,31 +208,25 @@ local function effect_player(effect,pos,power_level, effect_level,player)
|
|||
end
|
||||
end
|
||||
|
||||
local function globalstep_function(pos,player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local power_level = beacon_blockcheck(pos)
|
||||
local effect_string = meta:get_string("effect")
|
||||
if meta:get_int("effect_level") == 2 and power_level < 4 then
|
||||
return
|
||||
else
|
||||
local obstructed = false
|
||||
for y=pos.y+1, pos.y+100 do
|
||||
local function apply_effects_to_all_players(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local effect_string = meta:get_string("effect")
|
||||
local effect_level = meta:get_int("effect_level")
|
||||
|
||||
local nodename = minetest.get_node({x=pos.x,y=y, z = pos.z}).name
|
||||
if nodename ~= "mcl_core:bedrock" and nodename ~= "air" and nodename ~= "mcl_core:void" and nodename ~= "ignore" then --ignore means not loaded, let's just assume that's air
|
||||
if nodename ~="mcl_beacons:beacon_beam" then
|
||||
if minetest.get_item_group(nodename,"glass") == 0 and minetest.get_item_group(nodename,"material_glass") == 0 then
|
||||
obstructed = true
|
||||
remove_beacon_beam(pos)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if obstructed then
|
||||
return
|
||||
end
|
||||
effect_player(effect_string,pos,power_level,meta:get_int("effect_level"),player)
|
||||
local power_level = beacon_blockcheck(pos)
|
||||
|
||||
if effect_level == 2 and power_level < 4 then --no need to run loops when beacon is in an invalid setup :P
|
||||
return
|
||||
end
|
||||
|
||||
local beacon_distance = (power_level + 1) * 10
|
||||
|
||||
for _, player in pairs(minetest.get_connected_players()) do
|
||||
if vector.distance(pos, player:get_pos()) <= beacon_distance then
|
||||
if not clear_obstructed_beam(pos) then
|
||||
effect_player(effect_string, pos, power_level, effect_level, player)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -330,7 +340,7 @@ minetest.register_node("mcl_beacons:beacon", {
|
|||
minetest.set_node({x=pos.x,y=y,z=pos.z},{name="mcl_beacons:beacon_beam",param2=beam_palette_index})
|
||||
end
|
||||
end
|
||||
globalstep_function(pos,sender)--call it once outside the globalstep so the player gets the effect right after selecting it
|
||||
apply_effects_to_all_players(pos) --call it once outside the globalstep so the player gets the effect right after selecting it
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
@ -352,23 +362,6 @@ function register_beaconfuel(itemstring)
|
|||
table.insert(beacon_fuellist, itemstring)
|
||||
end
|
||||
|
||||
local timer = 0
|
||||
|
||||
minetest.register_globalstep(function(dtime)
|
||||
timer = timer + dtime
|
||||
if timer >= 3 then
|
||||
for _, player in ipairs(minetest.get_connected_players()) do
|
||||
local player_pos = player:get_pos()
|
||||
local pos_list = minetest.find_nodes_in_area({x=player_pos.x-50, y=player_pos.y-50, z=player_pos.z-50}, {x=player_pos.x+50, y=player_pos.y+50, z=player_pos.z+50},"mcl_beacons:beacon")
|
||||
for _, pos in ipairs(pos_list) do
|
||||
globalstep_function(pos,player)
|
||||
end
|
||||
end
|
||||
timer = 0
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
minetest.register_abm{
|
||||
label="update beacon beam",
|
||||
nodenames = {"mcl_beacons:beacon_beam"},
|
||||
|
@ -392,6 +385,16 @@ minetest.register_abm{
|
|||
end,
|
||||
}
|
||||
|
||||
minetest.register_abm{
|
||||
label="apply beacon effects to players",
|
||||
nodenames = {"mcl_beacons:beacon"},
|
||||
interval = 3,
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
apply_effects_to_all_players(pos)
|
||||
end,
|
||||
}
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_beacons:beacon",
|
||||
recipe = {
|
||||
|
|
|
@ -438,12 +438,14 @@ local playermessagecounter = {}
|
|||
It gets reset after 10 secs using a globalstep
|
||||
--]]
|
||||
|
||||
local chatbuttonused = false
|
||||
local globalstep_timer = 0
|
||||
minetest.register_globalstep(function(dtime)
|
||||
globalstep_timer = globalstep_timer + dtime
|
||||
if globalstep_timer >= 10 then
|
||||
globalstep_timer = 0
|
||||
playermessagecounter = {}
|
||||
chatbuttonused = false
|
||||
end
|
||||
end)
|
||||
|
||||
|
@ -472,16 +474,22 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
return
|
||||
end
|
||||
|
||||
local custom_sleep_message
|
||||
if fields.chatsubmit and fields.chatmessage ~= "" then
|
||||
if (not exceeded_rate_limit(player:get_player_name())) and shout_priv_check(player) then
|
||||
minetest.chat_send_all(minetest.format_chat_message(player:get_player_name(), fields.chatmessage))
|
||||
end
|
||||
return
|
||||
custom_sleep_message = fields.chatmessage
|
||||
end
|
||||
|
||||
if fields.defaultmessage then
|
||||
if custom_sleep_message or fields.defaultmessage then
|
||||
if chatbuttonused then
|
||||
local time_to_wait = math.ceil(10-globalstep_timer)
|
||||
minetest.chat_send_player(player:get_player_name(),S("Sorry, but you have to wait @1 seconds until you may use this button again!", tostring(time_to_wait)))
|
||||
return
|
||||
end
|
||||
|
||||
if (not exceeded_rate_limit(player:get_player_name())) and shout_priv_check(player) then
|
||||
minetest.chat_send_all(minetest.format_chat_message(player:get_player_name(), S("Hey! Would you guys mind sleeping?")))
|
||||
chatbuttonused = true
|
||||
local message = custom_sleep_message or S("Hey! Would you guys mind sleeping?")
|
||||
minetest.chat_send_all(minetest.format_chat_message(player:get_player_name(), message))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
|
|
@ -45,4 +45,5 @@ Chat:=Chat:
|
|||
send!=senden!
|
||||
You are missing the 'shout' privilege! It's required in order to talk in chat...=Ihnen fehlt das 'shout' Privileg! Es wird benötigt, um im Chat reden zu können...
|
||||
You exceeded the maximum number of messages per 10 seconds!=Sie haben die maximale Anzahl an Chatnachrichten pro 10 Sekunden überschritten!
|
||||
Hey! Would you guys mind sleeping?=Hey, würdet Ihr bitte zu Bett gehen?
|
||||
Hey! Would you guys mind sleeping?=Hey, würdet Ihr bitte zu Bett gehen?
|
||||
Sorry, but you have to wait @1 seconds until you may use this button again!=Sie müssen leider noch @1 Sekunden warten, bevor sie diesen Knopf erneut benutzen können!
|
|
@ -45,4 +45,5 @@ Chat:=
|
|||
send!=
|
||||
You are missing the 'shout' privilege! It's required in order to talk in chat...=
|
||||
You exceeded the maximum number of messages per 10 seconds!=
|
||||
Hey! Would you guys mind sleeping?=
|
||||
Hey! Would you guys mind sleeping?=
|
||||
Sorry, but you have to wait @1 seconds until you may use this button again!=
|
|
@ -149,28 +149,3 @@ end
|
|||
if mod_doc then
|
||||
doc.add_entry_alias("nodes", "mcl_ocean:seagrass_dirt", "craftitems", "mcl_ocean:seagrass")
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
label = "Fix incorrect seagrass",
|
||||
name = "mcl_ocean:fix_incorrect_seagrass",
|
||||
nodenames = {"group:seagrass"},
|
||||
run_at_every_load = false,
|
||||
action = function(pos, node)
|
||||
if node.param2 ~= 3 then
|
||||
node.param2 = 3
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
local seagrass = minetest.find_nodes_in_area(minp, maxp, {"group:seagrass"})
|
||||
for _, sgpos in pairs(seagrass) do
|
||||
local sgnode = minetest.get_node(sgpos)
|
||||
if sgnode.param2 ~= 3 then
|
||||
sgnode.param2 = 3
|
||||
minetest.set_node(sgpos, sgnode)
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
|
|
|
@ -11,6 +11,43 @@ local function roundN(n, d)
|
|||
return math.floor(n * m + 0.5) / m
|
||||
end
|
||||
|
||||
local function run_generators (p1, p2, blockseed)
|
||||
if nodes > 0 then
|
||||
for _, rec in ipairs(registered_generators) do
|
||||
if rec.nf then
|
||||
rec.nf(p1, p2, blockseed)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function update_data (vm, data, data2)
|
||||
-- Write stuff
|
||||
vm:set_data(data)
|
||||
if param2 > 0 then
|
||||
vm:set_param2_data(data2)
|
||||
end
|
||||
end
|
||||
|
||||
local function post_generator_processing(vm, minp, maxp, deco_used, deco_table, ore_used, ore_table)
|
||||
if deco_table then
|
||||
minetest.generate_decorations(vm,vector.new(minp.x,deco_table.min,minp.z),vector.new(maxp.x,deco_table.max,maxp.z))
|
||||
elseif deco_used then
|
||||
minetest.generate_decorations(vm)
|
||||
end
|
||||
if ore_table then
|
||||
minetest.generate_ores(vm,vector.new(minp.x,ore_table.min,minp.z),vector.new(maxp.x,ore_table.max,maxp.z))
|
||||
elseif ore_used then
|
||||
minetest.generate_ores(vm)
|
||||
end
|
||||
end
|
||||
|
||||
local function post_generator_processing_2(vm, p1, p2, shadow)
|
||||
vm:calc_lighting(p1, p2, shadow)
|
||||
vm:write_to_map()
|
||||
vm:update_liquids()
|
||||
end
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
local t1 = os.clock()
|
||||
local p1, p2 = {x=minp.x, y=minp.y, z=minp.z}, {x=maxp.x, y=maxp.y, z=maxp.z}
|
||||
|
@ -49,34 +86,13 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
|
|||
end
|
||||
|
||||
if lvm_used then
|
||||
-- Write stuff
|
||||
vm:set_data(data)
|
||||
if param2 > 0 then
|
||||
vm:set_param2_data(data2)
|
||||
end
|
||||
if deco_table then
|
||||
minetest.generate_decorations(vm,vector.new(minp.x,deco_table.min,minp.z),vector.new(maxp.x,deco_table.max,maxp.z))
|
||||
elseif deco_used then
|
||||
minetest.generate_decorations(vm)
|
||||
end
|
||||
if ore_table then
|
||||
minetest.generate_ores(vm,vector.new(minp.x,ore_table.min,minp.z),vector.new(maxp.x,ore_table.max,maxp.z))
|
||||
elseif ore_used then
|
||||
minetest.generate_ores(vm)
|
||||
end
|
||||
vm:calc_lighting(p1, p2, shadow)
|
||||
vm:write_to_map()
|
||||
vm:update_liquids()
|
||||
update_data (vm, data, data2)
|
||||
post_generator_processing(vm, minp, maxp, deco_used, deco_table, ore_used, ore_table)
|
||||
post_generator_processing_2(vm, p1, p2, shadow)
|
||||
end
|
||||
end
|
||||
|
||||
if nodes > 0 then
|
||||
for _, rec in ipairs(registered_generators) do
|
||||
if rec.nf then
|
||||
rec.nf(p1, p2, blockseed)
|
||||
end
|
||||
end
|
||||
end
|
||||
run_generators (p1, p2, blockseed)
|
||||
|
||||
mcl_vars.add_chunk(minp)
|
||||
if logging then
|
||||
|
@ -84,6 +100,8 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
|
|||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
function minetest.register_on_generated(node_function)
|
||||
mcl_mapgen_core.register_generator("mod_"..minetest.get_current_modname().."_"..tostring(#registered_generators+1), nil, node_function)
|
||||
end
|
||||
|
|
|
@ -290,6 +290,63 @@ local function set_grass_palette(minp,maxp,data2,area,biomemap,nodes)
|
|||
return lvm_used
|
||||
end
|
||||
|
||||
local function set_foliage_palette(minp,maxp,data2,area,biomemap,nodes)
|
||||
-- Flat area at y=0 to read biome 3 times faster than 5.3.0.get_biome_data(pos).biome: 43us vs 125us per iteration:
|
||||
if not biomemap then return end
|
||||
local aream = VoxelArea:new({MinEdge={x=minp.x, y=0, z=minp.z}, MaxEdge={x=maxp.x, y=0, z=maxp.z}})
|
||||
local nodes = minetest.find_nodes_in_area(minp, maxp, nodes)
|
||||
for n=1, #nodes do
|
||||
local n = nodes[n]
|
||||
local p_pos = area:index(n.x, n.y, n.z)
|
||||
local b_pos = aream:index(n.x, 0, n.z)
|
||||
local bn = minetest.get_biome_name(biomemap[b_pos])
|
||||
if bn then
|
||||
local biome = minetest.registered_biomes[bn]
|
||||
if biome and biome._mcl_biome_type and biome._mcl_foliage_palette_index and data2[p_pos] <= 1 then
|
||||
data2[p_pos] = biome._mcl_foliage_palette_index
|
||||
lvm_used = true
|
||||
elseif biome and biome._mcl_biome_type and biome._mcl_foliage_palette_index and data2[p_pos] > 1 then
|
||||
data2[p_pos] = (biome._mcl_foliage_palette_index * 8) + data2[p_pos]
|
||||
lvm_used = true
|
||||
end
|
||||
end
|
||||
end
|
||||
return lvm_used
|
||||
end
|
||||
|
||||
local function set_water_palette(minp,maxp,data2,area,biomemap,nodes)
|
||||
-- Flat area at y=0 to read biome 3 times faster than 5.3.0.get_biome_data(pos).biome: 43us vs 125us per iteration:
|
||||
if not biomemap then return end
|
||||
local aream = VoxelArea:new({MinEdge={x=minp.x, y=0, z=minp.z}, MaxEdge={x=maxp.x, y=0, z=maxp.z}})
|
||||
local nodes = minetest.find_nodes_in_area(minp, maxp, nodes)
|
||||
for n=1, #nodes do
|
||||
local n = nodes[n]
|
||||
local p_pos = area:index(n.x, n.y, n.z)
|
||||
local b_pos = aream:index(n.x, 0, n.z)
|
||||
local bn = minetest.get_biome_name(biomemap[b_pos])
|
||||
if bn then
|
||||
local biome = minetest.registered_biomes[bn]
|
||||
if biome and biome._mcl_biome_type and biome._mcl_water_palette_index then
|
||||
data2[p_pos] = biome._mcl_water_palette_index
|
||||
lvm_used = true
|
||||
end
|
||||
end
|
||||
end
|
||||
return lvm_used
|
||||
end
|
||||
|
||||
local function set_seagrass_param2(minp,maxp,data2,area,biomemap,nodes)
|
||||
local aream = VoxelArea:new({MinEdge={x=minp.x, y=0, z=minp.z}, MaxEdge={x=maxp.x, y=0, z=maxp.z}})
|
||||
local nodes = minetest.find_nodes_in_area(minp, maxp, nodes)
|
||||
for n=1, #nodes do
|
||||
local n = nodes[n]
|
||||
local p_pos = area:index(n.x, n.y, n.z)
|
||||
data2[p_pos] = 3
|
||||
lvm_used = true
|
||||
end
|
||||
return lvm_used
|
||||
end
|
||||
|
||||
-- Below the bedrock, generate air/void
|
||||
local function world_structure(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
||||
local biomemap --ymin, ymax
|
||||
|
@ -346,23 +403,47 @@ local function world_structure(vm, data, data2, emin, emax, area, minp, maxp, bl
|
|||
end
|
||||
|
||||
local function block_fixes_grass(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
||||
if maxp.y < mcl_vars.mg_overworld_min then
|
||||
--minetest.log("Exit grass fix")
|
||||
return
|
||||
else
|
||||
--minetest.log("Grass fixes")
|
||||
end
|
||||
|
||||
local biomemap = minetest.get_mapgen_object("biomemap")
|
||||
local lvm_used = false
|
||||
|
||||
if minp.y <= mcl_vars.mg_overworld_max and maxp.y >= mcl_vars.mg_overworld_min then
|
||||
-- Set param2 (=color) of nodes which use the grass colour palette.
|
||||
lvm_used = set_grass_palette(minp,maxp,data2,area,biomemap,{"group:grass_palette"})
|
||||
end
|
||||
return lvm_used
|
||||
local biomemap = minetest.get_mapgen_object("biomemap")
|
||||
local lvm_used = false
|
||||
local pr = PseudoRandom(blockseed)
|
||||
if minp.y <= mcl_vars.mg_overworld_max and maxp.y >= mcl_vars.mg_overworld_min then
|
||||
-- Set param2 (=color) of nodes which use the grass colour palette.
|
||||
lvm_used = set_grass_palette(minp,maxp,data2,area,biomemap,{"group:grass_palette"})
|
||||
end
|
||||
return lvm_used
|
||||
end
|
||||
|
||||
local function block_fixes_foliage(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
||||
local biomemap = minetest.get_mapgen_object("biomemap")
|
||||
local lvm_used = false
|
||||
local pr = PseudoRandom(blockseed)
|
||||
if minp.y <= mcl_vars.mg_overworld_max and maxp.y >= mcl_vars.mg_overworld_min then
|
||||
-- Set param2 (=color) of nodes which use the foliage colour palette.
|
||||
lvm_used = set_foliage_palette(minp,maxp,data2,area,biomemap,{"group:foliage_palette", "group:foliage_palette_wallmounted"})
|
||||
end
|
||||
return lvm_used
|
||||
end
|
||||
|
||||
local function block_fixes_water(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
||||
local biomemap = minetest.get_mapgen_object("biomemap")
|
||||
local lvm_used = false
|
||||
local pr = PseudoRandom(blockseed)
|
||||
if minp.y <= mcl_vars.mg_overworld_max and maxp.y >= mcl_vars.mg_overworld_min then
|
||||
-- Set param2 (=color) of nodes which use the water colour palette.
|
||||
lvm_used = set_water_palette(minp,maxp,data2,area,biomemap,{"group:water_palette"})
|
||||
end
|
||||
return lvm_used
|
||||
end
|
||||
|
||||
local function block_fixes_seagrass(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
||||
local lvm_used = false
|
||||
local pr = PseudoRandom(blockseed)
|
||||
if minp.y <= mcl_vars.mg_overworld_max and maxp.y >= mcl_vars.mg_overworld_min then
|
||||
-- Set param2 of seagrass to 3.
|
||||
lvm_used = set_seagrass_param2(minp,maxp,data2,area,biomemap,{"group:seagrass"})
|
||||
end
|
||||
return lvm_used
|
||||
end
|
||||
|
||||
-- End block fixes:
|
||||
local function end_basic(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
|
||||
|
@ -391,6 +472,9 @@ end, 9999, true)
|
|||
|
||||
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
||||
mcl_mapgen_core.register_generator("block_fixes_grass", block_fixes_grass, nil, 9999, true)
|
||||
mcl_mapgen_core.register_generator("block_fixes_foliage", block_fixes_foliage, nil, 9999, true)
|
||||
mcl_mapgen_core.register_generator("block_fixes_water", block_fixes_water, nil, 9999, true)
|
||||
mcl_mapgen_core.register_generator("block_fixes_seagrass", block_fixes_seagrass, nil, 9999, true)
|
||||
end
|
||||
|
||||
if mg_name == "v6" then
|
||||
|
@ -467,8 +551,38 @@ minetest.register_lbm({
|
|||
end
|
||||
})
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed) -- Set correct palette indexes of foliage in new mapblocks.
|
||||
local pos1, pos2 = vector.offset(minp, -16, -16, -16), vector.offset(maxp, 16, 16, 16)
|
||||
minetest.register_lbm({
|
||||
label = "Fix water palette indexes", -- Set correct palette indexes of water in old mapblocks.
|
||||
name = "mcl_mapgen_core:fix_water_palette_indexes",
|
||||
nodenames = {"group:water_palette"},
|
||||
run_at_every_load = false,
|
||||
action = function(pos, node)
|
||||
local water_palette_index = mcl_util.get_palette_indexes_from_pos(pos).water_palette_index
|
||||
if node.param2 ~= water_palette_index then
|
||||
node.param2 = water_palette_index
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
label = "Fix incorrect seagrass", -- Set correct param2 of seagrass in old mapblocks.
|
||||
name = "mcl_mapgen_core:fix_incorrect_seagrass",
|
||||
nodenames = {"group:seagrass"},
|
||||
run_at_every_load = false,
|
||||
action = function(pos, node)
|
||||
if node.param2 ~= 3 then
|
||||
node.param2 = 3
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- We go outside x and y for where trees are placed next to a biome that has already been generated.
|
||||
-- We go above maxp.y because trees can often get placed close to the top of a generated area and folliage may not
|
||||
-- be coloured correctly.
|
||||
local function fix_folliage_missed (minp, maxp)
|
||||
local pos1, pos2 = vector.offset(minp, -6, 0, -6), vector.offset(maxp, 6, 14, 6)
|
||||
local foliage = minetest.find_nodes_in_area(pos1, pos2, {"group:foliage_palette", "group:foliage_palette_wallmounted"})
|
||||
for _, fpos in pairs(foliage) do
|
||||
local fnode = minetest.get_node(fpos)
|
||||
|
@ -487,32 +601,10 @@ minetest.register_on_generated(function(minp, maxp, blockseed) -- Set correct pa
|
|||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
minetest.register_lbm({
|
||||
label = "Fix water palette indexes", -- Set correct palette indexes of water in old mapblocks.
|
||||
name = "mcl_mapgen_core:fix_water_palette_indexes",
|
||||
nodenames = {"group:water_palette"},
|
||||
run_at_every_load = false,
|
||||
action = function(pos, node)
|
||||
local water_palette_index = mcl_util.get_palette_indexes_from_pos(pos).water_palette_index
|
||||
if node.param2 ~= water_palette_index then
|
||||
node.param2 = water_palette_index
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed) -- Set correct palette indexes of missed foliage.
|
||||
if maxp.y < 0 then
|
||||
return
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed) -- Set correct palette indexes of water in new mapblocks.
|
||||
local pos1, pos2 = vector.offset(minp, -16, -16, -16), vector.offset(maxp, 16, 16, 16)
|
||||
local water = minetest.find_nodes_in_area(pos1, pos2, {"group:water_palette"})
|
||||
for _, wpos in pairs(water) do
|
||||
local wnode = minetest.get_node(wpos)
|
||||
local water_palette_index = mcl_util.get_palette_indexes_from_pos(wpos).water_palette_index
|
||||
if wnode.param2 ~= water_palette_index then
|
||||
wnode.param2 = water_palette_index
|
||||
minetest.set_node(wpos, wnode)
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
fix_folliage_missed (minp, maxp)
|
||||
end)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
|
||||
|
@ -46,7 +48,7 @@ local function pick_track(dimension, underground)
|
|||
minetest.log("action", "[mcl_music] Playing track: " .. chosen_track .. ", for context: " .. track_key)
|
||||
return chosen_track
|
||||
else
|
||||
--?
|
||||
-- ?
|
||||
end
|
||||
|
||||
return nil
|
||||
|
@ -102,38 +104,40 @@ local function play()
|
|||
|
||||
local day_count = minetest.get_day_count()
|
||||
for _, player in pairs(minetest.get_connected_players()) do
|
||||
local player_name = player:get_player_name()
|
||||
local hp = player:get_hp()
|
||||
local pos = player:get_pos()
|
||||
local dimension = mcl_worlds.pos_to_dimension(pos)
|
||||
if not player:get_meta():get("mcl_music:disable") then
|
||||
local player_name = player:get_player_name()
|
||||
local hp = player:get_hp()
|
||||
local pos = player:get_pos()
|
||||
local dimension = mcl_worlds.pos_to_dimension(pos)
|
||||
|
||||
local listener = listeners[player_name]
|
||||
local handle = listener and listener.handle
|
||||
local listener = listeners[player_name]
|
||||
local handle = listener and listener.handle
|
||||
|
||||
--local old_hp = listener and listener.hp
|
||||
--local is_hp_changed = old_hp and (math.abs(old_hp - hp) > 0.00001) or false
|
||||
--local old_hp = listener and listener.hp
|
||||
--local is_hp_changed = old_hp and (math.abs(old_hp - hp) > 0.00001) or false
|
||||
|
||||
local old_dimension = listener and listener.dimension
|
||||
local is_dimension_changed = old_dimension and (old_dimension ~= dimension) or false
|
||||
local old_dimension = listener and listener.dimension
|
||||
local is_dimension_changed = old_dimension and (old_dimension ~= dimension) or false
|
||||
|
||||
--minetest.log("handle: " .. dump (handle))
|
||||
if is_dimension_changed then
|
||||
stop_music_for_listener_name(player_name)
|
||||
if not listeners[player_name] then
|
||||
listeners[player_name] = {}
|
||||
end
|
||||
listeners[player_name].hp = hp
|
||||
listeners[player_name].dimension = dimension
|
||||
elseif not handle and (not listener or (listener.day_count ~= day_count)) then
|
||||
local underground = dimension == "overworld" and pos and pos.y < 0
|
||||
local track = pick_track(dimension, underground)
|
||||
if track then
|
||||
play_song(track, player_name, dimension, day_count)
|
||||
-- minetest.log("handle: " .. dump (handle))
|
||||
if is_dimension_changed then
|
||||
stop_music_for_listener_name(player_name)
|
||||
if not listeners[player_name] then
|
||||
listeners[player_name] = {}
|
||||
end
|
||||
listeners[player_name].hp = hp
|
||||
listeners[player_name].dimension = dimension
|
||||
elseif not handle and (not listener or (listener.day_count ~= day_count)) then
|
||||
local underground = dimension == "overworld" and pos and pos.y < 0
|
||||
local track = pick_track(dimension, underground)
|
||||
if track then
|
||||
play_song(track, player_name, dimension, day_count)
|
||||
else
|
||||
--minetest.log("no track found. weird")
|
||||
end
|
||||
else
|
||||
--minetest.log("no track found. weird")
|
||||
--minetest.log("else")
|
||||
end
|
||||
else
|
||||
--minetest.log("else")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -149,6 +153,10 @@ if music_enabled then
|
|||
stop_music_for_listener_name(player_name)
|
||||
end)
|
||||
|
||||
minetest.register_on_leaveplayer(function(player, timed_out)
|
||||
listeners[player:get_player_name()] = nil
|
||||
end)
|
||||
|
||||
minetest.register_on_respawnplayer(function(player)
|
||||
local player_name = player:get_player_name()
|
||||
stop_music_for_listener_name(player_name)
|
||||
|
@ -156,3 +164,59 @@ if music_enabled then
|
|||
else
|
||||
minetest.log("action", "[mcl_music] In-game music is deactivated")
|
||||
end
|
||||
|
||||
minetest.register_chatcommand("music", {
|
||||
params = "[on|off|invert [<player name>]]",
|
||||
description = S("Turns music for yourself or another player on or off."),
|
||||
func = function(sender_name, params)
|
||||
local argtable = {}
|
||||
for str in string.gmatch(params, "([^%s]+)") do
|
||||
table.insert(argtable, str)
|
||||
end
|
||||
|
||||
local action = argtable[1]
|
||||
local playername = argtable[2]
|
||||
|
||||
local sender = minetest.get_player_by_name(sender_name)
|
||||
local target_player = nil
|
||||
|
||||
if not action or action == "" then action = "invert" end
|
||||
|
||||
if not playername or playername == "" or sender_name == playername then
|
||||
target_player = sender
|
||||
playername =sender_name
|
||||
elseif not minetest.check_player_privs(sender, "debug") then -- Self-use handled above
|
||||
minetest.chat_send_player(sender_name, S("You need the debug privilege in order to turn ingame music on or off for somebody else!"))
|
||||
return
|
||||
else -- Admin
|
||||
target_player = minetest.get_player_by_name(playername)
|
||||
end
|
||||
|
||||
if not target_player then
|
||||
minetest.chat_send_player(sender_name, S("Couldn't find player @1!", playername))
|
||||
return
|
||||
end
|
||||
|
||||
local meta = target_player:get_meta()
|
||||
local display_new_state = "unknown" -- Should never be displayed -> no translation
|
||||
|
||||
if action == "invert" then
|
||||
if not meta:get("mcl_music:disable") then
|
||||
meta:set_int("mcl_music:disable", 1)
|
||||
display_new_state = S("off")
|
||||
else
|
||||
meta:set_string("mcl_music:disable", "") -- This deletes the meta value!
|
||||
display_new_state = S("on")
|
||||
end
|
||||
elseif action == "on" then
|
||||
meta:set_string("mcl_music:disable", "") -- Delete
|
||||
display_new_state = S("on")
|
||||
else
|
||||
meta:set_int("mcl_music:disable", 1)
|
||||
display_new_state = S("off")
|
||||
end
|
||||
|
||||
stop_music_for_listener_name(playername)
|
||||
minetest.chat_send_player(sender_name, S("Set music for @1 to: @2", playername, display_new_state))
|
||||
end,
|
||||
})
|
7
mods/PLAYER/mcl_music/locale/mcl_music.de.tr
Normal file
7
mods/PLAYER/mcl_music/locale/mcl_music.de.tr
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: mcl_music
|
||||
You need the debug privilege in order to turn ingame music on or off for somebody else!=Sie benötigen das „debug“ Privileg, um die Musik (im Spiel) für jemand anders ein oder aus zu schalten!
|
||||
Couldn't find player @1!= Spieler @1 konnte nicht gefunden werden!
|
||||
Set music for @1 to: @2=Musik für @1 auf @2 gesetzt
|
||||
Turns music for yourself or another player on or off.=Schaltet die Musik für Sie selbst oder jemand anders ein oder aus.
|
||||
on=an
|
||||
off=aus
|
7
mods/PLAYER/mcl_music/locale/template.txt
Normal file
7
mods/PLAYER/mcl_music/locale/template.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
# textdomain: mcl_music
|
||||
You need the debug privilege in order to turn ingame music on or off for somebody else!=
|
||||
Couldn't find player @1!=
|
||||
Set music for @1 to: @2=
|
||||
Turns music for yourself or another player on or off.=
|
||||
on=
|
||||
off=
|
|
@ -239,7 +239,7 @@ minetest.register_globalstep(function(dtime)
|
|||
elytra.speed = 1 - (direction.y/2 + 0.5)
|
||||
end
|
||||
|
||||
elytra.active = player:get_inventory():get_stack("armor", 3):get_name() == "mcl_armor:elytra"
|
||||
elytra.active = minetest.get_item_group(player:get_inventory():get_stack("armor", 3):get_name(), "elytra") ~= 0
|
||||
and not parent
|
||||
and (elytra.active or (is_just_jumped and player_velocity.y < -0))
|
||||
and ((not minetest.registered_nodes[fly_node].walkable) or fly_node == "ignore")
|
||||
|
|
14
mods/PLAYER/mcl_skins/locale/mcl_skins.es.tr
Normal file
14
mods/PLAYER/mcl_skins/locale/mcl_skins.es.tr
Normal file
|
@ -0,0 +1,14 @@
|
|||
# textdomain: mcl_skins
|
||||
Skins=Aspectos
|
||||
Templates=Plantillas
|
||||
Arm size=Tamaño de los brazos
|
||||
Bases=Bases
|
||||
Footwears=Calzado
|
||||
Eyes=Ojos
|
||||
Mouths=Bocas
|
||||
Bottoms=Parte inferior
|
||||
Tops=Parte superior
|
||||
Hairs=Cabellos
|
||||
Headwears=Accesorios para la cabeza
|
||||
Open skin configuration screen.=Abrir pantalla de configuración de aspectos
|
||||
Select=Seleccionar
|
Loading…
Reference in a new issue