mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-24 08:35:04 +00:00
Disabled right-click radial menu if player didn't spawn or died
This commit is contained in:
@@ -283,8 +283,6 @@ export class RadialMenu implements Layer {
|
||||
if (this.isVisible) {
|
||||
this.hideRadialMenu();
|
||||
return;
|
||||
} else {
|
||||
this.showRadialMenu(event.x, event.y);
|
||||
}
|
||||
this.enableCenterButton(false);
|
||||
for (const item of this.menuItems.values()) {
|
||||
@@ -315,9 +313,13 @@ export class RadialMenu implements Layer {
|
||||
consolex.warn("my player not found");
|
||||
return;
|
||||
}
|
||||
if (!myPlayer.isAlive()) {
|
||||
return;
|
||||
}
|
||||
myPlayer.actions(tile).then((actions) => {
|
||||
this.handlePlayerActions(myPlayer, actions, tile);
|
||||
});
|
||||
this.showRadialMenu(event.x, event.y);
|
||||
}
|
||||
|
||||
private handlePlayerActions(
|
||||
|
||||
Reference in New Issue
Block a user