forked from your-land-mirror/yl_speak_up
moved etitor parts into edtior/ folder
This commit is contained in:
parent
aa707c40ac
commit
8dbaaf21d5
@ -6,5 +6,146 @@ yl_speak_up.in_edit_mode = function(pname)
|
||||
and (yl_speak_up.edit_mode[pname] == yl_speak_up.speak_to[pname].n_id)
|
||||
end
|
||||
|
||||
-- overrides of functions fo fs/fs_talkdialog.lua when in edit_mode (or for entering/leaving it)
|
||||
dofile(minetest.get_modpath("yl_speak_up")..DIR_DELIM.."editor/fs/fs_talkdialog_edit_mode.lua")
|
||||
|
||||
local modpath = minetest.get_modpath("yl_speak_up")..DIR_DELIM.."editor"..DIR_DELIM
|
||||
|
||||
-- overrides of functions fo fs/fs_talkdialog.lua when in edit_mode (or for entering/leaving it)
|
||||
dofile(modpath .. "fs/fs_talkdialog_edit_mode.lua")
|
||||
|
||||
-- edit preconditions (can be reached through edit options dialog)
|
||||
dofile(modpath .. "fs/fs_edit_preconditions.lua")
|
||||
-- edit actions (can be reached through edit options dialog)
|
||||
dofile(modpath .. "fs/fs_edit_actions.lua")
|
||||
-- edit effects (can be reached through edit options dialog)
|
||||
dofile(modpath .. "fs/fs_edit_effects.lua")
|
||||
-- edit options dialog (detailed configuration of options in edit mode)
|
||||
dofile(modpath .. "fs/fs_edit_options_dialog.lua")
|
||||
|
||||
-- the player wants to change something regarding the dialog
|
||||
dofile(modpath .. "edit_mode_apply_changes.lua")
|
||||
|
||||
|
||||
|
||||
-- -- logging and showing the log
|
||||
-- dofile(modpath .. "api/api_logging.lua")
|
||||
-- dofile(modpath .. "fs/fs_show_log.lua")
|
||||
-- -- players *and* npc need privs for certain things; this here handles the NPC side of things
|
||||
-- dofile(modpath .. "npc_privs.lua")
|
||||
-- -- add generic dialogs
|
||||
-- dofile(modpath .. "add_generic_dialogs.lua")
|
||||
-- -- handle on_player_receive_fields and showing of formspecs
|
||||
-- dofile(modpath .. "show_fs.lua")
|
||||
-- -- general decoration part for main formspec, trade window etc.
|
||||
-- dofile(modpath .. "api/api_decorated.lua")
|
||||
-- -- the formspec and input handling for the main dialog
|
||||
-- dofile(modpath .. "api/api_talk.lua")
|
||||
-- dofile(modpath .. "fs/fs_talkdialog.lua")
|
||||
-- ask if the player wants to save, discard or go back in edit mode
|
||||
dofile(modpath .. "fs/fs_save_or_discard_or_back.lua")
|
||||
-- the player wants to change something regarding the dialog
|
||||
dofile(modpath .. "edit_mode_apply_changes.lua")
|
||||
--
|
||||
-- -- As the name says: a collection of custom functions that you can
|
||||
-- -- override on your server or in your game to suit your needs;
|
||||
-- -- Note: No special privs are needed to call custom functions. But...
|
||||
-- -- of course you can change them only if you have access to
|
||||
-- -- the server's file system or can execute lua code.
|
||||
-- -- Note: Please do not edit this file. Instead, create and edit the
|
||||
-- -- file "local_server_do_on_reload.lua"!
|
||||
-- dofile(modpath .. "api/custom_functions_you_can_override.lua")
|
||||
--
|
||||
-- assign a quest step to a dialog option/answer
|
||||
dofile(modpath .. "fs/fs_assign_quest_step.lua")
|
||||
--
|
||||
-- -- execute preconditions, actions and effects
|
||||
-- dofile(modpath .. "exec_eval_preconditions.lua")
|
||||
-- dofile(modpath .. "exec_actions.lua")
|
||||
-- dofile(modpath .. "exec_apply_effects.lua")
|
||||
-- some helper functions for formatting text for a formspec talbe
|
||||
dofile(modpath .. "print_as_table.lua")
|
||||
-- -- create i.e. a dropdown list of player names
|
||||
-- dofile(modpath .. "api/formspec_helpers.lua")
|
||||
-- handle alternate text for dialogs
|
||||
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
|
||||
-- dofile(modpath .. "npc_talk_debug.lua")
|
||||
-- -- execute lua code directly (preconditions and effects) - requires priv
|
||||
-- dofile(modpath .. "eval_and_execute_function.lua")
|
||||
-- common functions for editing preconditions and effects
|
||||
dofile(modpath .. "api/fs_edit_general.lua")
|
||||
-- edit preconditions (can be reached through edit options dialog)
|
||||
dofile(modpath .. "fs/fs_edit_preconditions.lua")
|
||||
-- edit actions (can be reached through edit options dialog)
|
||||
dofile(modpath .. "fs/fs_edit_actions.lua")
|
||||
-- edit effects (can be reached through edit options dialog)
|
||||
dofile(modpath .. "fs/fs_edit_effects.lua")
|
||||
-- edit options dialog (detailed configuration of options in edit mode)
|
||||
dofile(modpath .. "fs/fs_edit_options_dialog.lua")
|
||||
-- -- set name, description and owner (owner only with npc_talk_master priv)
|
||||
-- dofile(modpath .. "fs/fs_initial_config.lua")
|
||||
-- -- inspect and accept items the player gave to the NPC
|
||||
-- dofile(modpath .. "fs/fs_player_offers_item.lua")
|
||||
-- -- inventory management, trading and handling of quest items:
|
||||
-- dofile(modpath .. "api/api_inventory.lua")
|
||||
-- dofile(modpath .. "fs/fs_inventory.lua")
|
||||
-- -- limit how much the NPC shall buy and sell
|
||||
-- dofile(modpath .. "api/api_trade.lua")
|
||||
-- dofile(modpath .. "fs/fs_trade_limit.lua")
|
||||
-- dofile(modpath .. "fs/fs_edit_trade_limit.lua")
|
||||
-- -- trade one item(stack) against one other item(stack)
|
||||
-- dofile(modpath .. "api/api_trade_inv.lua")
|
||||
-- dofile(modpath .. "fs/fs_do_trade_simple.lua")
|
||||
-- dofile(modpath .. "fs/fs_add_trade_simple.lua")
|
||||
-- -- just click on a button to buy items from the trade list
|
||||
-- dofile(modpath .. "fs/fs_trade_via_buy_button.lua")
|
||||
-- -- easily accessible list of all trades the NPC offers
|
||||
-- dofile(modpath .. "fs/fs_trade_list.lua")
|
||||
-- as the name says: list which npc acesses a variable how and in which context
|
||||
dofile(modpath .. "fs/fs_get_list_of_usage_of_variable.lua")
|
||||
-- show which values are stored for which player in a quest variable
|
||||
dofile(modpath .. "fs/fs_show_all_var_values.lua")
|
||||
-- manage quest variables: add, delete, manage access rights etc.
|
||||
dofile(modpath .. "fs/fs_manage_variables.lua")
|
||||
-- -- handle variables for quests for player-owned NPC
|
||||
-- dofile(modpath .. "quest_api.lua")
|
||||
-- GUI for adding/editing quests
|
||||
dofile(modpath .. "fs/fs_manage_quests.lua")
|
||||
-- -- GUI for adding/editing quest steps for the quests
|
||||
-- dofile(modpath .. "api/api_quest_steps.lua")
|
||||
dofile(modpath .. "fs/fs_manage_quest_steps.lua")
|
||||
-- used by the above
|
||||
dofile(modpath .. "fs/fs_add_quest_steps.lua")
|
||||
-- -- setting skin, wielded item etc.
|
||||
-- dofile(modpath .. "old_staff_tool_compatibility.lua")
|
||||
-- dofile(modpath .. "api/api_fashion.lua")
|
||||
dofile(modpath .. "fs/fs_fashion.lua")
|
||||
dofile(modpath .. "fs/fs_fashion_extended.lua")
|
||||
-- -- properties for NPC without specific dialogs that want to make use of
|
||||
-- -- some generic dialogs
|
||||
-- dofile(modpath .. "api/api_properties.lua")
|
||||
dofile(modpath .. "fs/fs_properties.lua")
|
||||
-- -- the main functionality of the mod
|
||||
-- dofile(modpath .. "functions.lua")
|
||||
-- -- implementation of the chat commands registered in register_once.lua:
|
||||
-- dofile(modpath .. "chat_commands.lua")
|
||||
-- creating and maintaining quests
|
||||
dofile(modpath .. "fs/fs_quest_gui.lua")
|
||||
-- export dialog for cut&paste in .json format
|
||||
dofile(modpath .. "fs/fs_export.lua")
|
||||
-- take notes regarding what the NPC is for
|
||||
dofile(modpath .. "fs/fs_notes.lua")
|
||||
--
|
||||
-- -- show a list of all NPC the player can edit
|
||||
-- dofile(modpath .. "api/api_npc_list.lua")
|
||||
-- dofile(modpath .. "fs/fs_npc_list.lua")
|
||||
--
|
||||
-- -- some general functions that are useful for mobs_redo
|
||||
-- -- (react to right-click, nametag color etc.)
|
||||
-- -- only gets loaded if mobs_redo (mobs) exists as mod
|
||||
-- dofile(modpath .. "interface_mobs_api.lua")
|
||||
--
|
||||
-- -- functions and overrides for edit mode
|
||||
-- dofile(modpath .. "edit_mode.lua")
|
||||
--
|
||||
|
83
init.lua
83
init.lua
@ -157,10 +157,10 @@ yl_speak_up.reload = function(modpath, log_entry)
|
||||
-- the formspec and input handling for the main dialog
|
||||
dofile(modpath .. "api/api_talk.lua")
|
||||
dofile(modpath .. "fs/fs_talkdialog.lua")
|
||||
-- ask if the player wants to save, discard or go back in edit mode
|
||||
dofile(modpath .. "fs/fs_save_or_discard_or_back.lua")
|
||||
-- -- ask if the player wants to save, discard or go back in edit mode
|
||||
-- TODO dofile(modpath .. "fs/fs_save_or_discard_or_back.lua")
|
||||
-- the player wants to change something regarding the dialog
|
||||
dofile(modpath .. "edit_mode_apply_changes.lua")
|
||||
-- TODO dofile(modpath .. "edit_mode_apply_changes.lua")
|
||||
|
||||
-- As the name says: a collection of custom functions that you can
|
||||
-- override on your server or in your game to suit your needs;
|
||||
@ -171,35 +171,35 @@ yl_speak_up.reload = function(modpath, log_entry)
|
||||
-- file "local_server_do_on_reload.lua"!
|
||||
dofile(modpath .. "api/custom_functions_you_can_override.lua")
|
||||
|
||||
-- assign a quest step to a dialog option/answer
|
||||
dofile(modpath .. "fs/fs_assign_quest_step.lua")
|
||||
-- -- assign a quest step to a dialog option/answer
|
||||
-- TODO dofile(modpath .. "fs/fs_assign_quest_step.lua")
|
||||
|
||||
-- execute preconditions, actions and effects
|
||||
dofile(modpath .. "exec_eval_preconditions.lua")
|
||||
dofile(modpath .. "exec_actions.lua")
|
||||
dofile(modpath .. "exec_apply_effects.lua")
|
||||
-- some helper functions for formatting text for a formspec talbe
|
||||
dofile(modpath .. "print_as_table.lua")
|
||||
-- TODO dofile(modpath .. "print_as_table.lua")
|
||||
-- create i.e. a dropdown list of player names
|
||||
dofile(modpath .. "api/formspec_helpers.lua")
|
||||
-- handle alternate text for dialogs
|
||||
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")
|
||||
-- -- handle alternate text for dialogs
|
||||
-- TODO dofile(modpath .. "api/api_alternate_text.lua")
|
||||
-- -- helpful for debugging the content of the created dialog structure
|
||||
-- TODO dofile(modpath .. "fs/fs_show_what_points_to_this_dialog.lua")
|
||||
-- debugging - extended information about what (your own) NPC does
|
||||
dofile(modpath .. "npc_talk_debug.lua")
|
||||
-- execute lua code directly (preconditions and effects) - requires priv
|
||||
dofile(modpath .. "eval_and_execute_function.lua")
|
||||
-- common functions for editing preconditions and effects
|
||||
dofile(modpath .. "api/fs_edit_general.lua")
|
||||
-- -- common functions for editing preconditions and effects
|
||||
-- TODO dofile(modpath .. "api/fs_edit_general.lua")
|
||||
-- edit preconditions (can be reached through edit options dialog)
|
||||
dofile(modpath .. "fs/fs_edit_preconditions.lua")
|
||||
-- TODO dofile(modpath .. "fs/fs_edit_preconditions.lua")
|
||||
-- edit actions (can be reached through edit options dialog)
|
||||
dofile(modpath .. "fs/fs_edit_actions.lua")
|
||||
-- TODO dofile(modpath .. "fs/fs_edit_actions.lua")
|
||||
-- edit effects (can be reached through edit options dialog)
|
||||
dofile(modpath .. "fs/fs_edit_effects.lua")
|
||||
-- TODO dofile(modpath .. "fs/fs_edit_effects.lua")
|
||||
-- edit options dialog (detailed configuration of options in edit mode)
|
||||
dofile(modpath .. "fs/fs_edit_options_dialog.lua")
|
||||
-- TODO dofile(modpath .. "fs/fs_edit_options_dialog.lua")
|
||||
-- set name, description and owner (owner only with npc_talk_master priv)
|
||||
dofile(modpath .. "fs/fs_initial_config.lua")
|
||||
-- inspect and accept items the player gave to the NPC
|
||||
@ -219,40 +219,40 @@ yl_speak_up.reload = function(modpath, log_entry)
|
||||
dofile(modpath .. "fs/fs_trade_via_buy_button.lua")
|
||||
-- easily accessible list of all trades the NPC offers
|
||||
dofile(modpath .. "fs/fs_trade_list.lua")
|
||||
-- as the name says: list which npc acesses a variable how and in which context
|
||||
dofile(modpath .. "fs/fs_get_list_of_usage_of_variable.lua")
|
||||
-- show which values are stored for which player in a quest variable
|
||||
dofile(modpath .. "fs/fs_show_all_var_values.lua")
|
||||
-- manage quest variables: add, delete, manage access rights etc.
|
||||
dofile(modpath .. "fs/fs_manage_variables.lua")
|
||||
-- -- as the name says: list which npc acesses a variable how and in which context
|
||||
-- TODO dofile(modpath .. "fs/fs_get_list_of_usage_of_variable.lua")
|
||||
-- -- show which values are stored for which player in a quest variable
|
||||
-- TODO dofile(modpath .. "fs/fs_show_all_var_values.lua")
|
||||
-- -- manage quest variables: add, delete, manage access rights etc.
|
||||
-- TODO dofile(modpath .. "fs/fs_manage_variables.lua")
|
||||
-- handle variables for quests for player-owned NPC
|
||||
dofile(modpath .. "quest_api.lua")
|
||||
-- GUI for adding/editing quests
|
||||
dofile(modpath .. "fs/fs_manage_quests.lua")
|
||||
-- -- GUI for adding/editing quests
|
||||
-- TODO dofile(modpath .. "fs/fs_manage_quests.lua")
|
||||
-- GUI for adding/editing quest steps for the quests
|
||||
dofile(modpath .. "api/api_quest_steps.lua")
|
||||
dofile(modpath .. "fs/fs_manage_quest_steps.lua")
|
||||
-- used by the above
|
||||
dofile(modpath .. "fs/fs_add_quest_steps.lua")
|
||||
-- TODO dofile(modpath .. "fs/fs_manage_quest_steps.lua")
|
||||
-- -- used by the above
|
||||
-- TODO dofile(modpath .. "fs/fs_add_quest_steps.lua")
|
||||
-- setting skin, wielded item etc.
|
||||
dofile(modpath .. "old_staff_tool_compatibility.lua")
|
||||
dofile(modpath .. "api/api_fashion.lua")
|
||||
dofile(modpath .. "fs/fs_fashion.lua")
|
||||
dofile(modpath .. "fs/fs_fashion_extended.lua")
|
||||
-- TODO dofile(modpath .. "fs/fs_fashion.lua")
|
||||
-- TODO dofile(modpath .. "fs/fs_fashion_extended.lua")
|
||||
-- properties for NPC without specific dialogs that want to make use of
|
||||
-- some generic dialogs
|
||||
dofile(modpath .. "api/api_properties.lua")
|
||||
dofile(modpath .. "fs/fs_properties.lua")
|
||||
-- TODO dofile(modpath .. "fs/fs_properties.lua")
|
||||
-- the main functionality of the mod
|
||||
dofile(modpath .. "functions.lua")
|
||||
-- implementation of the chat commands registered in register_once.lua:
|
||||
dofile(modpath .. "chat_commands.lua")
|
||||
-- creating and maintaining quests
|
||||
dofile(modpath .. "fs/fs_quest_gui.lua")
|
||||
-- export dialog for cut&paste in .json format
|
||||
dofile(modpath .. "fs/fs_export.lua")
|
||||
-- take notes regarding what the NPC is for
|
||||
dofile(modpath .. "fs/fs_notes.lua")
|
||||
-- -- creating and maintaining quests
|
||||
-- TODO dofile(modpath .. "fs/fs_quest_gui.lua")
|
||||
-- -- export dialog for cut&paste in .json format
|
||||
-- TODO dofile(modpath .. "fs/fs_export.lua")
|
||||
-- -- take notes regarding what the NPC is for
|
||||
-- TODO dofile(modpath .. "fs/fs_notes.lua")
|
||||
|
||||
-- show a list of all NPC the player can edit
|
||||
dofile(modpath .. "api/api_npc_list.lua")
|
||||
@ -263,7 +263,18 @@ yl_speak_up.reload = function(modpath, log_entry)
|
||||
-- only gets loaded if mobs_redo (mobs) exists as mod
|
||||
dofile(modpath .. "interface_mobs_api.lua")
|
||||
|
||||
-- TODO: just temporal here; needed for debugging
|
||||
-- TODO: see dummy_functions.lua for this! TODO
|
||||
-- functions and overrides for edit mode
|
||||
yl_speak_up.show_precondition = function(p, pname)
|
||||
return "Only implemented in editor mod."
|
||||
end
|
||||
yl_speak_up.show_action = function(a, pname)
|
||||
return "Only implemented in editor mod."
|
||||
end
|
||||
yl_speak_up.show_effect = function(r, pname)
|
||||
return "Only implemented in editor mod."
|
||||
end
|
||||
dofile(modpath .. "editor/edit_mode.lua")
|
||||
|
||||
-- initialize and load all registered generic dialogs
|
||||
|
Loading…
Reference in New Issue
Block a user