Skip to content

Commit cb7b047

Browse files
authored
pass args.level_up to args.func (#1268)
1 parent 9a55d8f commit cb7b047

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lsp_def/utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ function SMODS.is_active_blind(key, ignore_disabled) end
775775
---@return boolean
776776
function SMODS.challenge_is_unlocked(challenge, k) end
777777

778-
---@param args table|{hands?: table, parameters?: table, level_up?: number|boolean, func?: fun(base: number, hand: string, param: string), instant?: boolean, StatusText?: boolean|string|table|fun(hand: string, parameter: string)}
778+
---@param args table|{hands?: table, parameters?: table, level_up?: number|boolean, func?: fun(base: number, hand: string, param: string, level_up?: number|boolean), instant?: boolean, StatusText?: boolean|string|table|fun(hand: string, parameter: string)}
779779
--- This functions handles upgrading poker hands in more complex ways. You can define
780780
--- a custom `func` to modify the values in specific ways. `hands` and `parameters` can
781781
--- be limited to specific ones, or default to using all of `G.GAME.hands` and `SMODS.Scoring_Parameters`.

src/utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3386,7 +3386,7 @@ function SMODS.upgrade_poker_hands(args)
33863386
for i, parameter in ipairs(args.parameters) do
33873387
if G.GAME.hands[hand][parameter] then
33883388
context.old_parameters[parameter] = G.GAME.hands[hand][parameter]
3389-
G.GAME.hands[hand][parameter] = args.func(G.GAME.hands[hand][parameter], hand, parameter)
3389+
G.GAME.hands[hand][parameter] = args.func(G.GAME.hands[hand][parameter], hand, parameter, args.level_up)
33903390
context.new_parameters[parameter] = G.GAME.hands[hand][parameter]
33913391
if not instant then
33923392
local StatusText = true

0 commit comments

Comments
 (0)