diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2016-06-11 08:40:09 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2016-06-11 08:40:09 +0100 |
commit | f8692e94e372045321cdfa28e20c5ff0af11ce9d (patch) | |
tree | acc8cb5a1321f51d0d0c2fdfee658a409124c307 /api.lua | |
parent | 54beb82686c6bb470a4463d04963d8ed9c07757f (diff) |
Added ability for do_custom to skip rest of api by setting return to false
Diffstat (limited to 'api.lua')
-rw-r--r-- | api.lua | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,5 +1,5 @@ --- Mobs Api (9th June 2016) +-- Mobs Api (11th June 2016) mobs = {} mobs.mod = "redo" @@ -2105,7 +2105,11 @@ local mob_step = function(self, dtime) -- run custom function (defined in mob lua file) 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 -- attack timer |