Changes

Jump to navigation Jump to search
combine CurseForge fields
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="Lookup Anything, LookupAnything", author="Pathoschild, Pathos", id="Pathoschild.LookupAnything, LookupAnything", ["nexus id"]="541", ["chucklefish id"]="4250", ["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 id"]="1915", ["chucklefish id"]="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 40: Line 40:  
   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 id"])
   local curseforgeId  = private.emptyToNil(frame.args["curseforge id"])
+
   local curseforge    = private.parseCommaDelimited(frame.args["curse"]) or {}
   local curseforgeKey  = private.emptyToNil(frame.args["curseforge key"])
+
  local curseforgeId  = curseforge[1] or nil
 +
   local curseforgeKey  = curseforge[2] or nil
 
   local moddropId      = private.emptyToNil(frame.args["moddrop id"])
 
   local moddropId      = private.emptyToNil(frame.args["moddrop id"])
 
   local customUrl      = private.emptyToNil(frame.args["url"])
 
   local customUrl      = private.emptyToNil(frame.args["url"])
translators
8,437

edits

Navigation menu