Skip to content

Commit 19a2ab2

Browse files
fix display of The Clock when using StrangeLib
1 parent 66d8594 commit 19a2ab2

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

lib/overrides.lua

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -371,22 +371,28 @@ function Game:update(dt)
371371
--Update UI
372372
--todo: in blinds screen, too
373373
if G.blind_select_opts then
374-
local blind_UI = G.blind_select_opts[string.lower(c)].definition.nodes[1].nodes[1].nodes[1].nodes[1]
375-
local chip_text_node = blind_UI.nodes[1].nodes[3].nodes[1].nodes[2].nodes[2].nodes[3]
376-
if chip_text_node then
377-
chip_text_node.config.text = number_format(
378-
get_blind_amount(G.GAME.round_resets.blind_ante)
379-
* G.GAME.starting_params.ante_scaling
380-
* G.GAME.CRY_BLINDS[c]
381-
)
382-
chip_text_node.config.scale = score_number_scale(
383-
0.9,
384-
get_blind_amount(G.GAME.round_resets.blind_ante)
385-
* G.GAME.starting_params.ante_scaling
386-
* G.GAME.CRY_BLINDS[c]
387-
)
374+
if (SMODS.Mods["StrangeLib"] or {}).can_load then
375+
StrangeLib.dynablind.blind_choice_scores[c] = get_blind_amount(G.GAME.round_resets.blind_ante)
376+
* G.GAME.starting_params.ante_scaling * G.GAME.CRY_BLINDS[c]
377+
StrangeLib.dynablind.blind_choice_score_texts[c] = number_format(StrangeLib.dynablind.blind_choice_scores[c])
378+
else
379+
local blind_UI = G.blind_select_opts[string.lower(c)].definition.nodes[1].nodes[1].nodes[1].nodes[1]
380+
local chip_text_node = blind_UI.nodes[1].nodes[3].nodes[1].nodes[2].nodes[2].nodes[3]
381+
if chip_text_node then
382+
chip_text_node.config.text = number_format(
383+
get_blind_amount(G.GAME.round_resets.blind_ante)
384+
* G.GAME.starting_params.ante_scaling
385+
* G.GAME.CRY_BLINDS[c]
386+
)
387+
chip_text_node.config.scale = score_number_scale(
388+
0.9,
389+
get_blind_amount(G.GAME.round_resets.blind_ante)
390+
* G.GAME.starting_params.ante_scaling
391+
* G.GAME.CRY_BLINDS[c]
392+
)
393+
end
394+
G.blind_select_opts[string.lower(c)]:recalculate()
388395
end
389-
G.blind_select_opts[string.lower(c)]:recalculate()
390396
end
391397
elseif
392398
G.GAME.round_resets.blind_states[c] ~= "Defeated"

0 commit comments

Comments
 (0)