arena: Fixed initial play-order display in tactical mode
This commit is contained in:
parent
3bbafcaf57
commit
9d2f3d6c4d
|
@ -115,6 +115,7 @@ module TK.SpaceTac.UI {
|
|||
this.add(this.effects_messages);
|
||||
this.effects_messages_toggle = this.battleview.animations.newVisibilityToggle(this.effects_messages, 500, false);
|
||||
|
||||
this.updatePlayOrder();
|
||||
this.updateActiveEffects();
|
||||
this.updateEffectsRadius();
|
||||
|
||||
|
@ -140,11 +141,7 @@ module TK.SpaceTac.UI {
|
|||
*/
|
||||
private processLogEvent(event: BaseBattleDiff): number {
|
||||
if (event instanceof ShipChangeDiff) {
|
||||
if (this.ship.is(event.new_ship)) {
|
||||
this.play_order.text = "-";
|
||||
} else {
|
||||
this.play_order.text = this.battleview.battle.getPlayOrder(this.ship).toString();
|
||||
}
|
||||
this.updatePlayOrder();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -297,6 +294,18 @@ module TK.SpaceTac.UI {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the play order indicator
|
||||
*/
|
||||
updatePlayOrder(): void {
|
||||
let play_order = this.battleview.battle.getPlayOrder(this.ship);
|
||||
if (play_order == 0) {
|
||||
this.play_order.text = "-";
|
||||
} else {
|
||||
this.play_order.text = play_order.toString();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the list of effects active on the ship
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue