yl_speak_up/fs
2023-12-11 19:41:33 +01:00
..
fs_add_trade_simple.lua split trade_simple.lua and other trading into fs/ and api/ part 2023-12-11 19:05:33 +01:00
fs_assign_quest_step.lua moved some files into fs/ and api/ folders to clean up 2023-12-08 22:41:27 +01:00
fs_do_trade_simple.lua split trade_simple.lua and other trading into fs/ and api/ part 2023-12-11 19:05:33 +01:00
fs_edit_actions.lua moved fs_edit_*.lua to fs/ 2023-12-11 19:24:19 +01:00
fs_edit_effects.lua moved fs_edit_*.lua to fs/ 2023-12-11 19:24:19 +01:00
fs_edit_options_dialog.lua moved some more fs_*.lua to fs/ 2023-12-11 19:41:33 +01:00
fs_edit_preconditions.lua moved fs_edit_*.lua to fs/ 2023-12-11 19:24:19 +01:00
fs_edit_trade_limit.lua split fs_trade_via_buy_button.lua in fs/ and api/ 2023-12-10 05:13:11 +01:00
fs_export.lua moved some files into fs/ and api/ folders to clean up 2023-12-08 22:41:27 +01:00
fs_get_list_of_usage_of_variable.lua moved some files into fs/ and api/ folders to clean up 2023-12-08 22:41:27 +01:00
fs_initial_config.lua moved some more fs_*.lua to fs/ 2023-12-11 19:41:33 +01:00
fs_manage_quests.lua manage variables/quests: made local functions with fun_ prefix distinct from the input_ function 2023-12-08 22:43:06 +01:00
fs_manage_variables.lua manage variables/quests: made local functions with fun_ prefix distinct from the input_ function 2023-12-08 22:43:06 +01:00
fs_notes.lua moved some files into fs/ and api/ folders to clean up 2023-12-08 22:41:27 +01:00
fs_player_offers_item.lua split fs_trade_via_buy_button.lua in fs/ and api/ 2023-12-10 05:13:11 +01:00
fs_properties.lua moved some files into fs/ and api/ folders to clean up 2023-12-08 22:41:27 +01:00
fs_quest_gui.lua moved some files into fs/ and api/ folders to clean up 2023-12-08 22:41:27 +01:00
fs_save_or_discard_or_back.lua moved some more fs_*.lua to fs/ 2023-12-11 19:41:33 +01:00
fs_show_all_var_values.lua moved some files into fs/ and api/ folders to clean up 2023-12-08 22:41:27 +01:00
fs_show_log.lua moved some files into fs/ and api/ folders to clean up 2023-12-08 22:41:27 +01:00
fs_show_what_points_to_this_dialog.lua moved some files into fs/ and api/ folders to clean up 2023-12-08 22:41:27 +01:00
fs_trade_limit.lua split fs_trade_limit.lua into fs/ and api/ part 2023-12-10 04:56:51 +01:00
fs_trade_list.lua moved some files into fs/ and api/ folders to clean up 2023-12-08 22:41:27 +01:00
fs_trade_via_buy_button.lua split fs_trade_via_buy_button.lua in fs/ and api/ 2023-12-10 05:13:11 +01:00
README.md moved fs_edit_*.lua to fs/ 2023-12-11 19:24:19 +01:00

In general, files in here ought to provide exactly tow functions:

    yl_speak_up.input_fs_<FILE_NAME> = function(player, formname, fields)
        -- react to whatever input the player supplied;
        -- usually show another formspec
        return
    end

and:

    yl_speak_up.get_fs_<FILE_NAME> = function(player, param)
        -- return a formspec string
        return formspec_string
    end

The actual displaying of the formspecs and calling of these functions happens in show_fs.lua.

There may be no function for handling input if the formspec only displays something and only offers a back button or buttons to other formspecs.

Additional (local) helper functions may be included if they are only used by those two functions above and not used elsewhere in the mod. That is not a technical requirement but mostly for keeping things clean. These functions are usually not declared as local and may be overridden from outside if needed.

An exception to the above rule are the functions

    yl_speak_up.show_precondition
    yl_speak_up.show_action
    yl_speak_up.show_effect

because in those cases it was better for readability and context to have them in their respective fs/fs_edit_<precondition|action|effect>.lua files.