diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-12 11:59:56 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:39 +0200 |
commit | 526eedf98e45fc3b0ad768ecb1d0cbc1968def2f (patch) | |
tree | 0b972c05ad7609f1f0d8df269c2255223940499f /data/scripts | |
parent | dcedfdacd1ba77591cdc0aa2b8c123c6a5ef2f5d (diff) | |
download | minetest-526eedf98e45fc3b0ad768ecb1d0cbc1968def2f.tar.gz minetest-526eedf98e45fc3b0ad768ecb1d0cbc1968def2f.tar.bz2 minetest-526eedf98e45fc3b0ad768ecb1d0cbc1968def2f.zip |
Scripting WIP
Diffstat (limited to 'data/scripts')
-rw-r--r-- | data/scripts/default.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/data/scripts/default.lua b/data/scripts/default.lua index baf541f46..c35558341 100644 --- a/data/scripts/default.lua +++ b/data/scripts/default.lua @@ -164,6 +164,12 @@ end -- Called when object is right-clicked function TNT:on_rightclick(clicker) + pos = self.object:getpos() + pos = {x=pos.x, y=pos.y+0.1, z=pos.z} + self.object:moveto(pos) +end +--[[ +function TNT:on_rightclick(clicker) print("TNT:on_rightclick()") print("self: "..dump(self)) print("getmetatable(self): "..dump(getmetatable(self))) @@ -173,6 +179,7 @@ function TNT:on_rightclick(clicker) pos = {x=pos.x+0.5+1, y=pos.y+0.5, z=pos.z+0.5} --minetest.env:add_node(pos, 0) end +--]] print("TNT dump: "..dump(TNT)) |