Builtin/../misc.lua: Replace minetest. with core., improve codestyle (#7540)

This commit is contained in:
ClobberXD 2018-07-09 23:41:35 +05:30 committed by Paramat
parent a61e1a4dbc
commit 498078bfa0

@ -44,7 +44,7 @@ local player_list = {}
function core.send_join_message(player_name) function core.send_join_message(player_name)
if not minetest.is_singleplayer() then if not core.is_singleplayer() then
core.chat_send_all("*** " .. player_name .. " joined the game.") core.chat_send_all("*** " .. player_name .. " joined the game.")
end end
end end
@ -99,8 +99,8 @@ function core.is_player(player)
end end
function minetest.player_exists(name) function core.player_exists(name)
return minetest.get_auth_handler().get_auth(name) ~= nil return core.get_auth_handler().get_auth(name) ~= nil
end end
@ -126,7 +126,9 @@ end
function core.hash_node_position(pos) function core.hash_node_position(pos)
return (pos.z+32768)*65536*65536 + (pos.y+32768)*65536 + pos.x+32768 return (pos.z + 32768) * 65536 * 65536
+ (pos.y + 32768) * 65536
+ pos.x + 32768
end end
@ -261,7 +263,7 @@ end
function core.close_formspec(player_name, formname) function core.close_formspec(player_name, formname)
return minetest.show_formspec(player_name, formname, "") return core.show_formspec(player_name, formname, "")
end end