provide basic show_precondition/action/effect for debug mode when editor/ is not available

This commit is contained in:
Sokomine 2024-02-10 19:11:26 +01:00
parent 1748a3308b
commit 10e8cef102
2 changed files with 15 additions and 12 deletions

View File

@ -270,18 +270,6 @@ 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

View File

@ -1,4 +1,19 @@
-- full version found in fs_edit_preconditions.lua:
yl_speak_up.show_precondition = function(p, pname)
return "P: "..minetest.serialize(p or {}).."."
end
-- full version found in fs_edit_actions.lua:
yl_speak_up.show_action = function(a)
return "A: "..minetest.serialize(a or {}).."."
end
-- full version found in fs_edit_effects.lua:
yl_speak_up.show_effect = function(r, pname)
return "E: "..minetest.serialize(r or {}).."."
end
-- store which player is monitoring the NPC (for preconditions and
-- effects)