mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-07-13 05:40:33 +02:00
added quick health check when punched
This commit is contained in:
7
api.lua
7
api.lua
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
-- Mobs Api (22nd February 2017)
|
-- Mobs Api (24th February 2017)
|
||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
@ -1992,6 +1992,11 @@ end
|
|||||||
|
|
||||||
local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
||||||
|
|
||||||
|
-- mob health check
|
||||||
|
if self.health <= 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- error checking when mod profiling is enabled
|
-- error checking when mod profiling is enabled
|
||||||
if not tool_capabilities then
|
if not tool_capabilities then
|
||||||
print (S("[MOBS] mod profiling enabled, damage not enabled"))
|
print (S("[MOBS] mod profiling enabled, damage not enabled"))
|
||||||
|
Reference in New Issue
Block a user