v0.4.2: hero.handle no longer actually acts, just sets up action

This prevents hero actions from running on the UI thread incorrectly
This commit is contained in:
Evan Debenham 2016-08-28 18:40:33 -04:00 committed by Evan Debenham
parent 1293607b42
commit c29cef8907
3 changed files with 13 additions and 8 deletions

View File

@ -1126,7 +1126,7 @@ public class Hero extends Char {
} }
return act(); return true;
} }
public void earnExp( int exp ) { public void earnExp( int exp ) {

View File

@ -167,7 +167,9 @@ public class AttackIndicator extends Tag {
@Override @Override
protected void onClick() { protected void onClick() {
if (enabled) { if (enabled) {
Dungeon.hero.handle( lastTarget.pos ); if (Dungeon.hero.handle( lastTarget.pos )) {
Dungeon.hero.next();
}
} }
} }

View File

@ -45,7 +45,10 @@ public class LootIndicator extends Tag {
slot = new ItemSlot() { slot = new ItemSlot() {
protected void onClick() { protected void onClick() {
Dungeon.hero.handle( Dungeon.hero.pos ); if (Dungeon.hero.handle(Dungeon.hero.pos)){
Dungeon.hero.next();
}
}; };
}; };
slot.showParams( true, false, false ); slot.showParams( true, false, false );