1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-09 16:24:42 +00:00

no icon warning

This commit is contained in:
Cameron Taylor 2021-09-02 17:07:32 -04:00
parent 380241bc6a
commit ab501cc533

View file

@ -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)