Compare commits

...

5 Commits

Author SHA1 Message Date
Jordan Irwin 7464a55cdb Add to TODO list 2021-08-04 11:22:14 -07:00
Jordan Irwin 38cb4357fb Add .gitattributes file to exclude certain files & dirs from archives & releases 2021-08-03 17:10:36 -07:00
Jordan Irwin 433dc9f735 Increment version to 1.1 2021-08-03 17:08:35 -07:00
Jordan Irwin c5559c13bf Fix listmobs command 2021-08-03 17:06:39 -07:00
Jordan Irwin c45c911a0a Update localization template & Spanish translation 2021-08-03 17:05:35 -07:00
9 changed files with 44 additions and 10 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
.* export-ignore
docs/ export-ignore

View File

@ -3,4 +3,15 @@ TODO:
- show formspec when "/list" called with no parameters
- optimize search with regular expressions
- clean up & optimize code
- fix "listmobs" command
- add support for:
- biomes
- aliases
- craftitems
- object_refs
- abms
- lbms
- decorations
- schematics
- chatcommands
- privileges
- callbacks?

View File

@ -22,10 +22,6 @@ for k in pairs(aux.options) do
table.insert(known_switches, k)
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.
--

View File

@ -1,7 +1,9 @@
next
v1.1
----
- added missing "textdomain" line to localization files
- updated localization template & Spanish translation
- fixed "listmobs" command
v1.0

View File

@ -154,7 +154,7 @@ end
-- @chatparam [string1] [string2] ...
-- @treturn boolean
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,
func = function(player, params)
local params = string.split(params, " ")
@ -169,8 +169,8 @@ registerChatCommand("list", {
if listitems.enable_singleword then
for _, kt in ipairs(aux.known_types) do
registerChatCommand("list" .. kt, {
params = "[options] [" .. S("string1") .. "] [" .. S("string2") .. "] ...",
description = S("List registered @1", kt) .. "\n\n\t" .. S("Options:") .. options_string,
params = "[" .. S("options") .. "] [" .. S("string1") .. "] [" .. S("string2") .. "] ...",
description = S("List registered @1", S(kt)) .. "\n\n\t" .. S("Options:") .. options_string,
func = function(player, params)
local params = string.split(params, " ")
params = table.concat(params, " ")

View File

@ -19,6 +19,10 @@ local known_types = {
"tools",
}
if core.global_exists("mobs") then
table.insert(known_types, "mobs")
end
--- Checks if value is contained in list.
--

View File

@ -4,16 +4,26 @@
## Help output description
List registered @1=Listar registro de @1
List registered items or entities=Listar los artículos o los entidades registrados
Display descriptions=Mostrar descripciones
Don't search descriptions=No analizar descripciones
Registered types:=Tipos registrados:
Options:=Opciones:
## Help output parameters
type=tipo
options=opciones
string1=cadena1
string2=cadena2
## Types
items=artículos
entities=entidades
nodes=nodos
ores=minerales
tools=herramientas
## Player used unrecognized switch
Error: Unknown option:=Error: Opción desconocida:
Error: Must specify list type=Error: Debes de especificar el tipo de lista

View File

@ -13,9 +13,18 @@ Options:=
## Help output parameters
type=
options=
string1=
string2=
## Types
items=
entities=
nodes=
ores=
tools=
mobs=
## Error output
Error: Unknown option:=
Error: Must specify list type=

View File

@ -3,6 +3,6 @@ title = List Items Chat Command
author = AntumDeluge
description = Chat command that lists registered items & entities.
license = MIT
version = 1.0
version = 1.1
min_minetest_version = 5.0
optional_depends = mobs