write manual editing of quest variable values to disc

This commit is contained in:
Sokomine 2025-06-09 02:58:03 +02:00
parent d35f053137
commit 46b70772c9

View File

@ -137,6 +137,7 @@ yl_speak_up.fun_input_fs_manage_variables_check_fields = function(player, formna
if(new_value ~= fields.current_value_for_player) then
success_msg = minetest.colorize("#FF0000", "FAILED TO set variable")
end
yl_speak_up.save_quest_variables(true)
yl_speak_up.show_fs(player, "msg", {
input_to = "yl_speak_up:manage_variables",
formspec = "size[10,2.5]"..
@ -163,6 +164,7 @@ yl_speak_up.fun_input_fs_manage_variables_check_fields = function(player, formna
if(new_value) then
success_msg = minetest.colorize("#FF0000", "FAILED TO unset variable")
end
yl_speak_up.save_quest_variables(true)
yl_speak_up.show_fs(player, "msg", {
input_to = "yl_speak_up:manage_variables",
formspec = "size[10,2]"..
@ -218,6 +220,7 @@ yl_speak_up.fun_input_fs_manage_variables_check_fields = function(player, formna
minetest.formspec_escape(var_name)..
"\"\nfor player "..minetest.formspec_escape(grant_to)..".\n"..
"Note: This will *not* affect existing preconditions/effects!"
yl_speak_up.save_quest_variables(true)
end
yl_speak_up.show_fs(player, "msg", {
input_to = "yl_speak_up:manage_variables",
@ -258,6 +261,7 @@ yl_speak_up.fun_input_fs_manage_variables_check_fields = function(player, formna
error_msg = "Granted "..right.." access to variable\n\""..
minetest.formspec_escape(var_name)..
"\"\nto player "..minetest.formspec_escape(grant_to).."."
yl_speak_up.save_quest_variables(true)
end
yl_speak_up.show_fs(player, "msg", {
input_to = "yl_speak_up:manage_variables",