Module:Format eq stat

From RuneRealm Wiki

This is the current revision of this page, as edited by Alex (talk | contribs) at 21:53, 11 October 2024 (Created page with "local p = {} function p.signed(arg) local first_char = string.sub(arg, 1, 1) if first_char == '+' or first_char == '-' then return arg else return '+'..arg end end function p.main(frame) local args = frame:getParent().args local arg = args[1] or '' return p.signed(arg) end return p"). 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 Template:No documentation/doc. [edit] [history] [purge]
This module does not have any documentation. Please consider adding documentation at Module:Format eq stat/doc. [edit]
Module:Format eq stat is required by Module:Infobox Bonuses.
Module:Format eq stat is required by Module:Infobox Monster.

local p = {}

function p.signed(arg)
	local first_char = string.sub(arg, 1, 1)

	if first_char == '+' or first_char == '-' then
		return arg
	else
		return '+'..arg
	end
end

function p.main(frame)
	local args = frame:getParent().args

	local arg = args[1] or ''
	return p.signed(arg)
end

return p