Skip to content

Commit

Permalink
Preventing changing progress by winning old levels.
Browse files Browse the repository at this point in the history
  • Loading branch information
etharner committed Nov 24, 2016
1 parent 22ceb08 commit 0ec60b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion thrii/Systems/InterfaceSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ public override void Update() {
if (engine.Score >= engine.CurrentLevel.Goal)
{
target.Interface.Text = "You win!";
if (!progressRaised && engine.CurrentLevel != Levels.LevelsList[0])
if (!progressRaised && engine.CurrentLevel != Levels.LevelsList[0] &&
Settings.GetProgress() <= Levels.LevelsList.FindIndex(l => l == engine.CurrentLevel)
)
{
Settings.SetProgress(Settings.GetProgress() + 1);
progressRaised = true;
Expand Down

0 comments on commit 0ec60b2

Please sign in to comment.