Merge testing into compatibility

This commit is contained in:
kay27 2022-07-24 04:30:40 +03:00
commit a9ea0e8037
100 changed files with 1831 additions and 1120 deletions

View File

@ -31,6 +31,12 @@ Refer to [Minetest Lua API](https://github.com/minetest/minetest/blob/master/doc
Follow [Lua code style guidelines](https://dev.minetest.net/Lua_code_style_guidelines). Use tabs, not spaces for indentation (tab size = 8). Never use `minetest.env`.
If you do a translation, try detecting translational issues with `check_translate_files.py` - just run it from tools folder:
```bash
# python3 check_translate_files.py fr | less
```
(`fr` is a language code)
Check your code works as expected.
Commit & push your changes to a new branch (not master, one change per a branch).

View File

@ -0,0 +1,2 @@
# textdomain:mcl_explosions
@1 was caught in an explosion.=@1 es mòrt(a) dins una petarada.

View File

@ -1,5 +1,11 @@
mcl_util = {}
local minetest_get_item_group = minetest.get_item_group
local minetest_get_meta = minetest.get_meta
local minetest_get_node = minetest.get_node
local minetest_get_node_timer = minetest.get_node_timer
local table_copy = table.copy
-- Updates all values in t using values from to*.
function table.update(t, ...)
for _, to in ipairs{...} do
@ -33,36 +39,6 @@ function mcl_util.rotate_axis(itemstack, placer, pointed_thing)
return itemstack
end
-- Returns position of the neighbor of a double chest node
-- or nil if node is invalid.
-- This function assumes that the large chest is actually intact
-- * pos: Position of the node to investigate
-- * param2: param2 of that node
-- * side: Which "half" the investigated node is. "left" or "right"
function mcl_util.get_double_container_neighbor_pos(pos, param2, side)
if side == "right" then
if param2 == 0 then
return {x=pos.x-1, y=pos.y, z=pos.z}
elseif param2 == 1 then
return {x=pos.x, y=pos.y, z=pos.z+1}
elseif param2 == 2 then
return {x=pos.x+1, y=pos.y, z=pos.z}
elseif param2 == 3 then
return {x=pos.x, y=pos.y, z=pos.z-1}
end
else
if param2 == 0 then
return {x=pos.x+1, y=pos.y, z=pos.z}
elseif param2 == 1 then
return {x=pos.x, y=pos.y, z=pos.z-1}
elseif param2 == 2 then
return {x=pos.x-1, y=pos.y, z=pos.z}
elseif param2 == 3 then
return {x=pos.x, y=pos.y, z=pos.z+1}
end
end
end
-- Iterates through all items in the given inventory and
-- returns the slot of the first item which matches a condition.
-- Returns nil if no item was found.
@ -87,7 +63,7 @@ end
-- Returns true if itemstack is a shulker box
local function is_not_shulker_box(itemstack)
local g = minetest.get_item_group(itemstack:get_name(), "shulker_box")
local g = minetest_get_item_group(itemstack:get_name(), "shulker_box")
return g == 0 or g == nil
end
@ -133,136 +109,116 @@ end
--- source_stack_id (optional): The inventory position ID of the source inventory to take the item from (-1 for slot of the first valid item; -1 is default)
--- destination_list (optional): List name of the destination inventory. Default is normally "main"; "src" for furnace
-- Returns true on success and false on failure.
local SHULKER_BOX = 3
local FURNACE = 4
local DOUBLE_CHEST_LEFT = 5
local DOUBLE_CHEST_RIGHT = 6
local CONTAINER_GROUP_TO_LIST = {
[1] = "main",
[2] = "main",
[SHULKER_BOX] = "main",
[FURNACE] = "dst",
[DOUBLE_CHEST_LEFT] = "main",
[DOUBLE_CHEST_RIGHT] = "main",
}
function mcl_util.move_item_container(source_pos, destination_pos, source_list, source_stack_id, destination_list)
local dpos = table.copy(destination_pos)
local spos = table.copy(source_pos)
local snode = minetest.get_node(spos)
local dnode = minetest.get_node(dpos)
local dctype = minetest.get_item_group(dnode.name, "container")
local sctype = minetest.get_item_group(snode.name, "container")
-- Container type 7 does not allow any movement
if sctype == 7 then
return false
end
-- Normalize double container by forcing to always use the left segment first
local function normalize_double_container(pos, node, ctype)
if ctype == 6 then
pos = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "right")
if not pos then
return false
end
node = minetest.get_node(pos)
ctype = minetest.get_item_group(node.name, "container")
-- The left segment seems incorrect? We better bail out!
if ctype ~= 5 then
return false
end
local spos = table_copy(source_pos)
local snode = minetest_get_node(spos)
local sctype = minetest_get_item_group(snode.name, "container")
local default_source_list = CONTAINER_GROUP_TO_LIST[sctype]
if not default_source_list then return end
if sctype == DOUBLE_CHEST_RIGHT then
local sparam2 = snode.param2
if sparam2 == 0 then spos.x = spos.x - 1
elseif sparam2 == 1 then spos.z = spos.z + 1
elseif sparam2 == 2 then spos.x = spos.x + 1
elseif sparam2 == 3 then spos.z = spos.z - 1
end
return pos, node, ctype
snode = minetest_get_node(spos)
sctype = minetest_get_item_group(snode.name, "container")
if sctype ~= DOUBLE_CHEST_LEFT then return end
end
spos, snode, sctype = normalize_double_container(spos, snode, sctype)
dpos, dnode, dctype = normalize_double_container(dpos, dnode, dctype)
if not spos or not dpos then return false end
local smeta = minetest.get_meta(spos)
local dmeta = minetest.get_meta(dpos)
local smeta = minetest_get_meta(spos)
local sinv = smeta:get_inventory()
local source_list = source_list or default_source_list
local dpos = table_copy(destination_pos)
local dnode = minetest_get_node(dpos)
local dctype = minetest_get_item_group(dnode.name, "container")
local default_destination_list = CONTAINER_GROUP_TO_LIST[sctype]
if not default_destination_list then return end
if dctype == DOUBLE_CHEST_RIGHT then
local dparam2 = dnode.param2
if dparam2 == 0 then dpos.x = dpos.x - 1
elseif dparam2 == 1 then dpos.z = dpos.z + 1
elseif dparam2 == 2 then dpos.x = dpos.x + 1
elseif dparam2 == 3 then dpos.z = dpos.z - 1
end
dnode = minetest_get_node(dpos)
dctype = minetest_get_item_group(dnode.name, "container")
if dctype ~= DOUBLE_CHEST_LEFT then return end
end
local dmeta = minetest_get_meta(dpos)
local dinv = dmeta:get_inventory()
-- Default source lists
if not source_list then
-- Main inventory for most container types
if sctype == 2 or sctype == 3 or sctype == 5 or sctype == 6 or sctype == 7 then
source_list = "main"
-- Furnace: output
elseif sctype == 4 then
source_list = "dst"
-- Unknown source container type. Bail out
else
return false
end
end
-- Automatically select stack slot ID if set to automatic
if not source_stack_id then
source_stack_id = -1
end
local source_stack_id = source_stack_id or -1
if source_stack_id == -1 then
local cond = nil
-- Prevent shulker box inception
if dctype == 3 then
cond = is_not_shulker_box
end
if dctype == SHULKER_BOX then cond = is_not_shulker_box end
source_stack_id = mcl_util.get_eligible_transfer_item_slot(sinv, source_list, dinv, dpos, cond)
if not source_stack_id then
-- Try again if source is a double container
if sctype == 5 then
spos = mcl_util.get_double_container_neighbor_pos(spos, snode.param2, "left")
smeta = minetest.get_meta(spos)
sinv = smeta:get_inventory()
source_stack_id = mcl_util.get_eligible_transfer_item_slot(sinv, source_list, dinv, dpos, cond)
if not source_stack_id then
return false
if sctype == DOUBLE_CHEST_LEFT then
local sparam2 = snode.param2
if sparam2 == 0 then spos.x = spos.x + 1
elseif sparam2 == 1 then spos.z = spos.z - 1
elseif sparam2 == 2 then spos.x = spos.x - 1
elseif sparam2 == 3 then spos.z = spos.z + 1
end
else
return false
snode = minetest_get_node(spos)
sctype = minetest_get_item_group(snode.name, "container")
if sctype ~= DOUBLE_CHEST_RIGHT then return end
smeta = minetest_get_meta(spos)
sinv = smeta:get_inventory()
source_stack_id = mcl_util.get_eligible_transfer_item_slot(sinv, source_list, dinv, dpos, cond)
end
end
if not source_stack_id then return end
end
-- Abort transfer if shulker box wants to go into shulker box
if dctype == 3 then
if dctype == SHULKER_BOX then
local stack = sinv:get_stack(source_list, source_stack_id)
if stack and minetest.get_item_group(stack:get_name(), "shulker_box") == 1 then
return false
end
end
-- Container type 7 does not allow any placement
if dctype == 7 then
return false
if stack and minetest_get_item_group(stack:get_name(), "shulker_box") == 1 then return end
end
-- If it's a container, put it into the container
if dctype ~= 0 then
-- Automatically select a destination list if omitted
if not destination_list then
-- Main inventory for most container types
if dctype == 2 or dctype == 3 or dctype == 5 or dctype == 6 or dctype == 7 then
destination_list = "main"
-- Furnace source slot
elseif dctype == 4 then
destination_list = "src"
local destination_list = destination_list or default_destination_list
-- Move item
local ok = mcl_util.move_item(sinv, source_list, source_stack_id, dinv, destination_list)
-- Try transfer to neighbor node if transfer failed and double container
if not ok then
if dctype == DOUBLE_CHEST_LEFT then
local dparam2 = dnode.param2
if dparam2 == 0 then dpos.x = dpos.x + 1
elseif dparam2 == 1 then dpos.z = dpos.z - 1
elseif dparam2 == 2 then dpos.x = dpos.x - 1
elseif dparam2 == 3 then dpos.z = dpos.z + 1
end
end
if destination_list then
-- Move item
local ok = mcl_util.move_item(sinv, source_list, source_stack_id, dinv, destination_list)
-- Try transfer to neighbor node if transfer failed and double container
if not ok and dctype == 5 then
dpos = mcl_util.get_double_container_neighbor_pos(dpos, dnode.param2, "left")
dmeta = minetest.get_meta(dpos)
dinv = dmeta:get_inventory()
ok = mcl_util.move_item(sinv, source_list, source_stack_id, dinv, destination_list)
end
-- Update furnace
if ok and dctype == 4 then
-- Start furnace's timer function, it will sort out whether furnace can burn or not.
minetest.get_node_timer(dpos):start(1.0)
end
return ok
dnode = minetest_get_node(dpos)
dctype = minetest_get_item_group(dnode.name, "container")
if dctype ~= DOUBLE_CHEST_RIGHT then return end
dmeta = minetest_get_meta(dpos)
dinv = dmeta:get_inventory()
ok = mcl_util.move_item(sinv, source_list, source_stack_id, dinv, destination_list)
end
end
return false
-- Update furnace
if ok and dctype == FURNACE then
-- Start furnace's timer function, it will sort out whether furnace can burn or not.
minetest_get_node_timer(dpos):start(1.0)
end
return ok
end
-- Returns the ID of the first non-empty slot in the given inventory list
@ -292,7 +248,7 @@ function mcl_util.generate_on_place_plant_function(condition)
end
-- Call on_rightclick if the pointed node defines it
local node = minetest.get_node(pointed_thing.under)
local node = minetest_get_node(pointed_thing.under)
if placer and not placer:get_player_control().sneak then
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack
@ -300,8 +256,8 @@ function mcl_util.generate_on_place_plant_function(condition)
end
local place_pos
local def_under = minetest.registered_nodes[minetest.get_node(pointed_thing.under).name]
local def_above = minetest.registered_nodes[minetest.get_node(pointed_thing.above).name]
local def_under = minetest.registered_nodes[minetest_get_node(pointed_thing.under).name]
local def_above = minetest.registered_nodes[minetest_get_node(pointed_thing.above).name]
if not def_under or not def_above then
return itemstack
end
@ -359,7 +315,7 @@ function mcl_util.call_on_rightclick(itemstack, player, pointed_thing)
-- Call on_rightclick if the pointed node defines it
if pointed_thing and pointed_thing.type == "node" then
local pos = pointed_thing.under
local node = minetest.get_node(pos)
local node = minetest_get_node(pos)
if player and not player:get_player_control().sneak then
local nodedef = minetest.registered_nodes[node.name]
local on_rightclick = nodedef and nodedef.on_rightclick
@ -372,7 +328,7 @@ end
function mcl_util.calculate_durability(itemstack)
local unbreaking_level = mcl_enchanting.get_enchantment(itemstack, "unbreaking")
local armor_uses = minetest.get_item_group(itemstack:get_name(), "mcl_armor_uses")
local armor_uses = minetest_get_item_group(itemstack:get_name(), "mcl_armor_uses")
local uses

View File

@ -21,9 +21,11 @@ local S = minetest.get_translator("extra_mobs")
local followitem = "mcl_farming:sweet_berry"
local fox = {
type = "monster",
type = "animal",
passive = false,
spawn_class = "hostile",
skittish = true,
runaway = true,
hp_min = 10,
hp_max = 10,
xp_min = 1,
@ -32,9 +34,20 @@ local fox = {
attack_type = "dogfight",
damage = 2,
reach = 1.5,
jump = true,
makes_footstep_sound = true,
walk_velocity = 3,
run_velocity = 6,
follow_velocity = 2,
follow = followitem,
pathfinding = 1,
fear_height = 4,
view_range = 16,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3},
specific_attack = { "mobs_mc:chicken", "extra_mobs:cod", "extra_mobs:salmon" },
visual = "mesh",
mesh = "extra_mobs_fox.b3d",
rotate = 270,
textures = { {
"extra_mobs_fox.png",
"extra_mobs_trans.png",
@ -42,10 +55,6 @@ local fox = {
visual_size = {x=3, y=3},
sounds = {
},
jump = true,
makes_footstep_sound = true,
walk_velocity = 3,
run_velocity = 6,
drops = {
},
animation = {
@ -63,9 +72,9 @@ local fox = {
lay_start = 34,
lay_end = 34,
},
runaway = true,
on_spawn = function(self)
if minetest.find_node_near(self.object:get_pos(), 4, "mcl_core:snow") ~= nil or minetest.find_node_near(self.object:get_pos(), 4, "mcl_core:dirt_with_grass_snow") ~= nil then
if minetest.find_node_near(self.object:get_pos(), 4, "mcl_core:snow") ~= nil
or minetest.find_node_near(self.object:get_pos(), 4, "mcl_core:dirt_with_grass_snow") ~= nil then
self.object:set_properties({textures={"extra_mobs_artic_fox.png", "extra_mobs_trans.png"}})
end
end,
@ -83,7 +92,11 @@ local fox = {
end)
end
for _,object in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 8)) do
if object and not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "extra_mobs:fox" and self.state ~= "attack" and math.random(1, 500) == 1 then
if object
and not object:is_player()
and object:get_luaentity()
and object:get_luaentity().name == "extra_mobs:fox"
and self.state ~= "attack" and math.random(1, 500) == 1 then
self.horny = true
end
local lp = object:get_pos()
@ -93,15 +106,30 @@ local fox = {
y = lp.y - s.y,
z = lp.z - s.z
}
if object and object:is_player() and not object:get_player_control().sneak or not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "mobs_mc:wolf" then
self.state = "runaway"
self.object:set_rotation({x=0,y=(atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate,z=0})
if self.reach > vector.distance(self.object:get_pos(), object:get_pos()) and self.timer > .9 then
self.timer = 0
object:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
-- scare logic
if (object
and object:is_player()
and not object:get_player_control().sneak)
or (not object:is_player()
and object:get_luaentity()
and object:get_luaentity().name == "mobs_mc:wolf") then
-- don't keep setting it once it's set
if not self.state == "runaway" then
self.state = "runaway"
self.object:set_rotation({x=0,y=(atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate,z=0})
end
-- if it is within a distance of the player or wolf
if 6 > vector.distance(self.object:get_pos(), object:get_pos()) then
self.timer = self.timer + 1
-- have some time before getting scared
if self.timer > 6 then
self.timer = 0
-- punch the fox for the player, but don't do any damage
self.object:punch(object, 0, {
full_punch_interval = 0,
damage_groups = {fleshy = 0}
}, nil)
end
end
end
end
@ -109,10 +137,6 @@ local fox = {
do_punch = function(self)
self.state = "runaway"
end,
follow = followitem,
fear_height = 4,
view_range = 16,
specific_attack = { "mobs_mc:chicken", "extra_mobs:cod", "extra_mobs:salmon" },
}
mobs:register_mob("extra_mobs:fox", fox)
@ -146,21 +170,21 @@ mobs:spawn_setup({
--mobs:spawn_specific("extra_mobs:fox", "overworld", "ground", 0, minetest.LIGHT_MAX+1, 30, 6000, 3, 0, 500)
--[[
mobs:spawn_specific(
"extra_mobs:artic_fox",
"overworld",
"ground",
"extra_mobs:artic_fox",
"overworld",
"ground",
{
"ColdTaiga",
"IcePlainsSpikes",
"IcePlains",
"ExtremeHills+_snowtop",
},
0,
minetest.LIGHT_MAX+1,
30,
6000,
3,
mobs_mc.spawn_height.water,
0,
minetest.LIGHT_MAX+1,
30,
6000,
3,
mobs_mc.spawn_height.water,
mobs_mc.spawn_height.overworld_max)
]]--
-- spawn eggs

View File

@ -1,11 +1,11 @@
# textdomain:extra_mobs
Hoglin=Hoglin
piglin=Piglin
piglin Brute=Piglin Barbare
Piglin=Piglin
Piglin Brute=Piglin Barbare
Strider=Arpenteur
Fox=Renard
Cod=Poisson
Salmon=Saumon
dolphin=Dauphin
Dolphin=Dauphin
Glow Squid=Pieuvre Lumineuse
Glow Ink Sac=Sac d'Encre Lumineuse

View File

@ -1,11 +1,11 @@
# textdomain:extra_mobs
Hoglin=
piglin=
piglin Brute=
Piglin=
Piglin Brute=
Strider=
Fox=
Cod=
Salmon=
dolphin=
Dolphin=
Glow Squid=
Glow Ink Sac=

View File

@ -0,0 +1,13 @@
# textdomain: mcl_boats
Acacia Boat=Barca de Cacièr
Birch Boat=Barca de Bèç
Boat=Barca
Boats are used to travel on the surface of water.= Las Barcas permetàn de vogar per l'aiga.
Dark Oak Boat=Barca de Jàrric
Jungle Boat=Barca de Jungla
Oak Boat=Barca de Ròure
Obsidian Boat=Barca d'Obsidiana
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. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=Fasetz un clic dreit sobre una sorça d'aiga per botar la barca. Fasetz un clic dreit sobre la barca per ne'n dintrar. Utilisatz [Esquèrra] e [Dreita] per menar, [Davant] per accelerar, e [Darrèir] per alentir o recular. Utilizatz [S'acatar] per o quitar, picatz la barca per o faire tombar en objèct.
Spruce Boat=Barca de Sap
Water vehicle=Veïcule d'Aiga
Sneak to dismount=S'acatar per descendre

View File

@ -0,0 +1,3 @@
# textdomain: mcl_falling_nodes
@1 was smashed by a falling anvil.=@1 fuguèt espotit per una enclutge.
@1 was smashed by a falling block.=@1 fuguèt espotit per un blòc.

View File

@ -88,7 +88,7 @@ local function land_state_switch(self, dtime)
end
--ignore everything else if following
if mobs.check_following(self) and
if mobs.check_following(self, dtime) and
(not self.breed_lookout_timer or (self.breed_lookout_timer and self.breed_lookout_timer == 0)) and
(not self.breed_timer or (self.breed_timer and self.breed_timer == 0)) then
self.state = "follow"
@ -984,7 +984,7 @@ function mobs.mob_step(self, dtime)
--go get the closest player
if attacking then
mobs.do_head_logic(self, dtime, attacking)
self.memory = 6 --6 seconds of memory
--set initial punch timer
@ -1040,6 +1040,7 @@ function mobs.mob_step(self, dtime)
--don't break eye contact
if self.hostile and self.attacking then
mobs.set_yaw_while_attacking(self)
mobs.do_head_logic(self, dtime, self.attacking)
end
--perfectly reset pause_timer

View File

@ -3,7 +3,7 @@ local minetest_get_objects_inside_radius = minetest.get_objects_inside_radius
local vector = vector
--check to see if someone nearby has some tasty food
mobs.check_following = function(self) -- returns true or false
mobs.check_following = function(self, dtime) -- returns true or false
--ignore
if not self.follow then
self.following_person = nil
@ -15,6 +15,7 @@ mobs.check_following = function(self) -- returns true or false
--check if the follower is a player incase they log out
if follower and follower:is_player() then
mobs.do_head_logic(self, dtime, follower)
local stack = follower:get_wielded_item()
--safety check
if not stack then

View File

@ -6,9 +6,9 @@ local degrees = function(yaw)
return yaw*180.0/math.pi
end
mobs.do_head_logic = function(self,dtime)
mobs.do_head_logic = function(self, dtime, player)
local player = minetest.get_player_by_name("singleplayer")
local player = player or minetest.get_player_by_name("singleplayer")
local look_at = player:get_pos()
look_at.y = look_at.y + player:get_properties().eye_height
@ -89,10 +89,21 @@ mobs.do_head_logic = function(self,dtime)
head_pitch = head_pitch + self.head_pitch_modifier
end
if self.swap_y_with_x then
self.object:set_bone_position(self.head_bone, bone_pos, vector.new(degrees(head_pitch),degrees(head_yaw),0))
local head_bone = self.head_bone
if (type(head_bone) == "table") then
for _, v in pairs(head_bone) do
if self.swap_y_with_x then
self.object:set_bone_position(v, bone_pos, vector.new(degrees(head_pitch),degrees(head_yaw),0))
else
self.object:set_bone_position(v, bone_pos, vector.new(degrees(head_pitch),0,degrees(head_yaw)))
end
end
else
self.object:set_bone_position(self.head_bone, bone_pos, vector.new(degrees(head_pitch),0,degrees(head_yaw)))
if self.swap_y_with_x then
self.object:set_bone_position(head_bone, bone_pos, vector.new(degrees(head_pitch),degrees(head_yaw),0))
else
self.object:set_bone_position(head_bone, bone_pos, vector.new(degrees(head_pitch),0,degrees(head_yaw)))
end
end
--set_bone_position([bone, position, rotation])
end

View File

@ -1,11 +1,11 @@
# textdomain: mcl_mobs
Peaceful mode active! No monsters will spawn.=Mode paisible actif! Aucun monstre n'apparaîtra.
Peaceful mode active! No monsters will spawn.=Mode paisible actif ! Aucun monstre n'apparaîtra.
This allows you to place a single mob.=Cela vous permet de placer un seul mob.
Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns.=Placez-le là où vous voulez que le mob apparaisse. Les animaux apparaîtront apprivoisés, sauf si vous maintenez la touche furtive enfoncée pendant le placement. Si vous le placez sur un générateur de mob, vous changez le mob qu'il génère.
You need the “maphack” privilege to change the mob spawner.=Vous avez besoin du privilège "maphack" pour changer le générateur de mob.
Name Tag=Étiquette de nom
A name tag is an item to name a mob.=Une étiquette de nom est un élément pour nommer un mob.
Before you use the name tag, you need to set a name at an anvil. Then you can use the name tag to name a mob. This uses up the name tag.=Avant d'utiliser l'étiquette de nom, vous devez définir un nom sur une enclume. Ensuite, vous pouvez utiliser l'étiquette de nom pour nommer un mob. Cela utilise l'étiquette de nom.
Only peaceful mobs allowed!=Seuls les mobs pacifiques sont autorisés!
Only peaceful mobs allowed!=Seuls les mobs pacifiques sont autorisés !
Give names to mobs=Donne des noms aux mobs
Set name at anvil=Définir le nom sur l'enclume

View File

@ -0,0 +1,2 @@
# textdomain:mcl_paintings
Painting=Pintura

View File

@ -74,3 +74,4 @@ Tool Smith=Fabriquant d'outil
Cleric=Clerc
Nitwit=Crétin
Protects you from death while wielding it=Vous protège de la mort en le maniant
Pillager=Pillard

View File

@ -0,0 +1,77 @@
# textdomain: mobs_mc
Totem of Undying=Totèm d'Imortalitat
A totem of undying is a rare artifact which may safe you from certain death.=Un totèm d'imortalitat es un artefacte rara que pòt vos sauvar d'una mòrt surada.
The totem only works while you hold it in your hand. If you receive fatal damage, you are saved from death and you get a second chance with 1 HP. The totem is destroyed in the process, however.=
Agent=Agent
Bat=Ratapenada
Blaze=Blaze
Chicken=Pola
Cow=Vacha
Mooshroom=Champavacha
Creeper=Creeper
Ender Dragon=Drac de l'End
Enderman=Òme de l'End
Endermite=Endarna
Ghast=Trèva
Elder Guardian=Gardian Ainat
Guardian=Gardian
Horse=Ega
Skeleton Horse=Ega Esquelèta
Zombie Horse=Ega Mòrtaviva
Donkey=Asne
Mule=Miula
Iron Golem=Golèm de Fèrre
Llama=Lama
Ocelot=Ocelòt
Parrot=Papagai
Pig=Pòrc
Polar Bear=Ors Polar
Rabbit=Lapin
Killer Bunny=Lapin Tuaire
The Killer Bunny=Lo Lapin Tuaire
Sheep=Moton
Shulker=
Silverfish=
Skeleton=
Stray=
Wither Skeleton=
Magma Cube=
Slime=
Snow Golem=
Spider=
Cave Spider=
Squid=
Vex=
Evoker=
Illusioner=
Villager=
Vindicator=
Zombie Villager=
Witch=
Wither=
Wolf=
Husk=
Zombie=
Zombie Pigman=
Iron Horse Armor=
Iron horse armor can be worn by horses to increase their protection from harm a bit.=
Golden Horse Armor=
Golden horse armor can be worn by horses to increase their protection from harm.=
Diamond Horse Armor=
Diamond horse armor can be worn by horses to greatly increase their protection from harm.=
Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.=
Farmer=
Fisherman=
Fletcher=
Shepherd=
Librarian=
Cartographer=
Armorer=
Leatherworker=
Butcher=
Weapon Smith=
Tool Smith=
Cleric=
Nitwit=
Protects you from death while wielding it=
Pillager=

View File

@ -82,7 +82,7 @@ mobs:register_mob("mobs_mc:sheep", {
--head code
has_head = true,
head_bone = "head",
head_bone = {"hea1", "hea2",},
swap_y_with_x = false,
reverse_head_yaw = false,

View File

@ -0,0 +1,4 @@
# textdomain: lightning
@1 was struck by lightning.=@1 fuguèt pica·t·da per lo tròn
Let lightning strike at the specified position or yourself=Pica lo tròn vès una posicion mencionada o sobre vosautr·e·a·s-mema
No position specified and unknown player=Pas de posicion mencionada e jogair·e·a pas conegu·t·da

View File

@ -1,4 +1,4 @@
# textdomain: lightning
@1 was struck by lightning.=@1 a été frappé(e) par la foudre.
Let lightning strike at the specified position or yourself=Fait frapper la foudre à la position spécifiée ou sur vous-même
Let lightning strike at the specified position or player. No parameter will strike yourself.=Fait frapper la foudre sur la position ou le joueur indiqué. Sans paramètre, la foudre frappera sur vous-même.
No position specified and unknown player=Aucune position spécifiée et joueur inconnu

View File

@ -0,0 +1,3 @@
# textdomain: mcl_void_damage
The void is off-limits to you!=Lo voeida es defendut per vosautr·e·a·s !
@1 fell into the endless void.=@1 es tombar dins la voeida infinida.

View File

@ -5,4 +5,4 @@ Error: No weather specified.=Erreur: Aucune météo spécifiée.
Error: Invalid parameters.=Erreur: Paramètres non valides.
Error: Duration can't be less than 1 second.=Erreur: La durée ne peut pas être inférieure à 1 seconde.
Error: Invalid weather specified. Use “clear”, “rain”, “snow” or “thunder”.=Erreur: Météo non valide spécifiée. Utilisez "clear" (clair), "rain" (pluie), "snow" (neige) ou "thunder" (tonnerre).
Toggles between clear weather and weather with downfall (randomly rain, thunderstorm or snow)=Bascule entre temps clair et temps avec chute (au hasard entre pluie, orage ou neige)
Toggles between clear weather and weather with downfall (randomly rain, thunderstorm or snow)=Bascule entre temps clair et temps avec des précipitations (au hasard entre pluie, orage ou neige)

View File

@ -17,7 +17,6 @@ Skeleton view range: -50%=
Creeper view range: -50%=
Damage: @1=
Damage (@1): @2=
Durability: @1
Healing: @1=
Healing (@1): @2=
Full punch interval: @1s=

View File

@ -1,4 +1,4 @@
# textdomain:awards
# textdomain: awards
@1/@2 chat messages=@1/@2 chat messages
@1/@2 crafted=@1/@2 fabrication
@1/@2 deaths=@1/@2 Mort
@ -6,12 +6,11 @@
@1/@2 game joins=@1/@2 sessions
@1/@2 placed=@1/@2 mis
@1 (got)=@1 (obtenu)
@1: @1=@1: @1
@1: @2=@1: @2
@1s awards:=Récompenses de @1:
(Secret Award)=(Récompense Secrètte)
<achievement ID>=<Succès ID>
<name>=<nom>
A Cat in a Pop-Tart?!=Un chat beurré ?!
Achievement gotten!=Succès obtenu !
Achievement gotten:=Succès obtenu :
Achievement gotten: @1=Succès obtenu : @1
@ -28,9 +27,9 @@ Join the game.=Rejoignez le jeu.
List awards in chat (deprecated)=Liste des récompenses dans le chat (obsolète)
Place a block: @1=Placer un bloc: @1
Place blocks: @1×@2=Placer des blocs: @1×@2
Secret Achievement gotten!=Succès secret obtenu !
Secret Achievement gotten:=Succès secret obtenu :
Secret Achievement gotten: @1=Succès secret obtenu : @1
Secret achievement gotten!=Succès secret obtenu !
Secret achievement gotten:=Succès secret obtenu :
Secret achievement gotten: @1=Succès secret obtenu : @1
Show details of an achievement=Afficher les détails d'un succès
Show, clear, disable or enable your achievements=Affichez, effacez, désactivez ou activez vos succès
Get this achievement to find out what it is.=Obtenez ce succès pour découvrir de quoi il s'agit.

View File

@ -1,4 +1,4 @@
# textdomain:awards
# textdomain: awards
@1/@2 chat messages=
@1/@2 crafted=
@1/@2 deaths=

View File

@ -63,3 +63,15 @@ Not Quite "Nine" Lives=Presque "neuf" vies
Charge a Respawn Anchor to the maximum.=Charger une Ancre de Réapparition au maximum.
The End?=L'End ?
Or the beginning?\nHint: Enter an end portal.=Ou le commencement ?\nAstuce : Entrer dans un portail de l'End.
Postmortal=Aux frontières de la mort
Use a Totem of Undying to cheat death.=Utiliser un Totem d'imortalité pour tromper la mort.
Sweet Dreams=Bonne nuit les petits
Sleep in a bed to change your respawn point.=Dormez dans un lit pour changer votre point de réapparition.
Serious Dedication=Sérieux dévouement
Use a Netherite Ingot to upgrade a hoe, and then completely reevaluate your life choices.=Utilisez un lingot de netherite pour améliorez une houe, puis réévaluez complètement vos choix de vie.
Fishy Business=Merci pour le poisson
Catch a fish. \nHint: Catch a fish, salmon, clownfish, or pufferfish.=Attrapez un poisson. \nAstuce : attrapez un poisson, saumon, poisson-clown, ou poisson-globe.
What A Deal!=Adjugé, Vendu !
Successfully trade with a Villager.=Commercez avec succès avec un villageois.
Tactical Fishing=Pêche tactique
Catch a fish... without a fishing rod=Attrapez un poisson... sans canne à pêche

View File

@ -6,6 +6,7 @@ Alexander Minges
aligator
ArTee3
Artem Arbatsky
balazsszalab
basxto
Benjamin Schötz
Blue Blancmange
@ -13,6 +14,7 @@ Booglejr
Brandon
Bu-Gee
bzoss
CableGuy67
chmodsayshello
Code-Sploit
cora
@ -31,6 +33,7 @@ Emojigit
epCode
erlehmann
FinishedFragment
FlamingRCCars
Glaucos Ginez
Gustavo Ramos Rehermann
Guy Liner
@ -39,6 +42,7 @@ HimbeerserverDE
iliekprogrammar
j1233
Jared Moody
Johannes Fritz
jordan4ibanez
kabou
kay27
@ -46,13 +50,14 @@ Laurent Rocher
Li0n
marcin-serwin
Marcin Serwin
Mark Roth
Mental-Inferno
Midgard
MysticTempest
Nicholas Niro
nickolas360
Nicu
nikolaus-albinger
Niklp
Nils Dagsson Moskopp
NO11
NO411
@ -60,6 +65,7 @@ Oil_boi
pitchum
PrairieAstronomer
PrairieWind
River River
Rocher Laurent
rootyjr
Rootyjr
@ -68,6 +74,7 @@ Sab Pyrope
Saku Laesvuori
sfan5
SmallJoker
Sumyjkl
superfloh247
Sven792
Sydney Gems
@ -75,6 +82,7 @@ talamh
TechDudie
Thinking
Tianyang Zhang
unknown
U.N.Owen
Wouters Dorian
wuniversales

View File

@ -1,8 +1,4 @@
Please run the following command to update contributor list:
```bash
# git log --pretty="%an" | sort | uniq >CONTRUBUTOR_LIST.txt
```
Please run `./update_credits.sh` from [tools](../../../tools) folder to update contributor list.
Please check that there is no error on execution, and `CONTRUBUTOR_LIST.txt` is updated.

View File

@ -1,59 +1,56 @@
# textdomain: mcl_death_messages
@1 was fatally hit by an arrow.=@1 a été mortellement touché par une flèche.
@1 has been killed with an arrow.=@1 a été tué avec une flèche.
@1 was shot by an arrow from @2.=@1 a été abattu par une flèche de @2.
@1 was shot by an arrow from a skeleton.=@1 a été abattu par une flèche d'un squelette.
@1 was shot by an arrow from a stray.=@1 a été abattu par une flèche d'un vagabond.
@1 was shot by an arrow from an illusioner.=@1 a été abattu par une flèche d'un illusionniste.
@1 was shot by an arrow.=@1 a été abattu par une flèche.
@1 forgot to breathe.=@1 a oublié de respirer.
@1 drowned.=@1 s'est noyé.
@1 ran out of oxygen.=@1 a manqué d'oxygène.
@1 was killed by @2.=@1 a été tué par @2.
@1 was killed.=@1 a été tué.
@1 was killed by a mob.=@1 a été tué par un mob.
@1 was burned to death by a blaze's fireball.=@1 a été brûlé vif par la boule de feu d'un blaze.
@1 was killed by a fireball from a blaze.=@1 a été tué par une boule de feu lors d'un blaze.
@1 was burned by a fire charge.=@1 a été brûlé par un incendie.
A ghast scared @1 to death.=Un ghast a éffrayé @1 à mort.
@1 has been fireballed by a ghast.=@1 a été pétrifié par un ghast.
@1 fell from a high cliff.=@1 est tombé d'une haute falaise.
@1 took fatal fall damage.=@1 a succombé à un chute mortelle.
@1 fell victim to gravity.=@1 a été victime de la gravité.
@1 died.=@1 est mort.
@1 was killed by a zombie.=@1 a été tué par un zombie.
@1 was killed by a baby zombie.=@1 a été tué par un bébé zombie.
@1 was killed by a blaze.=@1 a été tué par un blaze.
@1 was killed by a slime.=@1 a été tué par un slime.
@1 was killed by a witch.=@1 a été tué par un sorcier.
@1 was killed by a magma cube.=@1 a été tué par un cube de magma.
@1 was killed by a wolf.=@1 a été tué par un loup.
@1 was killed by a cat.=@1 a été tué par un chat.
@1 was killed by an ocelot.=@1 a été tué par un ocelot.
@1 was killed by an ender dragon.=@1 a été tué par un ender dragon.
@1 was killed by a wither.=@1 a été tué par un wither.
@1 was killed by an enderman.=@1 a été tué par un enderman.
@1 was killed by an endermite.=@1 a été tué par un endermite.
@1 was killed by a ghast.=@1 a été tué par un ghast.
@1 was killed by an elder guardian.=@1 a été tué par un grand gardien.
@1 was killed by a guardian.=@1 a été tué par un gardien.
@1 was killed by an iron golem.=@1 a été tué par un golem de fer.
@1 was killed by a polar_bear.=@1 a été tué par un ours blanc.
@1 was killed by a killer bunny.=@1 a été tué par un lapin tueur.
@1 was killed by a shulker.=@1 a été tué par un shulker.
@1 was killed by a silverfish.=@1 a été tué par un poisson d'argent.
@1 was killed by a skeleton.=@1 a été tué par un squelette.
@1 was killed by a stray.=@1 a été tué par un vagabond.
@1 was killed by a slime.=@1 a été tué par un slime.
@1 was killed by a spider.=@1 a été tué par une araignée.
@1 was killed by a cave spider.=@1 a été tué par une araignée venimeuse.
@1 was killed by a vex.=@1 a été tué par un vex.
@1 was killed by an evoker.=@1 a été tué par un invocateur.
@1 was killed by an illusioner.=@1 a été tué par un illusionniste.
@1 was killed by a vindicator.=@1 a été tué par un vindicateur.
@1 was killed by a zombie villager.=@1 a été tué par un villageois zombie.
@1 was killed by a husk.=@1 a été tué par un zombie momie.
@1 was killed by a baby husk.=@1 a été tué par un bébé zombie momie.
@1 was killed by a zombie pigman.=@1 a été tué par un zombie-couchon.
@1 was killed by a baby zombie pigman.=@1 a été tué par un bébé zombie-couchon
@1 was slain by @2.=@1 a été tué par @2
@1 went up in flames=@1 a marché dans les flammes
@1 walked into fire whilst fighting @2=@1 a marché dans les flammes en combattant @2
@1 was struck by lightning=@1 a été frappé par la foudre
@1 was struck by lightning whilst fighting @2=@1 a été frappé par la foudre en combattant @2
@1 burned to death=@1 a brûlé vif
@1 was burnt to a crisp whilst fighting @2=@1 a brûlé comme une saucisse en combattant @2
@1 tried to swim in lava=@1 a tenté de nager dans la lave
@1 tried to swim in lava to escape @2=@1 a tenté de nager dans la lave pour échapper à @2
@1 discovered the floor was lava=@1 a découvert que le sol était en lave
@1 walked into danger zone due to @2=@1 a marché dans la zone de danger à cause de @2
@1 suffocated in a wall=@1 est mort asphyxié dans un mur
@1 suffocated in a wall whilst fighting @2=@1 est mort asphyxié dans un mur en combattant @2
@1 drowned=@1 s'est noyé
@1 drowned whilst trying to escape @2=@1 s'est noyé en essayant d'échapper à @2
@1 starved to death=@1 est mort de faim
@1 starved to death whilst fighting @2=@1 est mort de faim en combattant @2
@1 was pricked to death=@1 a été piqué à mort
@1 walked into a cactus whilst trying to escape @2=@1 a marché dans un cactus en essayant d'échapper à @2
@1 hit the ground too hard=@1 a heurté le sol trop fort
@1 hit the ground too hard whilst trying to escape @2=@1 a heurté le sol trop fort en essayant d'échapper à @2
@1 experienced kinetic energy=@1 a expérimenté l'énergie cinétique
@1 experienced kinetic energy whilst trying to escape @2=@1 a expérimenté l'énergie cinétique en essayant d'échapper à @2
@1 fell out of the world=@1 est tombé hors du monde
@1 didn't want to live in the same world as @2=@1 ne voulait vivre dans le même monde que @2
@1 died=@1 est mort
@1 died because of @2=@1 est mort à cause de @2
@1 was killed by magic=@1 a été tué par magie
@1 was killed by magic whilst trying to escape @2=@1 a été tué par magie en essayant d'échapper à @2
@1 was killed by @2 using magic=@1 a été tué par @2 en utilisant la magie
@1 was killed by @2 using @3=@1 a été tué par @2 en utilisant @3
@1 was roasted in dragon breath=@1 a été rôti dans le souffle du dragon
@1 was roasted in dragon breath by @2=@1 a été rôti dans le souffle du dragon par @2
@1 withered away=@1 s'est flétri
@1 withered away whilst fighting @2=@1 s'est flétri en combattant @2
@1 was shot by a skull from @2=@1 a été abattu par un crane de @2
@1 was squashed by a falling anvil=@1 a été écrasé par une enclume
@1 was squashed by a falling anvil whilst fighting @2=@1 a été écrasé par une enclume en combattant @2
@1 was squashed by a falling block=@1 a été écrasé par un bloc tombant
@1 was squashed by a falling block whilst fighting @2=@1 a été écrasé par un bloc tombant en combattant @2
@1 was slain by @2=@1 a été tué par @2
@1 was slain by @2 using @3=@1 a été tué par @2 avec @3
@1 was shot by @2=@1 a été abattu par @2
@1 was shot by @2 using @3=@1 a été abattu par @2 avec @3
@1 was fireballed by @2=@1 a reçu une boule de feu de @2
@1 was fireballed by @2 using @3=@1 a reçu une boule de feu de @2 en utilisant @3
@1 was killed trying to hurt @2=@1 a été tué en essayant de blesser @2
@1 was killed by @3 trying to hurt @2=@1 a été tué par @3 en essayant de blesser @2
@1 blew up=@1 a explosé
@1 was blown up by @2=@1 a été explosé par @2
@1 was blown up by @2 using @3=@1 a été explosé par @2 en utilisant @3
@1 was squished too much=@1 a été trop écrabouillé
@1 was squashed by @2=@1 a été écrasé par @2
@1 went off with a bang=@1 est parti avec un bang
@1 went off with a bang due to a firework fired from @3 by @2=@1 est parti avec un bang à cause d'un feu d'artifice tiré de @3 par @2

View File

@ -33,7 +33,6 @@
@1 was roasted in dragon breath by @2=
@1 withered away=
@1 withered away whilst fighting @2=
@1 was killed by magic=
@1 was shot by a skull from @2=
@1 was squashed by a falling anvil=
@1 was squashed by a falling anvil whilst fighting @2=
@ -41,8 +40,6 @@
@1 was squashed by a falling block whilst fighting @2=
@1 was slain by @2=
@1 was slain by @2 using @3=
@1 was slain by @2=
@1 was slain by @2 using @3=
@1 was shot by @2=
@1 was shot by @2 using @3=
@1 was fireballed by @2=

View File

@ -1,14 +1,20 @@
local refresh_interval = .63
local huds = {}
local default_debug = 3
local default_debug = 5
local after = minetest.after
local get_connected_players = minetest.get_connected_players
local get_biome_name = minetest.get_biome_name
local get_biome_data = minetest.get_biome_data
local get_node = minetest.get_node
local format = string.format
local table_concat = table.concat
local floor = math.floor
local minetest_get_gametime = minetest.get_gametime
local get_voxel_manip = minetest.get_voxel_manip
local min1, min2, min3 = mcl_mapgen.overworld.min, mcl_mapgen.end_.min, mcl_mapgen.nether.min
local max1, max2, max3 = mcl_mapgen.overworld.max, mcl_mapgen.end_.max, mcl_mapgen.nether.max + 128
local CS = mcl_mapgen.CS_NODES
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
@ -17,6 +23,7 @@ local storage = minetest.get_mod_storage()
local player_dbg = minetest.deserialize(storage:get_string("player_dbg") or "return {}") or {}
local function get_text(pos, bits)
local pos = pos
local bits = bits
if bits == 0 then return "" end
local y = pos.y
@ -27,16 +34,42 @@ local function get_text(pos, bits)
elseif y >= min2 and y <= max2 then
y = y - min2
end
local biome_data = get_biome_data(pos)
local biome_name = biome_data and get_biome_name(biome_data.biome) or "No biome"
local text
if bits == 1 then
text = biome_name
elseif bits == 2 then
text = format("x:%.1f y:%.1f z:%.1f", pos.x, y, pos.z)
elseif bits == 3 then
text = format("%s x:%.1f y:%.1f z:%.1f", biome_name, pos.x, y, pos.z)
local will_show_mapgen_status = bits % 8 > 3
local will_show_coordinates = bits % 4 > 1
local will_show_biome_name = bits % 2 > 0
local will_be_shown = {}
if will_show_biome_name then
local biome_data = get_biome_data(pos)
local biome_name = biome_data and get_biome_name(biome_data.biome) or "No biome"
will_be_shown[#will_be_shown + 1] = biome_name
end
if will_show_coordinates then
local coordinates = format("x:%.1f y:%.1f z:%.1f", pos.x, y, pos.z)
will_be_shown[#will_be_shown + 1] = coordinates
end
if will_show_mapgen_status then
local pos_x = floor(pos.x)
local pos_y = floor(pos.y)
local pos_z = floor(pos.z)
local c = 0
for x = pos_x - CS, pos_x + CS, CS do
for y = pos_y - CS, pos_y + CS, CS do
for z = pos_z - CS, pos_z + CS, CS do
local pos = {x = x, y = y, z = z}
get_voxel_manip():read_from_map(pos, pos)
local node = get_node(pos)
if node.name ~= "ignore" then c = c + 1 end
end
end
end
local p = floor(c / 27 * 100 + 0.5)
local status = format("Generated %u%% (%u/27 chunks)", p, c)
will_be_shown[#will_be_shown + 1] = status
end
local text = table_concat(will_be_shown, ' ')
return text
end
@ -82,11 +115,11 @@ minetest.register_on_authplayer(function(name, ip, is_success)
end)
minetest.register_chatcommand("debug",{
description = S("Set debug bit mask: 0 = disable, 1 = biome name, 2 = coordinates, 3 = all"),
description = S("Set debug bit mask: 0 = disable, 1 = biome name, 2 = coordinates, 4 = mapgen status, 7 = all"),
func = function(name, params)
local dbg = math.floor(tonumber(params) or default_debug)
if dbg < 0 or dbg > 3 then
minetest.chat_send_player(name, S("Error! Possible values are integer numbers from @1 to @2", 0, 3))
if dbg < 0 or dbg > 7 then
minetest.chat_send_player(name, S("Error! Possible values are integer numbers from @1 to @2", 0, 7))
return
end
if dbg == default_debug then

View File

@ -1,4 +1,4 @@
# textdomain: mcl_info
Set debug bit mask: 0 @= disable, 1 @= biome name, 2 @= coordinates, 3 @= all=Réglage du masque de débugage : 0 @= désactiver, 1 @= nom de biome, 2 @= coordonnées, 3 @= tout=
Set debug bit mask: 0 @= disable, 1 @= biome name, 2 @= coordinates, 4 @= mapgen status, 7 @= all=Réglage du masque de débugage : 0 @= désactiver, 1 @= nom de biome, 2 @= coordonnées, 4 @= mapgen status, 7 @= tout=
Error! Possible values are integer numbers from @1 to @2=Erreur ! Les valeurs autorisées sont des nombres entiers de @1 à @2
Debug bit mask set to @1=Masque de débugage réglé à @1
Debug bit mask set to @1=Masque de débugage réglé à @1

View File

@ -1,4 +1,4 @@
# textdomain: mcl_info
Set debug bit mask: 0 @= disable, 1 @= biome name, 2 @= coordinates, 3 @= all=Установка отладочной битовой маски: 0 @= отключить, 1 @= биом, 2 @= координаты, 3 @= всё
Set debug bit mask: 0 @= disable, 1 @= biome name, 2 @= coordinates, 4 @= mapgen status, 7 @= all=Установка отладочной битовой маски: 0 @= отключить, 1 @= биом, 2 @= координаты, 4 @= состояние мапгена, 7 @= всё
Error! Possible values are integer numbers from @1 to @2=Ошибка! Допустимые значения - целые числа от @1 до @2
Debug bit mask set to @1=Отладочной битовой маске присвоено значение @1

View File

@ -1,4 +1,4 @@
# textdomain: mcl_info
Set debug bit mask: 0 @= disable, 1 @= biome name, 2 @= coordinates, 3 @= all=
Set debug bit mask: 0 @= disable, 1 @= biome name, 2 @= coordinates, 4 @= mapgen status, 7 @= all=
Error! Possible values are integer numbers from @1 to @2=
Debug bit mask set to @1=

View File

@ -3,6 +3,7 @@ Recipe book=Livre de recettes
Help=Aide
Select player skin=Sélectionnez l'apparence du joueur
Achievements=Accomplissements
Switch stack size=Échanger les tailles de piles
Building Blocks=Blocs de Construction
Decoration Blocks=Blocs de Décoration
Redstone=Redstone

View File

@ -1,2 +1,2 @@
# textdomain: mcl_observers
# textdomain: mcl_bells
Bell=Cloche

View File

@ -1,2 +1,2 @@
# textdomain: mcl_observers
# textdomain: mcl_bells
Bell=

View File

@ -0,0 +1,19 @@
# textdomain: mcl_amethyst
Amethyst Cluster= Abarolada d'Ametista
Amethyst Cluster is the final growth of amethyst bud.= L'Abarolada d'Ametista es l'etapa fin finala de creissança dau borron d'ametista.
Amethyst Shard= Esclap d'Ametista
An amethyst shard is a crystalline mineral.= Un Esclap d'Ametista es un minerau cristallin.
Block of Amethyst= Blòc d'Ametista
Budding Amethyst= Ametista Borronanta
Calcite= Calcita
Calcite can be found as part of amethyst geodes.= La Calcita pòt se trobar dins una geòda d'ametista.
Large Amethyst Bud= Borron d'Ametista Bèl
Large Amethyst Bud is the third growth of amethyst bud.= Lo Borron d'Ametista Bèl es la tresèima etapa de creissança dau borron d'ametista.
Medium Amethyst Bud= Borron d'Ametista Mejan
Medium Amethyst Bud is the second growth of amethyst bud.= Lo Borron d'Ametista Mejan es la segonda etapa de creissança dau borron d'ametista.
Small Amethyst Bud= Borron d'Ametista Pichòt
Small Amethyst Bud is the first growth of amethyst bud.= Lo Borron d'Ametista Pichòt es la pormèira etapa de creissança dau borron d'ametista.
The Block of Amethyst is a decoration block crafted from amethyst shards.= Lo Blòc d'Ametista es un blòc de decoracion fabricat dempuèi d'esclaps d'ametista.
The Budding Amethyst can grow amethyst= L'Ametista Borronanta pòt créisser l'ametista.
Tinted Glass= Veire Tintat
Tinted Glass is a type of glass which blocks lights while it is visually transparent.= Lo Veire Tintat es un tipe de veire que barra la lutz en estant clarent.

View File

@ -6,18 +6,44 @@ Iron Helmet=Casque de Fer
Golden Helmet=Casque d'Or
Diamond Helmet=Casque de Diamant
Chain Helmet=Casque de Mailles
Netherite Helmet=Casque de Netherite
Leather Tunic=Tunique en Cuir
Iron Chestplate=Plastron de Fer
Golden Chestplate=Plastron d'Or
Diamond Chestplate=Plastron de Diamant
Chain Chestplate=Cotte de Mailles
Netherite Chestplate=Plastron de Netherite
Leather Pants=Pantalon de Cuir
Iron Leggings=Jambières de Fer
Golden Leggings=Jambières d'Or
Diamond Leggings=Jambières de Diamant
Chain Leggings=Jambières de Mailles
Netherite Leggings=Jambières de Netherite
Leather Boots=Bottes de Cuir
Iron Boots=Bottes de Fer
Golden Boots=Bottes d'Or
Diamond Boots=Bottes de Diamant
Chain Boots=Bottes de Mailles
Netherite Boots=Bottes de Netherite
Elytra=Élytres
#Translations of enchantements
Increases underwater mining speed.=Augmente la vitesse de minage sous-marine.
Blast Protection=Protection contre les explosions
Reduces explosion damage and knockback.=Réduit les dégâts d'explosion et de recul.
Curse of Binding=Malédiction du lien éternel
Item cannot be removed from armor slots except due to death, breaking or in Creative Mode.=L'objet ne peut pas être retiré des emplacements d'armure sauf en cas de mort, de rupture ou en mode créatif.
Feather Falling=Chute amortie
Reduces fall damage.=Réduit les dégats de chute.
Fire Protection=Protection contre le feu
Reduces fire damage.=Reduit les dégats de feu.
Shooting consumes no regular arrows.=Le tir ne consomme pas de flèches standard.
Shoot 3 arrows at the cost of one.=Tirez sur 3 flèches au prix d'une.
Projectile Protection=Protection contre les projectiles
Reduces projectile damage.=Réduit les dommages causés par les projectiles.
Protection=Protection
Reduces most types of damage by 4% for each level.=Réduit la plupart des types de dégâts de 4% pour chaque niveau.
Thorns=Épines
Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=Reflète une partie des dégâts subis lors de la frappe, au prix d'une réduction de la durabilité à chaque déclenchement.
Aqua Affinity=Affinité aquatique

View File

@ -6,19 +6,43 @@ Iron Helmet=
Golden Helmet=
Diamond Helmet=
Chain Helmet=
Netherite Helmet=
Leather Tunic=
Iron Chestplate=
Golden Chestplate=
Diamond Chestplate=
Chain Chestplate=
Netherite Chestplate=
Leather Pants=
Iron Leggings=
Golden Leggings=
Diamond Leggings=
Chain Leggings=
Netherite Leggings=
Leather Boots=
Iron Boots=
Golden Boots=
Diamond Boots=
Chain Boots=
Netherite Boots=
Elytra=
#Translations of enchantements
Increases underwater mining speed.=
Blast Protection=
Reduces explosion damage and knockback.=
Curse of Binding=Malédiction du lien éternel
Item cannot be removed from armor slots except due to death, breaking or in Creative Mode.=
Feather Falling=
Reduces fall damage.=
Fire Protection=
Reduces fire damage.=
Shooting consumes no regular arrows.=
Shoot 3 arrows at the cost of one.=
Projectile Protection=
Reduces projectile damage.=
Protection=
Reduces most types of damage by 4% for each level.=
Thorns=
Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=
Aqua Affinity=

View File

@ -75,3 +75,4 @@ You can copy the pattern of a banner by placing two banners of the same color in
And one additional layer=Et une couche supplémentaire
And @1 additional layers=Et @1 couches supplémentaires
Paintable decoration=Décoration à peindre
Preview Banner= Aperçu de la Bannière

View File

@ -37,6 +37,7 @@ Players in bed: @1/@2=Joueurs au lit: @1/@2
Note: Night skip is disabled.=Remarque: Le saut de nuit est désactivé.
You're sleeping.=Tu dors.
You will fall asleep when all players are in bed.=Vous vous endormirez lorsque tous les joueurs seront au lit.
You will fall asleep when @1% of all players are in bed.=Vous vous endormirez lorsque @1% des joueurs seront au lit.
You're in bed.=Tu es au lit.
Allows you to sleep=Vous permet de dormir
Respawn Anchor=Ancre de Réapparition

View File

@ -245,16 +245,16 @@ minetest.register_node("mcl_blackstone:chain", {
--slabs/stairs
mcl_stairs.register_stair_and_slab_simple("blackstone", "mcl_blackstone:blackstone", "Blackstone Stair", "Blackstone Slab", "Double Blackstone Slab")
mcl_stairs.register_stair_and_slab_simple("blackstone", "mcl_blackstone:blackstone", S("Blackstone Stair"), S("Blackstone Slab"), S("Double Blackstone Slab"))
mcl_stairs.register_stair_and_slab_simple("blackstone_polished", "mcl_blackstone:blackstone_polished", "Polished Blackstone Stair", "Polished Blackstone Slab", "Polished Double Blackstone Slab")
mcl_stairs.register_stair_and_slab_simple("blackstone_polished", "mcl_blackstone:blackstone_polished", S("Polished Blackstone Stair"), S("Polished Blackstone Slab"), S("Polished Double Blackstone Slab"))
mcl_stairs.register_stair_and_slab_simple("blackstone_chiseled_polished", "mcl_blackstone:blackstone_chiseled_polished", "Polished Chiseled Blackstone Stair", "Chiseled Polished Blackstone Slab", "Double Polished Chiseled Blackstone Slab")
mcl_stairs.register_stair_and_slab_simple("blackstone_chiseled_polished", "mcl_blackstone:blackstone_chiseled_polished", S("Polished Chiseled Blackstone Stair"), S("Chiseled Polished Blackstone Slab"), S("Double Polished Chiseled Blackstone Slab"))
mcl_stairs.register_stair_and_slab_simple("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished", "Polished Blackstone Brick Stair", "Polished Blackstone Brick Slab", "Double Polished Blackstone Brick Slab")
mcl_stairs.register_stair_and_slab_simple("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished", S("Polished Blackstone Brick Stair"), S("Polished Blackstone Brick Slab"), S("Double Polished Blackstone Brick Slab"))
--Wall

View File

@ -1,18 +1,18 @@
# textdomain: mcl_blackstone
Blackstone=Roche noire
Polished Blackstone=Pierre noire
Chieseled Polished Blackstone=Pierre noire sculptée
Chiseled Polished Blackstone=Pierre noire sculptée
Polished Blackstone Bricks=Briques de pierre noire
Basalt=Basalte
Polished Basalt=Basalte taillé
Blackstone Slab=Dalle de roche noire
Polished Blackstone Slab=Dalle de pierre noire
Chieseled Polished Blackstone Slab=Dalle de pierre noire sculptée
Chiseled Polished Blackstone Slab=Dalle de pierre noire sculptée
Polished Blackstone Brick Slab=Dalle de briques de pierre noire
Blackstone Stairs=Escalier de roche noire
Polished Blackstone Stairs=Escalier de pierre noire
Chieseled Polished Blackstone Stairs=Escalier de pierre noire sculptée
Polished Blackstone Brick Stairs=Escalier de briques de pierre noire
Blackstone Stair=Escalier de roche noire
Polished Blackstone Stair=Escalier de pierre noire
Chiseled Polished Blackstone Stair=Escalier de pierre noire sculptée
Polished Blackstone Brick Stair=Escalier de briques de pierre noire
Quartz Bricks=Briques de quartz
Soul Torch=Torche des âmes
Soul Lantern=Lanterne des âmes
@ -21,3 +21,8 @@ Eternal Soul Fire=Feux éternel des âmes
Gilded Blackstone=Roche noire dorée
Nether Gold Ore=Minerai d'or du Nether
Smooth Basalt=Basalte lisse
Blackstone Wall=Muret de Roche noire
Double Blackstone Slab=Double dalle de roche noire
Polished Double Blackstone Slab=Double dalle de pierre noire
Double Polished Chiseled Blackstone Slab=Double dalle de pierre noire sculptée
Double Polished Blackstone Brick Slab=Double dalle de briques de pierre noire

View File

@ -7,12 +7,12 @@ Basalt=
Polished Basalt=
Blackstone Slab=
Polished Blackstone Slab=
Chieseled Polished Blackstone Slab=
Chiseled Polished Blackstone Slab=
Polished Blackstone Brick Slab=
Blackstone Stairs=
Polished Blackstone Stairs=
Chieseled Polished Blackstone Stairs=
Polished Blackstone Brick Stairs=
Blackstone Stair=
Polished Blackstone Stair=
Chiseled Polished Blackstone Stair=
Polished Blackstone Brick Stair=
Quartz Bricks=
Soul Torch=
Soul Lantern=
@ -22,3 +22,7 @@ Gilded Blackstone=
Nether Gold Ore=
Smooth Basalt=
Blackstone Wall=
Double Blackstone Slab=
Polished Double Blackstone Slab=
Double Polished Chiseled Blackstone Slab=
Double Polished Blackstone Brick Slab=

View File

@ -0,0 +1,8 @@
# textdomain: mcl_blast_furnace
Inventory=Inventaire
Blast Furnace=Haut Fourneau
Smelts ores faster than furnace=fond le minerai plus vite que le fourneau
Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn.=Utiliser le livre de recettes pour voir ce que vous pouvez fondre, ce que vous pouvez utiliser comme combustible et combien de temps ça va brûler.
Use the furnace to open the furnace menu.\nPlace a furnace fuel in the lower slot and the source material in the upper slot.\nThe furnace will slowly use its fuel to smelt the item.\nThe result will be placed into the output slot at the right side.=Utiliser le fourneau pour ouvrir le menu.\nPlacer le combustible dans la case en bas et le matériau source dans la case du haut.\nLe fourneau utilisera son combustible pour fondre lentement l'objet.\nLe résultat sera placé dans la case de sortie à droite.
Blast Furnaces smelt several items, mainly ores and armor, using a furnace fuel, into something else.=Les hauts fourneaux fondent plusieurs objets, principalement du minerai et des pièces d'armure, en quelque chose d'autre.
Active Blast Furnace=Haut Fourneau Actif

View File

@ -1,5 +1,8 @@
# textdomain: mcl_blast_furnace
Inventory=
Blast Furnace=
Smelts ores faster than furnace=
Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn.=
Use the furnace to open the furnace menu.\nPlace a furnace fuel in the lower slot and the source material in the upper slot.\nThe furnace will slowly use its fuel to smelt the item.\nThe result will be placed into the output slot at the right side.=
Blast Furnaces smelt several items, mainly ores and armor, using a furnace fuel, into something else.=
Active Blast Furnace=

View File

@ -13,3 +13,6 @@ Ammunition=Munition
Damage from bow: 1-10=Dégâts de l'arc: 1-10
Damage from dispenser: 3=Dégâts du distributeur: 3
Launches arrows=Lance des flèches
Crossbow=Arbalète
Crossbow is a ranged weapon to shoot arrows at your foes.=L'arbalète est une arme à distance qui tire des flèches sur vos ennemis.
To use the crossbow, 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 load an arrow into the chamber, then to shoot press left mouse.=Pour utiliser l'arbalète, il faut avoir au moins une flèche quelque part dans l'inventaire (sauf en mode créatif). Appuyez sur le bouton droit de la souris pour charger, relacher pour charger la flèche dans la chambre, puis pour tirer appuyer sur le bouton gauche de la souris.

View File

@ -0,0 +1,4 @@
# textdomain: mcl_cartography_table
Cartography Table=Table de Cartographie
Used to create or copy maps=Utilisée pour créer ou copier des cartes
Is used to create or copy maps for use..=Est utilisée pour créer ou copier des cartes..

View File

@ -0,0 +1,4 @@
# textdomain: mcl_cartography_table
Cartography Table=
Used to create or copy maps=
Is used to create or copy maps for use..=

View File

@ -1,5 +1,5 @@
# textdomain: mcl_cauldrons
Cauldron=Chaudrons
Cauldron=Chaudron
Cauldrons are used to store water and slowly fill up under rain. They can also be used to wash off banners.=Les chaudrons sont utilisés pour stocker l'eau et se remplissent lentement sous la pluie. Ils peuvent également être utilisés pour laver les bannières.
Place a water bucket into the cauldron to fill it with water. Place an empty bucket on a full cauldron to retrieve the water. Place a water bottle into the cauldron to fill the cauldron to one third with water. Place a glass bottle in a cauldron with water to retrieve one third of the water. Use an emblazoned banner on a cauldron with water to wash off its top layer.=Placez une marmite d'eau dans le chaudron pour le remplir d'eau. Placez un seau vide sur un chaudron plein pour récupérer l'eau. Placez une bouteille d'eau dans le chaudron pour remplir le chaudron au tiers avec de l'eau. Placez une bouteille en verre dans un chaudron avec de l'eau pour récupérer un tiers de l'eau. Utilisez une bannière blasonnée sur un chaudron avec de l'eau pour laver sa couche supérieure.
Cauldron (1/3 Water)=Chaudron (1/3 d'eau)

View File

@ -18,6 +18,30 @@ local entity_animations = {
}
}
-- Returns position of the neighbor of a double chest node
-- or nil if node is invalid.
-- This function assumes that the large chest is actually intact
-- * pos: Position of the node to investigate
-- * param2: param2 of that node
-- * side: Which "half" the investigated node is. "left" or "right"
local function get_double_container_neighbor_pos(pos, param2, side)
local pos = pos
local param2 = param2
if side == "right" then
if param2 == 0 then return {x=pos.x-1, y=pos.y, z=pos.z}
elseif param2 == 1 then return {x=pos.x, y=pos.y, z=pos.z+1}
elseif param2 == 2 then return {x=pos.x+1, y=pos.y, z=pos.z}
elseif param2 == 3 then return {x=pos.x, y=pos.y, z=pos.z-1}
end
else
if param2 == 0 then return {x=pos.x+1, y=pos.y, z=pos.z}
elseif param2 == 1 then return {x=pos.x, y=pos.y, z=pos.z-1}
elseif param2 == 2 then return {x=pos.x-1, y=pos.y, z=pos.z}
elseif param2 == 3 then return {x=pos.x, y=pos.y, z=pos.z+1}
end
end
end
minetest.register_entity("mcl_chests:chest", {
initial_properties = {
visual = "mesh",
@ -217,14 +241,14 @@ local function chest_update_after_close(pos)
find_or_create_entity(pos, "mcl_chests:trapped_chest_left", {"mcl_chests_trapped_double.png"}, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_left")
mesecon.receptor_off(pos, trapped_chest_mesecons_rules)
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "left")
local pos_other = get_double_container_neighbor_pos(pos, node.param2, "left")
minetest.swap_node(pos_other, {name="mcl_chests:trapped_chest_right", param2 = node.param2})
mesecon.receptor_off(pos_other, trapped_chest_mesecons_rules)
elseif node.name == "mcl_chests:trapped_chest_on_right" then
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_right", param2 = node.param2})
mesecon.receptor_off(pos, trapped_chest_mesecons_rules)
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "right")
local pos_other = get_double_container_neighbor_pos(pos, node.param2, "right")
minetest.swap_node(pos_other, {name="mcl_chests:trapped_chest_left", param2 = node.param2})
find_or_create_entity(pos_other, "mcl_chests:trapped_chest_left", {"mcl_chests_trapped_double.png"}, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_left")
mesecon.receptor_off(pos_other, trapped_chest_mesecons_rules)
@ -438,15 +462,15 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
-- BEGIN OF LISTRING WORKAROUND
inv:set_size("input", 1)
-- END OF LISTRING WORKAROUND
if minetest.get_node(mcl_util.get_double_container_neighbor_pos(pos, param2, "right")).name == "mcl_chests:"..canonical_basename.."_small" then
if minetest.get_node(get_double_container_neighbor_pos(pos, param2, "right")).name == "mcl_chests:"..canonical_basename.."_small" then
minetest.swap_node(pos, {name="mcl_chests:"..canonical_basename.."_right",param2=param2})
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "right")
local p = get_double_container_neighbor_pos(pos, param2, "right")
minetest.swap_node(p, { name = "mcl_chests:"..canonical_basename.."_left", param2 = param2 })
create_entity(p, "mcl_chests:"..canonical_basename.."_left", left_textures, param2, true, "default_chest", "mcl_chests_chest", "chest")
elseif minetest.get_node(mcl_util.get_double_container_neighbor_pos(pos, param2, "left")).name == "mcl_chests:"..canonical_basename.."_small" then
elseif minetest.get_node(get_double_container_neighbor_pos(pos, param2, "left")).name == "mcl_chests:"..canonical_basename.."_small" then
minetest.swap_node(pos, {name="mcl_chests:"..canonical_basename.."_left",param2=param2})
create_entity(pos, "mcl_chests:"..canonical_basename.."_left", left_textures, param2, true, "default_chest", "mcl_chests_chest", "chest")
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "left")
local p = get_double_container_neighbor_pos(pos, param2, "left")
minetest.swap_node(p, { name = "mcl_chests:"..canonical_basename.."_right", param2 = param2 })
else
minetest.swap_node(pos, { name = "mcl_chests:"..canonical_basename.."_small", param2 = param2 })
@ -541,7 +565,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
on_construct = function(pos)
local n = minetest.get_node(pos)
local param2 = n.param2
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "left")
local p = get_double_container_neighbor_pos(pos, param2, "left")
if not p or minetest.get_node(p).name ~= "mcl_chests:"..canonical_basename.."_right" then
n.name = "mcl_chests:"..canonical_basename.."_small"
minetest.swap_node(pos, n)
@ -560,7 +584,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
close_forms(canonical_basename, pos)
local param2 = n.param2
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "left")
local p = get_double_container_neighbor_pos(pos, param2, "left")
if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_right" then
return
end
@ -581,7 +605,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
-- BEGIN OF LISTRING WORKAROUND
elseif listname == "input" then
local inv = minetest.get_inventory({type="node", pos=pos})
local other_pos = mcl_util.get_double_container_neighbor_pos(pos, minetest.get_node(pos).param2, "left")
local other_pos = get_double_container_neighbor_pos(pos, minetest.get_node(pos).param2, "left")
local other_inv = minetest.get_inventory({type="node", pos=other_pos})
return limit_put(stack, inv, other_inv)
--[[if inv:room_for_item("main", stack) then
@ -609,7 +633,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
-- BEGIN OF LISTRING WORKAROUND
if listname == "input" then
local inv = minetest.get_inventory({type="node", pos=pos})
local other_pos = mcl_util.get_double_container_neighbor_pos(pos, minetest.get_node(pos).param2, "left")
local other_pos = get_double_container_neighbor_pos(pos, minetest.get_node(pos).param2, "left")
local other_inv = minetest.get_inventory({type="node", pos=other_pos})
inv:set_stack("input", 1, nil)
@ -626,7 +650,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
_mcl_hardness = 2.5,
on_rightclick = function(pos, node, clicker)
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "left")
local pos_other = get_double_container_neighbor_pos(pos, node.param2, "left")
local above_def = minetest.registered_nodes[minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name]
local above_def_other = minetest.registered_nodes[minetest.get_node({x = pos_other.x, y = pos_other.y + 1, z = pos_other.z}).name]
@ -692,7 +716,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
on_construct = function(pos)
local n = minetest.get_node(pos)
local param2 = n.param2
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "right")
local p = get_double_container_neighbor_pos(pos, param2, "right")
if not p or minetest.get_node(p).name ~= "mcl_chests:"..canonical_basename.."_left" then
n.name = "mcl_chests:"..canonical_basename.."_small"
minetest.swap_node(pos, n)
@ -710,7 +734,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
close_forms(canonical_basename, pos)
local param2 = n.param2
local p = mcl_util.get_double_container_neighbor_pos(pos, param2, "right")
local p = get_double_container_neighbor_pos(pos, param2, "right")
if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_left" then
return
end
@ -730,7 +754,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
return 0
-- BEGIN OF LISTRING WORKAROUND
elseif listname == "input" then
local other_pos = mcl_util.get_double_container_neighbor_pos(pos, minetest.get_node(pos).param2, "right")
local other_pos = get_double_container_neighbor_pos(pos, minetest.get_node(pos).param2, "right")
local other_inv = minetest.get_inventory({type="node", pos=other_pos})
local inv = minetest.get_inventory({type="node", pos=pos})
--[[if other_inv:room_for_item("main", stack) then
@ -757,7 +781,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
" moves stuff to chest at "..minetest.pos_to_string(pos))
-- BEGIN OF LISTRING WORKAROUND
if listname == "input" then
local other_pos = mcl_util.get_double_container_neighbor_pos(pos, minetest.get_node(pos).param2, "right")
local other_pos = get_double_container_neighbor_pos(pos, minetest.get_node(pos).param2, "right")
local other_inv = minetest.get_inventory({type="node", pos=other_pos})
local inv = minetest.get_inventory({type="node", pos=pos})
@ -775,7 +799,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
_mcl_hardness = 2.5,
on_rightclick = function(pos, node, clicker)
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "right")
local pos_other = get_double_container_neighbor_pos(pos, node.param2, "right")
if minetest.registered_nodes[minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name].groups.opaque == 1
or minetest.registered_nodes[minetest.get_node({x = pos_other.x, y = pos_other.y + 1, z = pos_other.z}).name].groups.opaque == 1 then
-- won't open if there is no space from the top
@ -892,12 +916,12 @@ register_chest("trapped_chest",
find_or_create_entity(pos, "mcl_chests:trapped_chest_on_left", {"mcl_chests_trapped_double.png"}, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_on_left")
mesecon.receptor_on(pos, trapped_chest_mesecons_rules)
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "left")
local pos_other = get_double_container_neighbor_pos(pos, node.param2, "left")
minetest.swap_node(pos_other, {name="mcl_chests:trapped_chest_on_right", param2 = node.param2})
mesecon.receptor_on(pos_other, trapped_chest_mesecons_rules)
end,
function(pos, node, clicker)
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "right")
local pos_other = get_double_container_neighbor_pos(pos, node.param2, "right")
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_on_right", param2 = node.param2})
mesecon.receptor_on(pos, trapped_chest_mesecons_rules)

View File

@ -1,7 +1,7 @@
# textdomain: mcl_composters
Composter=Composteur
Composters can convert various organic items into bonemeal.=Les composteurs convertissent divers éléments organiques en farine d'os.
Use organic items on the composter to fill it with layers of compost. Every time an item is put in the composter, there is a chance that the composter adds another layer of compost. Some items have a bigger chance of adding an extra layer than other items. After filling up with 7 layers of compost, the composter is full and bone meal can be retrieved from it. Taking out the bone meal empties the composter.=Utiliser des éléments organiques sur le composteur le remplit de couches de compost. Chaque fois qu'un élément est mis dans le composteur, il y a une chance que le composteur rajoute une couche de compost. Certains élémnets ont de plus grandes chances que d'autres d'ajouter une couche de compost. Une fois le composteur rempli de 7 couche de compost, il est plein et on peut récupérer la farine d'os.
Use organic items on the composter to fill it with layers of compost. Every time an item is put in the composter, there is a chance that the composter adds another layer of compost. Some items have a bigger chance of adding an extra layer than other items. After filling up with 7 layers of compost, the composter is full. After a delay of approximately one second the composter becomes ready and bone meal can be retrieved from it. Right-clicking the composter takes out the bone meal empties the composter.=Utiliser des éléments organiques sur le composteur le remplit de couches de compost. Chaque fois qu'un élément est mis dans le composteur, il y a une chance que le composteur rajoute une couche de compost. Certains élémnets ont de plus grandes chances que d'autres d'ajouter une couche de compost. Une fois le composteur rempli de 7 couche de compost, il est plein. Après un délai d'à peu près une seconde le composteur est prêt et on peut y récupérer la farine d'os. Cliquez droit le composteur le vide et récupère la farine d'os.
filled=plain
ready for harvest=prêt pour la récolte
Converts organic items into bonemeal=Convertit les éléments organiques en farine d'os

View File

@ -1,7 +1,7 @@
# textdomain: mcl_composters
Composter=
Composters can convert various organic items into bonemeal.=
Use organic items on the composter to fill it with layers of compost. Every time an item is put in the composter, there is a chance that the composter adds another layer of compost. Some items have a bigger chance of adding an extra layer than other items. After filling up with 7 layers of compost, the composter is full. After a delay of approximately one second the composter becomes ready and bone meal can be retrieved from it. Right-clicking the composter takes out the bone meal empties the composter."=
Use organic items on the composter to fill it with layers of compost. Every time an item is put in the composter, there is a chance that the composter adds another layer of compost. Some items have a bigger chance of adding an extra layer than other items. After filling up with 7 layers of compost, the composter is full. After a delay of approximately one second the composter becomes ready and bone meal can be retrieved from it. Right-clicking the composter takes out the bone meal empties the composter.=
filled=
ready for harvest=
Converts organic items into bonemeal=

View File

@ -4,17 +4,22 @@
local modpath = minetest.get_modpath(minetest.get_current_modname())
local minetest_get_item_group = minetest.get_item_group
local minetest_get_node = minetest.get_node
local math = math
local vector = vector
local math_random = math.random
local minetest_after = minetest.after
local minetest_get_node = minetest.get_node
local minetest_get_node_drops = minetest.get_node_drops
local minetest_get_node_or_nil = minetest.get_node_or_nil
local minetest_get_node_light = minetest.get_node_light
local minetest_get_item_group = minetest.get_item_group
local mcl_time_get_number_of_times_at_pos = mcl_time.get_number_of_times_at_pos
local minetest_get_objects_inside_radius = minetest.get_objects_inside_radius
local minetest_registered_nodes = minetest.registered_nodes
local mg_name = mcl_mapgen.name
local v6 = mcl_mapgen.v6
local math = math
local vector = vector
local OAK_TREE_ID = 1
local DARK_OAK_TREE_ID = 2
local SPRUCE_TREE_ID = 3
@ -31,11 +36,11 @@ minetest.register_abm({
action = function(pos, node, active_object_count, active_object_count_wider)
local water = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+1, z=pos.z+1}, "group:water")
local lavatype = minetest.registered_nodes[node.name].liquidtype
local lavatype = minetest_registered_nodes[node.name].liquidtype
for w=1, #water do
--local waternode = minetest.get_node(water[w])
--local watertype = minetest.registered_nodes[waternode.name].liquidtype
--local waternode = minetest_get_node(water[w])
--local watertype = minetest_registered_nodes[waternode.name].liquidtype
-- Lava on top of water: Water turns into stone
if water[w].y < pos.y and water[w].x == pos.x and water[w].z == pos.z then
minetest.set_node(water[w], {name="mcl_core:stone"})
@ -77,7 +82,7 @@ local lava_spark_census = 0
function mcl_core.lava_spark_set_chance()
lava_spark_chance = lava_spark_limit / lava_spark_abm_census
minetest.after(LAVA_SPARK_ABM_INTERVAL, mcl_core.lava_spark_set_chance)
minetest_after(LAVA_SPARK_ABM_INTERVAL, mcl_core.lava_spark_set_chance)
lava_spark_abm_census = 0
lava_spark_census = 0
end
@ -85,38 +90,38 @@ end
function lava_spark_add(pos)
local node = minetest_get_node(pos)
if minetest_get_item_group(node.name, "lava") == 0 then return end
local above = minetest.get_node(vector.new(pos.x, pos.y + 1, pos.z))
local above = minetest_get_node(vector.new(pos.x, pos.y + 1, pos.z))
if above.name ~= "air" then return end
local pos_addend = vector.new(
(math.random() - 0.5) * 0.8,
(math.random() - 0.5) * 0.8,
(math.random() - 0.5) * 0.8
(math_random() - 0.5) * 0.8,
(math_random() - 0.5) * 0.8,
(math_random() - 0.5) * 0.8
)
local spark_pos = vector.add(pos, pos_addend)
local spark = minetest.add_entity(spark_pos, "mcl_core:lava_spark")
if not spark then return end
local velocity = vector.new(
(math.random() - 0.5) * 3,
(math.random() + 2) * 2,
(math.random() - 0.5) * 3
(math_random() - 0.5) * 3,
(math_random() + 2) * 2,
(math_random() - 0.5) * 3
)
spark:set_velocity(velocity)
spark:set_acceleration(vector.new(0, -9, 0))
-- Set a random size
local size = 0.2 + math.random() * 0.2
local size = 0.2 + math_random() * 0.2
local props = spark:get_properties()
if not props then return end
props.visual_size = vector.new(size, size, size)
spark:set_properties(props)
local luaentity = spark:get_luaentity()
if not luaentity then return end
luaentity._life_timer = 0.4 + math.random()
luaentity._life_timer = 0.4 + math_random()
end
if lava_spark_limit > 0 then
@ -129,7 +134,7 @@ if lava_spark_limit > 0 then
interval = LAVA_SPARK_ABM_INTERVAL,
chance = 18,
action = function(pos, node)
local above = minetest_get_node({x = pos.x, y = pos.y + 1, z = pos.z})
local above = minetest_get_node(vector.new(pos.x, pos.y + 1, pos.z))
if above.name ~= "air" then return end
lava_spark_abm_census = lava_spark_abm_census + 1
@ -164,7 +169,7 @@ minetest.register_entity("mcl_core:lava_spark", {
self._smoke_timer = self._smoke_timer - dtime
if self._smoke_timer > 0 then return end
self._smoke_timer = 0.2 + math.random() * 0.3
self._smoke_timer = 0.2 + math_random() * 0.3
local pos = self.object:get_pos()
@ -190,44 +195,23 @@ minetest.register_entity("mcl_core:lava_spark", {
end
})
--
-- Papyrus and cactus growing
--
-- Functions
function mcl_core.grow_cactus(pos, node)
pos.y = pos.y-1
local name = minetest.get_node(pos).name
if minetest.get_item_group(name, "sand") ~= 0 then
pos.y = pos.y+1
local height = 0
while minetest.get_node(pos).name == "mcl_core:cactus" and height < 4 do
height = height+1
pos.y = pos.y+1
end
if height < 3 then
if minetest.get_node(pos).name == "air" then
minetest.set_node(pos, {name="mcl_core:cactus"})
end
end
end
end
function mcl_core.grow_reeds(pos, node)
pos.y = pos.y-1
local name = minetest.get_node(pos).name
if minetest.get_item_group(name, "soil_sugarcane") ~= 0 then
local name = minetest_get_node(pos).name
if minetest_get_item_group(name, "soil_sugarcane") ~= 0 then
if minetest.find_node_near(pos, 1, {"group:water"}) == nil and minetest.find_node_near(pos, 1, {"group:frosted_ice"}) == nil then
return
end
pos.y = pos.y+1
local height = 0
while minetest.get_node(pos).name == "mcl_core:reeds" and height < 3 do
while minetest_get_node(pos).name == "mcl_core:reeds" and height < 3 do
height = height+1
pos.y = pos.y+1
end
if height < 3 then
if minetest.get_node(pos).name == "air" then
if minetest_get_node(pos).name == "air" then
minetest.set_node(pos, {name="mcl_core:reeds"})
end
end
@ -236,18 +220,17 @@ end
-- ABMs
local function drop_attached_node(p)
local nn = minetest.get_node(p).name
local nn = minetest_get_node(p).name
if nn == "air" or nn == "ignore" then
return
end
minetest.remove_node(p)
for _, item in pairs(minetest.get_node_drops(nn, "")) do
for _, item in pairs(minetest_get_node_drops(nn, "")) do
local pos = {
x = p.x + math.random()/2 - 0.25,
y = p.y + math.random()/2 - 0.25,
z = p.z + math.random()/2 - 0.25,
x = p.x + math_random()/2 - 0.25,
y = p.y + math_random()/2 - 0.25,
z = p.z + math_random()/2 - 0.25,
}
if item ~= "" then
minetest.add_item(pos, item)
@ -259,11 +242,11 @@ end
local function liquid_flow_action(pos, group, action)
local function check_detach(pos, xp, yp, zp)
local p = {x=pos.x+xp, y=pos.y+yp, z=pos.z+zp}
local n = minetest.get_node_or_nil(p)
local n = minetest_get_node_or_nil(p)
if not n then
return false
end
local d = minetest.registered_nodes[n.name]
local d = minetest_registered_nodes[n.name]
if not d then
return false
end
@ -272,7 +255,7 @@ local function liquid_flow_action(pos, group, action)
* 2a: If target node is below liquid, always succeed
* 2b: If target node is horizontal to liquid: succeed if source, otherwise check param2 for horizontal flow direction ]]
local range = d.liquid_range or 8
if (minetest.get_item_group(n.name, group) ~= 0) and
if (minetest_get_item_group(n.name, group) ~= 0) and
((yp > 0) or
(yp == 0 and ((d.liquidtype == "source") or (n.param2 > (8-range) and n.param2 < 9)))) then
action(pos)
@ -321,17 +304,23 @@ minetest.register_abm({
end,
})
-- Cactus mechanisms
minetest.register_abm({
label = "Cactus growth",
nodenames = {"mcl_core:cactus"},
neighbors = {"group:sand"},
interval = 25,
chance = 10,
action = function(pos)
mcl_core.grow_cactus(pos)
end,
})
local function cactus_grow(pos, node)
local pos = pos
local y = pos.y
pos.y = y - 1
local name = minetest_get_node(pos).name
if minetest_get_item_group(name, "sand") == 0 then return end
for i = 1, 2 do
pos.y = y + i
name = minetest_get_node(pos).name
if name == "air" then
minetest.set_node(pos, {name = "mcl_core:cactus"})
return
end
if name ~= "mcl_core:cactus" then return end
end
end
minetest.register_abm({
label = "Cactus mechanisms",
@ -339,39 +328,34 @@ minetest.register_abm({
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
for _, object in pairs(minetest.get_objects_inside_radius(pos, 0.9)) do
local pos = pos
local x, y, z = pos.x, pos.y, pos.z
if minetest_registered_nodes[minetest_get_node({x = x + 1, y = y, z = z}).name].walkable
or minetest_registered_nodes[minetest_get_node({x = x - 1, y = y, z = z}).name].walkable
or minetest_registered_nodes[minetest_get_node({x = x, y = y, z = z + 1}).name].walkable
or minetest_registered_nodes[minetest_get_node({x = x, y = y, z = z - 1}).name].walkable
then
while minetest_get_node(pos).name == "mcl_core:cactus" do
minetest.remove_node(pos)
minetest.add_item(vector.offset(pos, math_random(-0.5, 0.5), 0, math_random(-0.5, 0.5)), "mcl_core:cactus")
pos.y = pos.y + 1
end
return
end
for _, object in pairs(minetest_get_objects_inside_radius(pos, 0.9)) do
local entity = object:get_luaentity()
if entity then
local entity_name = entity.name
if entity_name == "__builtin:item" then
object:remove()
elseif entity_name == "mcl_minecarts:minecart" then
local pos = object:get_pos()
local driver = entity._driver
if driver then
mcl_player.player_attached[driver] = nil
local player = minetest.get_player_by_name(driver)
player:set_detach()
player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
mcl_player.player_set_animation(player, "stand" , 30)
end
minetest.add_item(pos, "mcl_minecarts:minecart")
object:remove()
end
end
end
local posses = { { 1, 0 }, { -1, 0 }, { 0, 1 }, { 0, -1 } }
for _, p in pairs(posses) do
if minetest.registered_nodes[minetest.get_node(vector.new(pos.x + p[1], pos.y, pos.z + p[2])).name].walkable then
local posy = pos.y
while minetest.get_node(vector.new(pos.x, posy, pos.z)).name == "mcl_core:cactus" do
local pos = vector.new(pos.x, posy, pos.z)
minetest.remove_node(pos)
minetest.add_item(vector.offset(pos, math.random(-0.5, 0.5), 0, math.random(-0.5, 0.5)), "mcl_core:cactus")
posy = posy + 1
end
break
end
for i = 1, mcl_time_get_number_of_times_at_pos(pos, 25, 10) do
cactus_grow(pos)
end
end,
})
@ -398,7 +382,7 @@ minetest.register_on_dignode(function(pos, node)
local i=1
while timber_nodenames[i]~=nil do
local np={x=pos.x, y=pos.y+1, z=pos.z}
while minetest.get_node(np).name==timber_nodenames[i] do
while minetest_get_node(np).name==timber_nodenames[i] do
minetest.remove_node(np)
minetest.add_item(np, timber_nodenames[i])
np={x=np.x, y=np.y+1, z=np.z}
@ -408,7 +392,7 @@ minetest.register_on_dignode(function(pos, node)
end)
local function air_leaf(leaftype)
if math.random(0, 50) == 3 then
if math_random(0, 50) == 3 then
return {name = "air"}
else
return {name = leaftype}
@ -422,7 +406,7 @@ local function node_stops_growth(node)
return false
end
local def = minetest.registered_nodes[node.name]
local def = minetest_registered_nodes[node.name]
if not def then
return true
end
@ -455,7 +439,7 @@ local function check_growth_width(pos, width, height)
pos.x + x,
pos.y + y,
pos.z + z)
if node_stops_growth(minetest.get_node(np)) then
if node_stops_growth(minetest_get_node(np)) then
return false
end
end
@ -507,10 +491,10 @@ end
-- oak tree.
function mcl_core.generate_tree(pos, tree_type, options)
pos.y = pos.y-1
--local nodename = minetest.get_node(pos).name
--local nodename = minetest_get_node(pos).name
pos.y = pos.y+1
if not minetest.get_node_light(pos) then
if not minetest_get_node_light(pos) then
return
end
@ -563,7 +547,7 @@ function mcl_core.generate_v6_oak_tree(pos)
local node
for dy=1,4 do
pos.y = pos.y+dy
if minetest.get_node(pos).name ~= "air" then
if minetest_get_node(pos).name ~= "air" then
return
end
pos.y = pos.y-dy
@ -571,7 +555,7 @@ function mcl_core.generate_v6_oak_tree(pos)
node = {name = trunk}
for dy=0,4 do
pos.y = pos.y+dy
if minetest.get_node(pos).name == "air" then
if minetest_get_node(pos).name == "air" then
minetest.add_node(pos, node)
end
pos.y = pos.y-dy
@ -580,7 +564,7 @@ function mcl_core.generate_v6_oak_tree(pos)
node = {name = leaves}
pos.y = pos.y+3
--[[local rarity = 0
if math.random(0, 10) == 3 then
if math_random(0, 10) == 3 then
rarity = 1
end]]
for dx=-2,2 do
@ -591,23 +575,23 @@ function mcl_core.generate_v6_oak_tree(pos)
pos.z = pos.z+dz
if dx == 0 and dz == 0 and dy==3 then
if minetest.get_node(pos).name == "air" and math.random(1, 5) <= 4 then
if minetest_get_node(pos).name == "air" and math_random(1, 5) <= 4 then
minetest.add_node(pos, node)
minetest.add_node(pos, air_leaf(leaves))
end
elseif dx == 0 and dz == 0 and dy==4 then
if minetest.get_node(pos).name == "air" and math.random(1, 5) <= 4 then
if minetest_get_node(pos).name == "air" and math_random(1, 5) <= 4 then
minetest.add_node(pos, node)
minetest.add_node(pos, air_leaf(leaves))
end
elseif math.abs(dx) ~= 2 and math.abs(dz) ~= 2 then
if minetest.get_node(pos).name == "air" then
if minetest_get_node(pos).name == "air" then
minetest.add_node(pos, node)
minetest.add_node(pos, air_leaf(leaves))
end
else
if math.abs(dx) ~= 2 or math.abs(dz) ~= 2 then
if minetest.get_node(pos).name == "air" and math.random(1, 5) <= 4 then
if minetest_get_node(pos).name == "air" and math_random(1, 5) <= 4 then
minetest.add_node(pos, node)
minetest.add_node(pos, air_leaf(leaves))
end
@ -625,14 +609,14 @@ end
function mcl_core.generate_balloon_oak_tree(pos)
local path
local offset
local s = math.random(1, 12)
local s = math_random(1, 12)
if s == 1 then
-- Small balloon oak
path = modpath .. "/schematics/mcl_core_oak_balloon.mts"
offset = { x = -2, y = -1, z = -2 }
else
-- Large balloon oak
local t = math.random(1, 4)
local t = math_random(1, 4)
path = modpath .. "/schematics/mcl_core_oak_large_"..t..".mts"
if t == 1 or t == 3 then
offset = { x = -3, y = -1, z = -3 }
@ -671,7 +655,7 @@ end
function mcl_core.generate_v6_spruce_tree(pos)
local x, y, z = pos.x, pos.y, pos.z
local maxy = y + math.random(9, 13) -- Trunk top
local maxy = y + math_random(9, 13) -- Trunk top
local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore")
@ -694,7 +678,7 @@ function mcl_core.generate_v6_spruce_tree(pos)
local vi = a:index(x - dev, yy, zz)
local via = a:index(x - dev, yy + 1, zz)
for xx = x - dev, x + dev do
if math.random() < 0.95 - dev * 0.05 then
if math_random() < 0.95 - dev * 0.05 then
add_spruce_leaves(data, vi, c_air, c_ignore, c_snow,
c_spruce_leaves)
end
@ -714,9 +698,9 @@ function mcl_core.generate_v6_spruce_tree(pos)
-- Lower branches layer
local my = 0
for i = 1, 20 do -- Random 2x2 squares of leaves
local xi = x + math.random(-3, 2)
local yy = maxy + math.random(-6, -5)
local zi = z + math.random(-3, 2)
local xi = x + math_random(-3, 2)
local yy = maxy + math_random(-6, -5)
local zi = z + math_random(-3, 2)
if yy > my then
my = yy
end
@ -738,7 +722,7 @@ function mcl_core.generate_v6_spruce_tree(pos)
local vi = a:index(x - dev, yy, zz)
local via = a:index(x - dev, yy + 1, zz)
for xx = x - dev, x + dev do
if math.random() < 0.95 - dev * 0.05 then
if math_random() < 0.95 - dev * 0.05 then
add_spruce_leaves(data, vi, c_air, c_ignore, c_snow,
c_spruce_leaves)
end
@ -766,14 +750,14 @@ function mcl_core.generate_v6_spruce_tree(pos)
end
function mcl_core.generate_spruce_tree(pos)
local r = math.random(1, 3)
local r = math_random(1, 3)
local path = modpath .. "/schematics/mcl_core_spruce_"..r..".mts"
minetest.place_schematic({ x = pos.x - 3, y = pos.y - 1, z = pos.z - 3 }, path, "0", nil, false)
end
function mcl_core.generate_huge_spruce_tree(pos)
local r1 = math.random(1, 2)
local r2 = math.random(1, 4)
local r1 = math_random(1, 2)
local r2 = math_random(1, 4)
local path
local offset = { x = -4, y = -1, z = -5 }
if r1 <= 2 then
@ -793,7 +777,7 @@ end
-- Acacia tree (multiple variants)
function mcl_core.generate_acacia_tree(pos)
local r = math.random(1, 7)
local r = math_random(1, 7)
local offset = vector.new()
if r == 2 or r == 3 then
offset = { x = -4, y = -1, z = -4 }
@ -845,9 +829,9 @@ local function add_trunk_and_leaves(data, a, pos, tree_cid, leaves_cid,
-- Randomly add leaves in 2x2x2 clusters.
for i = 1, iters do
local clust_x = x + math.random(-size, size - 1)
local clust_y = y + height + math.random(-size, 0)
local clust_z = z + math.random(-size, size - 1)
local clust_x = x + math_random(-size, size - 1)
local clust_y = y + height + math_random(-size, 0)
local clust_z = z + math_random(-size, size - 1)
for xi = 0, 1 do
for yi = 0, 1 do
@ -871,7 +855,7 @@ function mcl_core.generate_v6_jungle_tree(pos)
--]]
local x, y, z = pos.x, pos.y, pos.z
local height = math.random(8, 12)
local height = math_random(8, 12)
local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore")
local c_jungletree = minetest.get_content_id("mcl_core:jungletree")
@ -892,7 +876,7 @@ function mcl_core.generate_v6_jungle_tree(pos)
local vi_1 = a:index(x - 1, y - 1, z + z_dist)
local vi_2 = a:index(x - 1, y, z + z_dist)
for x_dist = -1, 1 do
if math.random(1, 3) >= 2 then
if math_random(1, 3) >= 2 then
if data[vi_1] == c_air or data[vi_1] == c_ignore then
data[vi_1] = c_jungletree
elseif data[vi_2] == c_air or data[vi_2] == c_ignore then
@ -917,7 +901,7 @@ end
-- With pos being the lower X and the higher Z value of the trunk.
function mcl_core.generate_huge_jungle_tree(pos)
-- 2 variants
local r = math.random(1, 2)
local r = math_random(1, 2)
local path = modpath.."/schematics/mcl_core_jungle_tree_huge_"..r..".mts"
minetest.place_schematic({x = pos.x - 6, y = pos.y - 1, z = pos.z - 7}, path, "random", nil, false)
end
@ -959,12 +943,12 @@ minetest.register_abm({
return
end
local above = {x=pos.x, y=pos.y+1, z=pos.z}
local abovenode = minetest.get_node(above)
if minetest.get_item_group(abovenode.name, "liquid") ~= 0 or minetest.get_item_group(abovenode.name, "opaque") == 1 then
local abovenode = minetest_get_node(above)
if minetest_get_item_group(abovenode.name, "liquid") ~= 0 or minetest_get_item_group(abovenode.name, "opaque") == 1 then
-- Never grow directly below liquids or opaque blocks
return
end
local light_self = minetest.get_node_light(above)
local light_self = minetest_get_node_light(above)
if not light_self then return end
--[[ Try to find a spreading dirt-type block (e.g. grass block or mycelium)
within a 3×5×3 area, with the source block being on the 2nd-topmost layer. ]]
@ -979,20 +963,20 @@ minetest.register_abm({
-- Found it! Now check light levels!
local source_above = {x=p2.x, y=p2.y+1, z=p2.z}
local light_source = minetest.get_node_light(source_above)
local light_source = minetest_get_node_light(source_above)
if not light_source then return end
if light_self >= 4 and light_source >= 9 then
-- All checks passed! Let's spread the grass/mycelium!
local n2 = minetest.get_node(p2)
if minetest.get_item_group(n2.name, "grass_block") ~= 0 then
local n2 = minetest_get_node(p2)
if minetest_get_item_group(n2.name, "grass_block") ~= 0 then
n2 = mcl_core.get_grass_block_type(pos)
end
minetest.set_node(pos, {name=n2.name})
-- If this was mycelium, uproot plant above
if n2.name == "mcl_core:mycelium" then
local tad = minetest.registered_nodes[minetest.get_node(above).name]
local tad = minetest_registered_nodes[minetest_get_node(above).name]
if tad.groups and tad.groups.non_mycelium_plant then
minetest.dig_node(above)
end
@ -1010,9 +994,9 @@ minetest.register_abm({
catch_up = false,
action = function(pos, node)
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
local name = minetest.get_node(above).name
local name = minetest_get_node(above).name
-- Kill grass/mycelium when below opaque block or liquid
if name ~= "ignore" and (minetest.get_item_group(name, "opaque") == 1 or minetest.get_item_group(name, "liquid") ~= 0) then
if name ~= "ignore" and (minetest_get_item_group(name, "opaque") == 1 or minetest_get_item_group(name, "liquid") ~= 0) then
minetest.set_node(pos, {name = "mcl_core:dirt"})
end
end
@ -1020,11 +1004,11 @@ minetest.register_abm({
-- Turn Grass Path and similar nodes to Dirt if a solid node is placed above it
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
if minetest.get_item_group(newnode.name, "solid") ~= 0 or
minetest.get_item_group(newnode.name, "dirtifier") ~= 0 then
if minetest_get_item_group(newnode.name, "solid") ~= 0 or
minetest_get_item_group(newnode.name, "dirtifier") ~= 0 then
local below = {x=pos.x, y=pos.y-1, z=pos.z}
local belownode = minetest.get_node(below)
if minetest.get_item_group(belownode.name, "dirtifies_below_solid") == 1 then
local belownode = minetest_get_node(below)
if minetest_get_item_group(belownode.name, "dirtifies_below_solid") == 1 then
minetest.set_node(below, {name="mcl_core:dirt"})
end
end
@ -1038,8 +1022,8 @@ minetest.register_abm({
chance = 50,
action = function(pos, node)
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
local name = minetest.get_node(above).name
local nodedef = minetest.registered_nodes[name]
local name = minetest_get_node(above).name
local nodedef = minetest_registered_nodes[name]
if name ~= "ignore" and nodedef and (nodedef.groups and nodedef.groups.solid) then
minetest.set_node(pos, {name = "mcl_core:dirt"})
end
@ -1088,7 +1072,7 @@ local function sapling_grow_action(tree_id, soil_needed, one_by_one, two_by_two,
local meta = minetest.get_meta(pos)
if meta:get("grown") then return end
-- Checks if the sapling at pos has enough light and the correct soil
local light = minetest.get_node_light(pos)
local light = minetest_get_node_light(pos)
if not light then return end
local low_light = (light < treelight)
@ -1106,13 +1090,13 @@ local function sapling_grow_action(tree_id, soil_needed, one_by_one, two_by_two,
if low_light then
if delta < 1.2 then return end
if minetest.get_node_light(pos, 0.5) < treelight then return end
if minetest_get_node_light(pos, 0.5) < treelight then return end
end
-- TODO: delta is [days] missed in inactive area. Currently we just add it to stage, which is far from a perfect calculation...
local soilnode = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
local soiltype = minetest.get_item_group(soilnode.name, "soil_sapling")
local soilnode = minetest_get_node({x=pos.x, y=pos.y-1, z=pos.z})
local soiltype = minetest_get_item_group(soilnode.name, "soil_sapling")
if soiltype < soil_needed then return end
-- Increase and check growth stage
@ -1126,7 +1110,7 @@ local function sapling_grow_action(tree_id, soil_needed, one_by_one, two_by_two,
if two_by_two then
-- Check 8 surrounding saplings and try to find a 2×2 pattern
local function is_sapling(pos, sapling)
return minetest.get_node(pos).name == sapling
return minetest_get_node(pos).name == sapling
end
local p2 = {x=pos.x+1, y=pos.y, z=pos.z}
local p3 = {x=pos.x, y=pos.y, z=pos.z-1}
@ -1178,7 +1162,7 @@ local function sapling_grow_action(tree_id, soil_needed, one_by_one, two_by_two,
end
if one_by_one and tree_id == OAK_TREE_ID then
-- There is a chance that this tree wants to grow as a balloon oak
if math.random(1, 12) == 1 then
if math_random(1, 12) == 1 then
-- Check if there is room for that
if check_tree_growth(pos, tree_id, { balloon = true }) then
minetest.set_node(pos, {name="air"})
@ -1191,7 +1175,7 @@ local function sapling_grow_action(tree_id, soil_needed, one_by_one, two_by_two,
if one_by_one and check_tree_growth(pos, tree_id) then
-- Single sapling
minetest.set_node(pos, {name="air"})
--local r = math.random(1, 12)
--local r = math_random(1, 12)
mcl_core.generate_tree(pos, tree_id)
return
end
@ -1210,7 +1194,7 @@ local grow_birch = sapling_grow_action(BIRCH_TREE_ID, 1, true, false)
-- Attempts to grow the sapling at the specified position
-- pos: Position
-- node: Node table of the node at this position, from minetest.get_node
-- node: Node table of the node at this position, from minetest_get_node
-- Returns true on success and false on failure
function mcl_core.grow_sapling(pos, node)
local grow
@ -1342,7 +1326,7 @@ minetest.register_lbm({
local function leafdecay_particles(pos, node)
minetest.add_particlespawner({
amount = math.random(10, 20),
amount = math_random(10, 20),
time = 0.1,
minpos = vector.add(pos, {x=-0.4, y=-0.4, z=-0.4}),
maxpos = vector.add(pos, {x=0.4, y=0.4, z=0.4}),
@ -1380,7 +1364,7 @@ local function vinedecay_particles(pos, node)
end
minetest.add_particlespawner({
amount = math.random(8, 16),
amount = math_random(8, 16),
time = 0.1,
minpos = vector.add(pos, relpos1),
maxpos = vector.add(pos, relpos2),
@ -1418,8 +1402,8 @@ minetest.register_abm({
-- Add vines below pos (if empty)
local function spread_down(origin, target, dir, node)
if math.random(1, 2) == 1 then
if minetest.get_node(target).name == "air" then
if math_random(1, 2) == 1 then
if minetest_get_node(target).name == "air" then
minetest.add_node(target, {name = "mcl_core:vine", param2 = node.param2})
end
end
@ -1430,11 +1414,11 @@ minetest.register_abm({
local vines_in_area = minetest.find_nodes_in_area({x=origin.x-4, y=origin.y-1, z=origin.z-4}, {x=origin.x+4, y=origin.y+1, z=origin.z+4}, "mcl_core:vine")
-- Less then 4 vines blocks around the ticked vines block (remember the ticked block is counted by above function as well)
if #vines_in_area < 5 then
if math.random(1, 2) == 1 then
if minetest.get_node(target).name == "air" then
if math_random(1, 2) == 1 then
if minetest_get_node(target).name == "air" then
local backup_dir = minetest.wallmounted_to_dir(node.param2)
local backup = vector.subtract(target, backup_dir)
local backupnodename = minetest.get_node(backup).name
local backupnodename = minetest_get_node(backup).name
-- Check if the block above is supported
if mcl_core.supports_vines(backupnodename) then
@ -1452,10 +1436,10 @@ minetest.register_abm({
-- Spread horizontally
local backup_dir = minetest.wallmounted_to_dir(node.param2)
if not vector.equals(backup_dir, dir) then
local target_node = minetest.get_node(target)
local target_node = minetest_get_node(target)
if target_node.name == "air" then
local backup = vector.add(target, backup_dir)
local backupnodename = minetest.get_node(backup).name
local backupnodename = minetest_get_node(backup).name
if mcl_core.supports_vines(backupnodename) then
minetest.add_node(target, {name = "mcl_core:vine", param2 = node.param2})
end
@ -1473,7 +1457,7 @@ minetest.register_abm({
{ { x= 0, y= 0, z=-1 }, spread_horizontal },
}
local d = math.random(1, #directions)
local d = math_random(1, #directions)
local dir = directions[d][1]
local spread = directions[d][2]
@ -1483,7 +1467,7 @@ minetest.register_abm({
-- Returns true of the node supports vines
function mcl_core.supports_vines(nodename)
local def = minetest.registered_nodes[nodename]
local def = minetest_registered_nodes[nodename]
-- Rules: 1) walkable 2) full cube
return def.walkable and
(def.node_box == nil or def.node_box.type == "regular") and
@ -1521,11 +1505,11 @@ minetest.register_abm({
action = function(p0, node, _, _)
local do_preserve = false
local d = minetest.registered_nodes[node.name].groups.leafdecay
local d = minetest_registered_nodes[node.name].groups.leafdecay
if not d or d == 0 then
return
end
local n0 = minetest.get_node(p0)
local n0 = minetest_get_node(p0)
if n0.param2 ~= 0 then
-- Prevent leafdecay for player-placed leaves.
-- param2 is set to 1 after it was placed by the player
@ -1536,8 +1520,8 @@ minetest.register_abm({
p0_hash = minetest.hash_node_position(p0)
local trunkp = mcl_core.leafdecay_trunk_cache[p0_hash]
if trunkp then
local n = minetest.get_node(trunkp)
local reg = minetest.registered_nodes[n.name]
local n = minetest_get_node(trunkp)
local reg = minetest_registered_nodes[n.name]
-- Assume ignore is a trunk, to make the thing work at the border of the active area
if n.name == "ignore" or (reg and reg.groups.tree and reg.groups.tree ~= 0) then
return
@ -1562,12 +1546,12 @@ minetest.register_abm({
end
if not do_preserve then
-- Drop stuff other than the node itself
local itemstacks = minetest.get_node_drops(n0.name)
local itemstacks = minetest_get_node_drops(n0.name)
for _, itemname in pairs(itemstacks) do
local p_drop = {
x = p0.x - 0.5 + math.random(),
y = p0.y - 0.5 + math.random(),
z = p0.z - 0.5 + math.random(),
x = p0.x - 0.5 + math_random(),
y = p0.y - 0.5 + math_random(),
z = p0.z - 0.5 + math_random(),
}
minetest.add_item(p_drop, itemname)
end
@ -1586,7 +1570,7 @@ minetest.register_abm({
}
for s=1, #surround do
local spos = vector.add(p0, surround[s])
local maybe_vine = minetest.get_node(spos)
local maybe_vine = minetest_get_node(spos)
--local surround_inverse = vector.multiply(surround[s], -1)
if maybe_vine.name == "mcl_core:vine" and (not mcl_core.check_vines_supported(spos, maybe_vine)) then
minetest.remove_node(spos)
@ -1627,7 +1611,7 @@ minetest.register_abm({
interval = 16,
chance = 8,
action = function(pos, node)
if minetest.get_node_light(pos, 0) >= 12 then
if minetest_get_node_light(pos, 0) >= 12 then
if node.name == "mcl_core:ice" then
mcl_core.melt_ice(pos)
else
@ -1645,7 +1629,7 @@ function mcl_core.check_vines_supported(pos, node)
local supported = false
local dir = minetest.wallmounted_to_dir(node.param2)
local pos1 = vector.add(pos, dir)
local node_neighbor = minetest.get_node(pos1)
local node_neighbor = minetest_get_node(pos1)
-- Check if vines are attached to a solid block.
-- If ignore, we assume its solid.
if node_neighbor.name == "ignore" or mcl_core.supports_vines(node_neighbor.name) then
@ -1654,7 +1638,7 @@ function mcl_core.check_vines_supported(pos, node)
-- Vines are not attached, now we check if the vines are “hanging” below another vines block
-- of equal orientation.
local pos2 = vector.add(pos, {x=0, y=1, z=0})
local node2 = minetest.get_node(pos2)
local node2 = minetest_get_node(pos2)
-- Again, ignore means we assume its supported
if node2.name == "ignore" or (node2.name == "mcl_core:vine" and node2.param2 == node.param2) then
supported = true
@ -1667,7 +1651,7 @@ end
function mcl_core.melt_ice(pos)
-- Create a water source if ice is destroyed and there was something below it
local below = {x=pos.x, y=pos.y-1, z=pos.z}
local belownode = minetest.get_node(below)
local belownode = minetest_get_node(below)
local dim = mcl_worlds.pos_to_dimension(below)
if dim ~= "nether" and belownode.name ~= "air" and belownode.name ~= "ignore" and belownode.name ~= "mcl_core:void" then
minetest.set_node(pos, {name="mcl_core:water_source"})
@ -1702,7 +1686,7 @@ end
-- The snowable nodes also MUST have _mcl_snowed defined to contain the name
-- of the snowed node.
function mcl_core.register_snowed_node(itemstring_snowed, itemstring_clear, tiles, sounds, clear_colorization, desc)
local def = table.copy(minetest.registered_nodes[itemstring_clear])
local def = table.copy(minetest_registered_nodes[itemstring_clear])
local create_doc_alias
if def.description then
create_doc_alias = true
@ -1765,7 +1749,7 @@ end
-- This function assumes there is no snow cover node above. This function
-- MUST NOT be called if there is a snow cover node above pos.
function mcl_core.clear_snow_dirt(pos, node)
local def = minetest.registered_nodes[node.name]
local def = minetest_registered_nodes[node.name]
if def._mcl_snowless then
minetest.swap_node(pos, {name = def._mcl_snowless, param2=node.param2})
end
@ -1778,15 +1762,15 @@ end
-- Makes constructed snowable node snowed if placed below a snow cover node.
function mcl_core.on_snowable_construct(pos)
-- Myself
local node = minetest.get_node(pos)
local node = minetest_get_node(pos)
-- Above
local apos = {x=pos.x, y=pos.y+1, z=pos.z}
local anode = minetest.get_node(apos)
local anode = minetest_get_node(apos)
-- Make snowed if needed
if minetest.get_item_group(anode.name, "snow_cover") == 1 then
local def = minetest.registered_nodes[node.name]
if minetest_get_item_group(anode.name, "snow_cover") == 1 then
local def = minetest_registered_nodes[node.name]
if def._mcl_snowed then
minetest.swap_node(pos, {name = def._mcl_snowed, param2=node.param2})
end
@ -1806,8 +1790,8 @@ end
-- Makes snowable node below snowed.
function mcl_core.on_snow_construct(pos)
local npos = {x=pos.x, y=pos.y-1, z=pos.z}
local node = minetest.get_node(npos)
local def = minetest.registered_nodes[node.name]
local node = minetest_get_node(npos)
local def = minetest_registered_nodes[node.name]
if def._mcl_snowed then
minetest.swap_node(npos, {name = def._mcl_snowed, param2=node.param2})
end
@ -1815,13 +1799,13 @@ end
-- after_destruct
-- Clears snowed dirtlike node below.
function mcl_core.after_snow_destruct(pos)
local nn = minetest.get_node(pos).name
local nn = minetest_get_node(pos).name
-- No-op if snow was replaced with snow
if minetest.get_item_group(nn, "snow_cover") == 1 then
if minetest_get_item_group(nn, "snow_cover") == 1 then
return
end
local npos = {x=pos.x, y=pos.y-1, z=pos.z}
local node = minetest.get_node(npos)
local node = minetest_get_node(npos)
mcl_core.clear_snow_dirt(npos, node)
end

View File

@ -208,39 +208,39 @@ Stone=Roche
Stripped Acacia Log=Bois d'Acacia
Stripped Acacia Wood=Bois Ecorché d'Acacia
Stripped Birch Log=Bois de Bouleau
Stripped Birch Wood=Bois Ecorché de Bouleau
Stripped Birch Wood=Bois écorcé de Bouleau
Stripped Dark Oak Log=Bois de Chêne Noir
Stripped Dark Oak Wood=Bois Ecorché de Chêne Noir
Stripped Dark Oak Wood=Bois écorcé de Chêne Noir
Stripped Jungle Log=Bois d'Acajou
Stripped Jungle Wood=Bois Ecorché d'Acajou
Stripped Jungle Wood=Bois écorcé d'Acajou
Stripped Oak Log=Bois de Chêne
Stripped Oak Wood=Bois Ecorché de Chêne
Stripped Oak Wood=Bois écorcé de Chêne
Stripped Spruce Log=Bois de Sapin
Stripped Spruce Wood=Bois Ecorché de Sapin
Stripped Spruce Wood=Bois écorcé de Sapin
Stone Bricks=Pierre Taillée
Sugar=Sucre
Sugar Canes=Canne à Sucre
Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.=Les cannes à sucre sont une plante qui a certaines utilisations dans l'artisanat. Les cannes à sucre poussent lentement jusqu'à 3 blocs lorsqu'elles sont à côté de l'eau et sont placées sur un bloc d'herbe, de terre, de sable, de sable rouge, de podzol ou de terre stérile. Lorsqu'une canne à sucre est cassée, toutes les cannes à sucre connectées au-dessus se brisent également.
Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.=Les cannes à sucre ne peuvent être placées que sur d'autres cannes à sucre et sur des blocs sur lesquels elles poussent.
Sugar comes from sugar canes and is used to make sweet foods.=Le sucre provient des cannes à sucre et est utilisé pour fabriquer des aliments sucrés.
The stripped trunk of an acacia tree.=Le tronc écorché d'un acacia.
The stripped trunk of a birch tree.=Le tronc écorché d'un bouleau.
The stripped trunk of a dark oak tree.=Le tronc écorché d'un chêne noir.
The stripped trunk of a jungle tree.=Le tronc écorché d'un acajou.
The stripped trunk of an oak tree.=Le tronc écorché d'un chêne.
The stripped trunk of a spruce tree.=Le tronc écorché d'un sapin.
The stripped trunk of an acacia tree.=Le tronc écorcé d'un acacia.
The stripped trunk of a birch tree.=Le tronc écorcé d'un bouleau.
The stripped trunk of a dark oak tree.=Le tronc écorcé d'un chêne noir.
The stripped trunk of a jungle tree.=Le tronc écorcé d'un acajou.
The stripped trunk of an oak tree.=Le tronc écorcé d'un chêne.
The stripped trunk of a spruce tree.=Le tronc écorcé d'un sapin.
The trunk of a birch tree.=Le tronc d'un bouleau.
The trunk of a dark oak tree.=Le tronc d'un chêne noir.
The trunk of a jungle tree.=Le tronc d'un acajou.
The trunk of a spruce tree.=Le tronc d'un sapin.
The trunk of an acacia.=Le tronc d'un acacia
The trunk of an oak tree.=Le tronc d'un chêne.
The stripped wood of an acacia tree.=Les planches écorchée d'un acacia.
The stripped wood of a birch tree.=Les planches écorchée d'un bouleau.
The stripped wood of a dark oak tree.=Les planches écorchée d'un chêne noir.
The stripped wood of a jungle tree.=Les planches écorchée d'un acajou.
The stripped wood of an oak tree.=Les planches écorchée d'un chêne.
The stripped wood of a spruce tree.=Les planches écorchée d'un sapin.
The stripped wood of an acacia tree.=Les planches écorcée d'un acacia.
The stripped wood of a birch tree.=Les planches écorcée d'un bouleau.
The stripped wood of a dark oak tree.=Les planches écorcée d'un chêne noir.
The stripped wood of a jungle tree.=Les planches écorcée d'un acajou.
The stripped wood of an oak tree.=Les planches écorcée d'un chêne.
The stripped wood of a spruce tree.=Les planches écorcée d'un sapin.
This block consists of a couple of loose stones and can't support itself.=Ce bloc se compose de quelques pierres lâches et ne peut pas se soutenir.
This is a decorative block surrounded by the bark of a tree trunk.=Il s'agit d'un bloc décoratif entouré par l'écorce d'un tronc d'arbre.
This is a decorative block.=Il s'agit d'un bloc décoratif.

View File

@ -1,4 +1,4 @@
name = mcl_core
description = Core items of MineClone 2: Basic biome blocks (dirt, sand, stones, etc.), derived items, glass, sugar cane, cactus, barrier, mining tools, hand, craftitems, and misc. items which don't really fit anywhere else.
depends = mcl_autogroup, mcl_init, mcl_sounds, mcl_particles, mcl_util, mcl_worlds, doc_items, mcl_enchanting, mcl_colors, mcl_mapgen
depends = mcl_autogroup, mcl_init, mcl_sounds, mcl_particles, mcl_util, mcl_worlds, doc_items, mcl_enchanting, mcl_colors, mcl_mapgen, mcl_time
optional_depends = doc

View File

@ -11,7 +11,23 @@ else
ice_drawtype = "normal"
ice_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false
end
local mossnodes = {"mcl_core:stone", "mcl_core:granite", "mcl_core:granite_smooth", "mcl_core:diorite", "mcl_core:diorite_smooth", "mcl_core:andesite", "mcl_core:andesite_smooth", "mcl_deepslate:deepslate", --[[glowberries, ]]"mcl_core:dirt", "mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:coarse_dirt", "mcl_core:mycelium"}
local moss_nodes = {
"mcl_core:stone",
"mcl_core:granite",
"mcl_core:granite_smooth",
"mcl_core:diorite",
"mcl_core:diorite_smooth",
"mcl_core:andesite",
"mcl_core:andesite_smooth",
"mcl_deepslate:deepslate",
--[[glowberries, ]]
"mcl_core:dirt",
"mcl_core:dirt_with_grass",
"mcl_core:podzol",
"mcl_core:coarse_dirt",
"mcl_core:mycelium",
}
mcl_core.fortune_drop_ore = {
discrete_uniform_distribution = true,
@ -1089,7 +1105,9 @@ minetest.register_node("mcl_core:snowblock", {
_mcl_silk_touch_drop = true,
})
minetest.register_node("mcl_core:moss", {
local MOSS_ITEMSTRING = "mcl_core:moss"
local MOSS_NODE = {name = MOSS_ITEMSTRING}
minetest.register_node(MOSS_ITEMSTRING, {
description = S("Moss"),
_doc_items_longdesc = S("A moss block is a natural block that can be spread to some other blocks by using bone meal."),--TODO: Other desciption?
_doc_items_hidden = false,
@ -1101,41 +1119,41 @@ minetest.register_node("mcl_core:moss", {
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
if player:get_wielded_item():get_name() == "mcl_dye:white" then
if not minetest.is_creative_enabled(player) and not minetest.check_player_privs(player, "creative") then
itemstack:take_item()
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-1, y = pos.y-1, z = pos.z-1}, {x = pos.x+1, y = pos.y+1, z = pos.z+1}, mossnodes)) do
minetest.set_node(j, {name="mcl_core:moss"})
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-2, y = pos.y-1, z = pos.z-2}, {x = pos.x+2, y = pos.y+1, z = pos.z+2}, mossnodes)) do
if math.random(1,3) == 1 then minetest.set_node(j, {name="mcl_core:moss"}) end
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y-1, z = pos.z-3}, {x = pos.x+3, y = pos.y+1, z = pos.z+3}, mossnodes)) do
if math.random(1,9) == 1 then minetest.set_node(j, {name="mcl_core:moss"}) end
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y-1, z = pos.z-3}, {x = pos.x+3, y = pos.y+1, z = pos.z+3}, {"mcl_core:moss"})) do
if math.random(1,2) == 1 then
minetest.set_node({x=j.x,y=j.y+1,z=j.z} ,{name="mcl_flowers:tallgrass"})
end
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y-1, z = pos.z-3}, {x = pos.x+3, y = pos.y+1, z = pos.z+3}, {"mcl_core:moss"})) do
if math.random(1,4) == 1 then
minetest.set_node({x=j.x,y=j.y+1,z=j.z}, {name="mcl_core:moss_carpet"})
end
end
for i, j in pairs(minetest.find_nodes_in_area_under_air({x = pos.x-3, y = pos.y-1, z = pos.z-3}, {x = pos.x+3, y = pos.y+1, z = pos.z+3}, {"mcl_core:moss"})) do
if math.random(1,10) == 1 then
minetest.set_node({x=j.x,y=j.y+1,z=j.z} ,{name="mcl_flowers:double_grass"})
minetest.set_node({x=j.x,y=j.y+2,z=j.z} ,{name="mcl_flowers:double_grass_top"})
end
end
elseif minetest.registered_nodes[player:get_wielded_item():get_name()] then
local pos = pos
local x, y, z = pos.x, pos.y, pos.z
local player_wielded_item = player:get_wielded_item()
local item_name = player_wielded_item:get_name()
if item_name == "mcl_dye:white" then
if not minetest.is_creative_enabled(player) then
itemstack:take_item()
minetest.set_node(pointed_thing.above, {name=player:get_wielded_item():get_name()})
end
end,
end
for _, p in pairs(minetest.find_nodes_in_area_under_air({x=x-1, y=y-1, z=z-1}, {x=x+1, y=y+1, z=z+1}, moss_nodes)) do
minetest.set_node(p, MOSS_NODE)
end
for _, p in pairs(minetest.find_nodes_in_area_under_air({x=x-2, y=y-2, z=z-2}, {x=x+2, y=y+2, z=z+2}, moss_nodes)) do
if math.random(1,3) == 1 then minetest.set_node(p, MOSS_NODE) end
end
for _, p in pairs(minetest.find_nodes_in_area_under_air({x=x-3, y=y-3, z=z-3}, {x=x+3, y=y+3, z=z+3}, moss_nodes)) do
if math.random(1,9) == 1 then minetest.set_node(p, MOSS_NODE) end
end
for _, p in pairs(minetest.find_nodes_in_area_under_air({x=x-3, y=y-3, z=z-3}, {x=x+3, y=y+3, z=z+3}, {MOSS_ITEMSTRING})) do
if math.random(1,2) == 1 then
minetest.set_node({x=p.x, y=p.y+1, z=p.z}, {name="mcl_flowers:tallgrass"})
elseif math.random(1,4) == 1 then
minetest.set_node({x=p.x, y=p.y+1, z=p.z}, {name="mcl_core:moss_carpet"})
elseif math.random(1,10) == 1 then
minetest.set_node({x=p.x, y=p.y+1, z=p.z}, {name="mcl_flowers:double_grass"})
minetest.set_node({x=p.x, y=p.y+2, z=p.z}, {name="mcl_flowers:double_grass_top"})
end
end
elseif minetest.registered_nodes[item_name] then
if not minetest.is_creative_enabled(player) then
itemstack:take_item()
end
local set_pos = pointed_thing and pointed_thing.above or {x = pos.x, y = pos.y + 1, z = pos.z}
minetest.set_node(set_pos, {name = item_name})
end
end,
})
minetest.register_node("mcl_core:moss_carpet", {

View File

@ -31,21 +31,21 @@ Deepslate Lapis Lazuli Ore=Minerai de lapis-lazuli de l'ardoise des abîmes
Deepslate lapis ore is a variant of lapis ore that can generate in deepslate and tuff blobs.=Le minerai de lapis de l'ardoise des abîmes est une variante de minerai de lapis-lazuli qui apparaît dans l'ardoise des abîmes et les filons de tuf.
Deepslate redstone ore is a variant of redstone ore that can generate in deepslate and tuff blobs.=Le minerai de redstone de l'ardoise des abîmes est une variante de minerai de redstone qui apparaît dans l'ardoise des abîmes et les filons de tuf.
Deepslate Redstone Ore=Minerai de Redstone de l'ardoise des abîmes
Deepslate tiles are a decorative variant of deepslate.=L''ardoise des abîmes carrelée est une variante décorative de l'ardoise des abîmes.
Deepslate tiles are a decorative variant of deepslate.=L'ardoise des abîmes carrelée est une variante décorative de l'ardoise des abîmes.
Deepslate Tiles Slab=Dalle d'ardoise des abîmes carrelée
Deepslate Tiles Stairs=Escalier d'ardoise des abîmes carrelée
Deepslate Tiles Wall=Muret d'ardoise des abîmes carrelée
Deepslate Tiles=Ardoise des abîmes carrelée
Deepslate=Ardoise des abïmes
Deepslate=Ardoise des abîmes
Double Cobbled Deepslate Slab=Dalle double de pierre des abîmes
Double Deepslate Bricks Slab=Dalle double d'ardoise des abîmes taillée
Double Deepslate Tiles Slab=Dalle double d'ardoise des abîmes carrelée
Double Polished Deepslate Slab=Dalle double d'ardoise des abïmes polie
Double Polished Deepslate Slab=Dalle double d'ardoise des abîmes polie
Hides a silverfish=Cache un poisson d'argent
Infested Deepslate=Ardoise des abïmes infestée
Infested Deepslate=Ardoise des abîmes infestée
Lit Deepslate Redstone Ore=Minerai de Redstone de l'ardoise des abîmes éclairé
Polished deepslate is the stone-like polished version of deepslate.=l'ardoise des abîmes polie est la version polie de l'ardoise des abîmes, de manière similaire à la pierre.
Polished Deepslate Slab=Dalle d'ardoise des abïmes
Polished Deepslate Stairs=Escalier d'ardoise des abïmes
Polished Deepslate Wall=Muret d'ardoise des abïmes
Polished Deepslate=Ardoise des abïmes polie
Polished Deepslate Slab=Dalle d'ardoise des abîmes
Polished Deepslate Stairs=Escalier d'ardoise des abîmes
Polished Deepslate Wall=Muret d'ardoise des abîmes
Polished Deepslate=Ardoise des abîmes polie

View File

@ -1,100 +1,145 @@
# textdomain: mcl_enchanting
### enchantments.lua ###
Arrows passes through multiple objects.=Les flèches traversent plusieurs objets.
Arrows set target on fire.=Les flèches mettent le feu à la cible.
Bane of Arthropods=Fléau des arthropodes
Channeling=Canalisation
Channels a bolt of lightning toward a target. Works only during thunderstorms and if target is unobstructed with opaque blocks.=Canalise un éclair vers une cible. Fonctionne uniquement pendant les orages et si la cible n'est pas obstruée par des blocs opaques.
Curse of Vanishing=Malédiction de disparition
Decreases crossbow charging time.=Diminue le temps de chargement de l'arbalète.
Decreases time until rod catches something.=Diminue le temps jusqu'à ce qu'un poisson ne morde à l'hameçon.
Depth Strider=Agilité aquatique
Efficiency=Efficacité
Extends underwater breathing time.=Prolonge le temps de respiration sous l'eau.
Fire Aspect=Aura de feu
Flame=Flamme
Fortune=Fortune
Frost Walker=Semelles givrantes
Impaling=Empalement
Increases arrow damage.=Augmente les dégâts des flèches.
Increases arrow knockback.=Augmente le recul de la flèche.
Increases certain block drops.=Multiplie les items droppés.
Increases damage and applies Slowness IV to arthropod mobs (spiders, cave spiders, silverfish and endermites).=Augmente les dégâts et applique la lenteur IV aux mobs arthropodes (araignées, araignées des cavernes, lépismes argentés et endermites).
Increases damage to undead mobs.=Augmente les dégâts infligés aux monstres morts-vivants.
Increases damage.=Augmente les dégâts.
Increases item durability.=Augmente la durabilité des objets.
Increases knockback.=Augmente le recul.
Increases mining speed.=Augmente la vitesse de minage.
Increases mob loot.=Augmente le butin des mobs.
Increases rate of good loot (enchanting books, etc.)=Augmente le taux de bon butin (livres enchanteurs, etc.)
Increases sweeping attack damage.=Augmente les dégâts de l'épée.
Increases underwater movement speed.=Augmente la vitesse de déplacement sous l'eau.
Increases walking speed on soul sand.=Augmente la vitesse de marche sur le sable de l'âme.
Infinity=Infinité
Item destroyed on death.=Objet détruit à la mort.
Knockback=Recul
Looting=Butin
Loyalty=Loyauté
Luck of the Sea=Chance de la mer
Lure=Appât
Mending=Raccommodage
Mined blocks drop themselves.=Les blocs minés tombent d'eux-mêmes.
Multishot=Tir multiple
Piercing=Perforation
Power=Puissance
Punch=Frappe
Quick Charge=Charge rapide
Repair the item while gaining XP orbs.=Réparez l'objet tout en gagnant des points d'XP.
Respiration=Apnée
Riptide=Impulsion
Sets target on fire.=Définit la cible en feu.
Sharpness=Tranchant
Shoot 3 arrows at the cost of one.=Tirez 3 flèches pour le prix d'une.
Shooting consumes no regular arrows.=Le tir ne consomme pas de flèches standard.
Silk Touch=Toucher de soie
Smite=Châtiment
Soul Speed=Agilité des âmes
Sweeping Edge=Affilage
Trident deals additional damage to ocean mobs.=Trident inflige des dégâts supplémentaires aux mobs océaniques.
Trident launches player with itself when thrown. Works only in water or rain.=Le trident lance le joueur avec lui-même lorsqu'il est lancé. Fonctionne uniquement sous l'eau ou sous la pluie.
Trident returns after being thrown. Higher levels reduce return time.=Le trident revient après avoir été jeté. Des niveaux plus élevés réduisent le temps de retour.
Turns water beneath the player into frosted ice and prevents the damage from magma blocks.=Transforme l'eau sous le joueur en glace givrée et empêche les dommages causés par les blocs de magma.
Unbreaking=Solidité
### engine.lua ###
@1 Enchantment Levels=@1 Niveaux d'enchantement
@1 Lapis Lazuli=@1 Lapis Lazuli
Inventory=Inventaire
Level requirement: @1=Niveau requis: @1
### init.lua ###
'@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.
<player> <enchantment> [<level>]=<joueur> <enchantement> [<niveau>]
@1 can't be combined with @2.=@1 ne peut être combiné avec @2.
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 sélection d'un enchantement ; cliquer gauche sur la sélection et vous verrez le lapis lazuli et les niveaux d'expérience consummés. Et, un objet enchanté à la place.
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é les objets dans les cases, les options d'enchantement s'affichent.
Enchant=Enchantement
Enchant an item=Enchanter un objet
Enchanted Book=Livre enchanté
Enchanting Table=Table d'enchantement
Spend experience, and lapis to enchant various items.=Dépenser de l'expérience et du lapis pour enchanter des objets variés.
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 permettent d'enchanter des armures, outils, armes et livres avec différents pouvoirs. Mais cela a un coût en expérience et en lapis lazuli.
Enchanting succeded.=L'enchantement a réussi.
Forcefully enchant an item=Enchantement forcé d'un objet
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.=Placer un outil, armure, arme ou livre dans la case en haut à gauche, puis placer 1-3 lapis lazuli dans la case à droite.
Player '@1' cannot be found.=Le joueur '@1' est introuvable.
Rightclick the Enchanting Table to open the enchanting menu.=Clic droit sur la Table d'enchantement pour ouvrir le menu d'enchantement.
The number you have entered (@1) is too big, it must be at most @2.=Le nombre que vous avez entré (@1) est trop grand, il doit être au plus de @2.
The number you have entered (@1) is too small, it must be at least @2.=Le nombre que vous avez entré (@1) est trop petit, il doit être au moins de @2.
The selected enchantment can't be added to the target item.=L'enchantement sélectionné ne peut pas être ajouté à la cible.
The target doesn't hold an item.=La cible ne contient aucun élément.
The target item is not enchantable.=L'objet cible n'est pas enchantable.
There is no such enchantment '@1'.=Il n'y a pas un tel enchantement '@1'.
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 force de l'enchantement, placer des bibliothèques autour de la table d'enchantement. Cependant il faut garder un bloc d'air entre la table et les bibliothèques pour renforcer l'enchantement.
Usage: /enchant <player> <enchantment> [<level>]=Usage : /enchant <joueur> <enchantement> [<niveau>]
Usage: /forceenchant <player> <enchantment> [<level>]=Usage : /forceenchant <joueur> <enchantement> [<niveau>]
##### not used anymore #####
# textdomain: mcl_enchanting
Aqua Affinity=Affinité aquatique
Increases underwater mining speed.=Augmente la vitesse de minage sous-marine.
Bane of Arthropods=Fléau des arthropodes
Increases damage and applies Slowness IV to arthropod mobs (spiders, cave spiders, silverfish and endermites).=Augmente les dégâts et applique la lenteur IV aux mobs arthropodes (araignées, araignées des cavernes, lépismes argentés et endermites).
Blast Protection=Protection contre les explosions
Reduces explosion damage and knockback.=Réduit les dégâts d'explosion et de recul.
Channeling=Canalisation
Channels a bolt of lightning toward a target. Works only during thunderstorms and if target is unobstructed with opaque blocks.=Canalise un éclair vers une cible. Fonctionne uniquement pendant les orages et si la cible n'est pas obstruée par des blocs opaques.
Curse of Binding=Malédiction du lien éternel
Item cannot be removed from armor slots except due to death, breaking or in Creative Mode.=L'objet ne peut pas être retiré des emplacements d'armure sauf en cas de mort, de rupture ou en mode créatif.
Curse of Vanishing=Malédiction de disparition
Item destroyed on death.=Objet détruit à la mort.
Depth Strider=Agilité aquatique
Increases underwater movement speed.=Augmente la vitesse de déplacement sous l'eau.
Efficiency=Efficacité
Increases mining speed.=Augmente la vitesse de minage.
Feather Falling=Chute amortie
Reduces fall damage.=Réduit les dégats de chute.
Fire Aspect=Aura de feu
Sets target on fire.=Définit la cible en feu.
Fire Protection=Protection contre le feu
Reduces fire damage.=Reduit les dégats de feu.
Flame=Flamme
Arrows set target on fire.=Les flèches mettent le feu à la cible.
Fortune=Fortune
Increases certain block drops.=Multiplie les items droppés
Frost Walker=Semelles givrantes
Turns water beneath the player into frosted ice and prevents the damage from magma blocks.=Transforme l'eau sous le joueur en glace givrée et empêche les dommages causés par les blocs de magma.
Impaling=Empalement
Trident deals additional damage to ocean mobs.=Trident inflige des dégâts supplémentaires aux mobs océaniques.
Infinity=Infinité
Shooting consumes no regular arrows.=Le tir ne consomme pas de flèches standard.
Knockback=Recul
Increases knockback.=Augmente le recul.
Looting=Butin
Increases mob loot.=Augmente le butin des mobs.
Loyalty=Loyauté
Trident returns after being thrown. Higher levels reduce return time.=Le trident revient après avoir été jeté. Des niveaux plus élevés réduisent le temps de retour.
Luck of the Sea=Chance de la mer
Increases rate of good loot (enchanting books, etc.)=Augmente le taux de bon butin (livres enchanteurs, etc.)
Lure=Appât
Decreases time until rod catches something.=Diminue le temps jusqu'à ce qu'un poisson ne morde à l'hameçon.
Mending=Raccommodage
Repair the item while gaining XP orbs.=Réparez l'objet tout en gagnant des points d'XP.
Multishot=Tir multiple
Shoot 3 arrows at the cost of one.=Tirez sur 3 flèches au prix d'une.
Piercing=Perforation
Arrows passes through multiple objects.=Les flèches traversent plusieurs objets.
Power=Puissance
Increases arrow damage.=Augmente les dégâts des flèches.
Projectile Protection=Protection contre les projectiles
Reduces projectile damage.=Réduit les dommages causés par les projectiles.
Protection=Protection
Reduces most types of damage by 4% for each level.=Réduit la plupart des types de dégâts de 4% pour chaque niveau.
Punch=Frappe
Increases arrow knockback.=Augmente le recul de la flèche.
Quick Charge=Charge rapide
Decreases crossbow charging time.=Diminue le temps de chargement de l'arbalète.
Respiration=Apnée
Extends underwater breathing time.=Prolonge le temps de respiration sous l'eau.
Riptide=Impulsion
Trident launches player with itself when thrown. Works only in water or rain.=Le trident lance le joueur avec lui-même lorsqu'il est lancé. Fonctionne uniquement sous l'eau ou sous la pluie.
Sharpness=Tranchant
Increases damage.=Augmente les dégâts.
Silk Touch=Toucher de soie
Mined blocks drop themselves.=Les blocs minés tombent d'eux-mêmes.
Smite=Châtiment
Increases damage to undead mobs.=Augmente les dégâts infligés aux monstres morts-vivants.
Soul Speed=Agilité des âmes
Increases walking speed on soul sand.=Augmente la vitesse de marche sur le sable de l'âme.
Sweeping Edge=Affilage
Increases sweeping attack damage.=Augmente les dégâts de l'épée
Thorns=Épines
Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=Reflète une partie des dégâts subis lors de la frappe, au prix d'une réduction de la durabilité à chaque déclenchement.
Unbreaking=Solidité
Increases item durability.=Augmente la durabilité des objets.
Inventory=Inventaire
@1 Lapis Lazuli=@1 Lapis Lazuli
@1 Enchantment Levels=@1 Niveaux d'enchantement
Level requirement: @1=Niveau requis: @1
Enchant an item=Enchanter un objet
<player> <enchantment> [<level>]=<joueur> <enchantement> [<niveau>]
Usage: /enchant <player> <enchantment> [<level>]=Usage: /enchant <joueur> <enchantement> [<niveau>]
Player '@1' cannot be found.=Le joueur '@1' est introuvable.
There is no such enchantment '@1'.=Il n'y a pas un tel enchantement '@1'.
The target doesn't hold an item.=La cible ne contient aucun élément.
The selected enchantment can't be added to the target item.=L'enchantement sélectionné ne peut pas être ajouté à la cible.
'@1' is not a valid number='@1' n'est pas un nombre valide
The number you have entered (@1) is too big, it must be at most @2.=Le nombre que vous avez entré (@1) est trop grand, il doit être au plus de @2.
The number you have entered (@1) is too small, it must be at least @2.=Le nombre que vous avez entré (@1) est trop petit, il doit être au moins de @2.
@1 can't be combined with @2.=@1 ne peut pas être combiné avec @2.
Enchanting succeded.=L'enchantement a réussi.
Forcefully enchant an item=Enchantement forcé d'un objet
Usage: /forceenchant <player> <enchantment> [<level>]=Usage: /forceenchant <joueur> <enchantrment> [<niveau>]
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.
Enchanted Book=Livre enchanté
Enchanting Table=Table d'enchantement
Enchant=Enchantement

View File

@ -105,7 +105,6 @@ Place a tool, armor, weapon or book into the top left slot, and then place 1-3 L
Player '@1' cannot be found.=
Rightclick the Enchanting Table to open the enchanting menu.=
Spend experience, and lapis to enchant various items.=
The number you have entered (@1) is too big, it must be at most @2.=
@ -127,4 +126,20 @@ Usage: /forceenchant <player> <enchantment> [<level>]=
##### not used anymore #####
# textdomain: mcl_enchanting
Aqua Affinity=
Increases underwater mining speed.=
Blast Protection=
Reduces explosion damage and knockback.=
Curse of Binding=Malédiction du lien éternel
Item cannot be removed from armor slots except due to death, breaking or in Creative Mode.=
Feather Falling=
Reduces fall damage.=
Fire Protection=
Reduces fire damage.=
Projectile Protection=
Reduces projectile damage.=
Protection=
Reduces most types of damage by 4% for each level.=
Thorns=
Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=

View File

@ -96,4 +96,6 @@ Turns block into farmland=Transforme un bloc en terres agricoles
60% chance of poisoning=60% de chances d'empoisonnement
Surface for crops=Surface pour les cultures
Can become wet=Peut devenir humide
Uses: @1=Utilisations: @1
Uses: @1=Utilisations: @1
Sweet Berry=Baies sucrées
Sweet Berry Bush (Stage @1)=Buisson à Baies sucrées

View File

@ -16,3 +16,9 @@ Pufferfish=Poisson-Globe
Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).=Le poisson-globe est une espèce de poisson commune et peut être obtenu par la pêche. Ils peuvent techniquement être mangés, mais ils sont très mauvais pour les humains. Manger un poisson-globe ne restaure que 1 point de faim et vous empoisonnera fortement (ce qui draine votre santé de manière non fatale) et provoque une grave intoxication alimentaire (qui augmente votre faim).
Catches fish in water=Attrape les poissons dans l'eau
Very poisonous=Très toxique
cod=morue
salmon=saumon
Bucket of @1=Seau de @1
This bucket is filled with water and @1.=Ce seau est rempli d'eau et de @1
Place it to empty the bucket and place a @1. Obtain by right clicking on a @2 fish with a bucket of water.=Placez le pour vider le seau et placer un @1. Obtenu en cliquant droit sur un poisson @2 avec un seau d'eau.
Places a water source and a @1 fish.=Place une source d'eau et un poisson @1

View File

@ -0,0 +1,4 @@
# textdomain: mcl_fletching_table
Fletching Table=Table d'Archerie
A fletching table=une table d'archerie
This is the fletcher villager's work station. It currently has no use beyond decoration.=Ceci est le poste de travail du villageois fléchier. Il n'a actuellement aucune autre utilité que la décoration.

View File

@ -0,0 +1,4 @@
# textdomain: mcl_fletching_table
Fletching Table=
A fletching table=
This is the fletcher villager's work station. It currently has no use beyond decoration.=

View File

@ -1,13 +0,0 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

View File

@ -1,5 +0,0 @@
# Hoppers
This is the Hoppers mod for Minetest. It's just a clone of Minecraft hoppers, functions nearly identical to them minus mesecons making them stop and the way they're placed.
## Forum Topic
- https://forum.minetest.net/viewtopic.php?f=11&t=12379

View File

@ -1,9 +1,26 @@
local S = minetest.get_translator(minetest.get_current_modname())
local get_item_group = minetest.get_item_group
--[[ BEGIN OF NODE DEFINITIONS ]]
local math_abs = math.abs
local mcl_util_move_item_container = mcl_util.move_item_container
local minetest_facedir_to_dir = minetest.facedir_to_dir
local minetest_get_inventory = minetest.get_inventory
local minetest_get_item_group = minetest.get_item_group
local minetest_get_meta = minetest.get_meta
local minetest_get_node = minetest.get_node
local minetest_get_objects_inside_radius = minetest.get_objects_inside_radius
local minetest_registered_nodes = minetest.registered_nodes
local HOPPER = "mcl_hoppers:hopper"
local HOPPER_SIDE = "mcl_hoppers:hopper_side"
local GROUPS_TO_PUT_INTO_COMMON_SLOT = {
[2] = true,
[3] = true,
[5] = true,
[6] = true,
}
local GROUPS_TO_PUT_INTO_FUEL_SLOT = {
[4] = true,
}
local mcl_hoppers_formspec =
"size[9,7]"..
"label[2,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Hopper"))).."]"..
@ -25,44 +42,50 @@ local def_hopper = {
groups = {pickaxey=1, container=2,deco_block=1,hopper=1},
drawtype = "nodebox",
paramtype = "light",
-- FIXME: mcl_hoppers_hopper_inside.png is unused by hoppers.
tiles = {"mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png"},
tiles = {
"mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png",
"mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png"
},
node_box = {
type = "fixed",
fixed = {
--funnel walls
{-0.5, 0.0, 0.4, 0.5, 0.5, 0.5},
{0.4, 0.0, -0.5, 0.5, 0.5, 0.5},
{-0.5, 0.0, -0.5, -0.4, 0.5, 0.5},
{-0.5, 0.0, -0.5, 0.5, 0.5, -0.4},
{-0.5, 0.0, 0.4, 0.5, 0.5, 0.5,},
{ 0.4, 0.0, -0.5, 0.5, 0.5, 0.5,},
{-0.5, 0.0, -0.5, -0.4, 0.5, 0.5,},
{-0.5, 0.0, -0.5, 0.5, 0.5, -0.4,},
--funnel base
{-0.5, 0.0, -0.5, 0.5, 0.1, 0.5},
{-0.5, 0.0, -0.5, 0.5, 0.1, 0.5,},
--spout
{-0.3, -0.3, -0.3, 0.3, 0.0, 0.3},
{-0.1, -0.3, -0.1, 0.1, -0.5, 0.1},
{-0.3, -0.3, -0.3, 0.3, 0.0, 0.3,},
{-0.1, -0.3, -0.1, 0.1, -0.5, 0.1,},
},
},
selection_box = {
type = "fixed",
fixed = {
--funnel
{-0.5, 0.0, -0.5, 0.5, 0.5, 0.5},
{-0.5, 0.0, -0.5, 0.5, 0.5, 0.5,},
--spout
{-0.3, -0.3, -0.3, 0.3, 0.0, 0.3},
{-0.1, -0.3, -0.1, 0.1, -0.5, 0.1},
{-0.3, -0.3, -0.3, 0.3, 0.0, 0.3,},
{-0.1, -0.3, -0.1, 0.1, -0.5, 0.1,},
},
},
is_ground_content = false,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local meta = minetest_get_meta(pos)
meta:set_string("formspec", mcl_hoppers_formspec)
local inv = meta:get_inventory()
inv:set_size("main", 5)
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local meta = minetest.get_meta(pos)
local meta = minetest_get_meta(pos)
local meta2 = meta:to_table()
meta:from_table(oldmetadata)
local inv = meta:get_inventory()
@ -120,10 +143,8 @@ local def_hopper = {
_mcl_hardness = 3,
}
-- Redstone variants (on/off) of downwards hopper.
-- Note a hopper is enabled when it is *not* supplied with redstone power and disabled when it is supplied with redstone power.
-- Enabled downwards hopper
local def_hopper_enabled = table.copy(def_hopper)
def_hopper_enabled.description = S("Hopper")
def_hopper_enabled._tt_help = S("5 inventory slots").."\n"..S("Collects items from above, moves items to container below").."\n"..S("Can be disabled with redstone power")
@ -140,8 +161,8 @@ def_hopper_enabled.on_place = function(itemstack, placer, pointed_thing)
local upos = pointed_thing.under
local apos = pointed_thing.above
local uposnode = minetest.get_node(upos)
local uposnodedef = minetest.registered_nodes[uposnode.name]
local uposnode = minetest_get_node(upos)
local uposnodedef = minetest_registered_nodes[uposnode.name]
if not uposnodedef then return itemstack end
-- Use pointed node's on_rightclick function first, if present
if placer and not placer:get_player_control().sneak then
@ -150,26 +171,16 @@ def_hopper_enabled.on_place = function(itemstack, placer, pointed_thing)
end
end
local x = upos.x - apos.x
local z = upos.z - apos.z
local fake_itemstack = ItemStack(itemstack)
local dx = apos.x - upos.x
local dz = apos.z - upos.z
local param2
if x == -1 then
fake_itemstack:set_name("mcl_hoppers:hopper_side")
param2 = 0
elseif x == 1 then
fake_itemstack:set_name("mcl_hoppers:hopper_side")
param2 = 2
elseif z == -1 then
fake_itemstack:set_name("mcl_hoppers:hopper_side")
param2 = 3
elseif z == 1 then
fake_itemstack:set_name("mcl_hoppers:hopper_side")
param2 = 1
if (dx ~= 0) or (dz ~= 0) then
param2 = minetest.dir_to_facedir({x = dx, y = 0, z = dz})
fake_itemstack:set_name(HOPPER_SIDE)
end
local itemstack,_ = minetest.item_place_node(fake_itemstack, placer, pointed_thing, param2)
itemstack:set_name("mcl_hoppers:hopper")
local itemstack, _ = minetest.item_place_node(fake_itemstack, placer, pointed_thing, param2)
itemstack:set_name(HOPPER)
return itemstack
end
def_hopper_enabled.mesecons = {
@ -180,77 +191,84 @@ def_hopper_enabled.mesecons = {
},
}
minetest.register_node("mcl_hoppers:hopper", def_hopper_enabled)
minetest.register_node(HOPPER, def_hopper_enabled)
-- Disabled downwards hopper
local def_hopper_disabled = table.copy(def_hopper)
def_hopper_disabled.description = S("Disabled Hopper")
def_hopper_disabled.inventory_image = nil
def_hopper_disabled._doc_items_create_entry = false
def_hopper_disabled.groups.not_in_creative_inventory = 1
def_hopper_disabled.drop = "mcl_hoppers:hopper"
def_hopper_disabled.drop = HOPPER
def_hopper_disabled.mesecons = {
effector = {
action_off = function(pos, node)
minetest.swap_node(pos, {name="mcl_hoppers:hopper", param2=node.param2})
minetest.swap_node(pos, {name=HOPPER, param2=node.param2})
end,
},
}
minetest.register_node("mcl_hoppers:hopper_disabled", def_hopper_disabled)
-- Sidewadrs hopper (base definition)
local on_rotate
if minetest.get_modpath("screwdriver") then
on_rotate = screwdriver.rotate_simple
end
-- Sidewars hopper (base definition)
local def_hopper_side = {
_doc_items_create_entry = false,
drop = "mcl_hoppers:hopper",
groups = {pickaxey=1, container=2,not_in_creative_inventory=1,hopper=2},
drop = HOPPER,
groups = {
container = 2,
hopper = 2,
not_in_creative_inventory = 1,
pickaxey = 1,
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png"},
tiles = {
"mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png",
"mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png",
},
node_box = {
type = "fixed",
fixed = {
--funnel walls
{-0.5, 0.0, 0.4, 0.5, 0.5, 0.5},
{0.4, 0.0, -0.5, 0.5, 0.5, 0.5},
{-0.5, 0.0, -0.5, -0.4, 0.5, 0.5},
{-0.5, 0.0, -0.5, 0.5, 0.5, -0.4},
{-0.5, 0.0, 0.4, 0.5, 0.5, 0.5,},
{ 0.4, 0.0, -0.5, 0.5, 0.5, 0.5,},
{-0.5, 0.0, -0.5, -0.4, 0.5, 0.5,},
{-0.5, 0.0, -0.5, 0.5, 0.5, -0.4,},
--funnel base
{-0.5, 0.0, -0.5, 0.5, 0.1, 0.5},
{-0.5, 0.0, -0.5, 0.5, 0.1, 0.5,},
--spout
{-0.3, -0.3, -0.3, 0.3, 0.0, 0.3},
{-0.5, -0.3, -0.1, 0.1, -0.1, 0.1},
{-0.3, -0.3, -0.3, 0.3, 0.0, 0.3,},
{-0.1, -0.3, -0.5, 0.1, -0.1, 0.1,},
},
},
selection_box = {
type = "fixed",
fixed = {
--funnel
{-0.5, 0.0, -0.5, 0.5, 0.5, 0.5},
{-0.5, 0.0, -0.5, 0.5, 0.5, 0.5,},
--spout
{-0.3, -0.3, -0.3, 0.3, 0.0, 0.3},
{-0.5, -0.3, -0.1, 0.1, -0.1, 0.1},
{-0.3, -0.3, -0.3, 0.3, 0.0, 0.3,},
{-0.1, -0.3, -0.5, 0.1, -0.1, 0.1,},
},
},
is_ground_content = false,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local meta = minetest_get_meta(pos)
meta:set_string("formspec", mcl_hoppers_formspec)
local inv = meta:get_inventory()
inv:set_size("main", 5)
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
local meta = minetest.get_meta(pos)
local meta = minetest_get_meta(pos)
local meta2 = meta
meta:from_table(oldmetadata)
local inv = meta:get_inventory()
@ -302,13 +320,15 @@ local def_hopper_side = {
minetest.log("action", player:get_player_name()..
" takes stuff from mcl_hoppers at "..minetest.pos_to_string(pos))
end,
on_rotate = on_rotate,
on_rotate = screwdriver.rotate_simple,
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 4.8,
_mcl_hardness = 3,
}
-- Enabled sidewards hopper
local def_hopper_side_enabled = table.copy(def_hopper_side)
def_hopper_side_enabled.description = S("Side Hopper")
def_hopper_side_enabled.mesecons = {
@ -318,53 +338,105 @@ def_hopper_side_enabled.mesecons = {
end,
},
}
minetest.register_node("mcl_hoppers:hopper_side", def_hopper_side_enabled)
minetest.register_node(HOPPER_SIDE, def_hopper_side_enabled)
-- Disabled sidewards hopper
local def_hopper_side_disabled = table.copy(def_hopper_side)
def_hopper_side_disabled.description = S("Disabled Side Hopper")
def_hopper_side_disabled.mesecons = {
effector = {
action_off = function(pos, node)
minetest.swap_node(pos, {name="mcl_hoppers:hopper_side", param2=node.param2})
minetest.swap_node(pos, {name=HOPPER_SIDE, param2=node.param2})
end,
},
}
minetest.register_node("mcl_hoppers:hopper_side_disabled", def_hopper_side_disabled)
--[[ END OF NODE DEFINITIONS ]]
--[[ BEGIN OF ABM DEFINITONS ]]
-- Make hoppers suck in dropped items
minetest.register_abm({
label = "Hoppers suck in dropped items",
nodenames = {"mcl_hoppers:hopper","mcl_hoppers:hopper_side"},
interval = 1.0,
label = "Hopper",
nodenames = {
HOPPER,
HOPPER_SIDE,
},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local abovenode = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
if not minetest.registered_items[abovenode.name] then return end
-- Don't bother checking item enties if node above is a container (should save some CPU)
if get_item_group(abovenode.name, "container") then
return
end
local meta = minetest.get_meta(pos)
action = function(pos, node)
local pos = pos
local meta = minetest_get_meta(pos)
local inv = meta:get_inventory()
if not inv then return end
for _,object in pairs(minetest.get_objects_inside_radius(pos, 2)) do
local entity = object:get_luaentity()
if not object:is_player() and entity and entity.name == "__builtin:item" and not entity._removed then
if inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
-- Item must get sucked in when the item just TOUCHES the block above the hopper
-- This is the reason for the Y calculation.
-- Test: Items on farmland and slabs get sucked, but items on full blocks don't
local posob = object:get_pos()
local posob_miny = posob.y + object:get_properties().collisionbox[2]
if math.abs(posob.x-pos.x) <= 0.5 and (posob_miny-pos.y < 1.5 and posob.y-pos.y >= 0.3) then
entity._removed = true
entity.itemstring = ""
object:remove()
inv:add_item("main", ItemStack(object:get_luaentity().itemstring))
local x, y, z = pos.x, pos.y, pos.z
-- Move an item from the hopper into the container to which the hopper points to
local dst_pos
if node.name == HOPPER then
dst_pos = {x = x, y = y - 1, z = z}
else
local param2 = node.param2
local dir = minetest_facedir_to_dir(param2)
if not dir then return end
dst_pos = {x = x - dir.x, y = y, z = z - dir.z}
end
local dst_node = minetest_get_node(dst_pos)
local dst_node_name = dst_node.name
local dst_container_group = minetest_get_item_group(dst_node_name, "container")
if GROUPS_TO_PUT_INTO_COMMON_SLOT[dst_container_group] then
mcl_util_move_item_container(pos, dst_pos)
elseif GROUPS_TO_PUT_INTO_FUEL_SLOT[dst_container_group] then
local sinv = minetest_get_inventory({type="node", pos = pos})
local dinv = minetest_get_inventory({type="node", pos = dst_pos})
local slot_id,_ = mcl_util.get_eligible_transfer_item_slot(
sinv,
"main",
dinv,
"fuel",
function(itemstack, src_inventory, src_list, dst_inventory, dst_list)
-- Returns true if itemstack is fuel, but not for lava bucket if destination already has one
if not mcl_util.is_fuel(itemstack) then return false end
if itemstack:get_name() ~= "mcl_buckets:bucket_lava" then return true end
return dst_inventory:is_empty(dst_list)
end
)
end
local y_above = y + 1
local pos_above = {x = x, y = y_above, z = z}
local above_node = minetest_get_node(pos_above)
local above_node_name = above_node.name
local above_container_group = minetest_get_item_group(above_node_name, "container")
if above_container_group ~= 0 then
-- Suck an item from the container above into the hopper
if not mcl_util_move_item_container(pos_above, pos)
and above_container_group == 4 then
local finv = minetest_get_inventory({type="node", pos = pos_above})
if finv and not mcl_util.is_fuel(finv:get_stack("fuel", 1)) then
mcl_util_move_item_container(pos_above, pos, "fuel")
end
end
else
-- Suck in dropped items
local y_top_touch_to_suck = y_above + 0.5
for _, object in pairs(minetest_get_objects_inside_radius(pos_above, 1)) do
if not object:is_player() then
local entity = object:get_luaentity()
local entity_name = entity and entity.name
if entity_name == "__builtin:item" then
local itemstring = entity.itemstring
if itemstring and itemstring ~= "" and inv:room_for_item("main", ItemStack(itemstring)) then
local object_pos = object:get_pos()
local object_pos_y = object_pos.y
local object_collisionbox = object:get_properties().collisionbox
local touches_from_above = object_pos_y + object_collisionbox[2] <= y_top_touch_to_suck
if touches_from_above
and (math_abs(object_pos.x - x) <= 0.5)
and (math_abs(object_pos.z - z) <= 0.5)
then
object:remove()
inv:add_item("main", ItemStack(itemstring))
end
end
end
end
end
@ -372,116 +444,8 @@ minetest.register_abm({
end,
})
-- Returns true if itemstack is fuel, but not for lava bucket if destination already has one
local is_transferrable_fuel = function(itemstack, src_inventory, src_list, dst_inventory, dst_list)
if mcl_util.is_fuel(itemstack) then
if itemstack:get_name() == "mcl_buckets:bucket_lava" then
return dst_inventory:is_empty(dst_list)
else
return true
end
else
return false
end
end
minetest.register_abm({
label = "Hopper/container item exchange",
nodenames = {"mcl_hoppers:hopper"},
neighbors = {"group:container"},
interval = 1.0,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
-- Get node pos' for item transfer
local uppos = {x=pos.x,y=pos.y+1,z=pos.z}
local downpos = {x=pos.x,y=pos.y-1,z=pos.z}
-- Suck an item from the container above into the hopper
local upnode = minetest.get_node(uppos)
if not minetest.registered_nodes[upnode.name] then return end
local g = get_item_group(upnode.name, "container")
local sucked = mcl_util.move_item_container(uppos, pos)
-- Also suck in non-fuel items from furnace fuel slot
if not sucked and g == 4 then
local finv = minetest.get_inventory({type="node", pos=uppos})
if finv and not mcl_util.is_fuel(finv:get_stack("fuel", 1)) then
mcl_util.move_item_container(uppos, pos, "fuel")
end
end
-- Move an item from the hopper into container below
local downnode = minetest.get_node(downpos)
if not minetest.registered_nodes[downnode.name] then return end
mcl_util.move_item_container(pos, downpos)
end,
})
minetest.register_abm({
label = "Side-hopper/container item exchange",
nodenames = {"mcl_hoppers:hopper_side"},
neighbors = {"group:container"},
interval = 1.0,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
-- Determine to which side the hopper is facing, get nodes
local face = minetest.get_node(pos).param2
local front = {}
if face == 0 then
front = {x=pos.x-1,y=pos.y,z=pos.z}
elseif face == 1 then
front = {x=pos.x,y=pos.y,z=pos.z+1}
elseif face == 2 then
front = {x=pos.x+1,y=pos.y,z=pos.z}
elseif face == 3 then
front = {x=pos.x,y=pos.y,z=pos.z-1}
end
local above = {x=pos.x,y=pos.y+1,z=pos.z}
local downpos = {x=pos.x,y=pos.y-1,z=pos.z}
local frontnode = minetest.get_node(front)
if not minetest.registered_nodes[frontnode.name] then return end
-- Suck an item from the container above into the hopper
local abovenode = minetest.get_node(above)
if not minetest.registered_nodes[abovenode.name] then return end
local g = get_item_group(abovenode.name, "container")
local sucked = mcl_util.move_item_container(above, pos)
-- Also suck in non-fuel items from furnace fuel slot
if not sucked and g == 4 then
local finv = minetest.get_inventory({type="node", pos=above})
if finv and not mcl_util.is_fuel(finv:get_stack("fuel", 1)) then
mcl_util.move_item_container(above, pos, "fuel")
end
end
-- Try to move an item below before moving it sideways
local downnode = minetest.get_node(downpos)
if minetest.registered_nodes[downnode.name] and
mcl_util.move_item_container(pos, downpos) then return end
-- Move an item from the hopper into the container to which the hopper points to
local g = get_item_group(frontnode.name, "container")
if g == 2 or g == 3 or g == 5 or g == 6 then
mcl_util.move_item_container(pos, front)
elseif g == 4 then
-- Put fuel into fuel slot
local sinv = minetest.get_inventory({type="node", pos = pos})
local dinv = minetest.get_inventory({type="node", pos = front})
local slot_id,_ = mcl_util.get_eligible_transfer_item_slot(sinv, "main", dinv, "fuel", is_transferrable_fuel)
if slot_id then
mcl_util.move_item_container(pos, front, nil, slot_id, "fuel")
end
end
end
})
minetest.register_craft({
output = "mcl_hoppers:hopper",
output = HOPPER,
recipe = {
{"mcl_core:iron_ingot","","mcl_core:iron_ingot"},
{"mcl_core:iron_ingot","mcl_chests:chest","mcl_core:iron_ingot"},
@ -489,21 +453,20 @@ minetest.register_craft({
}
})
-- Add entry aliases for the Help
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mcl_hoppers:hopper", "nodes", "mcl_hoppers:hopper_side")
doc.add_entry_alias("nodes", HOPPER, "nodes", HOPPER_SIDE)
end
-- Legacy
minetest.register_alias("mcl_hoppers:hopper_item", "mcl_hoppers:hopper")
minetest.register_lbm({
label = "Update hopper formspecs (0.60.0",
name = "mcl_hoppers:update_formspec_0_60_0",
nodenames = { "group:hopper" },
run_at_every_load = false,
action = function(pos, node)
local meta = minetest.get_meta(pos)
local meta = minetest_get_meta(pos)
meta:set_string("formspec", mcl_hoppers_formspec)
end,
})
-- Legacy
minetest.register_alias("mcl_hoppers:hopper_item", HOPPER)

View File

@ -1,4 +1,5 @@
name = mcl_hoppers
author = jordan4ibanez
description = It's just a clone of Minecraft hoppers, functions nearly identical to them minus mesecons making them stop and the way they're placed.
depends = mcl_core, mcl_formspec, mcl_sounds, mcl_util
optional_depends = doc, screwdriver

View File

@ -1,11 +1,11 @@
# textdomain: mcl_jukebox
Music Disc=Disque de musique
A music disc holds a single music track which can be used in a jukebox to play music.=Un disque de musique contient une seule piste musicale qui peut être utilisée dans un juke-box pour lire de la musique.
A music disc holds a single music track which can be used in a jukebox to play music.=Un disque de musique contient une seule piste musicale qui peut être utilisée dans un juke-box pour jouer de la musique.
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.=Placez un disque de musique dans un juke-box vide pour lire la musique. Utilisez à nouveau le juke-box pour récupérer le disque de musique. La musique ne peut être entendue que par vous, pas par les autres joueurs.
Music Disc=Disque de musique
@1—@2=@1—@2
Jukebox=Juke-box
Jukeboxes play music when they're supplied with a music disc.=Les juke-box diffusent de la musique lorsqu'ils sont fournis avec un disque de musique.
Place a music disc into an empty jukebox to insert the music disc and play music. If the jukebox already has a music disc, you will retrieve this music disc first. The music can only be heard by you, not by other players.=Placez un disque de musique dans un juke-box vide pour insérer le disque de musique et lire de la musique. Si le juke-box possède déjà un disque de musique, vous allez d'abord récupérer ce disque de musique. La musique ne peut être entendue que par vous, pas par les autres joueurs.
Place a music disc into an empty jukebox to insert the music disc and play music. If the jukebox already has a music disc, you will retrieve this music disc first. The music can only be heard by you, not by other players.=Placez un disque de musique dans un juke-box vide pour insérer le disque de musique et jouer de la musique. Si le juke-box contient déjà un disque de musique, vous allez d'abord récupérer ce disque de musique. La musique ne peut être entendue que par vous, pas par les autres joueurs.
Now playing: @1—@2=En cours de lecture: @1—@2
Uses music discs to play music=Utilise des disques de musique pour lire de la musique
Uses music discs to play music=Utilise des disques de musique pour jouer de la musique

View File

@ -3,4 +3,4 @@ Chain=Chaine
Chains are metallic decoration blocks.=Les chaines sont des blocs de décoration métalliques.
Lantern=Lanterne
Lanterns are light sources which can be placed on the top or the bottom of most blocks.=Les lanternes sont des sources de lumières qui peuvent être placées au sommet ou en-dessous de la plupart des blocs.
Soul Lantern=Lanterne des âmes
Soul Lantern=Lanterne des âmes

View File

@ -3,4 +3,4 @@ Chain=
Chains are metallic decoration blocks.=
Lantern=
Lanterns are light sources which can be placed on the top or the bottom of most blocks.=
Soul Lantern=
Soul Lantern=

View File

@ -0,0 +1,4 @@
# textdomain: mcl_loom
Loom=Métier à tisser
Used to create banner designs=Utilisé pour créer des motifs de bannières
This is the shepherd villager's work station. It is used to create banner designs.=Ceci est le poste de travail du villageois berger. Il est utilisé pour créer des motifs de bannière.

View File

@ -0,0 +1,4 @@
# textdomain: mcl_loom
Loom=Ткацкий станок
Used to create banner designs=Позволяет создавать узоры на флаге
This is the shepherd villager's work station. It is used to create banner designs.=Это рабочее место пастуха. Позволяет создавать узоры на флаге

View File

@ -0,0 +1,4 @@
# textdomain: mcl_loom
Loom=
Used to create banner designs=
This is the shepherd villager's work station. It is used to create banner designs.=

View File

@ -623,13 +623,13 @@ minetest.register_craft({
}
})
mcl_stairs.register_stair_and_slab_simple("crimson_hyphae_wood", "mcl_mushroom:crimson_hyphae_wood", "Crimson Stair", "Crimson Slab", "Double Crimson Slab", "woodlike")
mcl_stairs.register_stair_and_slab_simple("crimson_hyphae_wood", "mcl_mushroom:crimson_hyphae_wood", S("Crimson Stair"), S("Crimson Slab"), S("Double Crimson Slab"), "woodlike")
--Hyphae Stairs and slabs
local barks = {
{ "warped", S("Warped Bark Stairs"), S("Warped Bark Slab"), S("Double Warped Bark Slab") },
{ "crimson", S("Crimson Bark Stairs"), S("Crimson Oak Bark Slab"), S("Double Crimson Bark Slab") },
{ "warped", S("Warped Bark Stair"), S("Warped Bark Slab"), S("Double Warped Bark Slab") },
{ "crimson", S("Crimson Bark Stair"), S("Crimson Bark Slab"), S("Double Crimson Bark Slab") },
}
for b=1, #barks do

View File

@ -7,6 +7,16 @@ Warped Roots=Racines tordues
Warped Wart Block=Bloc de verrues tordu
Shroomlight=Champilampe
Warped Hyphae=Tige tordue
The stem of a warped hyphae=La tige d'un champigon géant tordu
Warped Hyphae Bark=Ecorce de Tige tordue
This is a decorative block surrounded by the bark of an hyphae.=Ceci est un bloc décoratif entouré par l'écorce d'une tige.
Stripped Warped Hyphae=Tige tordue écorcée
The stripped stem of a warped hyphae=La tige écorcée d'un champignon géant tordu
Stripped Warped Hyphae Bark=Ecorce de Tige tordue
The stripped wood of a warped hyphae=Le bois écorcé d'un champignon géant tordu
Warped Bark Stair=Escalier d'écorce tordue
Warped Bark Slab=Dalle d'écorce tordue
Double Warped Bark Slab=Double dalle d'écorce tordue
Warped Nylium=Nylium tordu
Warped Checknode - only to check!=Bloc de vérification tordu - seulement pour vérifier !
Warped Hyphae Wood=Planches tordues
@ -15,6 +25,15 @@ Warped Slab=Dalle tordue
Crimson Fungus Mushroom=Champignon écarlate
Crimson Roots=Racines écarlates
Crimson Hyphae=Tige écarlate
The stem of a crimson hyphae=La tige d'un champigon géant tordu
Crimson Hyphae Bark=Ecorce de Tige écarlate
Stripped Crimson Hyphae=Tige écarlate écorcée
The stripped stem of a crimson hyphae=La tige écorcée d'un champignon géant écarlate
Stripped Crimson Hyphae Bark=Ecorce de Tige écarlate
The stripped wood of a crimson hyphae=Le bois écorcé d'un champignon géant écarlate
Crimson Bark Stair=Escalier d'écorce écarlate
Crimson Bark Slab=Dalle d'écorce écarlate
Double Crimson Bark Slab=Double dalle d'écorce écarlate
Crimson Hyphae Wood=Planches écarlates
Crimson Stair=Escalier écarlate
Crimson Slab=Dalle écarlate

View File

@ -15,11 +15,11 @@ The stripped stem of a warped hyphae=
Stripped Warped Hyphae Bark=
The stripped wood of a warped hyphae=
Warped Hyphae Wood=
Warped Bark Stair=
Warped Bark Slab=
Double Warped Bark Slab=
Warped Nylium=
Warped Checknode - only to check!=
Warped Hyphae Wood=
Warped Stair=
Warped Slab=
Crimson Fungus Mushroom=
@ -30,8 +30,9 @@ Crimson Hyphae Bark=
Stripped Crimson Hyphae=
The stripped stem of a crimson hyphae=
Stripped Crimson Hyphae Bark=
The stripped wood of a warped hyphae=
Crimson Oak Bark Slab=
The stripped wood of a crimson hyphae=
Crimson Bark Stair=
Crimson Bark Slab=
Double Crimson Bark Slab=
Crimson Hyphae Wood=
Crimson Stair=

View File

@ -37,4 +37,9 @@ Nether warts are plants home to the Nether. They can be planted on soul sand and
Place this item on soul sand to plant it and watch it grow.=Placez cet article sur du sable d'âme pour le planter et regardez-le grandir.
Burns your feet=Vous brûle les pieds
Grows on soul sand=Pousse sur le sable de l'âme
Reduces walking speed=Réduit la vitesse de marche
Reduces walking speed=Réduit la vitesse de marche
Netherite Scrap=Fragments de Netherite
Netherite Ingot=Lingot de Netherite
Ancient Debris=Débris antiques
Netherite Block=Bloc de Netherite
Netherite block is very hard and can be made of 9 netherite ingots.=Les blocs de netherite sont très durs et peuvent être fabriqués à partir de 9 lingots de netherite.

View File

@ -41,3 +41,5 @@ Reduces walking speed=
Netherite Scrap=
Netherite Ingot=
Ancient Debris=
Netherite Block=
Netherite block is very hard and can be made of 9 netherite ingots.=

View File

@ -0,0 +1,9 @@
# textdomain: mcl_raw_ores
Raw Iron=Fer Brut
Raw Gold=Or Brut
Raw Iron. Mine an Iron ore to get it.=Fer Brut. Miner du minerai de fer pour en obtenir.
Raw Gold. Mine a Gold ore to get it.=Or Brut. Miner du minerai d'or pour en obtenir.
Block of Raw Iron=Bloc de Fer Brut
Block of Raw Gold=Bloc d'Or Brut
A block of raw Iron is mostly a decorative block but also useful as a compact storage of raw Iron.=Un bloc de Fer brut est principalement un bloc décoratif mais aussi utile comme stockage compact de Fer brut.
A block of raw Gold is mostly a decorative block but also useful as a compact storage of raw Gold.=Un bloc d'Or brut est principalement un bloc décoratif mais aussi utile comme stockage compact d'Or brut.

View File

@ -3,3 +3,7 @@ Raw Iron=
Raw Gold=
Raw Iron. Mine an Iron ore to get it.=
Raw Gold. Mine a Gold ore to get it.=
Block of Raw Iron=
Block of Raw Gold=
A block of raw Iron is mostly a decorative block but also useful as a compact storage of raw Iron.=
A block of raw Gold is mostly a decorative block but also useful as a compact storage of raw Gold.=

View File

@ -14,6 +14,7 @@ mcl_shields = {
enchantments = {"mending", "unbreaking"},
players = {},
}
local players = mcl_shields.players
local interact_priv = minetest.registered_privileges.interact
interact_priv.give_to_singleplayer = false
@ -110,7 +111,7 @@ end
function mcl_shields.is_blocking(obj)
if not mcl_util or not mcl_util.is_player(obj) then return end
local blocking = mcl_shields.players[obj].blocking
local blocking = players[obj].blocking
if blocking > 0 then
local shieldstack = obj:get_wielded_item()
if blocking == 1 then
@ -155,7 +156,7 @@ local function modify_shield(player, vpos, vrot, i)
if i == 1 then
arm = "Left"
end
local player_data = mcl_shields.players[player]
local player_data = players[player]
if not player_data then return end
local shields = player_data.shields
if not shields then return end
@ -178,7 +179,10 @@ local function set_shield(player, block, i)
modify_shield(player, vector.new(3, -5, 0), vector.new(0, 0, 0), i)
end
end
local shield = mcl_shields.players[player].shields[i]
local player_data = players[player]
if not player_data then return end
local player_shields = player_data.shields
local shield = player_shields[i]
if not shield then return end
local luaentity = shield:get_luaentity()
if not luaentity then return end
@ -219,12 +223,12 @@ end
local function add_shield_entity(player, i)
local shield = minetest.add_entity(player:get_pos(), "mcl_shields:shield_entity")
shield:get_luaentity()._shield_number = i
mcl_shields.players[player].shields[i] = shield
players[player].shields[i] = shield
set_shield(player, false, i)
end
local function remove_shield_entity(player, i)
local shields = mcl_shields.players[player].shields
local shields = players[player].shields
if shields[i] then
shields[i]:remove()
shields[i] = nil
@ -232,7 +236,7 @@ local function remove_shield_entity(player, i)
end
local function handle_blocking(player)
local player_shield = mcl_shields.players[player]
local player_shield = players[player]
local rmb = player:get_player_control().RMB
if rmb then
local shield_in_offhand = mcl_shields.wielding_shield(player, 1)
@ -274,7 +278,7 @@ local function handle_blocking(player)
end
local function update_shield_entity(player, blocking, i)
local shield = mcl_shields.players[player].shields[i]
local shield = players[player].shields[i]
if mcl_shields.wielding_shield(player, i) then
if not shield then
add_shield_entity(player, i)
@ -378,7 +382,7 @@ end)
minetest.register_on_leaveplayer(function(player)
shield_hud[player] = nil
mcl_shields.players[player] = nil
players[player] = nil
end)
minetest.register_craft({
@ -468,7 +472,7 @@ minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv
end)
minetest.register_on_joinplayer(function(player)
mcl_shields.players[player] = {
players[player] = {
shields = {},
blocking = 0,
}

View File

@ -0,0 +1,4 @@
# textdomain: mcl_smithing_table
Inventory=Inventaire
Upgrade Gear=Améliorer l'équipement
Smithing table=Table de Forgeron

View File

@ -1,4 +1,3 @@
local S = minetest.get_translator(minetest.get_current_modname())
local LIGHT_ACTIVE_FURNACE = 13

View File

@ -0,0 +1,8 @@
# textdomain: mcl_smoker
Inventory=Inventaire
Smoker=Fumoir
Cooks food faster than furnace=Cuit la nourriture plus vite qu'un fourneau
Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn.=Utiliser le livre de recettes pour voir ce que vous pouvez fondre, ce que vous pouvez utiliser comme combustible et combien de temps ça va brûler.
Use the furnace to open the furnace menu.\nPlace a furnace fuel in the lower slot and the source material in the upper slot.\nThe furnace will slowly use its fuel to smelt the item.\nThe result will be placed into the output slot at the right side.=Utiliser le fourneau pour ouvrir le menu.\nPlacer le combustible dans la case en bas et le matériau source dans la case du haut.\nLe fourneau utilisera son combustible pour fondre lentement l'objet.\nLe résultat sera placé dans la case de sortie à droite.
Smokers cook several items, mainly raw foods, into cooked foods, but twice as fast as a normal furnace.=Les fumoirs cuisent plusieurs objets, surtout de la nourriture crue, en de la nourriture cuite.
Burning Smoker=Fumoir actif

View File

@ -1,5 +1,8 @@
# textdomain: mcl_smoker
Inventory=
Smoker=
Cooks food faster than furnace=
Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn.=
Use the furnace to open the furnace menu.\nPlace a furnace fuel in the lower slot and the source material in the upper slot.\nThe furnace will slowly use its fuel to smelt the item.\nThe result will be placed into the output slot at the right side.=
Smokers cook several items, mainly raw foods, into cooked foods, but twice as fast as a normal furnace.=
Burning Smoker=
Burning Smoker=

View File

@ -0,0 +1,3 @@
# textdomain: mcl_spyglass
Spyglass=Longue-vue
A spyglass is an item that can be used for zooming in on specific locations.=Une longue-vue peut servir à agrandir l'image dans une direction spécifique.

View File

@ -14,19 +14,23 @@ Stone Pickaxe=Pioche en Pierre
Iron Pickaxe=Pioche en Fer
Golden Pickaxe=Pioche en Or
Diamond Pickaxe=Pioche en Diamant
Netherite Pickaxe=Pioche en Netherite
Wooden Shovel=Pelle en Bois
Stone Shovel=Pelle en Pierre
Iron Shovel=Pelle en Fer
Golden Shovel=Pelle en Or
Diamond Shovel=Pelle en Diamant
Netherite Shovel=Pelle en Netherite
Wooden Axe=Hache en Bois
Stone Axe=Hache en Pierre
Iron Axe=Hache en Fer
Golden Axe=Hache en Or
Diamond Axe=Hache en Diamant
Netherite Axe=Hache en Netherite
Wooden Sword=Épée en Bois
Stone Sword=Épée en Pierre
Iron Sword=Épée en Fer
Golden Sword=Épée en Or
Diamond Sword=Épée en Diamant
Netherite Sword=Épée en Netherite
Shears=Cisailles

View File

@ -0,0 +1,3 @@
# textdomain: mcl_tridents
Trident=Trident
Launches a trident when you rightclick and it is in your hand=Lance un trident lorsque vous cliquez droit et qu'il est dans votre main

View File

@ -1,20 +1,20 @@
# textdomain: mclx_stairs
Oak Bark Stairs=Escalier en écorse de Chêne
Oak Bark Stairs=Escalier en écorce de Chêne
Oak Bark Slab=Dalle d'écorce de Chêne
Double Oak Bark Slab=Double Dalle d'écorce de Chêne
Acacia Bark Stairs=Escalier en écorce d'Acacia
Acacia Bark Slab=Dalle d'écorce d'Acacia
Double Acacia Bark Slab=Double Dalle d'écorce d'Acacia
Spruce Bark Stairs=Escalier en écorse de Sapin
Spruce Bark Stairs=Escalier en écorce de Sapin
Spruce Bark Slab=Dalle d'écorce de Sapin
Double Spruce Bark Slab=Double Dalle d'écorce de Sapin
Birch Bark Stairs=Escalier en écorse de Bouleau
Birch Bark Stairs=Escalier en écorce de Bouleau
Birch Bark Slab=Dalle d'écorce de Bouleau
Double Birch Bark Slab=Double Dalle d'écorce de Bouleau
Jungle Bark Stairs=Escalier en écorse d'Acajou
Jungle Bark Stairs=Escalier en écorce d'Acajou
Jungle Bark Slab=Dalle d'écorce d'Acajou
Double Jungle Bark Slab=Double Dalle d'écorce d'Acajou
Dark Oak Bark Stairs=Escalier en écorse de Chêne Noir
Dark Oak Bark Stairs=Escalier en écorce de Chêne Noir
Dark Oak Bark Slab=Dalle d'écorce de Chêne Noir
Double Dark Oak Bark Slab=Double Dalle d'écorce de Chêne Noir
Lapis Lazuli Slab=Dalle de Lapis Lazuli

View File

@ -1,2 +1,2 @@
#textdomain: screwdriver
# textdomain: screwdriver
Screwdriver=Tournevis

View File

@ -1,2 +1,2 @@
#textdomain: screwdriver
# textdomain: screwdriver
Screwdriver=Śrubokręt

View File

@ -1,2 +1,2 @@
#textdomain: screwdriver
# textdomain: screwdriver
Screwdriver=Отвёртка

View File

@ -1,2 +1,2 @@
#textdomain: screwdriver
# textdomain: screwdriver
Screwdriver=

View File

@ -3045,8 +3045,8 @@ local function register_decorations()
octaves = 3,
persist = 0.6
},
y_min = 4,
y_max = mcl_mapgen.overworld.max,
spawn_by = "air",
num_spawn_by = 8,
decoration = "mcl_core:cactus",
biomes = {"Desert",
"Mesa","Mesa_sandlevel",

View File

@ -670,8 +670,8 @@ local function register_mgv6_decorations()
octaves = 3,
persist = 0.6
},
y_min = 4,
y_max = mcl_mapgen.overworld.max,
spawn_by = "air",
num_spawn_by = 8,
decoration = "mcl_core:cactus",
height = 1,
height_max = 3,

View File

@ -1,11 +1,8 @@
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local chance_per_chunk = 400
local noise_multiplier = 2.5
local random_offset = 9159
local scanning_ratio = 0.001
local struct_threshold = 396
local struct_threshold = 393.91
local mcl_structures_get_perlin_noise_level = mcl_structures.get_perlin_noise_level
local minetest_find_nodes_in_area = minetest.find_nodes_in_area
@ -13,6 +10,223 @@ local minetest_swap_node = minetest.swap_node
local math_round = math.round
local math_abs = math.abs
local function insert_times(how_many_times, what, where)
for i = 1, how_many_times do
where[#where + 1] = what
end
end
local function create_probability_picker(table_of_how_many_times_what)
local picker = {}
for _, v in pairs(table_of_how_many_times_what) do
insert_times(v[1], v[2], picker)
end
return picker
end
local STONE_DECOR = {
"mcl_core:stonebrickcarved",
"mcl_blackstone:blackstone_chiseled_polished",
}
local PANE_OR_CHAIN = {
"xpanes:bar",
"mcl_lanterns:chain",
}
local PANE_OR_CHAIN_FLAT = {
"xpanes:bar_flat",
"mcl_lanterns:chain",
}
local STAIR1 = {
"mcl_stairs:stair_stonebrickcracked",
-- TODO: stair_blackstone_brick_polished_cracked:
"mcl_stairs:stair_deepslate_bricks",
}
local STAIR2 = {
"mcl_stairs:stair_stonebrickmossy",
"mcl_stairs:stair_blackstone_brick_polished",
}
local STAIR3 = {
"mcl_stairs:stair_stone_rough",
"mcl_stairs:stair_blackstone_chiseled_polished",
}
local STAIR4 = {
"mcl_stairs:stair_stonebrick",
"mcl_stairs:stair_blackstone_brick_polished",
}
local STAIR_OUTER1 = {
"mcl_stairs:stair_stonebrickcracked_outer",
-- TODO: stair_blackstone_brick_polished_cracked_outer:
"mcl_stairs:stair_deepslate_bricks_outer",
}
local STAIR_OUTER2 = {
"mcl_stairs:stair_stonebrickmossy_outer",
"mcl_stairs:stair_blackstone_brick_polished_outer",
}
local STAIR_OUTER3 = {
"mcl_stairs:stair_stone_rough_outer",
"mcl_stairs:stair_blackstone_chiseled_polished_outer",
}
local STAIR_OUTER4 = {
"mcl_stairs:stair_stonebrick_outer",
"mcl_stairs:stair_blackstone_brick_polished_outer",
}
local TOP_DECOR1 = {
"mcl_core:goldblock",
"mcl_core:goldblock",
}
local TOP_DECOR2 = {
"mcl_core:stone_with_gold",
"mcl_core:stone_with_gold",
}
local STONE1 = {
"mcl_core:stonebrickcracked",
-- TODO: polished_blackstone_brick_cracked:
"mcl_deepslate:deepslate_bricks_cracked",
}
local STONE2 = {
"mcl_core:stonebrickmossy",
"mcl_blackstone:blackstone_brick_polished",
}
local STONE3 = {
"mcl_nether:magma",
"mcl_core:packed_ice",
}
local STONE4 = {
"mcl_core:stonebrick",
"mcl_blackstone:blackstone_brick_polished",
}
local STONE5 = {
"mcl_core:stone",
"mcl_blackstone:blackstone",
}
local STONE6 = {
"mcl_core:cobble",
"mcl_blackstone:basalt_polished",
}
local STONE7 = {
"mcl_core:mossycobble",
"mcl_blackstone:blackstone_chiseled_polished",
}
local SLAB_TOP1 = {
"mcl_stairs:slab_stonebrickcracked_top",
-- TODO: slab_polished_blackstone_brick_cracked_top:
"mcl_stairs:slab_goldblock_top",
}
local SLAB_TOP2 = {
"mcl_stairs:slab_stonebrickmossy_top",
"mcl_stairs:slab_blackstone_brick_polished_top",
}
local SLAB_TOP3 = {
"mcl_stairs:slab_stone_top",
"mcl_stairs:slab_blackstone_top",
}
local SLAB_TOP4 = {
"mcl_stairs:slab_stonebrick_top",
"mcl_stairs:slab_blackstone_brick_polished_top",
}
local SLAB1 = {
"mcl_stairs:slab_stone",
"mcl_stairs:slab_blackstone",
}
local SLAB2 = {
"mcl_stairs:slab_stonebrick",
"mcl_stairs:slab_blackstone_brick_polished",
}
local SLAB3 = {
"mcl_stairs:slab_stonebrickcracked",
-- TODO: slab_polished_blackstone_brick_cracked:
"mcl_stairs:slab_goldblock",
}
local SLAB4 = {
"mcl_stairs:slab_stonebrickmossy",
"mcl_stairs:slab_blackstone_brick_polished",
}
local GARBAGE1 = {
"mcl_nether:netherrack",
"mcl_core:stone",
}
local LAVA_SOURCE = {
"mcl_nether:nether_lava_source",
"mcl_core:lava_source",
}
local GARBAGE3 = {
"mcl_nether:magma",
"mcl_nether:magma",
}
local stair_set_for_frame = create_probability_picker({
{ 3, STAIR1,},
{ 1, STAIR2,},
{ 1, STAIR3,},
{10, STAIR4,},
})
local stone_set_for_frame = create_probability_picker({
{ 3, STONE1,},
{ 1, STONE2,},
{ 1, STONE3,},
{10, STONE4,},
})
local slab_set_for_frame = create_probability_picker({
{ 3, SLAB_TOP1,},
{ 1, SLAB_TOP2,},
{ 1, SLAB_TOP3,},
{10, SLAB_TOP4,},
})
local stair_set_for_stairs = create_probability_picker({
{ 1, STAIR1,},
{ 2, STAIR2,},
{ 7, STAIR3,},
{ 3, STAIR4,},
})
local top_decoration_list = create_probability_picker({
{ 2, TOP_DECOR1,},
{ 1, TOP_DECOR2,},
})
local node_garbage = create_probability_picker({
{ 4, GARBAGE1,},
{ 1, LAVA_SOURCE,},
{ 1, GARBAGE3,},
})
local stair_replacement_list = {
"air",
"group:water",
"group:lava",
"group:buildable_to",
"group:deco_block",
}
local stair_outer_names = {
STAIR_OUTER1,
STAIR_OUTER2,
STAIR_OUTER3,
STAIR_OUTER4,
}
local stair_content = create_probability_picker({
{1, LAVA_SOURCE,},
{5, STONE5,},
{1, STONE4,},
{1, STONE3,},
{2, GARBAGE1,},
})
local stair_content_bottom = create_probability_picker({
{2, STONE3,},
{4, GARBAGE1,},
})
local slabs = create_probability_picker({
{5, SLAB1,},
{2, SLAB2,},
{1, SLAB3,},
{1, SLAB4,},
})
local stones = create_probability_picker({
{3, STONE5,},
{1, STONE6,},
{1, STONE7,},
})
local rotation_to_orientation = {
["0"] = 1,
@ -28,39 +242,11 @@ local rotation_to_param2 = {
["270"] = 2,
}
local node_top = {
"mcl_core:goldblock",
"mcl_core:stone_with_gold",
"mcl_core:goldblock",
}
local node_garbage = {
"mcl_nether:netherrack",
"mcl_core:lava_source",
"mcl_nether:netherrack",
"mcl_nether:netherrack",
"mcl_nether:magma",
"mcl_nether:netherrack",
}
local stone1 = {name = "mcl_core:stonebrickcracked"}
local stone2 = {name = "mcl_core:stonebrickmossy"}
local stone3 = {name = "mcl_nether:magma"}
local stone4 = {name = "mcl_core:stonebrick"}
local slab1 = {name = "mcl_stairs:slab_stonebrickcracked_top"}
local slab2 = {name = "mcl_stairs:slab_stonebrickmossy_top"}
local slab3 = {name = "mcl_stairs:slab_stone_top"}
local slab4 = {name = "mcl_stairs:slab_stonebrick_top"}
local stair1 = "mcl_stairs:stair_stonebrickcracked"
local stair2 = "mcl_stairs:stair_stonebrickmossy"
local stair3 = "mcl_stairs:stair_stone_rough"
local stair4 = "mcl_stairs:stair_stonebrick"
local function draw_frame(frame_pos, frame_width, frame_height, orientation, pr, is_chain, rotation)
local function draw_frame(frame_pos, frame_width, frame_height, orientation, pr, is_chain, rotation, is_blackstone)
local param2 = rotation_to_param2[rotation]
local variant = is_blackstone and 2 or 1
local function set_ruined_node(pos, node)
if pr:next(1, 5) == 4 then return end
@ -68,28 +254,20 @@ local function draw_frame(frame_pos, frame_width, frame_height, orientation, pr,
end
local function get_random_stone_material()
local rnd = pr:next(1, 15)
if rnd < 4 then return stone1 end
if rnd == 4 then return stone2 end
if rnd == 5 then return stone3 end
return stone4
local rnd = pr:next(1, #stone_set_for_frame)
return {name = stone_set_for_frame[rnd][variant]}
end
local function get_random_slab()
local rnd = pr:next(1, 15)
if rnd < 4 then return slab1 end
if rnd == 4 then return slab2 end
if rnd == 5 then return slab3 end
return slab4
return {name = slab_set_for_frame[rnd][variant]}
end
local function get_random_stair(param2_offset)
local param2 = (param2 + (param2_offset or 0)) % 4
local rnd = pr:next(1, 15)
if rnd < 4 then return {name = stair1, param2 = param2} end
if rnd == 4 then return {name = stair2, param2 = param2} end
if rnd == 5 then return {name = stair3, param2 = param2} end
return {name = stair4, param2 = param2}
local rnd = pr:next(1, #stair_set_for_frame)
local stare_name = stair_set_for_frame[rnd][variant]
return {name = stare_name, param2 = param2}
end
local function set_frame_stone_material(pos)
@ -118,7 +296,6 @@ local function draw_frame(frame_pos, frame_width, frame_height, orientation, pr,
local air_nodes = frame_nodes - obsidian_nodes
local function set_frame_node(pos)
-- local node_choice = pr:next(1, air_nodes + obsidian_nodes)
local node_choice = math_round(mcl_structures_get_perlin_noise_level(pos) * (air_nodes + obsidian_nodes))
if node_choice > obsidian_nodes and air_nodes > 0 then
air_nodes = air_nodes - 1
@ -141,7 +318,7 @@ local function draw_frame(frame_pos, frame_width, frame_height, orientation, pr,
local is_top_hole = is_top and frame_width > 5 and ((pos2.x == x1 + slide_x * 2 and pos2.z == z1 + slide_z * 2) or (pos2.x == last_x - slide_x * 2 and pos2.z == last_z - slide_z * 2))
if is_top_hole then
if pr:next(1, 7) > 1 then
minetest_swap_node(pos2, {name = "xpanes:bar_flat", param2 = orientation})
minetest_swap_node(pos2, {name = PANE_OR_CHAIN_FLAT[variant], param2 = orientation})
end
else
set_frame_stone_material(pos2)
@ -152,18 +329,18 @@ local function draw_frame(frame_pos, frame_width, frame_height, orientation, pr,
local pos = def.pos_outer1
local is_decor_here = not is_top and pos.y % 3 == 2
if is_decor_here then
minetest_swap_node(pos, {name = "mcl_core:stonebrickcarved"})
minetest_swap_node(pos, {name = STONE_DECOR[variant]})
elseif is_chain then
if not is_top and not is_obsidian then
minetest_swap_node(pos, {name = "xpanes:bar"})
minetest_swap_node(pos, {name = PANE_OR_CHAIN[variant]})
else
minetest_swap_node(pos, {name = "xpanes:bar_flat", param2 = orientation})
minetest_swap_node(pos, {name = PANE_OR_CHAIN_FLAT[variant], param2 = orientation})
end
else
if pr:next(1, 5) == 3 then
minetest_swap_node(pos, {name = "mcl_core:stonebrickcracked"})
minetest_swap_node(pos, {name = STONE1[variant]})
else
minetest_swap_node(pos, {name = "mcl_core:stonebrick"})
minetest_swap_node(pos, {name = STONE4[variant]})
end
end
end
@ -253,7 +430,7 @@ local function draw_frame(frame_pos, frame_width, frame_height, orientation, pr,
})
end end
local node_top = {name = node_top[pr:next(1, #node_top)]}
local node_top = {name = top_decoration_list[pr:next(1, #top_decoration_list)][variant]}
if is_chain then
set_ruined_frame_stone_material({x = x1 + slide_x * 2, y = last_y + 3, z = z1 + slide_z * 2})
set_ruined_frame_stone_material({x = x1 + slide_x , y = last_y + 3, z = z1 + slide_z })
@ -281,7 +458,9 @@ end
local possible_rotations = {"0", "90", "180", "270"}
local function draw_trash(pos, width, height, lift, orientation, pr)
local function draw_trash(pos, width, height, lift, orientation, pr, is_blackstone)
local variant = is_blackstone and 2 or 1
local pos = pos
local slide_x = (1 - orientation)
local slide_z = orientation
local x1 = pos.x - lift - 1
@ -297,7 +476,7 @@ local function draw_trash(pos, width, height, lift, orientation, pr)
for x = x1 + pr:next(0, 2), x2 - pr:next(0, 2) do
for z = z1 + pr:next(0, 2), z2 - pr:next(0, 2) do
if inverted_opacity_0_5 == 0 or (x % inverted_opacity_0_5 ~= pr:next(0, 1) and z % inverted_opacity_0_5 ~= pr:next(0, 1)) then
minetest_swap_node({x = x, y = y, z = z}, {name = node_garbage[pr:next(1, #node_garbage)]})
minetest_swap_node({x = x, y = y, z = z}, {name = node_garbage[pr:next(1, #node_garbage)][variant]})
end
end
end
@ -305,77 +484,6 @@ local function draw_trash(pos, width, height, lift, orientation, pr)
end
end
local stair_replacement_list = {
"air",
"group:water",
"group:lava",
"group:buildable_to",
"group:deco_block",
}
local stair_names = {
"mcl_stairs:stair_stonebrickcracked",
"mcl_stairs:stair_stonebrickmossy",
"mcl_stairs:stair_stone_rough",
"mcl_stairs:stair_stone_rough",
"mcl_stairs:stair_stone_rough",
"mcl_stairs:stair_stone_rough",
"mcl_stairs:stair_stone_rough",
"mcl_stairs:stair_stone_rough",
"mcl_stairs:stair_stone_rough",
"mcl_stairs:stair_stonebrick",
"mcl_stairs:stair_stonebrick",
"mcl_stairs:stair_stonebrick",
}
local stair_outer_names = {
"mcl_stairs:stair_stonebrickcracked_outer",
"mcl_stairs:stair_stonebrickmossy_outer",
"mcl_stairs:stair_stone_rough_outer",
"mcl_stairs:stair_stonebrick_outer",
}
local stair_content = {
{name = "mcl_core:lava_source"},
{name = "mcl_core:stone"},
{name = "mcl_core:stone"},
{name = "mcl_core:stone"},
{name = "mcl_core:stone"},
{name = "mcl_core:stone"},
{name = "mcl_core:stonebrick"},
{name = "mcl_nether:magma"},
{name = "mcl_nether:netherrack"},
{name = "mcl_nether:netherrack"},
}
local stair_content_bottom = {
{name = "mcl_nether:magma"},
{name = "mcl_nether:magma"},
{name = "mcl_nether:netherrack"},
{name = "mcl_nether:netherrack"},
{name = "mcl_nether:netherrack"},
{name = "mcl_nether:netherrack"},
}
local slabs = {
{name = "mcl_stairs:slab_stone"},
{name = "mcl_stairs:slab_stone"},
{name = "mcl_stairs:slab_stone"},
{name = "mcl_stairs:slab_stone"},
{name = "mcl_stairs:slab_stone"},
{name = "mcl_stairs:slab_stonebrick"},
{name = "mcl_stairs:slab_stonebrick"},
{name = "mcl_stairs:slab_stonebrickcracked"},
{name = "mcl_stairs:slab_stonebrickmossy"},
}
local stones = {
{name = "mcl_core:stone"},
{name = "mcl_core:stone"},
{name = "mcl_core:stone"},
{name = "mcl_core:cobble"},
{name = "mcl_core:mossycobble"},
}
local stair_selector = {
[-1] = {
[-1] = {
@ -383,7 +491,7 @@ local stair_selector = {
param2 = 1,
},
[0] = {
names = stair_names,
names = stair_set_for_stairs,
param2 = 1,
},
[1] = {
@ -393,14 +501,14 @@ local stair_selector = {
},
[0] = {
[-1] = {
names = stair_names,
names = stair_set_for_stairs,
param2 = 0,
},
[0] = {
names = stair_content,
},
[1] = {
names = stair_names,
names = stair_set_for_stairs,
param2 = 2,
},
},
@ -410,7 +518,7 @@ local stair_selector = {
param2 = 0,
},
[0] = {
names = stair_names,
names = stair_set_for_stairs,
param2 = 3,
},
[1] = {
@ -422,25 +530,14 @@ local stair_selector = {
local stair_offset_from_bottom = 2
local function draw_stairs(pos, width, height, lift, orientation, pr, is_chain, param2)
local function draw_stairs(pos, width, height, lift, orientation, pr, is_chain, param2, is_blackstone)
local variant = is_blackstone and 2 or 1
local current_stair_content = stair_content
local current_stones = stones
local function set_ruined_node(pos, node)
if pr:next(1, 7) < 3 then return end
minetest_swap_node(pos, node)
return true
end
local param2 = param2
local mirror = param2 == 1 or param2 == 2
if mirror then
param2 = (param2 + 2) % 4
end
if mirror then param2 = (param2 + 2) % 4 end
local chain_offset = is_chain and 1 or 0
local lift = lift + stair_offset_from_bottom
local slide_x = (1 - orientation)
local slide_z = orientation
@ -455,52 +552,63 @@ local function draw_stairs(pos, width, height, lift, orientation, pr, is_chain,
local y = y2
local place_slabs = true
local x_key, z_key
local need_to_place_chest = true
local chest_pos
local bad_nodes_ratio = 0
while (y >= y1) or (bad_nodes_ratio > 0.07) do
local good_nodes_counter = 0
for x = x1, x2 do
x_key = (x == x1) and -1 or (x == x2) and 1 or 0
for z = z1, z2 do
local pos = {x = x, y = y, z = z}
if #minetest_find_nodes_in_area(pos, pos, stair_replacement_list, false) > 0 then
z_key = (z == z1) and -1 or (z == z2) and 1 or 0
local stair_coverage = (x_key ~= 0) or (z_key ~= 0)
if stair_coverage then
if stair_layer then
local stair = stair_selector[x_key][z_key]
local names = stair.names
set_ruined_node(pos, {name = names[pr:next(1, #names)], param2 = stair.param2})
elseif place_slabs then
set_ruined_node(pos, slabs[pr:next(1, #slabs)])
else
local placed = set_ruined_node(pos, current_stones[pr:next(1, #current_stones)])
if need_to_place_chest and placed then
chest_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
minetest_swap_node(chest_pos, {name = "mcl_chests:chest_small"})
need_to_place_chest = false
end
local ruinity = height + lift
local y_layer_to_start_squeezing = y1 - 2 * lift
while (true) do
local x11 = math_round(x1)
local x22 = math_round(x2)
local z11 = math_round(z1)
local z22 = math_round(z2)
local good_nodes = minetest_find_nodes_in_area({x = x11, y = y, z = z11}, {x = x22, y = y, z = z22}, stair_replacement_list, false)
local good_nodes_ratio = #good_nodes / (x22 - x11 + 1) / (z22 - z11 + 1)
if y < y1 and good_nodes_ratio <= 0.07 then return chest_pos end
for _, pos in pairs(good_nodes) do
if pr:next(1, ruinity) > 1 then
local x, z = pos.x, pos.z
x_key = (x == x11) and -1 or (x == x22) and 1 or 0
z_key = (z == z11) and -1 or (z == z22) and 1 or 0
local should_be_a_stair_here = (x_key ~= 0) or (z_key ~= 0)
if should_be_a_stair_here then
if stair_layer then
local stair = stair_selector[x_key][z_key]
local names = stair.names
minetest_swap_node(pos, {name = names[pr:next(1, #names)][variant], param2 = stair.param2})
elseif place_slabs then
minetest_swap_node(pos, {name = slabs[pr:next(1, #slabs)][variant]})
else
minetest_swap_node(pos, {name = current_stones[pr:next(1, #current_stones)][variant]})
if not chest_pos then
chest_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
minetest_swap_node(chest_pos, {name = "mcl_chests:chest_small"})
end
elseif not stair_layer then
set_ruined_node(pos, current_stair_content[pr:next(1, #current_stair_content)])
end
else
good_nodes_counter = good_nodes_counter + 1
elseif not stair_layer then
minetest_swap_node(pos, {name = current_stair_content[pr:next(1, #current_stair_content)][variant]})
end
end
end
bad_nodes_ratio = 1 - good_nodes_counter / ((x2 - x1 + 1) * (z2 - z1 + 1))
if y >= y1 then
if y >= y1 - lift then
x1 = x1 - 1
x2 = x2 + 1
z1 = z1 - 1
z2 = z2 + 1
elseif y < y_layer_to_start_squeezing then
local noise = mcl_structures_get_perlin_noise_level(pos) + 0.5
x1 = x1 + noise * pr:next(0,2)
x2 = x2 - noise * pr:next(0,2)
z1 = z1 + noise * pr:next(0,2)
z2 = z2 - noise * pr:next(0,2)
if x1 >= x2 then return chest_pos end
if z1 >= z2 then return chest_pos end
elseif y == y_layer_to_start_squeezing then
current_stones = stair_content_bottom
end
if y >= y1 then
if (stair_layer or place_slabs) then
y = y - 1
if y <= y1 then
current_stair_content = stair_content_bottom
current_stones = stair_content_bottom
end
end
place_slabs = not place_slabs
@ -508,19 +616,9 @@ local function draw_stairs(pos, width, height, lift, orientation, pr, is_chain,
else
place_slabs = false
y = y - 1
local dx1 = pr:next(0, 10)
if dx1 < 3 then x1 = x1 + dx1 end
local dx2 = pr:next(0, 10)
if dx2 < 3 then x2 = x2 - dx1 end
if x1 >= x2 then return chest_pos end
local dz1 = pr:next(0, 10)
if dz1 < 3 then z1 = z1 + dz1 end
local dz2 = pr:next(0, 10)
if dz2 < 3 then z2 = z2 - dz1 end
if z1 >= z2 then return chest_pos end
end
if ruinity > 2 then ruinity = math.max(ruinity - pr:next(0,2), 2) end
end
return chest_pos
end
local function enchant(stack, pr)
@ -533,19 +631,18 @@ local function enchant_armor(stack, pr)
mcl_enchanting.enchant_randomly(stack, 30, false, false, false, pr)
end
local function place(pos, rotation, pr)
local width = pr:next(2, 10)
local height = pr:next(((width < 3) and 3 or 2), 10)
local lift = pr:next(0, 4)
local rotation = rotation or possible_rotations[pr:next(1, #possible_rotations)]
local function common_place(pos, rotation, pr, width, height, lift, is_blackstone)
local pos = pos
local width = width
local height = height
local lift = lift
local rotation = rotation
local orientation = rotation_to_orientation[rotation]
assert(orientation)
local param2 = rotation_to_param2[rotation]
assert(param2)
local is_chain = pr:next(1, 3) > 1
draw_trash(pos, width, height, lift, orientation, pr)
local chest_pos = draw_stairs(pos, width, height, lift, orientation, pr, is_chain, param2)
draw_frame({x = pos.x, y = pos.y + lift, z = pos.z}, width + 2, height + 2, orientation, pr, is_chain, rotation)
draw_trash(pos, width, height, lift, orientation, pr, is_blackstone)
local chest_pos = draw_stairs(pos, width, height, lift, orientation, pr, is_chain, param2, is_blackstone)
draw_frame({x = pos.x, y = pos.y + lift, z = pos.z}, width + 2, height + 2, orientation, pr, is_chain, rotation, is_blackstone)
if not chest_pos then return end
local lootitems = mcl_loot.get_loot(
@ -575,7 +672,7 @@ local function place(pos, rotation, pr)
{itemstring = "mcl_clock:clock", weight = 5},
{itemstring = "mesecons_pressureplates:pressure_plate_gold_off", weight = 5},
{itemstring = "mobs_mc:gold_horse_armor", weight = 5},
{itemstring = "mcl_core:goldblock", weight = 1, amount_min = 1, amount_max = 2},
{itemstring = TOP_DECOR1, weight = 1, amount_min = 1, amount_max = 2},
{itemstring = "mcl_bells:bell", weight = 1},
{itemstring = "mcl_core:apple_gold_enchanted", weight = 1},
}
@ -588,6 +685,24 @@ local function place(pos, rotation, pr)
mcl_loot.fill_inventory(inv, "main", lootitems, pr)
end
local function place(pos, rotation, pr)
local width = pr:next(2, 10)
local height = pr:next(((width < 3) and 3 or 2), math.floor((10 + width/2)))
local lift = pr:next(0, 2)
local rotation = rotation or possible_rotations[pr:next(1, #possible_rotations)]
common_place(pos, rotation, pr, width, height, lift, false)
minetest.log("action","Ruined portal generated at " .. minetest.pos_to_string(pos))
end
local function place_blackstone(pos, rotation, pr)
local width = pr:next(2, 5)
local height = pr:next(((width < 3) and 3 or 2), math.floor((5 + width/2)))
local lift = pr:next(0, 1)
local rotation = rotation or possible_rotations[pr:next(1, #possible_rotations)]
common_place(pos, rotation, pr, width, height, lift, true)
minetest.log("action","Ruined portal v2 generated at " .. minetest.pos_to_string(pos))
end
local function get_place_rank(pos)
local x, y, z = pos.x, pos.y, pos.z
local p1 = {x = x , y = y, z = z }
@ -630,3 +745,35 @@ mcl_structures.register_structure({
end,
place_function = place,
})
mcl_structures.register_structure({
name = "ruined_portal_black",
decoration = {
deco_type = "simple",
flags = "all_floors",
fill_ratio = scanning_ratio,
height = 1,
place_on = {"mcl_nether:netherrack", "mcl_nether:soul_sand", "mcl_nether:nether_lava_source", "mcl_core:lava_source"},
},
on_finished_chunk = function(minp, maxp, seed, vm_context, pos_list)
if minp.y > mcl_mapgen.nether.max then return end
local pr = PseudoRandom(seed + random_offset)
local random_number = pr:next(1, chance_per_chunk)
local noise = mcl_structures_get_perlin_noise_level(minp) * noise_multiplier
if (random_number + noise) < struct_threshold then return end
local pos = pos_list[1]
if #pos_list > 1 then
local count = get_place_rank(pos)
for i = 2, #pos_list do
local pos_i = pos_list[i]
local count_i = get_place_rank(pos_i)
if count_i > count then
count = count_i
pos = pos_i
end
end
end
place_blackstone(pos, nil, pr)
end,
place_function = place_blackstone,
})

View File

@ -0,0 +1,13 @@
# textdomain: mcl_skins
Templates=Modèles
Arm size=Taille des bras
Bases=Teint
Footwears=Chaussures
Eyes=Yeux
Mouths=Bouches
Bottoms=Bas
Tops=Haut
Hairs=Cheveux
Headwears=Coiffe
Open skin configuration screen.=Ouvrir l'écran de configuration du costume.
Select=Sélectionner

154
tools/texture_editor.py Normal file
View File

@ -0,0 +1,154 @@
from http.server import BaseHTTPRequestHandler, HTTPServer
from pathlib import Path
import pprint
import time
import glob
import os
hostName = "localhost"
serverPort = 8080
paths = {}
def dump(obj):
s = ''
for attr in dir(obj):
s = s + "obj.%s = %r" % (attr, getattr(obj, attr)) + "\n"
return s
def get_png(path):
if path in paths:
return Path(pahts[path]).read_bytes()
for file in glob.glob("../**/" + path, recursive = True):
paths[path] = file
return Path(file).read_bytes()
return
def scan():
for file in glob.glob("../**/*.png", recursive = True):
basename = os.path.basename(file)
if basename in paths:
print("Duplicate texture name, please fix:\n * %s:\n - %s\n - %s\n" % (basename, paths[basename], file))
else:
paths[basename] = file
def color_picker():
return """
<canvas id="myCanvas" width="256" height="256"></canvas>
<br/>
<input type='text' size=7 id='color'/>
<script>
function componentToHex(c) {
var hex = c.toString(16);
return hex.length == 1 ? "0" + hex : hex;
}
function function_down(v, d){
if (d<=1) {
return Math.min(255, Math.floor((1-v) * d * 255))
}
return 255-Math.min(255, Math.floor(v * (2-d) * 255))
}
function function_up(v, d){
if (d<=1) {
return Math.min(255, Math.floor(v * d * 255))
}
return 255-Math.min(255, Math.floor((1-v) * (2-d) * 255))
}
function function_keep(v, d){
return Math.min(Math.floor(d*255), 255)
}
function getColorAtXY(x, y){
var x0 = (x - 128) / 128;
var y0 = (y - 128) / 128;
var alpha = 0.5 - Math.atan2(y0, x0) / 2 / Math.PI;
var sector_alpha = alpha*3;
var sector_number = 2 - Math.floor(sector_alpha);
sector_alpha = sector_alpha - Math.floor(sector_alpha);
var distance = Math.sqrt(x0 * x0 + y0*y0) * dist_mult;
if (sector_number == 0) {
return {
"r" : function_up(sector_alpha, distance),
"b" : function_down(sector_alpha, distance),
"g" : function_keep(sector_alpha, distance)
};
}
if (sector_number == 1) {
return {
"g" : function_up(sector_alpha, distance),
"r" : function_down(sector_alpha, distance),
"b" : function_keep(sector_alpha, distance)
};
}
return {
"b" : function_up(sector_alpha, distance),
"g" : function_down(sector_alpha, distance),
"r" : function_keep(sector_alpha, distance)
};
};
var canvas = document.getElementById("myCanvas");
canvas.addEventListener('mousedown', function(e) {
const rect = canvas.getBoundingClientRect();
const x = e.clientX - rect.left;
const y = e.clientY - rect.top;
const color = getColorAtXY(x, y);
const rgb = '#' + componentToHex(color.r) + componentToHex(color.g) + componentToHex(color.b);
document.body.style.background = rgb;
document.getElementById('color').value = rgb;
}, false)
var ctx = canvas.getContext("2d");
var canvasData = ctx.getImageData(0, 0, 256, 256);
var dist_mult = 2 / Math.sqrt(2);
var index = 0;
for (var y = 0; y < 256; y++) {
for (var x = 0; x < 256; x++) {
var color = getColorAtXY(x, y);
canvasData.data[index++] = color.r;
canvasData.data[index++] = color.g;
canvasData.data[index++] = color.b;
canvasData.data[index++] = 255;
}
}
ctx.putImageData(canvasData, 0, 0)
</script>
"""
def get_html(path):
content = "<p>Request: %s</p>" % path
content += "<body>"
content += color_picker()
content += "<ul>Texture List:"
for key, value in paths.items():
content += "<li><a href='%s'>%s</a></li>" % (key, key)
content += "</ul>"
content += "</body></html>"
return content
class MyServer(BaseHTTPRequestHandler):
def do_GET(self):
path = self.path
if path.endswith(".png"):
content = get_png(path)
self.send_response(200)
self.send_header("Content-type", "image/png")
self.end_headers()
self.wfile.write(content)
else:
content = get_html(path)
self.send_response(200)
self.send_header("Content-type", "text/html")
self.end_headers()
self.wfile.write(bytes(content, "utf-8"))
if __name__ == "__main__":
scan()
webServer = HTTPServer((hostName, serverPort), MyServer)
print("Server started http://%s:%s" % (hostName, serverPort))
try:
webServer.serve_forever()
except KeyboardInterrupt:
pass
webServer.server_close()
print("Server stopped.")

21
tools/update_credits.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
#
TMP_FILE=$(mktemp /tmp/mcl5.XXXXXXXX)
git --version 2>/dev/null 1>/dev/null
IS_GIT_AVAILABLE=$?
if [ $IS_GIT_AVAILABLE -ne 0 ]; then
echo "Please install git!\n\n"
fi
`git log --pretty="%an" 1>$TMP_FILE 2>/dev/null`
IS_GIT_REPO=$?
if [ $IS_GIT_REPO -ne 0 ]; then
echo "You have to be inside a git repo to update CONTRUBUTOR_LIST.txt\n\n"
fi
# Edit names here:
sed -i 's/nikolaus-albinger/Niklp/g' $TMP_FILE
cat $TMP_FILE | sort | uniq >../mods/HUD/mcl_credits/CONTRUBUTOR_LIST.txt