Merge pull request 'Release 0.71.12' (#77) from testing into production

Reviewed-on: MineClone5/MineClone5#77
This commit is contained in:
kay27 2022-01-02 07:31:17 +00:00
commit f9dab6a635
38 changed files with 145 additions and 20 deletions

View File

@ -22,6 +22,7 @@
* Code-Sploit * Code-Sploit
* cora * cora
* David McMackins II * David McMackins II
* debian44
* Debiankaios * Debiankaios
* Dieter44 * Dieter44
* Doloment * Doloment

View File

@ -41,7 +41,18 @@ local function check_object(obj)
end end
local function get_visual_size(obj) local function get_visual_size(obj)
return obj:is_player() and {x = 1, y = 1, z = 1} or obj:get_luaentity()._old_visual_size or obj:get_properties().visual_size if not obj or obj:is_player() then
return boat_visual_size
end
local luaentity = obj:get_luaentity()
if luaentity then
if luaentity._old_visual_size then
return luaentity._old_visual_size
else
return boat_visual_size
end
end
return obj:get_properties().visual_size
end end
local function set_attach(boat) local function set_attach(boat)

View File

@ -19,6 +19,8 @@ mobs:register_mob("mobs_mc:iron_golem", {
rotate = 270, rotate = 270,
hp_min = 100, hp_min = 100,
hp_max = 100, hp_max = 100,
xp_min = 0,
xp_max = 0,
protect = true, protect = true,
neutral = true, neutral = true,
breath_max = -1, breath_max = -1,

View File

@ -27,6 +27,8 @@ mobs:register_mob("mobs_mc:snowman", {
passive = true, passive = true,
hp_min = 4, hp_min = 4,
hp_max = 4, hp_max = 4,
xp_min = 0,
xp_max = 0,
pathfinding = 1, pathfinding = 1,
view_range = 10, view_range = 10,
fall_damage = 0, fall_damage = 0,

View File

@ -177,7 +177,5 @@ minetest.register_on_joinplayer(function(player)
return_fields(player, "enchanting_lapis") return_fields(player, "enchanting_lapis")
end) end)
if minetest.is_creative_enabled("") then dofile(minetest.get_modpath(minetest.get_current_modname()).."/creative.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()).."/creative.lua")
end

View File

@ -1,5 +1,5 @@
name = mcl_inventory name = mcl_inventory
author = BlockMen author = BlockMen
description = Adds the player inventory and creative inventory. description = Adds the player inventory and creative inventory.
depends = mcl_init, mcl_formspec, mcl_enchanting depends = mcl_init, mcl_formspec, mcl_enchanting, mcl_commands
optional_depends = mcl_armor, mcl_brewing, mcl_potions, mcl_enchanting, mcl_craftguide, mcl_player optional_depends = mcl_armor, mcl_brewing, mcl_potions, mcl_enchanting, mcl_craftguide, mcl_player

View File

@ -207,7 +207,7 @@ minetest.register_abm({
local light = minetest.get_node_light(pos, nil) local light = minetest.get_node_light(pos, nil)
local time = minetest.get_us_time() local time = minetest.get_us_time()
if light < 14 and time > 18000 then if light < 14 and time > 18000 then
minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_inverted_on", param2=node.param2}) minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_inverted_on", param2=node.param2})
mesecon.receptor_on(pos, mesecon.rules.pplate) mesecon.receptor_on(pos, mesecon.rules.pplate)
end end

View File

@ -453,11 +453,21 @@ function ARROW_ENTITY.get_staticdata(self)
return minetest.serialize(out) return minetest.serialize(out)
end end
local function remove_arrow_on_joinplayer(staticdata, self)
if not staticdata.activated then
staticdata.activated = true
else
self.object:remove()
end
end
function ARROW_ENTITY.on_activate(self, staticdata, dtime_s) function ARROW_ENTITY.on_activate(self, staticdata, dtime_s)
self._time_in_air = 1.0 self._time_in_air = 1.0
self._in_player = false self._in_player = false
local data = minetest.deserialize(staticdata) local data = minetest.deserialize(staticdata)
if data then if data then
remove_arrow_on_joinplayer(data, self)
self._stuck = data.stuck self._stuck = data.stuck
if data.stuck then if data.stuck then
if data.stuckstarttime then if data.stuckstarttime then

View File

@ -181,7 +181,7 @@ S("The speed and damage of the arrow increases the longer you charge. The regula
itemstack:get_meta():set_string("active", "true") itemstack:get_meta():set_string("active", "true")
return itemstack return itemstack
end, end,
groups = {weapon=1,weapon_ranged=1,crossbow=1,enchantability=1}, groups = {not_in_creative_inventory=1,weapon=1,weapon_ranged=1,crossbow=1,enchantability=1},
_mcl_uses = 326, _mcl_uses = 326,
}) })

View File

@ -5,10 +5,11 @@ local mod_doc = minetest.get_modpath("doc")
minetest.register_node("mcl_core:glass", { minetest.register_node("mcl_core:glass", {
description = S("Glass"), description = S("Glass"),
_doc_items_longdesc = S("A decorative and mostly transparent block."), _doc_items_longdesc = S("A decorative and mostly transparent block."),
drawtype = "glasslike", drawtype = "glasslike_framed_optional",
is_ground_content = false, is_ground_content = false,
tiles = {"default_glass.png"}, tiles = {"default_glass.png", "default_glass_detail.png"},
paramtype = "light", paramtype = "light",
paramtype2 = "glasslikeliquidlevel",
sunlight_propagates = true, sunlight_propagates = true,
stack_max = 64, stack_max = 64,
groups = {handy=1, glass=1, building_block=1, material_glass=1}, groups = {handy=1, glass=1, building_block=1, material_glass=1},
@ -39,10 +40,11 @@ function mcl_core.add_stained_glass(desc, recipeitem, colorgroup, color)
_doc_items_create_entry = create_entry, _doc_items_create_entry = create_entry,
_doc_items_entry_name = entry_name, _doc_items_entry_name = entry_name,
_doc_items_longdesc = longdesc, _doc_items_longdesc = longdesc,
drawtype = "glasslike", drawtype = "glasslike_framed_optional",
is_ground_content = false, is_ground_content = false,
tiles = {"mcl_core_glass_"..color..".png"}, tiles = {"mcl_core_glass_"..color..".png", "mcl_core_glass_"..color.."_detail.png"},
paramtype = "light", paramtype = "light",
paramtype2 = "glasslikeliquidlevel",
sunlight_propagates = true, sunlight_propagates = true,
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true, use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
stack_max = 64, stack_max = 64,

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -0,0 +1,80 @@
local S = minetest.get_translator(minetest.get_current_modname())
local gamemode_ids = {
survival = 1,
creative = 2,
}
local id_to_gamemode = {}
for gamemode, id in pairs(gamemode_ids) do
id_to_gamemode[id] = gamemode
end
local creative_mode = 'creative'
local storage = minetest.get_mod_storage()
local player_to_gamemode_id = minetest.deserialize(storage:get_string("player_to_gamemode_id") or "return {}") or {}
minetest.register_on_shutdown(function()
storage:set_string("player_to_gamemode_id", minetest.serialize(player_to_gamemode_id))
end)
local core_is_creative_enabled = minetest.is_creative_enabled
minetest.is_creative_enabled = function(name)
local id = player_to_gamemode_id[name]
if id then
local gamemode = id_to_gamemode[id]
if gamemode then
return gamemode == creative_mode
end
end
return core_is_creative_enabled(name)
end
local function handle_gamemode_command(player_name, new_gamemode)
player_to_gamemode_id[player_name] = gamemode_ids[new_gamemode]
return true
end
if minetest.registered_chatcommands["gamemode"] then
minetest.unregister_chatcommand("gamemode")
end
local function get_gamemode_param()
local param
local i = 0
for gamemode, _ in pairs(gamemode_ids) do
if i == 0 then
param = "("
else
param = param .. " | "
end
i = i + 1
param = param .. gamemode
end
if i > 0 then
param = param .. ") "
end
return param
end
minetest.register_chatcommand("gamemode", {
params = S("@1[<name>]", get_gamemode_param()),
description = S("Set game mode for player or yourself"),
privs = {server=true},
func = function(name, param)
if (param == "") then
return false, S("Error: No game mode specified.")
end
if (gamemode_ids[param]) then
handle_gamemode_command(name, param)
else
local new_gamemode, player_name = string.match(param, "^([%a]+) ([%a%d_-]+)$")
if not new_gamemode or not gamemode_ids[new_gamemode] or not player_name then
return false, S("Invalid usage, see /help @1", "gamemode")
end
handle_gamemode_command(player_name, new_gamemode)
end
end
})

View File

@ -1,5 +1,6 @@
local modpath = minetest.get_modpath(minetest.get_current_modname()) local modpath = minetest.get_modpath(minetest.get_current_modname())
dofile(modpath.."/gamemode.lua")
dofile(modpath.."/kill.lua") dofile(modpath.."/kill.lua")
dofile(modpath.."/setblock.lua") dofile(modpath.."/setblock.lua")
dofile(modpath.."/seed.lua") dofile(modpath.."/seed.lua")

View File

@ -10,7 +10,7 @@ Kill player or yourself=Spieler oder sich selbst töten
Can use /say=Kann „/say“ benutzen Can use /say=Kann „/say“ benutzen
<message>=<Nachricht> <message>=<Nachricht>
Send a message to every player=Nachricht an alle Spieler senden Send a message to every player=Nachricht an alle Spieler senden
Invalid usage, see /help say.=Falsche Benutzung, siehe „/help say“. Invalid usage, see /help @1.=Falsche Benutzung, siehe „/help @1“.
<X>,<Y>,<Z> <NodeString>=<X>,<Y>,<Z> <Node-Bezeichner> <X>,<Y>,<Z> <NodeString>=<X>,<Y>,<Z> <Node-Bezeichner>
Set node at given position=Node (Block) an der gegebenen Position platzieren Set node at given position=Node (Block) an der gegebenen Position platzieren
Invalid node=Unültiger Node Invalid node=Unültiger Node
@ -21,3 +21,6 @@ Ban list: @1=Bannliste: @1
Show who is logged on=Anzeigen, wer eingeloggt ist Show who is logged on=Anzeigen, wer eingeloggt ist
Displays the world seed=Den Seed der Welt anzeigen Displays the world seed=Den Seed der Welt anzeigen
Only peaceful mobs allowed!=Nur friedliche Mobs erlaubt! Only peaceful mobs allowed!=Nur friedliche Mobs erlaubt!
@1[<name>]=
Set game mode for player or yourself=
Error: No game mode specified.=

View File

@ -21,3 +21,6 @@ Ban list: @1=Lista de baneados: @1
Show who is logged on=Mostrar quién ha iniciado sesión Show who is logged on=Mostrar quién ha iniciado sesión
Displays the world seed=Muestra la semilla del mundo Displays the world seed=Muestra la semilla del mundo
Only peaceful mobs allowed!=¡Solo se permiten animales pacíficos! Only peaceful mobs allowed!=¡Solo se permiten animales pacíficos!
@1[<name>]=
Set game mode for player or yourself=
Error: No game mode specified.=

View File

@ -10,7 +10,7 @@ Kill player or yourself=Tuez un joueur ou vous-même
Can use /say=Peut utiliser /say Can use /say=Peut utiliser /say
<message>=<message> <message>=<message>
Send a message to every player=Envoyez un message à chaque joueur Send a message to every player=Envoyez un message à chaque joueur
Invalid usage, see /help say.=Utilisation non valide, voir /help say. Invalid usage, see /help @1.=Utilisation non valide, voir /help @1.
<X>,<Y>,<Z> <NodeString>=<X>,<Y>,<Z> <NodeString> <X>,<Y>,<Z> <NodeString>=<X>,<Y>,<Z> <NodeString>
Set node at given position=Placer le noeud à une position donnée Set node at given position=Placer le noeud à une position donnée
Invalid node=Noeud non valide Invalid node=Noeud non valide
@ -21,3 +21,6 @@ Ban list: @1=Liste d'interdiction: @1
Show who is logged on=Afficher qui est connecté Show who is logged on=Afficher qui est connecté
Displays the world seed=Affiche la graine du monde Displays the world seed=Affiche la graine du monde
Only peaceful mobs allowed!=Seuls les mobs pacifiques sont autorisées! Only peaceful mobs allowed!=Seuls les mobs pacifiques sont autorisées!
@1[<name>]=
Set game mode for player or yourself=
Error: No game mode specified.=

View File

@ -10,7 +10,7 @@ Kill player or yourself=Zabij gracza lub siebie
Can use /say=Może używać /say Can use /say=Może używać /say
<message>=<wiadomość> <message>=<wiadomość>
Send a message to every player=Wyślij wiadomość do każdego gracza Send a message to every player=Wyślij wiadomość do każdego gracza
Invalid usage, see /help say.=Niepoprawne użyciu, zobacz /help say. Invalid usage, see /help @1.=Niepoprawne użyciu, zobacz /help @1.
<X>,<Y>,<Z> <NodeString>=<X>,<Y>,<Z> <ID Node'a> <X>,<Y>,<Z> <NodeString>=<X>,<Y>,<Z> <ID Node'a>
Set node at given position=Ustaw node w danej pozycji Set node at given position=Ustaw node w danej pozycji
Invalid node=Niepoprawny node Invalid node=Niepoprawny node
@ -21,3 +21,6 @@ Ban list: @1=Lista zbanowanych: @1
Show who is logged on=Pokaż zalogowanych Show who is logged on=Pokaż zalogowanych
Displays the world seed=Wyświetl ziarno świata Displays the world seed=Wyświetl ziarno świata
Only peaceful mobs allowed!=Tylko pokojowe moby dozwolone! Only peaceful mobs allowed!=Tylko pokojowe moby dozwolone!
@1[<name>]=
Set game mode for player or yourself=
Error: No game mode specified.=

View File

@ -10,7 +10,7 @@ Kill player or yourself=Убить игрока или себя
Can use /say=Можно использовать /say Can use /say=Можно использовать /say
<message>=<сообщение> <message>=<сообщение>
Send a message to every player=Отправляет сообщение всем игрокам Send a message to every player=Отправляет сообщение всем игрокам
Invalid usage, see /help say.=Недопустимое использование, см. /help say. Invalid usage, see /help @1.=Недопустимое использование, см. /help @1.
<X>,<Y>,<Z> <NodeString>=<X>,<Y>,<Z> <СтрокаУзла> <X>,<Y>,<Z> <NodeString>=<X>,<Y>,<Z> <СтрокаУзла>
Set node at given position=Устанавливает узел в заданной позиции Set node at given position=Устанавливает узел в заданной позиции
Invalid node=Неправильный узел Invalid node=Неправильный узел
@ -21,3 +21,6 @@ Ban list: @1=Бан-лист: @1
Show who is logged on=Показывает, кто подключён Show who is logged on=Показывает, кто подключён
Displays the world seed=Показывает значение зерна мира (seed) Displays the world seed=Показывает значение зерна мира (seed)
Only peaceful mobs allowed!=Включены только мирные мобы! Only peaceful mobs allowed!=Включены только мирные мобы!
@1[<name>]=@1[<имя>]
Set game mode for player or yourself=Задаёт режим игры для игрока или для вас
Error: No game mode specified.=Ошибка: Режим игры не указан.

View File

@ -10,7 +10,7 @@ Kill player or yourself=
Can use /say= Can use /say=
<message>= <message>=
Send a message to every player= Send a message to every player=
Invalid usage, see /help say.= Invalid usage, see /help @1.=
<X>,<Y>,<Z> <NodeString>= <X>,<Y>,<Z> <NodeString>=
Set node at given position= Set node at given position=
Invalid node= Invalid node=
@ -21,3 +21,6 @@ Ban list: @1=
Show who is logged on= Show who is logged on=
Displays the world seed= Displays the world seed=
Only peaceful mobs allowed!= Only peaceful mobs allowed!=
@1[<name>]=
Set game mode for player or yourself=
Error: No game mode specified.=

View File

@ -10,7 +10,7 @@ minetest.register_chatcommand("say", {
privs = {announce=true}, privs = {announce=true},
func = function(name, param) func = function(name, param)
if not param then if not param then
return false, S("Invalid usage, see /help say.") return false, S("Invalid usage, see /help @1.", "say")
end end
minetest.chat_send_all(("["..name.."] "..param)) minetest.chat_send_all(("["..name.."] "..param))
return true return true

View File

@ -6,7 +6,6 @@ local get_connected_players = minetest.get_connected_players
local get_node = minetest.get_node local get_node = minetest.get_node
local get_objects_inside_radius = minetest.get_objects_inside_radius local get_objects_inside_radius = minetest.get_objects_inside_radius
local get_player_by_name = minetest.get_player_by_name local get_player_by_name = minetest.get_player_by_name
local is_creative_enabled = minetest.is_creative_enabled
local kick_player = minetest.kick_player local kick_player = minetest.kick_player
local set_node = minetest.set_node local set_node = minetest.set_node
@ -63,7 +62,7 @@ local function update_player(player_object)
end end
local function check_player(name) local function check_player(name)
if is_creative_enabled(name) then return end if minetest.is_creative_enabled(name) then return end
local data = joined_players[name] local data = joined_players[name]
if not data then return end if not data then return end
if not data[0] then return end if not data[0] then return end

View File

@ -552,7 +552,8 @@ mcl_damage.register_modifier(function(obj, damage, reason)
node = minetest.get_node(pos) node = minetest.get_node(pos)
end end
if node then if node then
if minetest.registered_nodes[node.name].walkable then local def = minetest.registered_nodes[node.name]
if not def or def.walkable then
return return
end end
if minetest.get_item_group(node.name, "water") ~= 0 then if minetest.get_item_group(node.name, "water") ~= 0 then