added /npc_talk version command

This commit is contained in:
Sokomine 2023-11-05 18:10:49 +01:00
parent c513e0b8e4
commit dc278123d6
2 changed files with 9 additions and 0 deletions

View File

@ -12,8 +12,13 @@ yl_speak_up.command_npc_talk = function(pname, param)
if( cmd and cmd == "style") then
-- implemented in fs_decorated.lua:
return yl_speak_up.command_npc_talk_style(pname, rest)
-- show formspec with list of NPC controlled by the player
elseif(cmd and cmd == "list") then
return yl_speak_up.command_npc_talk_list(pname, rest)
-- show the version of the mod
elseif(cmd and cmd == "version") then
minetest.chat_send_player(pname, "Version of yl_speak_up: "..tostring(yl_speak_up.version))
return
-- debug mode only makes sense if the player can edit that NPC; the command checks for this
elseif(cmd and cmd == "debug") then
-- implemented in npc_talk_debug.lua:
@ -61,6 +66,7 @@ yl_speak_up.command_npc_talk = function(pname, param)
"Usage: \"/npc_talk <command>\" with <command> beeing:\n"..
" help this help here\n"..
" style display talk menu in a way better suited for very old versions of MT\n"..
" version show human-readable version information\n"..
" list shows a list of NPC that you can edit\n"..
" debug debug a particular NPC\n"..
" force_edit forces edit mode for any NPC you talk to\n"..

View File

@ -1,5 +1,8 @@
yl_speak_up = {}
-- human-readable version
yl_speak_up.version = "05.11.23 first publication"
-- some mods (i.e. yl_speak_up_addons) need to be called again when
-- this mod is reloaded via chat command "/npc_talk_reload";
-- this is a list of such functions