Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions source/funkin/backend/system/Flags.hx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ class Flags {
// Font configuration
public static var DEFAULT_FONT:String = "vcr.ttf";
public static var DEFAULT_FONT_SIZE:Int = 16;

public static var DEFAULT_ALT_ANIM_SUFFIX:String = "-alt";

// to translate these you need to convert them into ids
// Resume -> pause.resume
Expand Down
2 changes: 1 addition & 1 deletion source/funkin/game/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,7 @@ class PlayState extends MusicBeatState
if (strLine.characters != null) // Alt anim Idle
for (character in strLine.characters) {
if (character == null) continue;
character.idleSuffix = event.params[1] ? "-alt" : "";
character.idleSuffix = event.params[1] ? strLine.defaultAnimSuffix : "";
}
}
case "Play Animation":
Expand Down
8 changes: 6 additions & 2 deletions source/funkin/game/StrumLine.hx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ class StrumLine extends FlxTypedGroup<Strum> {
* Which animation suffix on characters that should be used when hitting notes.
*/
public var animSuffix(default, set):String = "";
/**
* The current animation suffix the strumline should use. Note that setting this will only take effect upon the alt. animation being reset.
*/
public var defaultAnimSuffix:String = Flags.DEFAULT_ALT_ANIM_SUFFIX;
/**
* TODO: Write documentation about this being a variable that can help when making multi key
*/
Expand Down Expand Up @@ -451,11 +455,11 @@ class StrumLine extends FlxTypedGroup<Strum> {
return animSuffix = str;
}
private inline function set_altAnim(b:Bool):Bool {
animSuffix = b ? "-alt" : "";
animSuffix = b ? defaultAnimSuffix : "";
return b;
}
private inline function get_altAnim():Bool {
return animSuffix == "-alt";
return animSuffix == defaultAnimSuffix;
}
#end
}