Browse Source

Document lovr.filesystem.setIdentity better;

bjorn 2 years ago
parent
commit
13a530b497
2 changed files with 16 additions and 4 deletions
  1. 6 2
      api/init.lua
  2. 10 2
      api/lovr/filesystem/setIdentity.lua

+ 6 - 2
api/init.lua

@@ -8501,16 +8501,20 @@ return {
         {
           name = "setIdentity",
           summary = "Set the name of the save directory.",
-          description = "Set the name of the save directory.",
+          description = "Set the name of the save directory.  This function can only be called once and is called automatically at startup, so this function normally isn't called manually.  However, the identity can be changed by setting the `t.identity` option in `lovr.conf`.",
           key = "lovr.filesystem.setIdentity",
           module = "lovr.filesystem",
+          related = {
+            "lovr.conf",
+            "lovr.filesystem.getSaveDirectory"
+          },
           variants = {
             {
               arguments = {
                 {
                   name = "identity",
                   type = "string",
-                  description = "The new name of the save directory."
+                  description = "The name of the save directory."
                 }
               },
               returns = {}

+ 10 - 2
api/lovr/filesystem/setIdentity.lua

@@ -1,10 +1,14 @@
 return {
   summary = 'Set the name of the save directory.',
-  description = 'Set the name of the save directory.',
+  description = [[
+    Set the name of the save directory.  This function can only be called once and is called
+    automatically at startup, so this function normally isn't called manually.  However, the
+    identity can be changed by setting the `t.identity` option in `lovr.conf`.
+  ]],
   arguments = {
     identity = {
       type = 'string',
-      description = 'The new name of the save directory.'
+      description = 'The name of the save directory.'
     }
   },
   returns = {},
@@ -13,5 +17,9 @@ return {
       arguments = { 'identity' },
       returns = {}
     }
+  },
+  related = {
+    'lovr.conf',
+    'lovr.filesystem.getSaveDirectory'
   }
 }