Module:Format equipment stat

From Illerai

This is the current revision of this page, as edited by Mark (Sọ̀rọ̀ | contribs) at 22:24, 2 November 2024 (1 revision imported). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Module documentation
This documentation is transcluded from Module:Format equipment stat/doc. [edit] [history] [purge]

This template should be used when there is no documentation for a Module or Template.


local p = {}

function p.main(frame)
	return p.format(frame:getParent().args[1])
end

function p.format(_arg, default)
	local arg = tonumber(_arg)
	if not arg then return default or _arg end
	if arg < 0 then return tostring(arg) end
	return '+'..arg
end

return p