v0.9.4: fixed rankings getting submitted when ankh revive is happening

This commit is contained in:
Evan Debenham 2021-08-13 22:21:59 -04:00
parent 732cd7ee86
commit 32cd459600
3 changed files with 7 additions and 2 deletions

View File

@ -676,7 +676,7 @@ public class Dungeon {
}
public static void fail( Class cause ) {
if (hero.belongings.getItem( Ankh.class ) == null) {
if (WndResurrect.instance == null) {
Rankings.INSTANCE.submit( false, cause );
}
}

View File

@ -1644,6 +1644,11 @@ public class Hero extends Char {
}
} else {
//this is hacky, basically we want to declare that a wndResurrect exists before
//it actually gets created. This is important so that the game knows to not
//delete the run or submit it to rankings, because a WndResurrect is about to exist
//this is needed because the actual creation of the window is delayed here
WndResurrect.instance = new Object();
Game.runOnRenderThread(new Callback() {
@Override
public void call() {

View File

@ -48,7 +48,7 @@ public class WndResurrect extends Window {
private static final int BTN_SIZE = 36;
public static WndResurrect instance;
public static Object instance;
private WndBlacksmith.ItemButton btnItem1;
private WndBlacksmith.ItemButton btnItem2;