forked from VoxeLibre/VoxeLibre
Merge branch 'master' of https://git.minetest.land/MineClone2/MineClone2
This commit is contained in:
commit
0372057fe3
|
@ -1,5 +1,8 @@
|
|||
local S = minetest.get_translator("mcl_death_messages")
|
||||
local N = function(s) return s end
|
||||
local C = minetest.colorize
|
||||
|
||||
local color_skyblue = mcl_colors.AQUA
|
||||
|
||||
local function get_tool_name(item)
|
||||
local name = item:get_meta():get_string("name")
|
||||
|
@ -41,6 +44,9 @@ local msgs = {
|
|||
["murder"] = {
|
||||
N("@1 was slain by @2 using [@3]"),
|
||||
},
|
||||
["murder_hand"] = {
|
||||
N("@1 was slain by @2"),
|
||||
},
|
||||
["murder_any"] = {
|
||||
N("@1 was killed."),
|
||||
},
|
||||
|
@ -131,7 +137,7 @@ local last_damages = { }
|
|||
|
||||
minetest.register_on_dieplayer(function(player, reason)
|
||||
-- Death message
|
||||
local message = minetest.settings:get_bool("mcl_showDeathMessages")
|
||||
local message = minetest.settings:get_bool("mcl_showDeathMessages") --Maybe cache the setting?
|
||||
if message == nil then
|
||||
message = true
|
||||
end
|
||||
|
@ -201,7 +207,11 @@ minetest.register_on_dieplayer(function(player, reason)
|
|||
elseif hitter:is_player() then
|
||||
hittername = hitter:get_player_name()
|
||||
if hittername ~= nil then
|
||||
msg = dmsg("murder", name, hittername, minetest.colorize("#00FFFF", hitter_toolname))
|
||||
if hitter_toolname == "" then
|
||||
msg = dmsg("murder_hand", name, hittername)
|
||||
else
|
||||
msg = dmsg("murder", name, hittername, C(color_skyblue, hitter_toolname))
|
||||
end
|
||||
else
|
||||
msg = dmsg("murder_any", name)
|
||||
end
|
||||
|
@ -229,7 +239,7 @@ minetest.register_on_dieplayer(function(player, reason)
|
|||
if shooter == nil then
|
||||
msg = dmsg("arrow", name)
|
||||
elseif shooter:is_player() then
|
||||
msg = dmsg("arrow_name", name, shooter:get_player_name(), minetest.colorize("#00FFFF", get_tool_name(shooter:get_wielded_item())))
|
||||
msg = dmsg("arrow_name", name, shooter:get_player_name(), C(color_skyblue, get_tool_name(shooter:get_wielded_item())))
|
||||
elseif s_ent and s_ent._cmi_is_mob then
|
||||
if s_ent.nametag ~= "" then
|
||||
msg = dmsg("arrow_name", name, shooter:get_player_name(), get_tool_name(shooter:get_wielded_item()))
|
||||
|
|
|
@ -56,3 +56,4 @@ A ghast scared @1 to death.=Ein Ghast hat @1 zu Tode erschrocken.
|
|||
@1 was killed by a baby husk.=@1 wurde von einem Wüstenzombiebaby getötet.
|
||||
@1 was killed by a zombie pigman.=@1 wurde von einem Schweinezombie getötet.
|
||||
@1 was killed by a baby zombie pigman.=@1 wurde von einem Schweinezombiebaby getötet.
|
||||
@1 was slain by @2.=
|
||||
|
|
|
@ -55,3 +55,4 @@ A ghast scared @1 to death.=Se ha asustado @1 hasta morir.
|
|||
@1 was killed by a baby husk.=@1 fue asesinado por un bebé husk.
|
||||
@1 was killed by a zombie pigman.=@1 fue asesinado por un cerdo zombie.
|
||||
@1 was killed by a baby zombie pigman.=@1 fue asesinado por un bebé cerdo zombie.
|
||||
@1 was slain by @2.=
|
||||
|
|
|
@ -56,3 +56,4 @@ A ghast scared @1 to death.=Un ghast a éffrayé @1 à mort.
|
|||
@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.=
|
||||
|
|
|
@ -56,3 +56,4 @@ A ghast scared @1 to death.=Гаст напугал @1 до смерти.
|
|||
@1 was killed by a baby husk.=@1 был(а) убит(а) машылом-кадавром.
|
||||
@1 was killed by a zombie pigman.=@1 был(а) убит(а) зомби-свиночеловеком.
|
||||
@1 was killed by a baby zombie pigman.=@1 был(а) убит(а) малышом-зомби-свиночеловеком.
|
||||
@1 was slain by @2.=
|
||||
|
|
|
@ -56,3 +56,4 @@ A ghast scared @1 to death.=
|
|||
@1 was killed by a baby husk.=
|
||||
@1 was killed by a zombie pigman.=
|
||||
@1 was killed by a baby zombie pigman.=
|
||||
@1 was slain by @2.=
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
name = mcl_death_messages
|
||||
author = 4Evergreen4
|
||||
description = Shows messages in chat when a player dies.
|
||||
depends = mcl_colors
|
||||
|
|
|
@ -489,8 +489,8 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz
|
|||
if filter == nil then
|
||||
filter = ""
|
||||
end
|
||||
formspec = formspec .. "field[5.3,1.34;4,0.75;suche;;"..minetest.formspec_escape(filter).."]"
|
||||
formspec = formspec .. "field_close_on_enter[suche;false]"
|
||||
formspec = formspec .. "field[5.3,1.34;4,0.75;search;;"..minetest.formspec_escape(filter).."]"
|
||||
formspec = formspec .. "field_close_on_enter[search;false]"
|
||||
end
|
||||
if pagenum ~= nil then formspec = formspec .. "p"..tostring(pagenum) end
|
||||
|
||||
|
@ -561,11 +561,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
elseif fields.inv then
|
||||
if players[name].page == "inv" then return end
|
||||
page = "inv"
|
||||
elseif fields.suche == "" and not fields.creative_next and not fields.creative_prev then
|
||||
elseif fields.search == "" and not fields.creative_next and not fields.creative_prev then
|
||||
set_inv_page("all", player)
|
||||
page = "nix"
|
||||
elseif fields.suche ~= nil and not fields.creative_next and not fields.creative_prev then
|
||||
set_inv_search(string.lower(fields.suche),player)
|
||||
elseif fields.search ~= nil and not fields.creative_next and not fields.creative_prev then
|
||||
set_inv_search(string.lower(fields.search),player)
|
||||
page = "nix"
|
||||
end
|
||||
|
||||
|
@ -612,8 +612,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
players[name].start_i = start_i
|
||||
|
||||
local filter = ""
|
||||
if not fields.nix and fields.suche ~= nil and fields.suche ~= "" then
|
||||
filter = fields.suche
|
||||
if not fields.nix and fields.search ~= nil and fields.search ~= "" then
|
||||
filter = fields.search
|
||||
players[name].filter = filter
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
local S = minetest.get_translator("mesecons_commandblock")
|
||||
local F = minetest.formspec_escape
|
||||
|
||||
local color_red = mcl_colors.RED
|
||||
|
||||
local command_blocks_activated = minetest.settings:get_bool("mcl_enable_commandblocks", true)
|
||||
local msg_not_activated = S("Command blocks are not enabled on this server")
|
||||
|
||||
local function construct(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
||||
|
@ -78,7 +83,7 @@ local function check_commands(commands, player_name)
|
|||
if string.sub(cmd, 1, 1) == "/" then
|
||||
msg = S("Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands. Hint: Try to remove the leading slash.", cmd)
|
||||
end
|
||||
return false, minetest.colorize("#FF0000", msg)
|
||||
return false, minetest.colorize(color_red, msg)
|
||||
end
|
||||
if player_name then
|
||||
local player_privs = minetest.get_player_privs(player_name)
|
||||
|
@ -86,7 +91,7 @@ local function check_commands(commands, player_name)
|
|||
for cmd_priv, _ in pairs(cmddef.privs) do
|
||||
if player_privs[cmd_priv] ~= true then
|
||||
local msg = S("Error: You have insufficient privileges to use the command “@1” (missing privilege: @2)! The command block has not been changed.", cmd, cmd_priv)
|
||||
return false, minetest.colorize("#FF0000", msg)
|
||||
return false, minetest.colorize(color_red, msg)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -99,9 +104,14 @@ local function commandblock_action_on(pos, node)
|
|||
return
|
||||
end
|
||||
|
||||
minetest.swap_node(pos, {name = "mesecons_commandblock:commandblock_on"})
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
local commander = meta:get_string("commander")
|
||||
|
||||
if not command_blocks_activated then
|
||||
--minetest.chat_send_player(commander, msg_not_activated)
|
||||
return
|
||||
end
|
||||
minetest.swap_node(pos, {name = "mesecons_commandblock:commandblock_on"})
|
||||
|
||||
local commands = resolve_commands(meta:get_string("commands"), pos)
|
||||
for _, command in pairs(commands:split("\n")) do
|
||||
|
@ -117,7 +127,6 @@ local function commandblock_action_on(pos, node)
|
|||
return
|
||||
end
|
||||
-- Execute command in the name of commander
|
||||
local commander = meta:get_string("commander")
|
||||
cmddef.func(commander, param)
|
||||
end
|
||||
end
|
||||
|
@ -129,6 +138,10 @@ local function commandblock_action_off(pos, node)
|
|||
end
|
||||
|
||||
local on_rightclick = function(pos, node, player, itemstack, pointed_thing)
|
||||
if not command_blocks_activated then
|
||||
minetest.chat_send_player(player:get_player_name(), msg_not_activated)
|
||||
return
|
||||
end
|
||||
local can_edit = true
|
||||
-- Only allow write access in Creative Mode
|
||||
if not minetest.is_creative_enabled(player:get_player_name()) then
|
||||
|
|
|
@ -27,3 +27,4 @@ Access denied. You need the “maphack” privilege to edit command blocks.=Zugr
|
|||
Editing the command block has failed! You can only change the command block in Creative Mode!=Bearbeitung des Befehlsblocks fehlgeschlagen! Sie können den Befehlsblock nur im Kreativmodus ändern!
|
||||
Editing the command block has failed! The command block is gone.=Bearbeiten des Befehlsblocks fehlgeschlagen! Der Befehlsblock ist verschwunden.
|
||||
Executes server commands when powered by redstone power=Führt Serverbefehle aus, wenn mit Redstoneenergie versorgt
|
||||
Command blocks are not enabled on this server=
|
||||
|
|
|
@ -28,3 +28,4 @@ Example 2:@n give @@n mcl_core:apple 5@nGives the nearest player 5 apples=2.
|
|||
Access denied. You need the “maphack” privilege to edit command blocks.=Acceso denegado. Necesita el privilegio "maphack" para editar bloques de comandos.
|
||||
Editing the command block has failed! You can only change the command block in Creative Mode!=¡La edición del bloque de comando ha fallado! ¡Solo puede cambiar el bloque de comandos en modo creativo!
|
||||
Editing the command block has failed! The command block is gone.=¡La edición del bloque de comando ha fallado! El bloque de comando se ha ido.
|
||||
Command blocks are not enabled on this server=
|
||||
|
|
|
@ -27,3 +27,4 @@ Access denied. You need the “maphack” privilege to edit command blocks.=Acc
|
|||
Editing the command block has failed! You can only change the command block in Creative Mode!=La modification du bloc de commandes a échoué! Vous ne pouvez modifier le bloc de commandes qu'en mode créatif!
|
||||
Editing the command block has failed! The command block is gone.=La modification du bloc de commandes a échoué! Le bloc de commande a disparu.
|
||||
Executes server commands when powered by redstone power=Exécute les commandes du serveur lorsqu'il est alimenté par l'alimentation Redstone
|
||||
Command blocks are not enabled on this server=Les blocks de commandes ne sont pas activés sur ce serveur
|
||||
|
|
|
@ -27,3 +27,4 @@ Access denied. You need the “maphack” privilege to edit command blocks.=До
|
|||
Editing the command block has failed! You can only change the command block in Creative Mode!=Попытка редактирования командного блока потерпела неудачу. Вы можете изменять командные блоки только в творческом режиме!
|
||||
Editing the command block has failed! The command block is gone.=Попытка редактирования командного блока потерпела неудачу. Командный блок исчез.
|
||||
Executes server commands when powered by redstone power=При подаче энергии редстоуна выполняет серверные команды
|
||||
Command blocks are not enabled on this server=
|
||||
|
|
|
@ -27,3 +27,4 @@ Access denied. You need the “maphack” privilege to edit command blocks.=
|
|||
Editing the command block has failed! You can only change the command block in Creative Mode!=
|
||||
Editing the command block has failed! The command block is gone.=
|
||||
Executes server commands when powered by redstone power=
|
||||
Command blocks are not enabled on this server=
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
name = mesecons_commandblock
|
||||
depends = mesecons
|
||||
depends = mesecons, mcl_colors
|
||||
optional_depends = doc, doc_items
|
||||
|
|
|
@ -808,7 +808,7 @@ minetest.register_node("mcl_core:obsidian", {
|
|||
description = S("Obsidian"),
|
||||
_doc_items_longdesc = S("Obsidian is an extremely hard mineral with an enourmous blast-resistance. Obsidian is formed when water meets lava."),
|
||||
tiles = {"default_obsidian.png"},
|
||||
is_ground_content = true,
|
||||
is_ground_content = false,
|
||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||
stack_max = 64,
|
||||
groups = {pickaxey=5, building_block=1, material_stone=1},
|
||||
|
|
|
@ -129,6 +129,9 @@ mcl_superflat_classic (Classic superflat map generation) bool false
|
|||
# If disabled, no ores will be generated.
|
||||
mcl_generate_ores (Generate Ores) bool true
|
||||
|
||||
# If disabled, command blocks will be unusuable (but still present).
|
||||
mcl_enable_commandblocks (Enable Command Blocks) bool true
|
||||
|
||||
# Make some blocks emit decorative particles like flames. This setting
|
||||
# specifies the detail level of particles, with higher levels being
|
||||
# more CPU demanding.
|
||||
|
|
Loading…
Reference in New Issue