-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtnt.lua
More file actions
27 lines (26 loc) · 766 Bytes
/
tnt.lua
File metadata and controls
27 lines (26 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
cannons.register_muni("tnt:tnt",{
physical = false,
timer=0,
textures = {"tnt_top.png", "tnt_bottom.png", "tnt_side.png", "tnt_side.png", "tnt_side.png", "tnt_side.png"},
lastpos={},
damage=15,
visual = "cube",
visual_size = {x=0.5, y=0.5},
range=1,
gravity=10,
velocity=20,
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
on_player_hit = function(self,pos,player)
core.registered_nodes["tnt:tnt_burning"].on_timer(pos);
self.object:remove()
end,
on_mob_hit = function(self,pos,mob)
core.registered_nodes["tnt:tnt_burning"].on_timer(pos);
self.object:remove()
end,
on_node_hit = function(self,pos,node)
core.registered_nodes["tnt:tnt_burning"].on_timer(pos);
self.object:remove()
end,
})
cannons.register_gunpowder("tnt:gunpowder");