forked from Sokomine/yl_speak_up
added /npc_talk version command
This commit is contained in:
parent
c513e0b8e4
commit
dc278123d6
@ -12,8 +12,13 @@ yl_speak_up.command_npc_talk = function(pname, param)
|
|||||||
if( cmd and cmd == "style") then
|
if( cmd and cmd == "style") then
|
||||||
-- implemented in fs_decorated.lua:
|
-- implemented in fs_decorated.lua:
|
||||||
return yl_speak_up.command_npc_talk_style(pname, rest)
|
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
|
elseif(cmd and cmd == "list") then
|
||||||
return yl_speak_up.command_npc_talk_list(pname, rest)
|
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
|
-- debug mode only makes sense if the player can edit that NPC; the command checks for this
|
||||||
elseif(cmd and cmd == "debug") then
|
elseif(cmd and cmd == "debug") then
|
||||||
-- implemented in npc_talk_debug.lua:
|
-- 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"..
|
"Usage: \"/npc_talk <command>\" with <command> beeing:\n"..
|
||||||
" help this help here\n"..
|
" help this help here\n"..
|
||||||
" style display talk menu in a way better suited for very old versions of MT\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"..
|
" list shows a list of NPC that you can edit\n"..
|
||||||
" debug debug a particular NPC\n"..
|
" debug debug a particular NPC\n"..
|
||||||
" force_edit forces edit mode for any NPC you talk to\n"..
|
" force_edit forces edit mode for any NPC you talk to\n"..
|
||||||
|
3
init.lua
3
init.lua
@ -1,5 +1,8 @@
|
|||||||
yl_speak_up = {}
|
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
|
-- 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 mod is reloaded via chat command "/npc_talk_reload";
|
||||||
-- this is a list of such functions
|
-- this is a list of such functions
|
||||||
|
Loading…
Reference in New Issue
Block a user