Saplings-Projects / Birthday-2024

Game project for birthday in 2024 : a puzzle game where you must fit the pieces on the space you have
GNU General Public License v3.0
1 stars 6 forks source link

Skip button update #86

Closed Casulono closed 6 months ago

Casulono commented 6 months ago

Description

The skip button is currently unintuitive as in reality, it doesn't skip levels that someone hasn't beaten yet and just returns to level select. This small PR changes it and the skip button allows skipping levels to locked ones. It will unlock them but won't mark them as complete, the miniature will still feature blank level when it is implemented for all of them.

Related issue(s)

https://github.com/Saplings-Projects/Birthday-2024/issues/83

List of changes

A more detailed list of the changes.

Mikotey commented 6 months ago

My initial understanding was that the skip button was primarily for the sapling levels where none of them are locked. Skipping was mostly just to navigate to the next. Not so much to force progression

There were some additional changes to be made in order for campaign tracking to work as you intended. Previously, the campaign levels relied on the integer to track completion, so skipping did treat them as beaten and completed. Now the campaign levels use the same method as the sapling levels by checking the completion dictionary. Since campaign levels don't have a level name, it couldn't rely on that as the key for tracking completion. I've changed the key to be the level setup resource path (was going to use resource name, but apparently that just defaults to empty string...). This key seems more reliable in the case that two levels have the same name

Mikotey commented 6 months ago

Nevermind. I guess not lol

Casulono commented 6 months ago

oh, and I also can't approve this PR

Mikotey commented 6 months ago

@Samuel-Fox save us