From 01d7210d64163dd7cb3a4e92c6f64c271843d862 Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Thu, 19 Jan 2023 13:51:38 +0300 Subject: [PATCH] fix difficulty icon display fucking up n/as --- src/lib/templates.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/templates.cr b/src/lib/templates.cr index b14fa3b..94784b6 100644 --- a/src/lib/templates.cr +++ b/src/lib/templates.cr @@ -56,7 +56,7 @@ module CrystalGauntlet::Templates ] def get_difficulty_icon(difficulty : LevelDifficulty?, featured : Bool = false, epic : Bool = false, demon_difficulty : DemonDifficulty? = DemonDifficulty::Hard) - "/assets/difficulties/#{DIFFICULTIES[difficulty.try &.to_i || -1]? || "na"}#{difficulty.try &.demon? ? "-#{DEMON_DIFFICULTIES[demon_difficulty.try &.to_i || -1]? || "hard"}" : ""}#{(featured && !epic) ? "-featured" : ""}#{epic ? "-epic" : ""}.png" + "/assets/difficulties/#{difficulty.try { |d| DIFFICULTIES[d.to_i]? } || "na"}#{difficulty.try &.demon? ? "-#{DEMON_DIFFICULTIES[demon_difficulty.try &.to_i || -1]? || "hard"}" : ""}#{(featured && !epic) ? "-featured" : ""}#{epic ? "-epic" : ""}.png" end end