Line 21: |
Line 21: |
| --- 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", name2="LookupAnything", author="Pathoschild", author2="Pathos", id="Pathoschild.LookupAnything", ["old ids"]="LookupAnything", ["nexus id"]="541", ["cf 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", ["cf id"]="4250", ["github"]="Pathoschild/StardewMods", warnings="warning A, warning B", links="https://google.ca" }})) |
| function p.entry(frame) | | function p.entry(frame) |
| -- read input args | | -- read input args |
− | local names = private.parseCommaDelimited((frame.args["name"] or '') .. ',' .. (frame.args["name2"] or '')) | + | local names = private.parseCommaDelimited(frame.args["name"] or '') |
− | local authors = private.parseCommaDelimited((frame.args["author"] or '') .. ',' .. (frame.args["author2"] or '')) | + | local authors = private.parseCommaDelimited(frame.args["author"] or '') |
− | local ids = private.parseCommaDelimited((frame.args["id"] or '') .. ',' .. (frame.args["old ids"] or '')) | + | local ids = private.parseCommaDelimited(frame.args["id"] or '') |
| local nexusID = private.emptyToNil(frame.args["nexus id"]) | | local nexusID = private.emptyToNil(frame.args["nexus id"]) |
| local github = private.emptyToNil(frame.args["github"]) | | local github = private.emptyToNil(frame.args["github"]) |
Line 35: |
Line 35: |
| local unofficialVersion = private.emptyToNil(frame.args["unofficial version"]) | | local unofficialVersion = private.emptyToNil(frame.args["unofficial version"]) |
| local unofficialUrl = private.emptyToNil(frame.args["unofficial url"]) | | local unofficialUrl = private.emptyToNil(frame.args["unofficial url"]) |
− | local oldIDs = private.emptyToNil(frame.args["old ids"])
| |
| local chucklefishID = private.emptyToNil(frame.args["cf id"]) | | local chucklefishID = private.emptyToNil(frame.args["cf id"]) |
| 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 name2 = private.emptyToNil(frame.args["name2"])
| |
− | local author2 = private.emptyToNil(frame.args["author2"])
| |
| local links = private.parseCommaDelimited(frame.args["links"]) | | local links = private.parseCommaDelimited(frame.args["links"]) |
| local warnings = private.parseCommaDelimited(frame.args["warnings"]) | | local warnings = private.parseCommaDelimited(frame.args["warnings"]) |