From ce1e191eaf8360625ab213f39b1897037ae699b2 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Wed, 5 Jan 2022 18:58:57 +0100 Subject: [PATCH] updated documentation of parameters of actions --- fs_edit_actions.lua | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/fs_edit_actions.lua b/fs_edit_actions.lua index a0307c6..3ba801a 100644 --- a/fs_edit_actions.lua +++ b/fs_edit_actions.lua @@ -5,7 +5,13 @@ -- a_type selected from values_what -- a_value used to store the subtype of a_type -- --- npc_gives and npc_wants: +-- no action (none): nothing to do. +-- +-- a trade ("trade"): +-- a_buy what the NPC sells (itemstack) +-- a_pay what the NPC wants as payment (itemstack) +-- +-- giving and taking of items ("npc_gives" and "npc_wants"): -- a_on_failure if the action fails, go to this dialog -- a_value itemstack of the given/wanted item in string form -- a_item_desc the description the NPC shall set for that itemstack @@ -15,6 +21,18 @@ -- item and not just something the player faked with an -- engraving table or something similar -- +-- the player has to enter text ("text_input"): +-- a_value the expected answer the player has to enter +-- a_question the question the NPC shall ask the player (so that the +-- player can know which answer is expected here) +-- +-- call a custom formspec ("custom"): +-- a_value parameter for the custom function +-- +-- a general, more complex formspec-basted puzzle ("puzzle"): not supported yet +-- TODO: implement "puzzle" type? +-- +-- -- Note: Trades are not stored as actions - they are stored in -- dialog.trades[ trade_id ] with == " " --