Line 22: |
Line 22: |
| --- Render a mod row in the SMAPI compatibility table. | | --- Render a mod row in the SMAPI compatibility table. |
| -- @param frame The arguments passed to the script. | | -- @param frame The arguments passed to the script. |
− | -- @test mw.log(p.entry({ args = { name="Lookup Anything, LookupAnything", author="Pathoschild, Pathos", id="Pathoschild.LookupAnything, LookupAnything", ["nexus id"]="541", ["chucklefish id"]="4250", ["github"]="Pathoschild/StardewMods", warnings="warning A, warning B", links="https://google.ca" }})) | + | -- @test mw.log(p.entry({ args = { name="Lookup Anything, LookupAnything", author="Pathoschild, Pathos", id="Pathoschild.LookupAnything, LookupAnything", ["nexus id"]="541", ["chucklefish id"]="4250", ["github"]="Pathoschild/StardewMods", warnings="warning A, warning B" }})) |
| function p.entry(frame) | | function p.entry(frame) |
| -- read input args | | -- read input args |
Line 42: |
Line 42: |
| local customUrl = private.emptyToNil(frame.args["url"]) | | local customUrl = private.emptyToNil(frame.args["url"]) |
| local customSource = private.emptyToNil(frame.args["source"]) | | local customSource = private.emptyToNil(frame.args["source"]) |
− | local pullRequestUrl = private.emptyToNil(frame.args["pull request"])
| |
− | local links = private.parseCommaDelimited(frame.args["links"])
| |
| | | |
| local warnings = private.parseCommaDelimited(frame.args["warnings"]) | | local warnings = private.parseCommaDelimited(frame.args["warnings"]) |
| local devNote = private.emptyToNil(frame.args["dev note"]) | | local devNote = private.emptyToNil(frame.args["dev note"]) |
| local contentPackFor = private.emptyToNil(frame.args["content pack for"]) | | local contentPackFor = private.emptyToNil(frame.args["content pack for"]) |
− | local mapLocalVersions = private.emptyToNil(frame.args["map local versions"])
| |
− | local mapRemoteVersions = private.emptyToNil(frame.args["map remote versions"])
| |
− | local changeUpdateKeys = private.emptyToNil(frame.args["change update keys"])
| |
| | | |
| local betaSummary = private.emptyToNil(frame.args["beta summary"]) | | local betaSummary = private.emptyToNil(frame.args["beta summary"]) |
Line 111: |
Line 106: |
| row:attr("data-beta-unofficial-version", betaCompat and betaCompat.unofficialVersion) | | row:attr("data-beta-unofficial-version", betaCompat and betaCompat.unofficialVersion) |
| row:attr("data-beta-unofficial-url", betaCompat and betaCompat.unofficialUrl) | | row:attr("data-beta-unofficial-url", betaCompat and betaCompat.unofficialUrl) |
− | row:attr("data-pr", pullRequestUrl)
| |
| row:attr("data-warnings", private.emptyToNil(table.concat(warnings, ","))) | | row:attr("data-warnings", private.emptyToNil(table.concat(warnings, ","))) |
| row:attr("data-content-pack-for", contentPackFor) | | row:attr("data-content-pack-for", contentPackFor) |
| row:attr("data-dev-note", devNote) | | row:attr("data-dev-note", devNote) |
− | row:attr("data-map-local-versions", mapLocalVersions)
| |
− | row:attr("data-map-remote-versions", mapRemoteVersions)
| |
− | row:attr("data-change-update-keys", changeUpdateKeys)
| |
| row:newline() | | row:newline() |
| | | |
Line 232: |
Line 223: |
| -- anchor | | -- anchor |
| field:wikitext("[[#" .. (names[1] or '') .. "|#]] ") | | field:wikitext("[[#" .. (names[1] or '') .. "|#]] ") |
− |
| |
− | -- pull request
| |
− | if pullRequestUrl then
| |
− | field:wikitext("[" .. pullRequestUrl .. " PR] ")
| |
− | end
| |
| | | |
| -- dev note | | -- dev note |
Line 269: |
Line 255: |
| function private.style(frame) | | function private.style(frame) |
| if frame.extensionTag ~= nil then | | if frame.extensionTag ~= nil then |
− | return frame:extensionTag('templatestyles', '', {src = 'Module:SMAPI compatibility/styles.css'}) | + | return frame:extensionTag('templatestyles', '', {src = 'Module:SMAPI compatibility/styles.css'}) |
| else | | else |
| return "" -- called from the debug console | | return "" -- called from the debug console |