From 7e5fc745c0e89001398f93318890be5d3f931f68 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Thu, 9 Jan 2025 23:19:09 +0100 Subject: [PATCH] fixed bug in ink import due to a wrong reimplementation of split command in test environment --- functions_dialogs.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/functions_dialogs.lua b/functions_dialogs.lua index 525d253..256005e 100644 --- a/functions_dialogs.lua +++ b/functions_dialogs.lua @@ -442,7 +442,7 @@ yl_speak_up.update_dialog_option = function(log, dialog, dialog_name, option_nam end -- options for special dialogs have to start with "automaticly_" local parts = string.split(option_name or "", "_") - if(not(parts) or not(parts[1]) or parts[1] ~= "automaticly_") then + if(not(parts) or not(parts[1]) or parts[1] ~= "automaticly") then option_name = "automaticly_"..table.concat(parts[2], "_") end -- for d_trade and d_got_item effects and preconditions are created WITH DEFAULT VALUES TODO @@ -472,15 +472,15 @@ yl_speak_up.update_dialog_option = function(log, dialog, dialog_name, option_nam if(not(parts) or not(parts[1]) or not(parts[2])) then table.insert(log, log_str.."FAILED to create unknown option \""..tostring(o_id).."\".") return nil - elseif(o_id and parts[1] == "new_") then + elseif(o_id and parts[1] == "new") then -- we are asked to create a *new* option o_id = nil - elseif(o_id and parts[1] == "automaticly_") then + elseif(o_id and parts[1] == "automaticly") then -- this option will be automaticly selected if its preconditions are true mode = 1 option_name = parts[2] o_id = option_name - elseif(o_id and parts[1] == "randomly_") then + elseif(o_id and parts[1] == "randomly") then -- this option will be randomly selected if its preconditions are true; -- (that means all other options of this dialog will have to be randomly as well; -- something which cannot be done here as there is no guarantee that all options @@ -488,7 +488,7 @@ yl_speak_up.update_dialog_option = function(log, dialog, dialog_name, option_nam mode = 2 option_name = parts[2] o_id = option_name - elseif(o_id and parts[1] ~= "o_") then + elseif(o_id and parts[1] ~= "o") then table.insert(log, log_str.."FAILED to create unknown option \""..tostring(o_id).."\".") return nil end