Changes

Jump to navigation Jump to search
shorten argument names
Line 25: Line 25:  
--- 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="Content Patcher, ContentPatcher", author="Pathoschild, Pathos", id="Pathoschild.ContentPatcher, ContentPatcher", ["nexus id"]="1915", ["chucklefish id"]="4250", curse="309243,content-patcher", github="Pathoschild/StardewMods", warnings="warning A, warning B" }}))
+
-- @test mw.log(p.entry({ args = { name="Content Patcher, ContentPatcher", author="Pathoschild, Pathos", id="Pathoschild.ContentPatcher, ContentPatcher", nexus="1915", chucklefish="4250", curse="309243,content-patcher", github="Pathoschild/StardewMods", warnings="warning A, warning B" }}))
 
function p.entry(frame)
 
function p.entry(frame)
 
   -- read input args
 
   -- read input args
Line 31: Line 31:  
   local authors    = private.parseCommaDelimited(frame.args["author"] or '')
 
   local authors    = private.parseCommaDelimited(frame.args["author"] or '')
 
   local ids        = private.parseCommaDelimited(frame.args["id"] or '')
 
   local ids        = private.parseCommaDelimited(frame.args["id"] or '')
   local nexusId    = private.emptyToNil(frame.args["nexus id"])
+
   local nexusId    = private.emptyToNil(frame.args["nexus"])
 
   local github    = private.emptyToNil(frame.args["github"])
 
   local github    = private.emptyToNil(frame.args["github"])
 
   local summary    = private.emptyToNil(frame.args["summary"])
 
   local summary    = private.emptyToNil(frame.args["summary"])
Line 39: Line 39:  
   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 chucklefishId  = private.emptyToNil(frame.args["chucklefish id"])
+
   local chucklefishId  = private.emptyToNil(frame.args["chucklefish"])
 
   local curseforge    = private.parseCommaDelimited(frame.args["curse"]) or {}
 
   local curseforge    = private.parseCommaDelimited(frame.args["curse"]) or {}
 
   local curseforgeId  = curseforge[1] or nil
 
   local curseforgeId  = curseforge[1] or nil
 
   local curseforgeKey  = curseforge[2] or nil
 
   local curseforgeKey  = curseforge[2] or nil
   local moddropId      = private.emptyToNil(frame.args["moddrop id"])
+
   local moddropId      = private.emptyToNil(frame.args["moddrop"])
 
   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"])
translators
8,404

edits

Navigation menu