Migrate to os.clock() for time-based functionality

- Fixed is_enable typo for ailments.
- Make small monster updates 1/s.
This commit is contained in:
GreenComfyTea
2022-07-11 08:51:52 +03:00
parent e82612f725
commit d8a6e8c578
7 changed files with 84 additions and 142 deletions

View File

@@ -36,7 +36,7 @@ function ailment_buildup.draw_dynamic(monster, ailment_buildups_position_on_scre
goto continue;
end
if cached_config.settings.time_limit ~= 0 and time.total_elapsed_seconds - ailment.last_change_time > cached_config.settings.time_limit then
if cached_config.settings.time_limit ~= 0 and time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then
goto continue;
end
@@ -167,7 +167,7 @@ function ailment_buildup.draw_static(monster, ailment_buildups_position_on_scree
goto continue;
end
if cached_config.settings.time_limit ~= 0 and time.total_elapsed_seconds - ailment.last_change_time > cached_config.settings.time_limit then
if cached_config.settings.time_limit ~= 0 and time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then
goto continue;
end
@@ -295,7 +295,7 @@ function ailment_buildup.draw_highlighted(monster, ailment_buildups_position_on_
goto continue;
end
if cached_config.settings.time_limit ~= 0 and time.total_elapsed_seconds - ailment.last_change_time > cached_config.settings.time_limit then
if cached_config.settings.time_limit ~= 0 and time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then
goto continue;
end
@@ -423,7 +423,7 @@ function ailment_buildup.draw_small(monster, ailment_buildups_position_on_screen
goto continue;
end
if cached_config.settings.time_limit ~= 0 and time.total_elapsed_seconds - ailment.last_change_time > cached_config.settings.time_limit then
if cached_config.settings.time_limit ~= 0 and time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then
goto continue;
end