mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-10 00:34:40 +00:00
no icon warning
This commit is contained in:
parent
380241bc6a
commit
ab501cc533
|
@ -1,6 +1,7 @@
|
||||||
package;
|
package;
|
||||||
|
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
|
import openfl.utils.Assets;
|
||||||
|
|
||||||
using StringTools;
|
using StringTools;
|
||||||
|
|
||||||
|
@ -44,6 +45,12 @@ class HealthIcon extends FlxSprite
|
||||||
if (newChar != 'bf-pixel' && newChar != 'bf-old')
|
if (newChar != 'bf-pixel' && newChar != 'bf-old')
|
||||||
newChar = newChar.split('-')[0].trim();
|
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 (newChar != char)
|
||||||
{
|
{
|
||||||
if (animation.getByName(newChar) == null)
|
if (animation.getByName(newChar) == null)
|
||||||
|
|
Loading…
Reference in a new issue