forked from mtcontrib/mobs_redo
Added ability for do_custom to skip rest of api by setting return to false
This commit is contained in:
parent
54beb82686
commit
f8692e94e3
8
api.lua
8
api.lua
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
-- Mobs Api (9th June 2016)
|
-- Mobs Api (11th June 2016)
|
||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
@ -2105,7 +2105,11 @@ local mob_step = function(self, dtime)
|
|||||||
|
|
||||||
-- run custom function (defined in mob lua file)
|
-- run custom function (defined in mob lua file)
|
||||||
if self.do_custom then
|
if self.do_custom then
|
||||||
self.do_custom(self, dtime)
|
|
||||||
|
-- when false skip going any further
|
||||||
|
if self.do_custom(self, dtime) == false then
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- attack timer
|
-- attack timer
|
||||||
|
Loading…
Reference in New Issue
Block a user