summaryrefslogtreecommitdiff
path: root/api.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-10-18 19:56:04 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-10-18 19:56:04 +0100
commitec4ba73bab1140c9a639df05f83921f7e47e1b94 (patch)
treed277e5011d43509c4f4a6f066a7a8075ed2a3e6d /api.lua
parentf6f3b58ac643b304a4e087facc8623a23e1d9bd7 (diff)
added custom after_activate function check
Diffstat (limited to 'api.lua')
-rw-r--r--api.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/api.lua b/api.lua
index 93e0467..b934af7 100644
--- a/api.lua
+++ b/api.lua
@@ -2099,9 +2099,9 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
end
-- mob health check
- if self.health <= 0 then
- return
- end
+-- if self.health <= 0 then
+-- return
+-- end
-- error checking when mod profiling is enabled
if not tool_capabilities then
@@ -2507,6 +2507,11 @@ local mob_activate = function(self, staticdata, def, dtime)
end
end
+ -- run after_activate
+ if def.after_activate then
+ def.after_activate(self, staticdata, def, dtime)
+ end
+
if use_cmi then
self._cmi_components = cmi.activate_components(self.serialized_cmi_components)
cmi.notify_activate(self.object, dtime)