supported "at least" for accepting items

This commit is contained in:
Sokomine 2025-06-08 16:34:42 +02:00
parent a8531ef41e
commit d35f053137
2 changed files with 4 additions and 2 deletions

View File

@ -2309,7 +2309,7 @@ yl_speak_up.get_sub_fs_edit_option_action_npc_wants_or_accepts = function(
end end
amount = tostring(parts[2]) amount = tostring(parts[2])
end end
local size_list = {"any amount", "exactly "..amount, local size_list = {"any amount", "exactly "..amount, "at_least "..amount,
"less than "..amount, "more than "..amount, "another amount than "..amount} "less than "..amount, "more than "..amount, "another amount than "..amount}
local match_size = 1 local match_size = 1
for i, list_text in ipairs(size_list) do for i, list_text in ipairs(size_list) do

View File

@ -299,6 +299,8 @@ yl_speak_up.show_precondition = function(p, pname)
local match = "any amount" local match = "any amount"
if(p.p_match_stack_size == "any") then if(p.p_match_stack_size == "any") then
match = "any amount" match = "any amount"
elseif(p.p_match_stack_size == "at_least") then
match = "at least "..tostring(amount)
elseif(p.p_match_stack_size == "exactly") then elseif(p.p_match_stack_size == "exactly") then
match = "exactly "..tostring(amount) match = "exactly "..tostring(amount)
elseif(p.p_match_stack_size == "less" elseif(p.p_match_stack_size == "less"
@ -308,7 +310,7 @@ yl_speak_up.show_precondition = function(p, pname)
match = "another amount than " ..tostring(amount) match = "another amount than " ..tostring(amount)
end end
if(p.p_item_group and p.p_item_group ~= "") then if(p.p_item_group and p.p_item_group ~= "") then
return "The player offered "..tostring(match).." item(s) of the group \"".. return "The player offered "..tostring(match).." of item(s) of the group \""..
tostring(item).."\"." tostring(item).."\"."
elseif((p.p_item_quest_id and p.p_item_quest_id ~= "") elseif((p.p_item_quest_id and p.p_item_quest_id ~= "")
or (p.p_item_desc and p.p_item_desc ~= "")) then or (p.p_item_desc and p.p_item_desc ~= "")) then