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",
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@ end
|
||||||
local function common_hand()
|
local function common_hand()
|
||||||
return (G.GAME or {}).current_round and F.reduce(
|
return (G.GAME or {}).current_round and F.reduce(
|
||||||
G.GAME.hands,
|
G.GAME.hands,
|
||||||
{name = "High Card", order = -1 / 0, played = 0},
|
{ name = "High Card", order = -1 / 0, played = 0 },
|
||||||
function(a, v, k)
|
function(a, v, k)
|
||||||
return (a.played < v.played or (a.played == v.played) and (a.order > v.order)) and
|
return (a.played < v.played or (a.played == v.played) and (a.order > v.order)) and
|
||||||
{name = k, order = v.order, played = v.played} or a
|
{ name = k, order = v.order, played = v.played } or a
|
||||||
end,
|
end,
|
||||||
pairs
|
pairs
|
||||||
).name or "High Card"
|
).name or "High Card"
|
||||||
|
|
@ -41,10 +41,10 @@ SMODS.Atlas {
|
||||||
SMODS.Joker {
|
SMODS.Joker {
|
||||||
key = "escapey",
|
key = "escapey",
|
||||||
atlas = "escapey",
|
atlas = "escapey",
|
||||||
pos = {x = 0, y = 0},
|
pos = { x = 0, y = 0 },
|
||||||
sinis = {x = 2, y = 0},
|
sinis = { x = 2, y = 0 },
|
||||||
soul_pos = {x = 1, y = 0},
|
soul_pos = { x = 1, y = 0 },
|
||||||
config = {extra = {level_up_by = 1}},
|
config = { extra = { level_up_by = 1 } },
|
||||||
cost = 8,
|
cost = 8,
|
||||||
rarity = 3,
|
rarity = 3,
|
||||||
eternal_compat = true,
|
eternal_compat = true,
|
||||||
|
|
@ -110,7 +110,7 @@ SMODS.Joker {
|
||||||
F.filter(G.jokers.cards, is_mergeable_with(card)),
|
F.filter(G.jokers.cards, is_mergeable_with(card)),
|
||||||
function(v)
|
function(v)
|
||||||
sum = sum + v.ability.extra.level_up_by * (v.getEvalQty and v:getEvalQty() or 1)
|
sum = sum + v.ability.extra.level_up_by * (v.getEvalQty and v:getEvalQty() or 1)
|
||||||
v:start_dissolve({HEX("57ecab")}, nil, 1.6)
|
v:start_dissolve({ HEX("57ecab") }, nil, 1.6)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -165,22 +165,25 @@ SMODS.Joker {
|
||||||
F.foreach(
|
F.foreach(
|
||||||
F.filter(G.consumeables.cards, destructible),
|
F.filter(G.consumeables.cards, destructible),
|
||||||
function(v)
|
function(v)
|
||||||
v:start_dissolve({HEX("57ecab")}, nil, 1.6)
|
v:start_dissolve({ HEX("57ecab") }, nil, 1.6)
|
||||||
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
|
||||||
)
|
)
|
||||||
|
|
||||||
level_up_hand(card, hand, nil, object_count * card.ability.extra.level_up_by)
|
level_up_hand(card, hand, nil, object_count * card.ability.extra.level_up_by)
|
||||||
|
|
||||||
update_hand_text(
|
update_hand_text(
|
||||||
{sound = "button", volume = 0.7, pitch = 1.1, delay = 0},
|
{ sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
|
||||||
{mult = 0, chips = 0, handname = "", level = ""}
|
{ mult = 0, chips = 0, handname = "", level = "" }
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue