Skip to content

Commit

Permalink
fix: Actually check if the Playable Character is unlocked
Browse files Browse the repository at this point in the history
  • Loading branch information
AbnormalPoof committed Oct 21, 2024
1 parent f46f57e commit d81d105
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/funkin/ui/charSelect/CharSelectSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,10 @@ class CharSelectSubState extends MusicBeatSubState
}
else
{
if (availableChars.exists(i)) nonLocks.push(i);
var playableCharacterId:String = availableChars.get(i);
var player:Null<PlayableCharacter> = PlayerRegistry.instance.fetchEntry(playableCharacterId);
var isPlayerUnlocked:Bool = player?.isUnlocked() ?? false;
if (availableChars.exists(i) && isPlayerUnlocked) nonLocks.push(i);

var temp:Lock = new Lock(0, 0, i);
temp.ID = 1;
Expand Down

0 comments on commit d81d105

Please sign in to comment.