Selaa lähdekoodia

Android identity;

bjorn 4 vuotta sitten
vanhempi
commit
e5a0d8c369
3 muutettua tiedostoa jossa 7 lisäystä ja 38 poistoa
  1. 2 20
      api/init.lua
  2. 0 16
      api/lovr/filesystem/getApplicationId.lua
  3. 5 2
      api/lovr/filesystem/getIdentity.lua

+ 2 - 20
api/init.lua

@@ -4173,25 +4173,6 @@ return {
             }
           }
         },
-        {
-          name = "getApplicationId",
-          summary = "Get the application ID.",
-          description = "Returns the platform-specific application ID, or `nil` if the current platform doesn't have one.\n\nCurrently only implemented on Android, where it returns the package name, e.g. `org.lovr.app`.",
-          key = "lovr.filesystem.getApplicationId",
-          module = "lovr.filesystem",
-          variants = {
-            {
-              arguments = {},
-              returns = {
-                {
-                  name = "id",
-                  type = "string",
-                  description = "The application ID."
-                }
-              }
-            }
-          }
-        },
         {
           name = "getDirectoryItems",
           summary = "Get a list of files in a directory.",
@@ -4239,9 +4220,10 @@ return {
         {
           name = "getIdentity",
           summary = "Get the name of the save directory.",
-          description = "Returns the identity of the game, which is used as the name of the save directory.  The default is `default`.",
+          description = "Returns the identity of the game, which is used as the name of the save directory.  The default is `default`.  It can be changed using `t.identity` in `lovr.conf`.",
           key = "lovr.filesystem.getIdentity",
           module = "lovr.filesystem",
+          notes = "On Android, this is always the package id (like `org.lovr.app`).",
           variants = {
             {
               arguments = {},

+ 0 - 16
api/lovr/filesystem/getApplicationId.lua

@@ -1,16 +0,0 @@
-return {
-  summary = 'Get the application ID.',
-  description = [[
-    Returns the platform-specific application ID, or `nil` if the current platform doesn't have one.
-
-    Currently only implemented on Android, where it returns the package name, e.g. `org.lovr.app`.
-  ]],
-  arguments = {},
-  returns = {
-    {
-      name = 'id',
-      type = 'string',
-      description = 'The application ID.'
-    }
-  }
-}

+ 5 - 2
api/lovr/filesystem/getIdentity.lua

@@ -2,7 +2,7 @@ return {
   summary = 'Get the name of the save directory.',
   description = [[
     Returns the identity of the game, which is used as the name of the save directory.  The default
-    is `default`.
+    is `default`.  It can be changed using `t.identity` in `lovr.conf`.
   ]],
   arguments = {},
   returns = {
@@ -11,5 +11,8 @@ return {
       type = 'string',
       description = 'The name of the save directory, or `nil` if it isn\'t set.'
     }
-  }
+  },
+  notes = [[
+    On Android, this is always the package id (like `org.lovr.app`).
+  ]]
 }