Disabled right-click radial menu if player didn't spawn or died

This commit is contained in:
NewHappyRabbit
2025-02-20 01:15:15 +02:00
parent 0f325d4be8
commit 2fcc6f9a24
+4 -2
View File
@@ -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(