Merge pull request #11 from JordanL2/texture_mod_2

Fix for texture mod issue
This commit is contained in:
ElCeejo 2022-03-22 13:42:43 -07:00 committed by GitHub
commit 8542912775
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 16 deletions

View file

@ -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