mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-03-15 12:21:24 +00:00
Texture mod fix
This commit is contained in:
parent
8273f25207
commit
3bb1119017
2 changed files with 6 additions and 4 deletions
5
api.lua
5
api.lua
|
@ -55,10 +55,11 @@ end
|
|||
---------------
|
||||
|
||||
local function indicate_damage(self)
|
||||
self.object:set_texture_mod("^[colorize:#FF000040")
|
||||
local texture_mod = self.object:get_texture_mod()
|
||||
self.object:set_texture_mod(texture_mod .. "^[colorize:#FF000040")
|
||||
core.after(0.2, function()
|
||||
if creatura.is_alive(self) then
|
||||
self.object:set_texture_mod("")
|
||||
self.object:set_texture_mod(texture_mod)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -203,10 +203,11 @@ local function index_box_border(self)
|
|||
end
|
||||
|
||||
local function indicate_damage(self)
|
||||
self.object:set_texture_mod("^[colorize:#FF000040")
|
||||
local texture_mod = self.object:get_texture_mod()
|
||||
self.object:set_texture_mod(texture_mod .. "^[colorize:#FF000040")
|
||||
core.after(0.2, function()
|
||||
if creatura.is_alive(self) then
|
||||
self.object:set_texture_mod("")
|
||||
self.object:set_texture_mod(texture_mod)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue