supported "at least" for accepting items

This commit is contained in:
Sokomine 2025-06-08 16:33:44 +02:00
parent 3855a9b393
commit b371f15801

View File

@ -382,8 +382,11 @@ yl_speak_up.eval_precondition = function(player, n_id, p, other_options_true_or_
if(p.p_match_stack_size and p.p_match_stack_size ~= "") then
local c_got = stack_got:get_count()
local c_wanted = stack_wanted:get_count()
if( p.p_match_stack_size == "exactly" and c_got ~= c_wanted) then
return false -- not exactly the same amount as the wanted one
elseif(p.p_match_stack_size == "at_least" and c_got < c_wanted) then
return false -- didn't get at least the wanted amount
elseif(p.p_match_stack_size == "less" and c_got >= c_wanted) then
return false -- didn't get less than the given number
elseif(p.p_match_stack_size == "more" and c_got <= c_wanted) then