mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Inline complete method as well
For better guarantees that `finalAction` is actually called on the same screen that `checkCanComplete()` was (uses result of one `getCurrentScreen()` call throughout instead of calling multiple times).
This commit is contained in:
parent
f9196ae976
commit
00c6703c51
@ -84,7 +84,8 @@ namespace osu.Game
|
|||||||
// we may already be at the target screen type.
|
// we may already be at the target screen type.
|
||||||
if (validScreens.Contains(current.GetType()) && !beatmap.Disabled)
|
if (validScreens.Contains(current.GetType()) && !beatmap.Disabled)
|
||||||
{
|
{
|
||||||
complete();
|
finalAction(current);
|
||||||
|
Cancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,11 +139,5 @@ namespace osu.Game
|
|||||||
lastEncounteredDialogScreen = current;
|
lastEncounteredDialogScreen = current;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void complete()
|
|
||||||
{
|
|
||||||
finalAction(getCurrentScreen());
|
|
||||||
Cancel();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user