mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-03-21 15:21:24 +00:00
Merge pull request #11 from JordanL2/texture_mod_2
Fix for texture mod issue
This commit is contained in:
commit
8542912775
2 changed files with 14 additions and 16 deletions
|
@ -203,13 +203,11 @@ local function index_box_border(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
function mob:indicate_damage()
|
function mob:indicate_damage()
|
||||||
local texture_mod = self.object:get_texture_mod()
|
self._original_texture_mod = self._original_texture_mod or self.object:get_texture_mod()
|
||||||
self.object:set_texture_mod("^[colorize:#FF000040")
|
self.object:set_texture_mod(self._original_texture_mod .. "^[colorize:#FF000040")
|
||||||
self.object:set_texture_mod(texture_mod .. "^[colorize:#FF000040")
|
|
||||||
core.after(0.2, function()
|
core.after(0.2, function()
|
||||||
if creatura.is_alive(self) then
|
if creatura.is_alive(self) then
|
||||||
self.object:set_texture_mod("")
|
self.object:set_texture_mod(self._original_texture_mod)
|
||||||
self.object:set_texture_mod(texture_mod)
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue