Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
fix always invalid when finish level :|
Browse files Browse the repository at this point in the history
  • Loading branch information
KirisameSoup committed Apr 3, 2024
1 parent e791d71 commit 28f01ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion cprev/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ static void Fall()
public static void CPValidation(int prevcp, int? newcp = null)
{
// validation on finished level
if (newcp is null && prevcp != 1) goto invalid;
if (newcp is null)
{
if (prevcp == 1) return;
goto invalid;
}

WorkshopItemSource lvltype = Game.instance.currentLevelType;
int lvlnum = Game.instance.currentLevelNumber;
Expand Down
2 changes: 1 addition & 1 deletion cprev/cprev.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net46</TargetFramework>
<AssemblyName>cprev</AssemblyName>
<Description>cprev</Description>
<Version>1.0.0</Version>
<Version>1.0.1</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand Down

0 comments on commit 28f01ae

Please sign in to comment.