1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-16 18:01:40 +00:00

Rename minetest.* to core.* in devtest

This commit is contained in:
Lars Müller 2024-10-28 15:57:54 +01:00 committed by GitHub
parent d849d51c2d
commit 88c7a54e08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
78 changed files with 914 additions and 914 deletions

View file

@ -34,14 +34,14 @@ local function show_fullscreen_fs(name, window)
("label[%f,%f;%s]"):format(size.x / 2, size.y / 2 + 1, touch_text),
}
minetest.show_formspec(name, "testfullscreenfs:fs", table.concat(fs))
minetest.chat_send_player(name, ("Calculated size of %f, %f"):format(size.x, size.y))
core.show_formspec(name, "testfullscreenfs:fs", table.concat(fs))
core.chat_send_player(name, ("Calculated size of %f, %f"):format(size.x, size.y))
last_window_info[name] = window
end
minetest.register_chatcommand("testfullscreenfs", {
core.register_chatcommand("testfullscreenfs", {
func = function(name)
local window = minetest.get_player_window_information(name)
local window = core.get_player_window_information(name)
if not window then
return false, "Unable to get window info"
end
@ -51,21 +51,21 @@ minetest.register_chatcommand("testfullscreenfs", {
end,
})
minetest.register_globalstep(function()
core.register_globalstep(function()
for name, last_window in pairs(last_window_info) do
local window = minetest.get_player_window_information(name)
local window = core.get_player_window_information(name)
if window and not window_info_equal(last_window, window) then
show_fullscreen_fs(name, window)
end
end
end)
minetest.register_on_player_receive_fields(function(player, formname, fields)
core.register_on_player_receive_fields(function(player, formname, fields)
if formname == "testfullscreenfs:fs" and fields.quit then
last_window_info[player:get_player_name()] = nil
end
end)
minetest.register_on_leaveplayer(function(player)
core.register_on_leaveplayer(function(player)
last_window_info[player:get_player_name()] = nil
end)