@@ -575,11 +575,11 @@ end
575575
576576
577577function G .UIDEF .stake_option (_type )
578-
578+
579579 local middle = {n = G .UIT .R , config = {align = " cm" , minh = 1.7 , minw = 7.3 }, nodes = {
580580 {n = G .UIT .O , config = {id = nil , func = ' RUN_SETUP_check_stake2' , object = Moveable ()}},
581581 }}
582-
582+
583583 local stake_options = {}
584584 local curr_options = {}
585585 local deck_usage = G .PROFILES [G .SETTINGS .profile ].deck_usage [G .GAME .viewed_back .effect .center .key ]
@@ -590,7 +590,7 @@ function G.UIDEF.stake_option(_type)
590590 curr_options [i ] = # stake_options
591591 end
592592 end
593-
593+
594594 return {n = G .UIT .ROOT , config = {align = " tm" , colour = G .C .CLEAR , minh = 2.03 , minw = 8.3 }, nodes = {
595595 _type == ' Continue' and middle
596596 or create_option_cycle ({options = stake_options , opt_callback = ' change_stake' , current_option = curr_options [G .viewed_stake ] or 1 ,
@@ -865,7 +865,7 @@ function tally_sprite(pos, value, tooltip, suit)
865865 local atlas_key_2 = (" ui_" .. (G .SETTINGS .colourblind_option and " 2" or " 1" ))
866866 local atlas = SMODS .get_atlas (atlas_key_1 ) or SMODS .get_atlas (atlas_key_2 )
867867 t_s = SMODS .create_sprite (0 , 0 , 0.3 , 0.3 , atlas , SMODS .Suits [suit ].ui_pos )
868- else
868+ else
869869 local atlas_key_1 = suit and SMODS .Suits [suit ][G .SETTINGS .colourblind_option and " hc_ui_atlas" or " lc_ui_atlas" ]
870870 local atlas_key_2 = (" ui_" .. (G .SETTINGS .colourblind_option and " 2" or " 1" ))
871871 local atlas = SMODS .get_atlas (atlas_key_1 ) or SMODS .get_atlas (atlas_key_2 )
@@ -1219,7 +1219,7 @@ G.FUNCS.your_suits_page = function(args)
12191219 G .VIEWING_DECK = true
12201220 table.sort (G .playing_cards , function (a , b ) return a :get_nominal (' suit' ) > b :get_nominal (' suit' ) end )
12211221 local SUITS = {}
1222- local suit_map = {}
1222+ local suit_map = {}
12231223 for i = # SMODS .Suit .obj_buffer , 1 , - 1 do
12241224 SUITS [SMODS .Suit .obj_buffer [i ]] = {}
12251225 suit_map [# suit_map + 1 ] = SMODS .Suit .obj_buffer [i ]
@@ -1640,7 +1640,7 @@ function create_UIBox_current_hands(simple, in_collection)
16401640 no_pips = true ,
16411641 in_collection = in_collection
16421642 }) }
1643- } or nil }
1643+ } or nil }
16441644 }
16451645
16461646 local t = {
@@ -1944,9 +1944,9 @@ function create_UIBox_notify_alert(_achievement, _type)
19441944 t_s .states .drag .can = false
19451945 t_s .states .hover .can = false
19461946 t_s .states .collide .can = false
1947-
1947+
19481948 local subtext = _type == ' achievement' and localize (G .F_TROPHIES and ' k_trophy' or ' k_achievement' ) or
1949- _type == ' Joker' and localize (' k_joker' ) or
1949+ _type == ' Joker' and localize (' k_joker' ) or
19501950 _type == ' Voucher' and localize (' k_voucher' ) or
19511951 _type == ' Back' and localize (' k_deck' ) or
19521952 _c .set and localize (' k_' .. _c .set :lower ()) or
@@ -2031,7 +2031,7 @@ end
20312031-- silent = boolean value
20322032function Card :set_edition (edition , immediate , silent , delay )
20332033 SMODS .enh_cache :write (self , nil )
2034-
2034+
20352035 if self .edition then
20362036 self .ability .card_limit = self .ability .card_limit - (self .edition .card_limit or 0 )
20372037 self .ability .extra_slots_used = self .ability .extra_slots_used - (self .edition .extra_slots_used or 0 )
@@ -2442,16 +2442,21 @@ G.FUNCS.change_collab = function(args)
24422442 end
24432443 G .FUNCS .update_suit_colours (args .cycle_config .curr_suit , deckskin_key , selected_palette )
24442444 G .FUNCS .update_collab_cards (args .to_key , args .cycle_config .curr_suit )
2445- if swap_node then
2446- for i = 1 , # swap_node .children do
2447- swap_node .children [i ]:remove ()
2448- swap_node .children [i ] = nil
2449- end
2450- local new_palette_selector = {n = G .UIT .R , config = {align = " cm" , id = ' palette_selector' }, nodes = {
2451- create_option_cycle ({options = palette_loc_options , w = 5.5 , cycle_shoulders = false , curr_suit = args .cycle_config .curr_suit , curr_skin = deckskin_key , opt_callback = ' change_colour_palette' , current_option = selected_palette , colour = G .C .ORANGE , focus_args = {snap_to = true , nav = ' wide' }}),
2445+
2446+ local swap_node = G .OVERLAY_MENU :get_UIE_by_ID (' palette_selector' )
2447+ for i = 1 , # swap_node .children do
2448+ swap_node .children [i ]:remove ()
2449+ swap_node .children [i ] = nil
2450+ end
2451+ if # palette_loc_options > 1 then
2452+ local opt_cycle = create_option_cycle ({options = palette_loc_options , w = 4.5 , h = 0.5 , text_scale = 0.3 , cycle_shoulders = false , curr_suit = args .cycle_config .curr_suit , curr_skin = deckskin_key , opt_callback = ' change_colour_palette' , current_option = selected_palette , colour = G .C .ORANGE , focus_args = {snap_to = true , nav = ' wide' }})
2453+ opt_cycle .nodes [1 ].config .padding = 0.085
2454+ local new_palette_selector = {n = G .UIT .R , config = {align = " cm" , id = ' palette_selector' , minh = 0.85 }, nodes = {
2455+ opt_cycle
24522456 }}
24532457 swap_node .UIBox :add_child (new_palette_selector , swap_node )
2454- end
2458+ end
2459+
24552460 for k , v in pairs (G .I .CARD ) do
24562461 if v .config and v .config .card and v .children .front and v .ability .effect ~= ' Stone Card' then
24572462 v :set_sprites (nil , v .config .card )
@@ -2496,7 +2501,7 @@ end
24962501local debuff_card = Blind .debuff_card
24972502function Blind :debuff_card (card , from_blind )
24982503 local flags = SMODS .calculate_context ({ debuff_card = card , ignore_debuff = true })
2499- if flags .prevent_debuff then
2504+ if flags .prevent_debuff then
25002505 if card .debuff then card :set_debuff (false ) end
25012506 return
25022507 elseif flags .debuff then
@@ -2571,7 +2576,7 @@ function Card:set_base(card, initial, manual_sprites)
25712576 SMODS .merge_defaults (contexts , {change_rank = true , other_card = self , new_rank = new_rank , old_rank = self .base .id , rank_increase = ((self .base .id < new_rank ) and true ) or false })
25722577 end
25732578 end
2574- if card and card .suit and self .base .suit ~= card .suit then
2579+ if card and card .suit and self .base .suit ~= card .suit then
25752580 SMODS .merge_defaults (contexts , {change_suit = true , other_card = self , new_suit = card .suit , old_suit = self .base .suit })
25762581 end
25772582 if next (contexts ) then
0 commit comments