Skip to content

Commit 4199c44

Browse files
authored
Merge pull request #449 from DigitalDetective47/main
2 parents 76e7b8a + 19a2ab2 commit 4199c44

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
@@ -375,22 +375,28 @@ function Game:update(dt)
375375
--Update UI
376376
--todo: in blinds screen, too
377377
if G.blind_select_opts then
378-
local blind_UI = G.blind_select_opts[string.lower(c)].definition.nodes[1].nodes[1].nodes[1].nodes[1]
379-
local chip_text_node = blind_UI.nodes[1].nodes[3].nodes[1].nodes[2].nodes[2].nodes[3]
380-
if chip_text_node then
381-
chip_text_node.config.text = number_format(
382-
get_blind_amount(G.GAME.round_resets.blind_ante)
383-
* G.GAME.starting_params.ante_scaling
384-
* G.GAME.CRY_BLINDS[c]
385-
)
386-
chip_text_node.config.scale = score_number_scale(
387-
0.9,
388-
get_blind_amount(G.GAME.round_resets.blind_ante)
389-
* G.GAME.starting_params.ante_scaling
390-
* G.GAME.CRY_BLINDS[c]
391-
)
378+
if (SMODS.Mods["StrangeLib"] or {}).can_load then
379+
StrangeLib.dynablind.blind_choice_scores[c] = get_blind_amount(G.GAME.round_resets.blind_ante)
380+
* G.GAME.starting_params.ante_scaling * G.GAME.CRY_BLINDS[c]
381+
StrangeLib.dynablind.blind_choice_score_texts[c] = number_format(StrangeLib.dynablind.blind_choice_scores[c])
382+
else
383+
local blind_UI = G.blind_select_opts[string.lower(c)].definition.nodes[1].nodes[1].nodes[1].nodes[1]
384+
local chip_text_node = blind_UI.nodes[1].nodes[3].nodes[1].nodes[2].nodes[2].nodes[3]
385+
if chip_text_node then
386+
chip_text_node.config.text = number_format(
387+
get_blind_amount(G.GAME.round_resets.blind_ante)
388+
* G.GAME.starting_params.ante_scaling
389+
* G.GAME.CRY_BLINDS[c]
390+
)
391+
chip_text_node.config.scale = score_number_scale(
392+
0.9,
393+
get_blind_amount(G.GAME.round_resets.blind_ante)
394+
* G.GAME.starting_params.ante_scaling
395+
* G.GAME.CRY_BLINDS[c]
396+
)
397+
end
398+
G.blind_select_opts[string.lower(c)]:recalculate()
392399
end
393-
G.blind_select_opts[string.lower(c)]:recalculate()
394400
end
395401
elseif
396402
G.GAME.round_resets.blind_states[c] ~= "Defeated"

0 commit comments

Comments
 (0)