X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=mods%2Fmob%2Fapi%2Fapi_hook.lua;h=4607bf2049fc397e742c94ad032e571443a8ed17;hb=f39b7a6138697251614a5472b7d68a3ed1defd30;hp=59b5c63128e9a4d3f5a1197edfabdbf11988378d;hpb=b2b155f1fbc3261bd7f64fd5e5deb1fa97624778;p=Crafter.git diff --git a/mods/mob/api/api_hook.lua b/mods/mob/api/api_hook.lua index 59b5c63..4607bf2 100644 --- a/mods/mob/api/api_hook.lua +++ b/mods/mob/api/api_hook.lua @@ -1,3 +1,4 @@ +local minetest = minetest --class mobs = {} @@ -90,6 +91,7 @@ mob_register.die_sound = def.die_sound mob_register.attack_type = def.attack_type if def.attack_type == "explode" then mob_register.tnt_tick_timer = 0 + mob_register.explosion_type = def.explosion_type end mob_register.explosion_radius = def.explosion_radius mob_register.explosion_power = def.explosion_power @@ -136,6 +138,12 @@ mob_register.custom_on_punch = def.custom_on_punch mob_register.c_mob_data = def.c_mob_data +mob_register.deactivating = false + +mob_register.on_fire = false + +mob_register.fire_table = def.fire_table + if def.pathfinds then --mob_register.path = {} mob_register.pathfinding_timer = 0 @@ -159,7 +167,7 @@ mob_register.on_step = function(self, dtime,moveresult) self.custom_function_begin(self,dtime) end - --self.collision_detection(self) + self.collision_detection(self) if self.fall_damage then self.fall_damage(self) end @@ -173,7 +181,7 @@ mob_register.on_step = function(self, dtime,moveresult) self.custom_function(self,dtime,moveresult) end - --self.move(self,dtime,moveresult) + self.move(self,dtime,moveresult) --self.debug_nametag(self,dtime)