Файл:Imbox deletion.png Внимание! Начат процесс обновления Wiki до версии игры 10.x. Если у Вас есть желание принять участие, то Вы можете найти больше информации в нашем ECO Contribution Wiki Discord.

Модуль:ChatCommandslist: различия между версиями

Материал из Eco - Русская Wiki
Перейти к:навигация, поиск
[непроверенная версия][непроверенная версия]
(Новая страница: «local p = {} function p.main() local wiki = '' -- import the required modules local commandsData = require( "Module:CommandData" ) -- create the header o...»)
 
Нет описания правки
Строка 6: Строка 6:
-- import the required modules
-- import the required modules
local commandsData = require( "Module:CommandData" )
local commandsData = require( "Module:CommandData" )
 
local commands = commandsData.commands


-- create the header of the table
-- create the header of the table
Строка 20: Строка 21:
wiki = header
wiki = header


 
for k,v in pairs(commands) do
row = row .. "<tr> \n "
row = row .. "</tr>"
end
wiki = wiki .. " </table>"
wiki = wiki .. " </table>"
return wiki
return wiki

Версия от 14:15, 2 февраля 2021

Для документации этого модуля может быть создана страница Модуль:ChatCommandslist/doc

local p = {}

function p.main()
	local wiki = ''

	-- import the required modules
	local commandsData = require( "Module:CommandData" )	
	
	local commands = commandsData.commands

	-- create the header of the table
	local header = "<table class=\"wikitable sortable\"> \n " 
	header = header .. "<tr> \n "
	header = header .. "<th>Категория</th> \n "
	header = header .. "<th>Команда</th> \n "
	header = header .. "<th>Быстрый вызов</th> \n "
	header = header .. "<th>Описание</th> \n "
	header = header .. "<th>Аргументы</th> \n "
	header = header .. "</tr> \n "
	
	wiki = header

	for k,v in pairs(commands) do
		row = row .. "<tr> \n "
		row = row .. "</tr>"
	end
	wiki = wiki .. " </table>"
	return wiki
	end

return p