diff options
author | madmaxoft <github@xoft.cz> | 2013-10-22 22:07:39 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-22 22:07:39 +0200 |
commit | 34de5210d60d0a026a83ad051ae580c60db0dc4d (patch) | |
tree | 01b8f60e258bdc35616ff94808f3895cf7b0e5b9 /MCServer/Plugins/APIDump | |
parent | APIDump: Inheritance is tested properly. (diff) | |
download | cuberite-34de5210d60d0a026a83ad051ae580c60db0dc4d.tar cuberite-34de5210d60d0a026a83ad051ae580c60db0dc4d.tar.gz cuberite-34de5210d60d0a026a83ad051ae580c60db0dc4d.tar.bz2 cuberite-34de5210d60d0a026a83ad051ae580c60db0dc4d.tar.lz cuberite-34de5210d60d0a026a83ad051ae580c60db0dc4d.tar.xz cuberite-34de5210d60d0a026a83ad051ae580c60db0dc4d.tar.zst cuberite-34de5210d60d0a026a83ad051ae580c60db0dc4d.zip |
Diffstat (limited to 'MCServer/Plugins/APIDump')
-rw-r--r-- | MCServer/Plugins/APIDump/main.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua index eb0555d67..2db8b4b1b 100644 --- a/MCServer/Plugins/APIDump/main.lua +++ b/MCServer/Plugins/APIDump/main.lua @@ -158,9 +158,16 @@ function CreateAPITables() end -- Member variables: + local SetField = a_ClassObj[".set"] or {}; if ((a_ClassObj[".get"] ~= nil) and (type(a_ClassObj[".get"]) == "table")) then for k, v in pairs(a_ClassObj[".get"]) do - table.insert(res.Variables, { Name = k }); + if (SetField[k] == nil) then + -- It is a read-only variable, add it as a constant: + table.insert(res.Constants, {Name = k, Value = ""}); + else + -- It is a read-write variable, add it as a variable: + table.insert(res.Variables, { Name = k }); + end end end return res; |