Expose PLATFORM global

master
stujones11 2019-05-23 21:08:56 +01:00 committed by MoNTE48
parent c903357766
commit 51b9110533
4 changed files with 3 additions and 7 deletions

View File

@ -656,8 +656,3 @@ function core.pointed_thing_to_face_pos(placer, pointed_thing)
end
return fine_pos
end
-- Allow mods to define a platform.
function core.get_platform()
return PLATFORM
end

View File

@ -75,7 +75,7 @@ local function get_formspec(tabview, name, tabdata)
retval = retval ..
"tableoptions[background=#00000000;border=false]" ..
"tablecolumns[" ..
image_column(fgettext("Favorite"), "favorite") .. ";" ..
image_column(fgettext("Favorite"), "favorite") .. ",align=center;" ..
image_column(fgettext("Ping")) .. ",padding=0.25;" ..
"color,span=3;" ..
"text,align=right;" .. -- clients

View File

@ -30,7 +30,7 @@ minetest.register_on_joinplayer(function(player)
30
)
if core.get_platform() ~= "Android" or core.get_platform() ~= "iOS" then
if PLATFORM ~= "Android" or PLATFORM ~= "iOS" then
player:hud_set_hotbar_image("gui_hotbar.png")
player:hud_set_hotbar_itemcount(9)
else

View File

@ -62,6 +62,7 @@ void ScriptApiSecurity::initializeSecurity()
"core",
"collectgarbage",
"DIR_DELIM",
"PLATFORM",
"error",
"getfenv",
"getmetatable",