Skip to content

Commit 2973f86

Browse files
author
jolly[bot]
committed
jolly-bot: auto-format Lua files using Stylua
1 parent 40d570d commit 2973f86

File tree

2 files changed

+43
-25
lines changed

2 files changed

+43
-25
lines changed

items/code.lua

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3535,11 +3535,14 @@ local log = {
35353535
G.GAME.bosses_used[bl] = (G.GAME.bosses_used[bl] or 1) - 1
35363536
end
35373537
G.GAME.USING_CODE = true
3538-
localize{}
3538+
localize({})
35393539
G.CHOOSE_CARD = UIBox({
35403540
definition = create_UIBox_log({
35413541
bl and G.localization.descriptions.Blind[bl].name or "None",
3542-
voucher and G.P_CENTERS[voucher[1]] and localize { type = 'name_text', set = G.P_CENTERS[voucher[1]].set, key = voucher[1] } or "None",
3542+
voucher
3543+
and G.P_CENTERS[voucher[1]]
3544+
and localize({ type = "name_text", set = G.P_CENTERS[voucher[1]].set, key = voucher[1] })
3545+
or "None",
35433546
}, localize("cry_code_antevoucher")),
35443547
config = {
35453548
align = "cm",
@@ -3560,8 +3563,9 @@ local log = {
35603563
local j = {}
35613564
for i = 1, 5 do
35623565
local key = Cryptid.predict_joker("sho")
3563-
local next_joker = G.P_CENTERS[key] and localize { type = 'name_text', set = G.P_CENTERS[key].set, key = key }
3564-
or "ERROR"
3566+
local next_joker = G.P_CENTERS[key]
3567+
and localize({ type = "name_text", set = G.P_CENTERS[key].set, key = key })
3568+
or "ERROR"
35653569
if next_joker == "ERROR" then
35663570
local try = (G.localization.descriptions[G.P_CENTERS[key].set] or {})[key]
35673571
try = try and try.name or "[ERROR]"

lib/overrides.lua

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -508,59 +508,73 @@ function Game:update(dt)
508508
G.STATE = G.STATES.SELECTING_HAND
509509
G.STATE_COMPLETE = false
510510
end
511-
if
511+
if
512512
G.STATE == G.STATES.HAND_PLAYED
513513
and to_big(G.GAME.chips) > to_big(G.GAME.blind.chips)
514514
and not G.hand.cards[1]
515515
and not G.deck.cards[1]
516516
then
517517
--im having to manually recreate some of this idk why
518518
G.RESET_BLIND_STATES = true
519-
G.RESET_JIGGLES = true
519+
G.RESET_JIGGLES = true
520520
G.GAME.blind.in_blind = false
521521
G.E_MANAGER:add_event(Event({
522-
trigger = 'after',
522+
trigger = "after",
523523
delay = 0.3,
524524
func = function()
525525
if G.GAME.blind.config.blind.cry_before_cash and not G.GAME.blind.disabled then
526526
G.GAME.blind:cry_before_cash()
527527
else
528-
G.GAME.cry_make_a_decision = nil
529-
530-
G.STATE = G.STATES.ROUND_EVAL
531-
G.STATE_COMPLETE = false
528+
G.GAME.cry_make_a_decision = nil
529+
530+
G.STATE = G.STATES.ROUND_EVAL
531+
G.STATE_COMPLETE = false
532532
end
533533

534-
if G.GAME.blind_on_deck == 'Small' then
535-
G.GAME.round_resets.blind_states.Small = 'Defeated'
536-
elseif G.GAME.blind_on_deck == 'Big' then
537-
G.GAME.round_resets.blind_states.Big = 'Defeated'
534+
if G.GAME.blind_on_deck == "Small" then
535+
G.GAME.round_resets.blind_states.Small = "Defeated"
536+
elseif G.GAME.blind_on_deck == "Big" then
537+
G.GAME.round_resets.blind_states.Big = "Defeated"
538538
else
539539
if G.GAME.current_round.cry_voucher_stickers.pinned == false then
540540
G.GAME.current_round.voucher = SMODS.get_next_vouchers()
541541
G.GAME.current_round.cry_voucher_stickers = Cryptid.next_voucher_stickers()
542542
G.GAME.current_round.cry_voucher_edition = cry_get_next_voucher_edition() or {}
543543
G.GAME.current_round.cry_bonusvouchers = {}
544-
G.GAME.cry_bonusvouchersused = {} -- i'm not sure why i'm putting these in two separate tables but it doesn't matter much
544+
G.GAME.cry_bonusvouchersused = {} -- i'm not sure why i'm putting these in two separate tables but it doesn't matter much
545545
for i = 1, G.GAME.cry_bonusvouchercount do
546546
G.GAME.current_round.cry_bonusvouchers[i] = SMODS.get_next_vouchers()
547547
end
548548
if G.GAME.modifiers.cry_no_vouchers then
549-
very_fair_quip = pseudorandom_element(G.localization.misc.very_fair_quips, pseudoseed("cry_very_fair"))
549+
very_fair_quip =
550+
pseudorandom_element(G.localization.misc.very_fair_quips, pseudoseed("cry_very_fair"))
550551
end
551552
end
552-
G.GAME.round_resets.blind_states.Boss = 'Defeated'
553+
G.GAME.round_resets.blind_states.Boss = "Defeated"
553554
for k, v in ipairs(G.playing_cards) do
554555
v.ability.played_this_ante = nil
555556
end
556557
end
557558

558-
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
559-
if G.GAME.round_resets.temp_reroll_cost then G.GAME.round_resets.temp_reroll_cost = nil; calculate_reroll_cost(true) end
559+
if G.GAME.round_resets.temp_handsize then
560+
G.hand:change_size(-G.GAME.round_resets.temp_handsize)
561+
G.GAME.round_resets.temp_handsize = nil
562+
end
563+
if G.GAME.round_resets.temp_reroll_cost then
564+
G.GAME.round_resets.temp_reroll_cost = nil
565+
calculate_reroll_cost(true)
566+
end
560567
for _, v in pairs(find_joker("cry-loopy")) do
561568
if v.ability.extra.retrigger ~= 0 then
562569
v.ability.extra.retrigger = 0
563-
card_eval_status_text(v, 'extra', nil, nil, nil, {message = localize("k_reset"), colour = G.C.GREEN})
570+
card_eval_status_text(
571+
v,
572+
"extra",
573+
nil,
574+
nil,
575+
nil,
576+
{ message = localize("k_reset"), colour = G.C.GREEN }
577+
)
564578
end
565579
end
566580
for _, v in pairs(G.deck.cards) do
@@ -574,18 +588,18 @@ function Game:update(dt)
574588
reset_idol_card()
575589
reset_mail_rank()
576590
reset_ancient_card()
577-
reset_castle_card()
591+
reset_castle_card()
578592
for _, mod in ipairs(SMODS.mod_list) do
579-
if mod.reset_game_globals and type(mod.reset_game_globals) == 'function' then
593+
if mod.reset_game_globals and type(mod.reset_game_globals) == "function" then
580594
mod.reset_game_globals(false)
581595
end
582596
end
583597
for k, v in ipairs(G.playing_cards) do
584598
v.ability.discarded = nil
585599
v.ability.forced_selection = nil
586600
end
587-
return true
588-
end
601+
return true
602+
end,
589603
}))
590604
end
591605
end

0 commit comments

Comments
 (0)