renamed get_fs_ function in alternate_text because it does something diffrent from other get_fs_ functions

This commit is contained in:
Sokomine 2023-12-18 04:47:53 +01:00
parent 2cbac5ca7e
commit 536ad045f6
2 changed files with 8 additions and 8 deletions

View File

@ -31,7 +31,7 @@ yl_speak_up.handle_edit_actions_alternate_text = function(
yl_speak_up.speak_to[pname].edit_alternate_text_for = target_action
yl_speak_up.show_fs(player, "msg", {
input_to = "yl_speak_up:"..formspec_input_to,
formspec = yl_speak_up.get_fs_edit_dialog_modification(
formspec = yl_speak_up.extend_fs_edit_dialog_modification(
dialog, target_action.a_on_failure, target_action.alternate_text,
"if the action \""..tostring(target_action.a_id)..
"\" of option \""..tostring(o_id)..
@ -61,7 +61,7 @@ yl_speak_up.handle_edit_actions_alternate_text = function(
-- this only happens in edit_options_dialog; log it directly
yl_speak_up.show_fs(player, "msg", {
input_to = "yl_speak_up:"..formspec_input_to,
formspec = yl_speak_up.get_fs_edit_dialog_modification(
formspec = yl_speak_up.extend_fs_edit_dialog_modification(
dialog, target_effect.r_value, target_effect.alternate_text,
"if the action "..
"of option \""..tostring(o_id)..
@ -85,7 +85,7 @@ yl_speak_up.handle_edit_actions_alternate_text = function(
yl_speak_up.speak_to[pname].edit_alternate_text_for = data
yl_speak_up.show_fs(player, "msg", {
input_to = "yl_speak_up:"..formspec_input_to,
formspec = yl_speak_up.get_fs_edit_dialog_modification(
formspec = yl_speak_up.extend_fs_edit_dialog_modification(
dialog, failure_id, data.alternate_text,
"if the action \""..tostring(x_id)..
"\" of option \""..tostring(o_id)..
@ -103,7 +103,7 @@ yl_speak_up.handle_edit_actions_alternate_text = function(
yl_speak_up.speak_to[pname].edit_alternate_text_for = data
yl_speak_up.show_fs(player, "msg", {
input_to = "yl_speak_up:"..formspec_input_to,
formspec = yl_speak_up.get_fs_edit_dialog_modification(
formspec = yl_speak_up.extend_fs_edit_dialog_modification(
dialog, data.on_failure, data.alternate_text,
"if the effect \""..tostring(x_id)..
"\" of option \""..tostring(o_id)..
@ -125,7 +125,7 @@ yl_speak_up.handle_edit_actions_alternate_text = function(
yl_speak_up.speak_to[pname].edit_alternate_text_for = "timer_on_failure"
yl_speak_up.show_fs(player, "msg", {
input_to = "yl_speak_up:"..formspec_input_to,
formspec = yl_speak_up.get_fs_edit_dialog_modification(
formspec = yl_speak_up.extend_fs_edit_dialog_modification(
dialog, d_id, alternate_text,
"if the player failed to complete the action "..
"\" of option \""..tostring(o_id)..
@ -148,7 +148,7 @@ yl_speak_up.handle_edit_actions_alternate_text = function(
yl_speak_up.speak_to[pname].edit_alternate_text_for = "timer_on_success"
yl_speak_up.show_fs(player, "msg", {
input_to = "yl_speak_up:"..formspec_input_to,
formspec = yl_speak_up.get_fs_edit_dialog_modification(
formspec = yl_speak_up.extend_fs_edit_dialog_modification(
dialog, d_id, alternate_text,
"if the player has complete the action "..
"\" of option \""..tostring(o_id)..
@ -400,7 +400,7 @@ end
-- this allows to edit modifications of a dialog that are applied when a given option
-- is choosen - i.e. when the NPC wants to answer some questions - but those answers
-- do not warrant their own dialog
yl_speak_up.get_fs_edit_dialog_modification = function(dialog, d_id, alternate_dialog_text, explanation,
yl_speak_up.extend_fs_edit_dialog_modification = function(dialog, d_id, alternate_dialog_text, explanation,
forbid_turn_into_new_dialog)
local nd = "button[9.0,12.3;6,0.7;turn_alternate_text_into_new_dialog;Turn this into a new dialog]"

View File

@ -183,7 +183,7 @@ yl_speak_up.reload = function(modpath, log_entry)
-- create i.e. a dropdown list of player names
dofile(modpath .. "formspec_helpers.lua")
-- handle alternate text for dialogs
dofile(modpath .. "fs_alternate_text.lua")
dofile(modpath .. "api/api_alternate_text.lua")
-- helpful for debugging the content of the created dialog structure
dofile(modpath .. "fs/fs_show_what_points_to_this_dialog.lua")
-- debugging - extended information about what (your own) NPC does