mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-17 09:50:44 +00:00
## Description: About 30s before an alliance is about to expire, both players receive a prompt to extend the alliance. If both players agree the alliance is extended. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: evan
This commit is contained in:
@@ -176,11 +176,9 @@ export class PlayerPanel extends LitElement implements Layer {
|
||||
if (myPlayer !== null && myPlayer.isAlive()) {
|
||||
this.actions = await myPlayer.actions(this.tile);
|
||||
|
||||
if (this.actions?.interaction?.allianceCreatedAtTick !== undefined) {
|
||||
const createdAt = this.actions.interaction.allianceCreatedAtTick;
|
||||
const durationTicks = this.g.config().allianceDuration();
|
||||
const expiryTick = createdAt + durationTicks;
|
||||
const remainingTicks = expiryTick - this.g.ticks();
|
||||
if (this.actions?.interaction?.allianceExpiresAt !== undefined) {
|
||||
const expiresAt = this.actions.interaction.allianceExpiresAt;
|
||||
const remainingTicks = expiresAt - this.g.ticks();
|
||||
|
||||
if (remainingTicks > 0) {
|
||||
const remainingSeconds = Math.max(
|
||||
|
||||
Reference in New Issue
Block a user