Skip to content

Commit ac9cd87

Browse files
author
jolly[bot]
committed
jolly-bot: auto-format Lua files using Stylua
1 parent 813a9cf commit ac9cd87

File tree

2 files changed

+42
-24
lines changed

2 files changed

+42
-24
lines changed

items/code.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3499,7 +3499,10 @@ local log = {
34993499
G.CHOOSE_CARD = UIBox({
35003500
definition = create_UIBox_log({
35013501
bl and G.localization.descriptions.Blind[bl].name or "None",
3502-
voucher and G.P_CENTERS[voucher[1]] and localize { type = 'name_text', set = G.P_CENTERS[voucher[1]].set, key = voucher[1] } or "None",
3502+
voucher
3503+
and G.P_CENTERS[voucher[1]]
3504+
and localize({ type = "name_text", set = G.P_CENTERS[voucher[1]].set, key = voucher[1] })
3505+
or "None",
35033506
}, localize("cry_code_antevoucher")),
35043507
config = {
35053508
align = "cm",
@@ -3520,8 +3523,9 @@ local log = {
35203523
local j = {}
35213524
for i = 1, 5 do
35223525
local key = Cryptid.predict_joker("sho")
3523-
local next_joker = G.P_CENTERS[key] and localize { type = 'name_text', set = G.P_CENTERS[key].set, key = key }
3524-
or "ERROR"
3526+
local next_joker = G.P_CENTERS[key]
3527+
and localize({ type = "name_text", set = G.P_CENTERS[key].set, key = key })
3528+
or "ERROR"
35253529
if next_joker == "ERROR" then
35263530
local try = (G.localization.descriptions[G.P_CENTERS[key].set] or {})[key]
35273531
try = try and try.name or "[ERROR]"

lib/overrides.lua

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -471,59 +471,73 @@ function Game:update(dt)
471471
G.STATE = G.STATES.SELECTING_HAND
472472
G.STATE_COMPLETE = false
473473
end
474-
if
474+
if
475475
G.STATE == G.STATES.HAND_PLAYED
476476
and to_big(G.GAME.chips) > to_big(G.GAME.blind.chips)
477477
and not G.hand.cards[1]
478478
and not G.deck.cards[1]
479479
then
480480
--im having to manually recreate some of this idk why
481481
G.RESET_BLIND_STATES = true
482-
G.RESET_JIGGLES = true
482+
G.RESET_JIGGLES = true
483483
G.GAME.blind.in_blind = false
484484
G.E_MANAGER:add_event(Event({
485-
trigger = 'after',
485+
trigger = "after",
486486
delay = 0.3,
487487
func = function()
488488
if G.GAME.blind.config.blind.cry_before_cash and not G.GAME.blind.disabled then
489489
G.GAME.blind:cry_before_cash()
490490
else
491-
G.GAME.cry_make_a_decision = nil
492-
493-
G.STATE = G.STATES.ROUND_EVAL
494-
G.STATE_COMPLETE = false
491+
G.GAME.cry_make_a_decision = nil
492+
493+
G.STATE = G.STATES.ROUND_EVAL
494+
G.STATE_COMPLETE = false
495495
end
496496

497-
if G.GAME.blind_on_deck == 'Small' then
498-
G.GAME.round_resets.blind_states.Small = 'Defeated'
499-
elseif G.GAME.blind_on_deck == 'Big' then
500-
G.GAME.round_resets.blind_states.Big = 'Defeated'
497+
if G.GAME.blind_on_deck == "Small" then
498+
G.GAME.round_resets.blind_states.Small = "Defeated"
499+
elseif G.GAME.blind_on_deck == "Big" then
500+
G.GAME.round_resets.blind_states.Big = "Defeated"
501501
else
502502
if G.GAME.current_round.cry_voucher_stickers.pinned == false then
503503
G.GAME.current_round.voucher = SMODS.get_next_vouchers()
504504
G.GAME.current_round.cry_voucher_stickers = Cryptid.next_voucher_stickers()
505505
G.GAME.current_round.cry_voucher_edition = cry_get_next_voucher_edition() or {}
506506
G.GAME.current_round.cry_bonusvouchers = {}
507-
G.GAME.cry_bonusvouchersused = {} -- i'm not sure why i'm putting these in two separate tables but it doesn't matter much
507+
G.GAME.cry_bonusvouchersused = {} -- i'm not sure why i'm putting these in two separate tables but it doesn't matter much
508508
for i = 1, G.GAME.cry_bonusvouchercount do
509509
G.GAME.current_round.cry_bonusvouchers[i] = SMODS.get_next_vouchers()
510510
end
511511
if G.GAME.modifiers.cry_no_vouchers then
512-
very_fair_quip = pseudorandom_element(G.localization.misc.very_fair_quips, pseudoseed("cry_very_fair"))
512+
very_fair_quip =
513+
pseudorandom_element(G.localization.misc.very_fair_quips, pseudoseed("cry_very_fair"))
513514
end
514515
end
515-
G.GAME.round_resets.blind_states.Boss = 'Defeated'
516+
G.GAME.round_resets.blind_states.Boss = "Defeated"
516517
for k, v in ipairs(G.playing_cards) do
517518
v.ability.played_this_ante = nil
518519
end
519520
end
520521

521-
if G.GAME.round_resets.temp_handsize then G.hand:change_size(-G.GAME.round_resets.temp_handsize); G.GAME.round_resets.temp_handsize = nil end
522-
if G.GAME.round_resets.temp_reroll_cost then G.GAME.round_resets.temp_reroll_cost = nil; calculate_reroll_cost(true) end
522+
if G.GAME.round_resets.temp_handsize then
523+
G.hand:change_size(-G.GAME.round_resets.temp_handsize)
524+
G.GAME.round_resets.temp_handsize = nil
525+
end
526+
if G.GAME.round_resets.temp_reroll_cost then
527+
G.GAME.round_resets.temp_reroll_cost = nil
528+
calculate_reroll_cost(true)
529+
end
523530
for _, v in pairs(find_joker("cry-loopy")) do
524531
if v.ability.extra.retrigger ~= 0 then
525532
v.ability.extra.retrigger = 0
526-
card_eval_status_text(v, 'extra', nil, nil, nil, {message = localize("k_reset"), colour = G.C.GREEN})
533+
card_eval_status_text(
534+
v,
535+
"extra",
536+
nil,
537+
nil,
538+
nil,
539+
{ message = localize("k_reset"), colour = G.C.GREEN }
540+
)
527541
end
528542
end
529543
for _, v in pairs(G.deck.cards) do
@@ -537,18 +551,18 @@ function Game:update(dt)
537551
reset_idol_card()
538552
reset_mail_rank()
539553
reset_ancient_card()
540-
reset_castle_card()
554+
reset_castle_card()
541555
for _, mod in ipairs(SMODS.mod_list) do
542-
if mod.reset_game_globals and type(mod.reset_game_globals) == 'function' then
556+
if mod.reset_game_globals and type(mod.reset_game_globals) == "function" then
543557
mod.reset_game_globals(false)
544558
end
545559
end
546560
for k, v in ipairs(G.playing_cards) do
547561
v.ability.discarded = nil
548562
v.ability.forced_selection = nil
549563
end
550-
return true
551-
end
564+
return true
565+
end,
552566
}))
553567
end
554568
end

0 commit comments

Comments
 (0)