v3.0.2: fixed time freeze breaking recalled thrown runestones

This commit is contained in:
Evan Debenham
2025-03-17 14:38:23 -04:00
parent 5ee9f7f155
commit 434c467ac1

View File

@@ -22,6 +22,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells; package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
@@ -41,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Callback;
import com.watabou.utils.Reflection; import com.watabou.utils.Reflection;
public class RecallInscription extends ClericSpell { public class RecallInscription extends ClericSpell {
@@ -79,7 +81,14 @@ public class RecallInscription extends ClericSpell {
if (item instanceof InventoryStone){ if (item instanceof InventoryStone){
((InventoryStone) item).directActivate(); ((InventoryStone) item).directActivate();
} else { } else {
item.doThrow(hero); //we're already on the render thread, but we want to delay this
//as things like time freeze cancel can stop stone throwing from working
ShatteredPixelDungeon.runOnRenderThread(new Callback() {
@Override
public void call() {
item.doThrow(hero);
}
});
} }
} }