From 3a327f5c5d0247eed208207678efd0591b2767b5 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 2 May 2022 23:00:00 -0400 Subject: [PATCH] pico fixes teehee --- source/funkin/play/character/BaseCharacter.hx | 1 + source/funkin/play/character/CharacterData.hx | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/source/funkin/play/character/BaseCharacter.hx b/source/funkin/play/character/BaseCharacter.hx index f09f8cfa5..c3e40e50b 100644 --- a/source/funkin/play/character/BaseCharacter.hx +++ b/source/funkin/play/character/BaseCharacter.hx @@ -141,6 +141,7 @@ class BaseCharacter extends Bopper this.characterName = _data.name; this.singTimeCrochet = _data.singTime; this.globalOffsets = _data.offsets; + this.flipX = _data.flipX; } shouldBop = false; diff --git a/source/funkin/play/character/CharacterData.hx b/source/funkin/play/character/CharacterData.hx index d38f6cc72..5fa55ada4 100644 --- a/source/funkin/play/character/CharacterData.hx +++ b/source/funkin/play/character/CharacterData.hx @@ -6,13 +6,13 @@ import funkin.modding.events.ScriptEventDispatcher; import funkin.play.character.BaseCharacter; import funkin.play.character.MultiSparrowCharacter; import funkin.play.character.PackerCharacter; -import funkin.play.character.SparrowCharacter; import funkin.play.character.ScriptedCharacter.ScriptedBaseCharacter; import funkin.play.character.ScriptedCharacter.ScriptedMultiSparrowCharacter; import funkin.play.character.ScriptedCharacter.ScriptedPackerCharacter; import funkin.play.character.ScriptedCharacter.ScriptedSparrowCharacter; -import funkin.util.assets.DataAssets; +import funkin.play.character.SparrowCharacter; import funkin.util.VersionUtil; +import funkin.util.assets.DataAssets; import haxe.Json; import openfl.utils.Assets; @@ -412,6 +412,11 @@ class CharacterDataParser input.animations = []; } + if (input.flipX == null) + { + input.flipX = DEFAULT_FLIPX; + } + if (input.animations.length == 0 && input.startingAnimation != null) { return null; @@ -555,6 +560,14 @@ typedef CharacterData = * @default idle */ var startingAnimation:Null; + + /** + * Whether or not the whole ass sprite is flipped by default. + * Useful for characters that could also be played (Pico) + * + * @default false + */ + var flipX:Null; }; typedef HealthIconData =