diff options
Diffstat (limited to 'resources/script')
-rw-r--r-- | resources/script/interact.lua | 3 | ||||
-rw-r--r-- | resources/script/test.lua | 20 |
2 files changed, 16 insertions, 7 deletions
diff --git a/resources/script/interact.lua b/resources/script/interact.lua new file mode 100644 index 0000000..98bb34f --- /dev/null +++ b/resources/script/interact.lua @@ -0,0 +1,3 @@ +function interact(entity, time) + print('Interact! ' .. time) +end diff --git a/resources/script/test.lua b/resources/script/test.lua index f78cf13..1dc1fc4 100644 --- a/resources/script/test.lua +++ b/resources/script/test.lua @@ -1,14 +1,20 @@ -function print_table(foo, bar) +local function print_table(foo, bar) for k, v in pairs(foo) do print(bar .. k, v) - if type(v) == 'table' and bar .. k ~= '_G' then - print_table(v, bar .. k .. '.') - end + --if type(v) == 'table' and bar .. k ~= '_G' then + -- print_table(v, bar .. k .. '.') + --end end end -print_table(_G, '') +--print(getmetatable(_G)) +--setmetatable(_G, {}) +--print_table(_G, '') -print(getmetatable('').__index) -print(string) +print(bar) +print(getmetatable(bar)) + +--print(getmetatable('').bar) +--getmetatable('').bar = 'bar' +--print(getmetatable('').bar) |