Skip to content

Commit ee21190

Browse files
author
jolly[bot]
committed
jolly-bot: auto-format Lua files using Stylua
1 parent c095236 commit ee21190

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

items/code.lua

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3417,11 +3417,10 @@ local global_sticker = {
34173417
calculate = function(self, card, context)
34183418
-- Added by IcyEthics
34193419
if context.cry_shuffling_area and context.cardarea == G.deck and context.cry_post_shuffle then
3420-
34213420
local _targetpos = nil
34223421
local _selfpos = nil
34233422

3424-
-- Iterate through every card in the deck to find both the location
3423+
-- Iterate through every card in the deck to find both the location
34253424
-- of the stickered card, and the highest placed non-stickered card
34263425
for i, _playingcard in ipairs(G.deck.cards) do
34273426
if _playingcard == card then
@@ -3431,12 +3430,15 @@ local global_sticker = {
34313430
end
34323431
end
34333432

3434-
if _targetpos == nil then _targetpos = #G.deck.cards end
3435-
if _selfpos == nil then _selfpos = #G.deck.cards end
3433+
if _targetpos == nil then
3434+
_targetpos = #G.deck.cards
3435+
end
3436+
if _selfpos == nil then
3437+
_selfpos = #G.deck.cards
3438+
end
34363439

34373440
-- Swaps the positions of the selected cards
34383441
G.deck.cards[_selfpos], G.deck.cards[_targetpos] = G.deck.cards[_targetpos], G.deck.cards[_selfpos]
3439-
34403442
end
34413443
end,
34423444
}

lib/overrides.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,13 +1602,13 @@ G.FUNCS.can_skip_booster = function(e)
16021602
end
16031603

16041604
-- Added by IcyEthics: Adding a hook to the shuffle function so that there can be a context to modify randomization
1605-
-- Any card using this will most likely want to use cry_post_shuffle.
1605+
-- Any card using this will most likely want to use cry_post_shuffle.
16061606
-- added cry_pre_shuffle for posterity
16071607
local o_ca_shuffle = CardArea.shuffle
16081608
function CardArea:shuffle(_seed)
1609-
SMODS.calculate_context({cry_shuffling_area = true, cardarea = self, cry_pre_shuffle = true})
1610-
1609+
SMODS.calculate_context({ cry_shuffling_area = true, cardarea = self, cry_pre_shuffle = true })
1610+
16111611
o_ca_shuffle(self, _seed)
16121612

1613-
SMODS.calculate_context({cry_shuffling_area = true, cardarea = self, cry_post_shuffle = true})
1613+
SMODS.calculate_context({ cry_shuffling_area = true, cardarea = self, cry_post_shuffle = true })
16141614
end

0 commit comments

Comments
 (0)