Skip to content

Commit

Permalink
Fix issue where website would not allow downloads of boards whose des…
Browse files Browse the repository at this point in the history
…criptors used frbFiles rather than frbFile1-4 (#193)
  • Loading branch information
nikkiwritescode authored Feb 13, 2024
1 parent 8bc187c commit 3752ce7
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions _includes/renderMapDownloadScript.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -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 -%}
]);

0 comments on commit 3752ce7

Please sign in to comment.