From aed1a0b69fdcfa76653822726182b56be629a18f Mon Sep 17 00:00:00 2001 From: Hamcha Date: Tue, 28 May 2019 00:57:40 +0200 Subject: [PATCH] Use webp instead of jpg for cards --- Scenes/Components/Card.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scenes/Components/Card.gd b/Scenes/Components/Card.gd index 24d19dc..e515956 100644 --- a/Scenes/Components/Card.gd +++ b/Scenes/Components/Card.gd @@ -32,10 +32,10 @@ onready var texture: Texture = cardImage.get_surface_material(0) func set_cardid(val: String): cardID = val if ready: - Remote.fetch(Remote.IMGURL + val + ".jpg", self, "_card_fetched") + Remote.fetch(Remote.IMGURL + val + ".webp", self, "_card_fetched") func _ready(): - Remote.fetch(Remote.IMGURL + cardID + ".jpg", self, "_card_fetched") + Remote.fetch(Remote.IMGURL + cardID + ".webp", self, "_card_fetched") ready = true func _mouse_hover(): @@ -85,7 +85,7 @@ func _check_drop_anim(anim_name): func _card_fetched(result: int, response_code: int, headers: PoolStringArray, body: PoolByteArray): assert(result == HTTPRequest.RESULT_SUCCESS) var img = Image.new() - var err = img.load_jpg_from_buffer(body) + var err = img.load_webp_from_buffer(body) assert(err == OK) # Depending if card pic is a problem or not, rotate the card image mesh if img.get_width() > img.get_height():