api change: the entity name is now generated from the nodename

This commit is contained in:
adrido 2013-12-03 05:05:33 +01:00
parent dd24532a4b
commit fdd7def7fe
2 changed files with 2 additions and 6 deletions

@ -12,7 +12,6 @@ local exploding={
range=1,
gravity=10,
velocity=30,
name="cannons:exploding_bullet",
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
on_player_hit = function(self,pos,player)
local playername = player:get_player_name()
@ -52,7 +51,6 @@ local fire={
range=2,
gravity=8,
velocity=35,
name="cannons:fire_bullet",
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
on_player_hit = function(self,pos,player)
local playername = player:get_player_name()
@ -93,7 +91,6 @@ local ball_wood={
range=1,
gravity=10,
velocity=40,
name="cannons:wood_bullet",
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
on_player_hit = function(self,pos,player)
local playername = player:get_player_name()
@ -146,7 +143,6 @@ local ball_stone={
range=2,
gravity=10,
velocity=40,
name="cannons:stone_bullet",
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
on_player_hit = function(self,pos,player)
local playername = player:get_player_name()
@ -199,7 +195,6 @@ local ball_steel={
range=2,
gravity=5,
velocity=50,
name="cannons:iron_bullet",
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
on_player_hit = function(self,pos,player)
local playername = player:get_player_name()

@ -239,6 +239,8 @@ cannons.registered_muni = {}
function cannons.register_muni(node,entity)
cannons.registered_muni[node] = {}
cannons.registered_muni[node].entity = entity
local name = node:split(":")
cannons.registered_muni[node].entity.name ="cannons:entity_"..name[1].."_"..name[2]
cannons.registered_muni[node].entity.on_step = function(self, dtime)
self.timer=self.timer+dtime
if self.timer >= 0.3 then --easiesst less laggiest way to find out that it left his start position
@ -287,7 +289,6 @@ local apple={
range=2,
gravity=10,
velocity=30,
name="cannons:apple",
collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25},
on_player_hit = function(self,pos,player)
local playername = player:get_player_name()