This commit is contained in:
GreenComfyTea
2023-08-18 10:26:49 +03:00
parent 2efdbd5f1a
commit d5b83eef2a

View File

@@ -75,7 +75,7 @@ function this.new_timer(callback, cooldown_seconds, start_offset_seconds)
end end
function this.new_delay(callback, delay) function this.new_delay_timer(callback, delay)
if callback == nil or delay == nil then if callback == nil or delay == nil then
return; return;
end end
@@ -117,7 +117,7 @@ function this.update_timers()
for callback, delay_timer in pairs(this.delay_timer_list) do for callback, delay_timer in pairs(this.delay_timer_list) do
if this.total_elapsed_script_seconds - delay_timer.init_time > delay_timer.delay then if this.total_elapsed_script_seconds - delay_timer.init_time > delay_timer.delay then
callback(); callback();
remove_list.insert(callback); table.insert(remove_list, callback);
end end
end end