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:
parent
1293607b42
commit
c29cef8907
|
@ -1126,7 +1126,7 @@ public class Hero extends Char {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return act();
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void earnExp( int exp ) {
|
public void earnExp( int exp ) {
|
||||||
|
|
|
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user