mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Scripting WIP
This commit is contained in:
parent
dcedfdacd1
commit
526eedf98e
8 changed files with 203 additions and 100 deletions
|
@ -163,6 +163,12 @@ function TNT:on_punch(hitter)
|
|||
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))
|
||||
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue