Browse Source

Fix Object:type;

bjorn 1 year ago
parent
commit
2b9bdc00ae
2 changed files with 13 additions and 5 deletions
  1. 9 3
      api/init.lua
  2. 4 2
      api/lovr/Object/type.lua

+ 9 - 3
api/init.lua

@@ -976,9 +976,15 @@ return {
                 }
                 }
               },
               },
               variants = {
               variants = {
-                arguments = {},
-                returns = {
-                  "type"
+                {
+                  arguments = {},
+                  returns = {
+                    {
+                      name = "type",
+                      type = "string",
+                      description = "The type of the object."
+                    }
+                  }
                 }
                 }
               }
               }
             }
             }

+ 4 - 2
api/lovr/Object/type.lua

@@ -9,8 +9,10 @@ return {
     }
     }
   },
   },
   variants = {
   variants = {
-    arguments = {},
-    returns = { 'type' }
+    {
+      arguments = {},
+      returns = { 'type' }
+    }
   },
   },
   example = [[
   example = [[
     function isTexture(obj)
     function isTexture(obj)