fixed bug in quest_api.lua: setting variables to nil is possible again

This commit is contained in:
Sokomine 2021-07-12 00:23:46 +02:00
parent bcc171dff2
commit bbc778f0ef

View File

@ -92,7 +92,10 @@ yl_speak_up.set_quest_variable_value = function(player_name, variable_name, new_
if(not(variable_name) or not(player_name) or not(yl_speak_up.player_vars[ k ])) then
return false
end
yl_speak_up.player_vars[ k ][ player_name ] = tostring(new_value)
if(new_value ~= nil) then
new_value = tostring(new_value)
end
yl_speak_up.player_vars[ k ][ player_name ] = new_value
-- a quest variable was changed - save that to disc (but no need to force it)
yl_speak_up.save_quest_variables(false)
return true