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:
parent
380241bc6a
commit
ab501cc533
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue