Expose PLATFORM global
parent
c903357766
commit
51b9110533
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -62,6 +62,7 @@ void ScriptApiSecurity::initializeSecurity()
|
|||
"core",
|
||||
"collectgarbage",
|
||||
"DIR_DELIM",
|
||||
"PLATFORM",
|
||||
"error",
|
||||
"getfenv",
|
||||
"getmetatable",
|
||||
|
|
Loading…
Reference in New Issue