Speed up animation when many tags exist
This commit is contained in:
parent
8cf3988bcc
commit
e1e0ce0661
2 changed files with 15 additions and 12 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
"author": [
|
"author": [
|
||||||
"Emik"
|
"Emik"
|
||||||
],
|
],
|
||||||
"version": "1.4.2",
|
"version": "1.4.3",
|
||||||
"badge_colour": "8BE9FD",
|
"badge_colour": "8BE9FD",
|
||||||
"main_file": "src/main.lua",
|
"main_file": "src/main.lua",
|
||||||
"badge_text_colour": "44475A",
|
"badge_text_colour": "44475A",
|
||||||
|
|
|
||||||
|
|
@ -169,10 +169,13 @@ SMODS.Joker {
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
local trigger = #G.GAME.tags >= 30 and "immediate" or "before"
|
||||||
|
local delay = #G.GAME.tags >= 30 and 0 or 1 / #G.GAME.tags
|
||||||
|
|
||||||
F.foreach(
|
F.foreach(
|
||||||
G.GAME.tags,
|
G.GAME.tags,
|
||||||
function(v)
|
function(v)
|
||||||
G.E_MANAGER:add_event(Event({trigger = "immediate", func = fast_delete(v)}))
|
G.E_MANAGER:add_event(Event { trigger = trigger, blocking = #G.GAME.tags < 30, delay = delay, func = fast_delete(v) })
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue