summaryrefslogtreecommitdiffstats
path: root/resources/script
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-02-14 23:12:07 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-02-14 23:12:07 +0100
commit0b3e29dea9863c4b5ca0c77958bbcb32a05867ca (patch)
treef96454b1c29d73ee5c083b5b2fdb988bc574542d /resources/script
parentf05141f1f78d9e0d917b2cc07f0fb09fd7f62801 (diff)
downloadrpgedit-0b3e29dea9863c4b5ca0c77958bbcb32a05867ca.tar
rpgedit-0b3e29dea9863c4b5ca0c77958bbcb32a05867ca.zip
Some work towards scriptable events
Diffstat (limited to 'resources/script')
-rw-r--r--resources/script/interact.lua3
-rw-r--r--resources/script/test.lua20
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)