fixed bug: cannot request alliance multiple times or if already allied

This commit is contained in:
evanpelle
2024-09-18 17:34:31 -07:00
parent 4bab6a5271
commit bdbe1b759c
4 changed files with 11 additions and 1 deletions
+3
View File
@@ -253,6 +253,9 @@ export class UILayer implements Layer {
console.warn('my player not found')
return
}
if (myPlayer.alliedWith(owner) || myPlayer.pendingAllianceRequestWith(owner)) {
return
}
this.customMenu!.style.display = 'block';
this.customMenu!.style.left = `${e.x}px`;