Skip to content

Commit

Permalink
Merge pull request #172 from dacmot/update_minetest_game_5.7
Browse files Browse the repository at this point in the history
Update minetest game 5.7
  • Loading branch information
dacmot authored Nov 29, 2023
2 parents ca98830 + 1fa78de commit bc37503
Show file tree
Hide file tree
Showing 51 changed files with 391 additions and 300 deletions.
2 changes: 1 addition & 1 deletion builder/mods_src/minetest_game/minetest_game
Submodule minetest_game updated 55 files
+2 −0 game_api.txt
+1 −1 mods/beds/functions.lua
+5 −0 mods/beds/init.lua
+3 −3 mods/beds/locale/beds.id.tr
+2 −2 mods/beds/locale/beds.zh_TW.tr
+1 −1 mods/binoculars/locale/binoculars.id.tr
+2 −2 mods/boats/locale/boats.ru.tr
+2 −2 mods/bones/locale/bones.sv.tr
+1 −1 mods/bucket/locale/bucket.ja.tr
+29 −27 mods/creative/init.lua
+9 −5 mods/creative/inventory.lua
+0 −1 mods/creative/mod.conf
+36 −10 mods/default/chests.lua
+2 −1 mods/default/craftitems.lua
+1 −1 mods/default/locale/default.eo.tr
+22 −22 mods/default/locale/default.id.tr
+79 −79 mods/default/locale/default.ja.tr
+3 −3 mods/default/locale/default.zh_CN.tr
+3 −3 mods/default/locale/default.zh_TW.tr
+3 −3 mods/default/nodes.lua
+8 −8 mods/doors/locale/doors.ja.tr
+ mods/doors/textures/doors_item_glass.png
+ mods/doors/textures/doors_item_obsidian_glass.png
+1 −1 mods/dye/locale/dye.id.tr
+4 −4 mods/farming/locale/farming.ja.tr
+5 −5 mods/farming/locale/farming.zh_TW.tr
+5 −2 mods/mtg_craftguide/init.lua
+53 −0 mods/mtg_craftguide/locale/mtg_craftguide.id.tr
+1 −1 mods/mtg_craftguide/locale/mtg_craftguide.ru.tr
+4 −0 mods/player_api/api.lua
+17 −0 mods/screwdriver/init.lua
+7 −0 mods/sethome/init.lua
+1 −0 mods/sethome/locale/sethome.de.tr
+1 −0 mods/sethome/locale/sethome.eo.tr
+1 −0 mods/sethome/locale/sethome.es.tr
+1 −0 mods/sethome/locale/sethome.fr.tr
+1 −0 mods/sethome/locale/sethome.id.tr
+1 −0 mods/sethome/locale/sethome.it.tr
+1 −0 mods/sethome/locale/sethome.ja.tr
+1 −0 mods/sethome/locale/sethome.jbo.tr
+1 −0 mods/sethome/locale/sethome.ms.tr
+1 −0 mods/sethome/locale/sethome.pl.tr
+1 −0 mods/sethome/locale/sethome.pt_BR.tr
+1 −0 mods/sethome/locale/sethome.ru.tr
+1 −0 mods/sethome/locale/sethome.sk.tr
+1 −0 mods/sethome/locale/sethome.sv.tr
+1 −0 mods/sethome/locale/sethome.uk.tr
+1 −0 mods/sethome/locale/sethome.zh_CN.tr
+1 −0 mods/sethome/locale/sethome.zh_TW.tr
+1 −0 mods/sethome/locale/template.txt
+116 −116 mods/stairs/locale/stairs.ja.tr
+6 −0 mods/walls/init.lua
+3 −3 mods/walls/locale/walls.ja.tr
+4 −2 mods/wool/init.lua
+1 −1 mods/wool/locale/wool.id.tr
2 changes: 1 addition & 1 deletion mod_sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ origin https://github.com/minetest-mods/mesecons (fetch)
Mod: mesecons/mesecons

origin https://github.com/minetest/minetest_game (fetch)
* 08057e8e0f01b443515ff81423215e4367f84872 Merge remote-tracking branch 'origin/stable-5' into HEAD
* 90501504646a3df861d6703a712f9772ddf7fb35 Merge remote-tracking branch 'origin/stable-5' into HEAD
Mod: minetest_game/minetest_game

origin https://codeberg.org/Hamlet/mobs_ghost_redo (fetch)
Expand Down
2 changes: 1 addition & 1 deletion mods/minetest_game/beds/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function beds.on_rightclick(pos, player)
local ppos = player:get_pos()
local tod = minetest.get_timeofday()

if tod > 0.2 and tod < 0.805 then
if tod > beds.day_interval.start and tod < beds.day_interval.finish then
if beds.player[name] then
lay_down(player, nil, nil, false)
end
Expand Down
5 changes: 5 additions & 0 deletions mods/minetest_game/beds/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ beds.formspec = "size[8,11;true]" ..
"bgcolor[#080808BB;true]" ..
"button_exit[2,10;4,0.75;leave;" .. esc(S("Leave Bed")) .. "]"

beds.day_interval = {
start = 0.2,
finish = 0.805,
}

local modpath = minetest.get_modpath("beds")

-- Load files
Expand Down
6 changes: 3 additions & 3 deletions mods/minetest_game/beds/locale/beds.id.tr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# textdomain: beds
Fancy Bed=Ranjang Mewah
Simple Bed=Ranjang Sederhana
This bed is already occupied!=
You have to stop moving before going to bed!=
This bed is already occupied!=Ranjang telah terisi!
You have to stop moving before going to bed!=Anda harus diam untuk tidur!
Good morning.=Selamat pagi.
@1 of @2 players are in bed=@1 dari @2 pemain sedang tidur
Force night skip=Paksa lewati malam
You can only sleep at night.=Anda hanya dapat tidur pada waktu malam.
You can only sleep at night.=Anda hanya bisa tidur pada waktu malam.
Leave Bed=Tinggalkan Ranjang
4 changes: 2 additions & 2 deletions mods/minetest_game/beds/locale/beds.zh_TW.tr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# textdomain: beds
Fancy Bed=花式床
Simple Bed=簡易床
This bed is already occupied!=
You have to stop moving before going to bed!=
This bed is already occupied!=這個床已經被占據了!
You have to stop moving before going to bed!=你必須在上床前停止移動!
Good morning.=早安!
@1 of @2 players are in bed=@2位玩家中的@1位在床上
Force night skip=強制跳過夜晚
Expand Down
2 changes: 1 addition & 1 deletion mods/minetest_game/binoculars/locale/binoculars.id.tr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# textdomain: binoculars
Binoculars=Teropong
Use with 'Zoom' key=Pakai dengan tombol 'Zoom'
Use with 'Zoom' key=Pakai dengan tombol 'Zum'
4 changes: 2 additions & 2 deletions mods/minetest_game/boats/locale/boats.ru.tr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# textdomain: boats
Boat cruise mode on=Режим путешествия на лодке включен
Boat cruise mode off=Режим путешествия на лодке выключен
Boat cruise mode on=Автоход лодки включен
Boat cruise mode off=Автоход лодки выключен
Boat=Лодка
4 changes: 2 additions & 2 deletions mods/minetest_game/bones/locale/bones.sv.tr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# textdomain: bones
Bones=Ben
@1's old bones=@1s Gamla ben
@1 died at @2.=@1 dog på @a.
@1 died at @2, and dropped their inventory.=@1 dog på @a, och tappade deras saker.
@1 died at @2.=@1 dog på @2.
@1 died at @2, and dropped their inventory.=@1 dog på @2, och tappade deras saker.
@1 died at @2, and bones were placed.=@1 dog på @2, och deras ben var placerade.
@1's fresh bones=@1s färska ben
@1's bones=@1s ben
2 changes: 1 addition & 1 deletion mods/minetest_game/bucket/locale/bucket.ja.tr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# textdomain: bucket
Empty Bucket=空のバケツ
Water Bucket=水入りバケツ
River Water Bucket=川の水入りバケツ
River Water Bucket=河川水入りバケツ
Lava Bucket=溶岩入りバケツ
56 changes: 29 additions & 27 deletions mods/minetest_game/creative/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,36 @@ end
dofile(minetest.get_modpath("creative") .. "/inventory.lua")

if minetest.is_creative_enabled("") then
-- Dig time is modified according to difference (leveldiff) between tool
-- 'maxlevel' and node 'level'. Digtime is divided by the larger of
-- leveldiff and 1.
-- To speed up digging in creative, hand 'maxlevel' and 'digtime' have been
-- increased such that nodes of differing levels have an insignificant
-- effect on digtime.
local digtime = 42
local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}
minetest.register_on_mods_loaded(function()
-- Dig time is modified according to difference (leveldiff) between tool
-- 'maxlevel' and node 'level'. Digtime is divided by the larger of
-- leveldiff and 1.
-- To speed up digging in creative, hand 'maxlevel' and 'digtime' have been
-- increased such that nodes of differing levels have an insignificant
-- effect on digtime.
local digtime = 42
local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}

-- Override the hand tool
minetest.override_item("", {
range = 10,
tool_capabilities = {
full_punch_interval = 0.5,
max_drop_level = 3,
groupcaps = {
crumbly = caps,
cracky = caps,
snappy = caps,
choppy = caps,
oddly_breakable_by_hand = caps,
-- dig_immediate group doesn't use value 1. Value 3 is instant dig
dig_immediate =
{times = {[2] = digtime, [3] = 0}, uses = 0, maxlevel = 256},
},
damage_groups = {fleshy = 10},
}
})
-- Override the hand tool
minetest.override_item("", {
range = 10,
tool_capabilities = {
full_punch_interval = 0.5,
max_drop_level = 3,
groupcaps = {
crumbly = caps,
cracky = caps,
snappy = caps,
choppy = caps,
oddly_breakable_by_hand = caps,
-- dig_immediate group doesn't use value 1. Value 3 is instant dig
dig_immediate =
{times = {[2] = digtime, [3] = 0}, uses = 0, maxlevel = 256},
},
damage_groups = {fleshy = 10},
}
})
end)
end

-- Unlimited node placement
Expand Down
14 changes: 9 additions & 5 deletions mods/minetest_game/creative/inventory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,18 @@ function creative.register_tab(name, title, items)
creative.update_creative_inventory(player_name, items)
local inv = player_inventory[player_name]
local pagenum = math.floor(inv.start_i / (4*8) + 1)
local pagemax = math.ceil(inv.size / (4*8))
local pagemax = math.max(math.ceil(inv.size / (4*8)), 1)
local esc = minetest.formspec_escape
return sfinv.make_formspec(player, context,
(inv.size == 0 and ("label[3,2;"..esc(S("No items to show.")).."]") or "") ..
"label[5.8,4.15;" .. minetest.colorize("#FFFF00", tostring(pagenum)) .. " / " .. tostring(pagemax) .. "]" ..
[[
image[4.08,4.2;0.8,0.8;creative_trash_icon.png]
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]
list[detached:trash;main;4.02,4.1;1,1;]
listring[]
image_button[5,4.05;0.8,0.8;creative_prev_icon.png;creative_prev;]
image_button[7.2,4.05;0.8,0.8;creative_next_icon.png;creative_next;]
image_button[7.25,4.05;0.8,0.8;creative_next_icon.png;creative_next;]
image_button[2.63,4.05;0.8,0.8;creative_search_icon.png;creative_search;]
image_button[3.25,4.05;0.8,0.8;creative_clear_icon.png;creative_clear;]
]] ..
Expand Down Expand Up @@ -191,10 +192,13 @@ function creative.register_tab(name, title, items)
inv.start_i = 0
inv.filter = ""
sfinv.set_player_inventory_formspec(player, context)
elseif fields.creative_search or
fields.key_enter_field == "creative_filter" then
elseif (fields.creative_search or
fields.key_enter_field == "creative_filter")
and fields.creative_filter then
inv.start_i = 0
inv.filter = fields.creative_filter:lower()
inv.filter = fields.creative_filter:sub(1, 128) -- truncate to a sane length
:gsub("[%z\1-\8\11-\31\127]", "") -- strip naughty control characters (keeps \t and \n)
:lower() -- search is case insensitive
sfinv.set_player_inventory_formspec(player, context)
elseif not fields.quit then
local start_i = inv.start_i or 0
Expand Down
1 change: 0 additions & 1 deletion mods/minetest_game/creative/mod.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name = creative
description = Minetest Game mod: creative
depends = sfinv
optional_depends = default
46 changes: 36 additions & 10 deletions mods/minetest_game/default/chests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,22 @@ end
default.chest.open_chests = {}

minetest.register_on_player_receive_fields(function(player, formname, fields)
local pn = player:get_player_name()

if formname ~= "default:chest" then
if default.chest.open_chests[pn] then
default.chest.chest_lid_close(pn)
end

return
end
if not player or not fields.quit then
return
end
local pn = player:get_player_name()

if not default.chest.open_chests[pn] then
if not (fields.quit and default.chest.open_chests[pn]) then
return
end

default.chest.chest_lid_close(pn)

return true
end)

Expand Down Expand Up @@ -129,17 +132,22 @@ function default.chest.register_chest(prefixed_name, d)
return itemstack
end

local cn = clicker:get_player_name()

if default.chest.open_chests[cn] then
default.chest.chest_lid_close(cn)
end

minetest.sound_play(def.sound_open, {gain = 0.3,
pos = pos, max_hear_distance = 10}, true)
if not default.chest.chest_lid_obstructed(pos) then
minetest.swap_node(pos,
{ name = name .. "_open",
param2 = node.param2 })
end
minetest.after(0.2, minetest.show_formspec,
clicker:get_player_name(),
minetest.after(0.2, minetest.show_formspec, cn,
"default:chest", default.chest.get_chest_formspec(pos))
default.chest.open_chests[clicker:get_player_name()] = { pos = pos,
default.chest.open_chests[cn] = { pos = pos,
sound = def.sound_close, swap = name }
end
def.on_blast = function() end
Expand Down Expand Up @@ -200,6 +208,12 @@ function default.chest.register_chest(prefixed_name, d)
return inv:is_empty("main")
end
def.on_rightclick = function(pos, node, clicker)
local cn = clicker:get_player_name()

if default.chest.open_chests[cn] then
default.chest.chest_lid_close(cn)
end

minetest.sound_play(def.sound_open, {gain = 0.3, pos = pos,
max_hear_distance = 10}, true)
if not default.chest.chest_lid_obstructed(pos) then
Expand All @@ -208,9 +222,9 @@ function default.chest.register_chest(prefixed_name, d)
param2 = node.param2 })
end
minetest.after(0.2, minetest.show_formspec,
clicker:get_player_name(),
cn,
"default:chest", default.chest.get_chest_formspec(pos))
default.chest.open_chests[clicker:get_player_name()] = { pos = pos,
default.chest.open_chests[cn] = { pos = pos,
sound = def.sound_close, swap = name }
end
def.on_blast = function(pos)
Expand Down Expand Up @@ -274,6 +288,18 @@ function default.chest.register_chest(prefixed_name, d)
end
})
end

-- close opened chests on load
minetest.register_lbm({
label = "close opened chests on load",
name = "default:close_" .. prefixed_name:gsub(":", "_") .. "_open",
nodenames = {prefixed_name .. "_open"},
run_at_every_load = true,
action = function(pos, node)
node.name = prefixed_name
minetest.swap_node(pos, node)
end
})
end

default.chest.register_chest("default:chest", {
Expand Down
3 changes: 2 additions & 1 deletion mods/minetest_game/default/craftitems.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
return
end

if fields.close then
if fields.quit then
book_writers[player_name] = nil
end

Expand Down Expand Up @@ -179,6 +179,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
data.description = S("\"@1\" by @2", short_title, data.owner)
data.text = fields.text:sub(1, max_text_size)
data.text = data.text:gsub("\r\n", "\n"):gsub("\r", "\n")
data.text = data.text:gsub("[%z\1-\8\11-\31\127]", "") -- strip naughty control characters (keeps \t and \n)
data.page = 1
data.page_max = math.ceil((#data.text:gsub("[^\n]", "") + 1) / lpp)

Expand Down
2 changes: 1 addition & 1 deletion mods/minetest_game/default/locale/default.eo.tr
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ Empty Bookshelf=Malplena Librobreto
Bookshelf (@1 written, @2 empty books)=Librobreto (@1 skriba(j), @2 malplena(j) libro(j))
Bookshelf=Librobreto
Text too long=Tro longa teksto
"@1"=
Wooden Sign=Ligna Signo
Steel Sign=Ŝtala Signo
Wooden Ladder=Ligna Ŝtupetaro
Expand Down Expand Up @@ -217,4 +218,3 @@ Torch=Torĉo
##### not used anymore #####

Mese Post Light=Mesea Fosta Lampo

Loading

0 comments on commit bc37503

Please sign in to comment.