From 3752ce7edbbb95cd7f6717432444c21e48107879 Mon Sep 17 00:00:00 2001 From: nikkiwritescode Date: Tue, 13 Feb 2024 00:55:02 -0600 Subject: [PATCH] Fix issue where website would not allow downloads of boards whose descriptors used frbFiles rather than frbFile1-4 (#193) --- _includes/renderMapDownloadScript.liquid | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/_includes/renderMapDownloadScript.liquid b/_includes/renderMapDownloadScript.liquid index 1774a46f4..2515bf7ce 100644 --- a/_includes/renderMapDownloadScript.liquid +++ b/_includes/renderMapDownloadScript.liquid @@ -11,7 +11,6 @@ Renders: {%- endcomment -%} {%- include getParent.liquid file_path=include.map.path -%} - {%- capture frbFiles -%} {%- if include.map.frbFile4 -%} {{ include.map.frbFile1 }},{{include.map.frbFile2}},{{include.map.frbFile3}},{{include.map.frbFile4}} @@ -26,18 +25,16 @@ Renders: {%- endif -%} {%- endcapture %} +{% assign frbList = frbFiles | split: "," %} +{% assign url = "https://raw.githubusercontent.com/FortuneStreetModding/fortunestreetmodding.github.io/main/" %} +{% assign frb_url_base = url | prepend: ",'" | append: gd_directory_path | append: "/" %} -{% assign frbList = frbFiles | split: ", " %} -{% assign url_base = "https://raw.githubusercontent.com/FortuneStreetModding/fortunestreetmodding.github.io/main/" %} - -{%- capture urls -%} - {{- url_base | prepend: "'" | append: include.map.path | append: "'" -}}- - {% for frb in frbList %} - {{- url_base | prepend: ",'" | append: gd_directory_path | append: "/" | append: frb | append: ".frb'" -}} - {% endfor %} +saveZip('{{ gd_directory_name }}', [ + {{- url | prepend: "'" | append: include.map.path | append: "'" -}} {%- if include.map.mapIcon -%} - {{- url_base | prepend: ",'" | append: gd_directory_path | append: "/" | append: include.map.mapIcon | append: ".png'" -}} + {{- url | prepend: ",'" | append: gd_directory_path | append: "/" | append: include.map.mapIcon | append: ".png'" -}} {%- endif -%} -{%- endcapture %} - -saveZip('{{ gd_directory_name }}', {{ urls }}); + {% for frb in frbList -%} + {{- frb_url_base | append: frb | append: ".frb'" -}} + {% endfor -%} + ]);