Skip to content

Commit

Permalink
Fix GA
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmfinol committed Feb 8, 2025
1 parent fd0ad39 commit b5de368
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
5 changes: 5 additions & 0 deletions Assets/Scripts/UnityExtensionMethods/UnityFileMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ public static IEnumerator SaveUrlToFile(string url, string filePath, string post
yield break;
}

#if UNITY_WEBGL
if (url.StartsWith("https://") && !url.StartsWith("https://cgs.games/api/proxy/"))
url = "https://cgs.games/api/proxy/" + url[8..];
#endif

var uriBuilder = url.StartsWith("http")
? new UriBuilder(url)
{
Expand Down
12 changes: 6 additions & 6 deletions docs/games/grand_archive/cgs.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "Grand Archive TCG",
"allCardsUrl": "https://cgs.games/api/proxy/api.gatcg.com/cards/search",
"allCardsUrl": "https://api.gatcg.com/cards/search",
"allCardsUrlPageCountIdentifier": "total_pages",
"autoUpdateUrl": "https://www.cardgamesimulator.com/games/grand_archive/cgs.json",
"bannerImageUrl": "https://www.cardgamesimulator.com/games/grand_archive/Banner.png",
"cardBackImageUrl": "https://www.cardgamesimulator.com/games/grand_archive/CardBack.png",
"cardDataIdentifier": "data",
"cardIdIdentifier": "uuid",
"cardImageFileType": "jpg",
"cardImageUrl": "https://cgs.games/api/proxy/ga-index-public.s3.us-west-2.amazonaws.com/cards/{editions[0].slug}.jpg",
"cardImageUrl": "https://api.gatcg.com{editions[0].image}",
"cardPrimaryProperty": "effect_raw",
"cardProperties": [
{
Expand Down Expand Up @@ -91,13 +91,13 @@
"type": "objectList",
"properties": [
{
"name": "card_id",
"display": "Card Id",
"name": "slug",
"display": "Slug",
"type": "string"
},
{
"name": "slug",
"display": "Slug",
"name": "image",
"display": "Image",
"type": "string"
},
{
Expand Down
14 changes: 7 additions & 7 deletions docs/games/grand_archive_spoilers/cgs.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "Grand Archive (Spoilers)",
"allCardsUrl": "https://cgs.games/api/proxy/api.gatcg.com/cards/search",
"allCardsUrl": "https://api.gatcg.com/cards/search",
"allCardsUrlPageCountIdentifier": "total_pages",
"allSetsUrl": "https://www.cardgamesimulator.com/games/grand_archive_spoilers/AllSets.json",
"autoUpdateUrl": "https://www.cardgamesimulator.com/games/grand_archive_spoilers/cgs.json",
"bannerImageUrl": "https://www.cardgamesimulator.com/games/grand_archive/Banner.png",
"cardBackImageUrl": "https://www.cardgamesimulator.com/games/grand_archive/CardBack.png",
"cardDataIdentifier": "data",
"cardIdIdentifier": "slug",
"cardIdIdentifier": "uuid",
"cardImageFileType": "jpg",
"cardImageProperty": "img_src",
"cardImageUrl": "https://cgs.games/api/proxy/ga-index-public.s3.us-west-2.amazonaws.com/cards/{editions[0].slug}.jpg",
"cardImageUrl": "https://api.gatcg.com{editions[0].image}",
"cardPrimaryProperty": "effect_raw",
"cardProperties": [
{
Expand Down Expand Up @@ -93,13 +93,13 @@
"type": "objectList",
"properties": [
{
"name": "card_id",
"display": "Card Id",
"name": "slug",
"display": "Slug",
"type": "string"
},
{
"name": "slug",
"display": "Slug",
"name": "image",
"display": "Image",
"type": "string"
},
{
Expand Down

0 comments on commit b5de368

Please sign in to comment.