Changes

Jump to navigation Jump to search
update CurseForge URL to no longer need the key
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"])
 
   local chucklefishId  = private.emptyToNil(frame.args["chucklefish"])
   local curseforge    = private.parseCommaDelimited(frame.args["curse"]) or {}
+
   local curseforgeId  = private.emptyToNil(frame.args["curse"])
  local curseforgeId  = curseforge[1] or nil
  −
  local curseforgeKey  = curseforge[2] or nil
   
   local moddropId      = private.emptyToNil(frame.args["moddrop"])
 
   local moddropId      = private.emptyToNil(frame.args["moddrop"])
 
   local customUrl      = private.emptyToNil(frame.args["url"])
 
   local customUrl      = private.emptyToNil(frame.args["url"])
Line 85: Line 83:  
     url = "https://www.moddrop.com/stardew-valley/mods/" .. mw.uri.encode(moddropId, "PATH")
 
     url = "https://www.moddrop.com/stardew-valley/mods/" .. mw.uri.encode(moddropId, "PATH")
 
   elseif curseforgeId then
 
   elseif curseforgeId then
     url = "https://www.curseforge.com/stardewvalley/mods/" .. mw.uri.encode(curseforgeKey, "PATH")
+
     url = "https://www.curseforge.com/projects/" .. mw.uri.encode(curseforgeId, "PATH")
 
   elseif chucklefishId then
 
   elseif chucklefishId then
 
     url = "https://community.playstarbound.com/resources/" .. mw.uri.encode(chucklefishId, "PATH")
 
     url = "https://community.playstarbound.com/resources/" .. mw.uri.encode(chucklefishId, "PATH")
Line 101: Line 99:  
   row:attr("data-cf-id", chucklefishId)
 
   row:attr("data-cf-id", chucklefishId)
 
   row:attr("data-curseforge-id", curseforgeId)
 
   row:attr("data-curseforge-id", curseforgeId)
  row:attr("data-curseforge-key", curseforgeKey)
   
   row:attr("data-moddrop-id", moddropId)
 
   row:attr("data-moddrop-id", moddropId)
 
   row:attr("data-nexus-id", nexusId)
 
   row:attr("data-nexus-id", nexusId)
Line 249: Line 246:  
     if #ids == 0 then
 
     if #ids == 0 then
 
       field:wikitext("[⚠ no id] ")
 
       field:wikitext("[⚠ no id] ")
    end
  −
    if (not curseforgeId) ~= (not curseforgeKey) then
  −
      field:wikitext("<abbr title=\"The mod data is invalid: can't specify Curseforge key or ID without the other.\">[⚠ invalid data]</abbr>")
   
     end
 
     end
  
translators
8,404

edits

Navigation menu