Toggle menu
1
18
17
345
Emergency Response: Liberty County Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Vehicle specifications: Difference between revisions

From Emergency Response: Liberty County Wiki
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
local p = {}

function p.main(frame)
function p.main(frame)
local parentFrame = frame:getParent()
local getArgs = require('Module:Arguments').getArgs
local args = parentFrame and parentFrame.args or frame.args
local args = getArgs(frame)


local price = args['price'] or ''
local wikitext = ''
local health = args['health'] or ''
if next(args) == nil then
return "{{error|The [[Template:Vehicle_specifications|Vehicle_specifications]] template requires at least one parameter to display content. Check the documentation for usage}}"
end


if args['manufacturer'] then
local wikitext = '|-|Price=\n\n' .. "[[" .. price .. "]]" .. '\n\n|-|Health=\n\n' .. health .. ''
wikitext = wikitext .. '|-|Price=\n\n' .. "[[" .. args['price'] .. "]]" .. '\n\n'
end


if args['health'] then
return wikitext
wikitext = wikitext .. '|-|Health=\n\n' .. args['health'] .. '\n\n'
end

return wikitext
end
end

return p

Revision as of 11:47, 20 February 2026

Module documentation[view][edit][history][purge]
This documentation is transcluded from Module:Vehicle specifications/doc. Changes can be proposed in the talk page.

function p.main(frame)
    local getArgs = require('Module:Arguments').getArgs
    local args = getArgs(frame)

    local wikitext = ''
    
    if next(args) == nil then
    	return "{{error|The [[Template:Vehicle_specifications|Vehicle_specifications]] template requires at least one parameter to display content. Check the documentation for usage}}"
    end

    if args['manufacturer'] then
        wikitext = wikitext .. '|-|Price=\n\n' .. "[[" .. args['price'] .. "]]" .. '\n\n'
    end

    if args['health'] then
        wikitext = wikitext .. '|-|Health=\n\n' .. args['health'] .. '\n\n'
    end

    return wikitext
end
🍪 Cookies help us deliver our services. By using our site, you agree to our use of cookies.