mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-04-30 05:41:46 -04:00
Fix behavior issue
This commit is contained in:
parent
8379af33f5
commit
5846ab1cb9
1 changed files with 9 additions and 6 deletions
15
mob_meta.lua
15
mob_meta.lua
|
@ -1155,13 +1155,16 @@ function mob:_execute_utilities()
|
|||
end
|
||||
end
|
||||
if loop_data.utility
|
||||
and loop_data.args
|
||||
and self._utility_data.args then
|
||||
local no_data = not self._utility_data.utility and not self._utility_data.args
|
||||
local new_util = self._utility_data.utility ~= loop_data.utility or not tbl_equals(self._utility_data.args, loop_data.args)
|
||||
if no_data
|
||||
or new_util then -- if utilities are different or utilities are the same and args are different set new data
|
||||
and loop_data.args then
|
||||
if not self._utility_data then
|
||||
self._utility_data = loop_data
|
||||
else
|
||||
local no_data = not self._utility_data.utility and not self._utility_data.args
|
||||
local new_util = self._utility_data.utility ~= loop_data.utility or not tbl_equals(self._utility_data.args, loop_data.args)
|
||||
if no_data
|
||||
or new_util then -- if utilities are different or utilities are the same and args are different set new data
|
||||
self._utility_data = loop_data
|
||||
end
|
||||
end
|
||||
end
|
||||
if self._utility_data.utility then
|
||||
|
|
Loading…
Add table
Reference in a new issue