Compare commits
5 Commits
37eb8e02b0
...
7464a55cdb
Author | SHA1 | Date |
---|---|---|
|
7464a55cdb | |
|
38cb4357fb | |
|
433dc9f735 | |
|
c5559c13bf | |
|
c45c911a0a |
|
@ -0,0 +1,2 @@
|
||||||
|
.* export-ignore
|
||||||
|
docs/ export-ignore
|
13
TODO.txt
13
TODO.txt
|
@ -3,4 +3,15 @@ TODO:
|
||||||
- show formspec when "/list" called with no parameters
|
- show formspec when "/list" called with no parameters
|
||||||
- optimize search with regular expressions
|
- optimize search with regular expressions
|
||||||
- clean up & optimize code
|
- clean up & optimize code
|
||||||
- fix "listmobs" command
|
- add support for:
|
||||||
|
- biomes
|
||||||
|
- aliases
|
||||||
|
- craftitems
|
||||||
|
- object_refs
|
||||||
|
- abms
|
||||||
|
- lbms
|
||||||
|
- decorations
|
||||||
|
- schematics
|
||||||
|
- chatcommands
|
||||||
|
- privileges
|
||||||
|
- callbacks?
|
||||||
|
|
4
api.lua
4
api.lua
|
@ -22,10 +22,6 @@ for k in pairs(aux.options) do
|
||||||
table.insert(known_switches, k)
|
table.insert(known_switches, k)
|
||||||
end
|
end
|
||||||
|
|
||||||
if core.global_exists("mobs") then
|
|
||||||
table.insert(aux.known_types, "mobs")
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Retrieves a simplified table containing string names of registered items or entities.
|
--- Retrieves a simplified table containing string names of registered items or entities.
|
||||||
--
|
--
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
|
||||||
next
|
v1.1
|
||||||
----
|
----
|
||||||
- added missing "textdomain" line to localization files
|
- added missing "textdomain" line to localization files
|
||||||
|
- updated localization template & Spanish translation
|
||||||
|
- fixed "listmobs" command
|
||||||
|
|
||||||
|
|
||||||
v1.0
|
v1.0
|
||||||
|
|
6
chat.lua
6
chat.lua
|
@ -154,7 +154,7 @@ end
|
||||||
-- @chatparam [string1] [string2] ...
|
-- @chatparam [string1] [string2] ...
|
||||||
-- @treturn boolean
|
-- @treturn boolean
|
||||||
registerChatCommand("list", {
|
registerChatCommand("list", {
|
||||||
params = S("type") .. " [options] [" .. S("string1") .. "] [" .. S("string2") .. "] ...",
|
params = S("type") .. " [" .. S("options") .. "] [" .. S("string1") .. "] [" .. S("string2") .. "] ...",
|
||||||
description = help_string .. options_string .. types_string,
|
description = help_string .. options_string .. types_string,
|
||||||
func = function(player, params)
|
func = function(player, params)
|
||||||
local params = string.split(params, " ")
|
local params = string.split(params, " ")
|
||||||
|
@ -169,8 +169,8 @@ registerChatCommand("list", {
|
||||||
if listitems.enable_singleword then
|
if listitems.enable_singleword then
|
||||||
for _, kt in ipairs(aux.known_types) do
|
for _, kt in ipairs(aux.known_types) do
|
||||||
registerChatCommand("list" .. kt, {
|
registerChatCommand("list" .. kt, {
|
||||||
params = "[options] [" .. S("string1") .. "] [" .. S("string2") .. "] ...",
|
params = "[" .. S("options") .. "] [" .. S("string1") .. "] [" .. S("string2") .. "] ...",
|
||||||
description = S("List registered @1", kt) .. "\n\n\t" .. S("Options:") .. options_string,
|
description = S("List registered @1", S(kt)) .. "\n\n\t" .. S("Options:") .. options_string,
|
||||||
func = function(player, params)
|
func = function(player, params)
|
||||||
local params = string.split(params, " ")
|
local params = string.split(params, " ")
|
||||||
params = table.concat(params, " ")
|
params = table.concat(params, " ")
|
||||||
|
|
|
@ -19,6 +19,10 @@ local known_types = {
|
||||||
"tools",
|
"tools",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if core.global_exists("mobs") then
|
||||||
|
table.insert(known_types, "mobs")
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Checks if value is contained in list.
|
--- Checks if value is contained in list.
|
||||||
--
|
--
|
||||||
|
|
|
@ -4,16 +4,26 @@
|
||||||
|
|
||||||
|
|
||||||
## Help output description
|
## Help output description
|
||||||
|
List registered @1=Listar registro de @1
|
||||||
List registered items or entities=Listar los artículos o los entidades registrados
|
List registered items or entities=Listar los artículos o los entidades registrados
|
||||||
Display descriptions=Mostrar descripciones
|
Display descriptions=Mostrar descripciones
|
||||||
Don't search descriptions=No analizar descripciones
|
Don't search descriptions=No analizar descripciones
|
||||||
Registered types:=Tipos registrados:
|
Registered types:=Tipos registrados:
|
||||||
|
Options:=Opciones:
|
||||||
|
|
||||||
## Help output parameters
|
## Help output parameters
|
||||||
type=tipo
|
type=tipo
|
||||||
|
options=opciones
|
||||||
string1=cadena1
|
string1=cadena1
|
||||||
string2=cadena2
|
string2=cadena2
|
||||||
|
|
||||||
|
## Types
|
||||||
|
items=artículos
|
||||||
|
entities=entidades
|
||||||
|
nodes=nodos
|
||||||
|
ores=minerales
|
||||||
|
tools=herramientas
|
||||||
|
|
||||||
## Player used unrecognized switch
|
## Player used unrecognized switch
|
||||||
Error: Unknown option:=Error: Opción desconocida:
|
Error: Unknown option:=Error: Opción desconocida:
|
||||||
Error: Must specify list type=Error: Debes de especificar el tipo de lista
|
Error: Must specify list type=Error: Debes de especificar el tipo de lista
|
||||||
|
|
|
@ -13,9 +13,18 @@ Options:=
|
||||||
|
|
||||||
## Help output parameters
|
## Help output parameters
|
||||||
type=
|
type=
|
||||||
|
options=
|
||||||
string1=
|
string1=
|
||||||
string2=
|
string2=
|
||||||
|
|
||||||
|
## Types
|
||||||
|
items=
|
||||||
|
entities=
|
||||||
|
nodes=
|
||||||
|
ores=
|
||||||
|
tools=
|
||||||
|
mobs=
|
||||||
|
|
||||||
## Error output
|
## Error output
|
||||||
Error: Unknown option:=
|
Error: Unknown option:=
|
||||||
Error: Must specify list type=
|
Error: Must specify list type=
|
||||||
|
|
2
mod.conf
2
mod.conf
|
@ -3,6 +3,6 @@ title = List Items Chat Command
|
||||||
author = AntumDeluge
|
author = AntumDeluge
|
||||||
description = Chat command that lists registered items & entities.
|
description = Chat command that lists registered items & entities.
|
||||||
license = MIT
|
license = MIT
|
||||||
version = 1.0
|
version = 1.1
|
||||||
min_minetest_version = 5.0
|
min_minetest_version = 5.0
|
||||||
optional_depends = mobs
|
optional_depends = mobs
|
||||||
|
|
Loading…
Reference in New Issue