diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index d56c3fbc0..c875b5623 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -1,6 +1,7 @@ package; import flixel.FlxSprite; +import openfl.utils.Assets; using StringTools; @@ -44,6 +45,12 @@ class HealthIcon extends FlxSprite if (newChar != 'bf-pixel' && newChar != 'bf-old') newChar = newChar.split('-')[0].trim(); + if (!Assets.exists(Paths.image('icons/icon-' + newChar))) + { + FlxG.log.warn('No icon with data: $newChar : using default placeholder face instead!'); + newChar = "face"; + } + if (newChar != char) { if (animation.getByName(newChar) == null)