Commit Graph

2750 Commits

Author SHA1 Message Date
Abdallah Bahrawi 0a2b6ed9a6 Implement Stop/Start trading with all (#2278)
fixes #2275

Added global Start/Stop trading; use your **player panel** to trigger
it.

<img width="370" height="540" alt="Screenshot 2025-10-23 184447"
src="https://github.com/user-attachments/assets/c3b7967e-ffdd-4f37-ba67-b60a602278ce"
/>

- [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
regression is found:

abodcraft1
v0.26.9
2025-10-26 13:42:30 -07:00
Mike Harris 0931d4ae4b FIX: Revert Spawn Highlight Color for DUOS, TRIOS, QUADS (#2298)
## Description:

This PR addresses issue #2297 - Spawn Color Overload in DUOS, TRIOS, and
QUADS game modes. This PR reverts the spawn highlight color behavior for
these game modes so that the player can identify their teammates more
easily in these modes.

See below for example fix. The "self" player and their teammate in this
DUOS mode game are the same `light blue` color as shown in issue #2297
and their opponent is still the same `brown` color as shown in that
issue.

However, now the player's teammate has a green spawn highlight color
(same as v0.26.7 and earlier) and the players on other teams have a
yellow spawn highlight color (same as v0.26.7 and earlier).

<img width="605" height="657" alt="Duos Teammate ID Resolution"
src="https://github.com/user-attachments/assets/6e62830a-31bb-4d3d-ae5a-34b809ea4e13"
/>

The "self" player's spawn highlight color remains a breathing white
ring, consistent with other game modes.

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

GlacialDrift
2025-10-26 12:19:16 -07:00
Aotumuri 3478b3ab13 Fix: Prevent unbind button overflow and wrap long text in keybind settings (#2287)
## Description:
This PR fixes layout issues in the User Settings → Keybind section where
the “Unbind” button text would overflow in languages with long
translations (e.g., Italian).

before 
<img width="372" height="477" alt="スクリーンショット 2025-10-25 15 42 09"
src="https://github.com/user-attachments/assets/ce31e116-1848-4350-a6da-011b10a42668"
/>

after
<img width="383" height="168" alt="スクリーンショット 2025-10-25 15 41 47"
src="https://github.com/user-attachments/assets/8133ed56-f920-42a8-9477-78561fdd477a"
/>

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

aotumuri

Co-authored-by: Evan <evanpelle@gmail.com>
2025-10-25 14:35:24 -07:00
Duwibi 6b696685b5 Add Achiran (#2280)
## Description:

Describe the PR.
Adds the Halloween Special Map - Achiran. It has 4 nations and will be
playable in game for a period of around 2 weeks during the Halloween
event.

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

DISCORD_USERNAME
Nikola123
v0.26.8
2025-10-25 14:29:49 -07:00
unique-coder-124 2137507713 perf(pathfinding): replace array.shift() with index-based iteration for O(1) access (#2264)
## Description:
Replaced Array.shift() in boat path iteration with an index-based loop
to avoid O(n) shifts per step. This reduces per-move cost and keeps
memory usage unchanged. I validated the change by running locally and
confirming behaviour is unchanged.

### Summary
This PR improves pathfinding performance by replacing Array.shift() with
an index-based iteration to get the next boat position.
Shifting the array for each move is O(n) per operation, whereas using an
index is O(1).
JavaScript does not free the memory of the shifted elements immediately,
so there’s no memory benefit to shift() in this context. Using an index
improves performance without additional memory cost.

### Testing & Caveats
- I attempted to test the performance gain by increasing the trade cap
to 5000, but on my system, neither method could be stressed enough to
produce measurable differences.
- I am unfamiliar with JavaScript profiling tools, so I do not have
exact performance numbers.
- Based on the change, there is no risk of decreased performance.
- In my minor testing, the boat pathfinding felt faster when a single
player was set to max speed as the game would slow down less.

### Notes
- This is primarily an optimization for future scalability and clean
performance improvements.
- With this change, the max boat cap can potentially be increased.
- The behavioural logic remains unchanged; the boats still navigate the
same paths as before.

### Checklist
- [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
2025-10-25 14:09:18 -07:00
DevelopingTom b69adf70b3 Halloween Event (#2285)
## Description:

Changed theme colors for an "autumn" ambiance:

<img width="395" height="254" alt="image"
src="https://github.com/user-attachments/assets/67bd07d3-e74b-49e2-ba0b-c87958767d45"
/>

Changed structures pixel art:

<img width="756" height="605" alt="image"
src="https://github.com/user-attachments/assets/5158ae81-0641-413c-8862-367259496a9a"
/>


Change existing FX with new halloween-themed ones:


https://github.com/user-attachments/assets/fb99be49-43cd-4d85-ad77-8c153070edaf

Added new FX playing randomly on the map:


https://github.com/user-attachments/assets/16631113-77e6-4b8c-b1b6-c147f5f1d275

Added a couple of new emojis, which are used by the bots when attacked:
👻🎃

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

IngloriousTom
2025-10-25 14:06:15 -07:00
Abdallah Bahrawi 380eab5d12 Implement Stop/Start trading with all (#2278)
## Description:
fixes #2275 

Added global Start/Stop trading; use your **player panel** to trigger
it.

<img width="370" height="540" alt="Screenshot 2025-10-23 184447"
src="https://github.com/user-attachments/assets/c3b7967e-ffdd-4f37-ba67-b60a602278ce"
/>

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

abodcraft1
2025-10-25 20:59:40 +00:00
Loymdayddaud 913e814b59 Update stale action (#2286)
## Description:

Updated the stale comment, removed issue write permissions, updated the
orphaned comment

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

loymdayddaud
2025-10-25 14:00:08 -07:00
Aotumuri f57adced5d Add missing English keybind text for MIRV action (#2289)
## Description:

This PR adds the missing string for the MIRV keybind action in the User
Settings menu.
<img width="383" height="137" alt="スクリーンショット 2025-10-25 16 03 21"
src="https://github.com/user-attachments/assets/1a436fff-76a3-428a-bf14-c836ef9faf40"
/>

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

aotumuri
2025-10-25 13:57:58 -07:00
Mike Harris 565b1345ad Expand Clan Name Possibilities (#2178)
## Description:

**This PR expands clan name possibilities available to players.**
**Suggested Label:** Feature
**Suggested Milestone:** v26 or v27

The current clan name logic does not allow for all alphanumeric
characters (e.g. 0-9). Instead it only allows for uppercase and
lowercase letters (e.g. a-z and A-Z). This PR updates the logic to
include 0-9 in the allowable character set. This is in line with how
many other games utilize clan names.

Secondarily, the requirement for the clan name to occur at the start of
the player name has been relaxed. Now, the requirement is that the clan
name is matched with `\[([a-zA-Z0-9]{2,5})\]`. The pre-requisites for
clan regex matching have been updated so that both `[` and `]` must be
*included* in the player name (whereas previously the `[` was required
to appear at the start of the player name). This allows the clan name to
occur anywhere in the player name.

Finally, clan names (once matched by RegEx) are converted to Uppercase
so that clan names such as `[un]`, `[UN]`, `[Un]`, and `[uN]` are all
recognized as the *same* clan.

As a result, all existing clan names remain valid, but new clan names
are now possible. For example `[3M]MeanMrMustard` now has `3M`
recognized as the clan name and `T[UN]able` now has `UN` recognized as
the clan name. Test cases within the `tests/PlayerInfo.tests.ts` file
have been updated accordingly to accurately represent the full
alphanumeric character set.

This addresses issue #2267. 


## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

GlacialDrift (GlacialDrift_)
2025-10-24 22:37:40 +00:00
Duwibi 39c65d6245 Add Achiran (#2280)
## Description:

Describe the PR.
Adds the Halloween Special Map - Achiran. It has 4 nations and will be
playable in game for a period of around 2 weeks during the Halloween
event.

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

DISCORD_USERNAME
Nikola123
2025-10-24 15:38:28 -07:00
VariableVince 4ed1076166 Fix Boat hotkey (B) behaviour (#2179)
## Description:

Fixes Issue #2177, land border required to send boat. And fixes boat not
being sent for longer distances.

- Boat Hotkey (B) (PR #1060) was implemented seemingly with a wrong
assumption. Namely that it should do the same checks as the AUTO BOAT
functionality (PR #540) before sending a transport ship. But it should
have done the same checks as when sending a MANUAL transport ship, as if
the Radial Menu was used. Basically the same checks as in
RadialMenuElements line 508-532.

Because of this it wrongly required:
- there to be no land border with the other player 
(while boat from radial menu gets sent without bothering about this)
- the tile clicked to be a Land tile 
(only makes sense in the context of auto-boating where user clicks to
attack an enemy on their land, and only if there's no border will it
then send a boat to that land if possible)
- the distance to be short
(since auto-boat was mainly meant to automatically cross rivers)

Fixed this by removing canAttack check (for the unwanted land border
requirement) and splitting up the auto boat and the manual boat checks.

- canBoatAttack: moved out the parts which where only meant for
auto-boating
- shouldBoat: moved in the parts from canBoatAttack that where only
meant for auto-boating. Renamed it to canAutoBoat for better
discernability. Gave it early returns for tad better performance and
consolidated returns in the bottom, while keeping the same
functionality.

## Please complete the following:

- [ ] I have added screenshots for all UI updates
- [ ] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [ ] 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

tryout33
2025-10-24 12:43:23 -07:00
Mike Harris 69373e28cb Feature: Improve Spawn Color Highlighting (#2271)
**This PR improves spawn highlighting to identify self and friend/foe.
Suggested Label: Feature
Suggested Milestone: v26 or v27**

## Description:

**This PR changes the behavior for spawn color highlighting and
addresses issue #2270.**

Currently, the user's spawn highlight color is the same as all other
players in FFA and the same as all enemies in Team games. Although
"breathing" rings were added recently for the user's spawn highlight,
this can still be difficult to find on the map, especially with large
player counts.

This PR modifies how spawn highlights are drawn for the user and for
allies and enemies in Team games.

### User Spawn Color Updates

First, an additional spawn highlight color was added for the user in
`src/core/configuration/PastelTheme.ts`: `_spawnHighlightSelfColor`.
This is defined to be white (0xFFFFFF).

Second, the breathing ring was modified to improve visibility (all in
`src/client/graphics/layers/TerritoryLayer.ts`) :
- A radial-gradient transparent ring in the spawn color (white) is drawn
at all times
- The ring is transparent for `radius = 8` pixels from the player's
center point
- The gradient extends from `8` to `24` pixels from the player's center
point
  - The first 10% of the ring (~ 1 pixel) is solid 
  - The remaining ring fades to transparent at `24` pixels
- A solid, "breathing" ring is drawn on top of the transparent ring
- The solid ring is also transparent for `radius = 8` pixels from the
center point
- The outer radius of the solid ring is a function of "time" in the same
way that the current breathing ring is implemented.
- The solid ring therefore grows and shrinks to cover the transparent
ring

### Other Player Spawn Color Updates

In FFA games, no change is made to the spawn color highlight of other
players. It remains `rgb(255,213,79)`.

In team games, the spawn color highlight of other players is updated to
use their team colors. For example, a player on the red team will have a
red spawn highlight, while a player on the purple team will have a
purple spawn highlight.

Both of these changes are handled with a simple update in
`src/client/graphics/layers/TerritoryLayer.ts` within the
`spawnHighlight()` method:

```typescript
const myPlayer = this.game.myPlayer();
  if (myPlayer !== null && myPlayer !== human && myPlayer.team() === null) {
    // In FFA games (when team === null), use default yellow spawn highlight color
    color = this.theme.spawnHighlightColor();
  } else if (myPlayer !== null && myPlayer !== human) {
    // In Team games, the spawn highlight color becomes that player's team color
    // Optionally, this could be broken down to teammate or enemy and simplified to green and red, respectively
    const team = human.team();
    if (team !== null) color = this.theme.teamColor(team);
  }
```

### Attached Images

Three images have been attached. The three images show a progression of
the "breathing" user highlight. They also show the team-specific
highlights of players on other teams. (Note that Nations in the private
game were assigned teams but do not have spawn highlights).

<img width="1161" height="895" alt="Screenshot 2025-10-22 211929"
src="https://github.com/user-attachments/assets/71d466b8-61e4-4e30-83e5-06efdfc706ce"
/>
<img width="1322" height="934" alt="Screenshot 2025-10-22 212003"
src="https://github.com/user-attachments/assets/4e6c18b7-7f9e-436d-afb9-85a08a11c40b"
/>
<img width="1340" height="954" alt="Screenshot 2025-10-22 212028"
src="https://github.com/user-attachments/assets/597d0ed5-5519-4cf7-bc60-9963da3f7d7f"
/>

### Misc.

- I added `.idea/` to `.gitignore` because I use JetBrains IDEs
- I expanded the `fallbackColors` list. Right now it has a lot of green
colors, so I added equivalents for red, blue, cyan, magenta, and yellow.

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

GlacialDrift
2025-10-24 18:55:01 +00:00
MaxHT0x 4c9fcdedf4 Fix slow radial menu animation for mobile players (#2201) (#2248)
## Description:

Closes #2201

Remove CSS transition from SVG element that was causing the radial menu
to animate from its previous position to the new clicked position. This
was creating delays of up to 2 seconds for mobile players, making the
game unplayable on mobile devices.

The viewport clamping functionality (from PR #1817) is preserved - the
menu now appears instantly at the correct clamped position instead of
animating to it.

I wasn't sure if this should only apply for mobile players, but making
it so sounded too much trouble for what it's worth so its removed
entirely

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

stackk.
v0.26.7
2025-10-23 15:04:52 -07:00
Michal Martínek 1b3bcf32c1 Made leaderboard entries bold for teammates (#2221)
## Description:
Closes #2185.
Made leaderboard entries **bold** all your for **teamates**. Before it
was only bold for your player.
_Your player should still be bold even when is undefined._

Didn't add any tests - not sure if there is any testing for these type
of things.

### collapsed leaderboard list
<img width="1920" height="1080" alt="Snímek obrazovky 2025-10-22 182432"
src="https://github.com/user-attachments/assets/6241fda7-6e1e-47c0-a6a0-7eaf4b95e8b8"
/>

### expanded leaderboard
<img width="1920" height="1008" alt="Snímek obrazovky 2025-10-22 182539"
src="https://github.com/user-attachments/assets/22d1089f-62ae-4fb3-8ff1-e7ddc75c100e"
/>

### player not yet spawned
<img width="1920" height="1008" alt="Snímek obrazovky 2025-10-22 183858"
src="https://github.com/user-attachments/assets/2e7f3856-a084-4043-8e65-cf0653a901e5"
/>



## 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
- [ ] 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:
michal7952
2025-10-23 15:03:11 -07:00
evanpelle f1b70ea26d Merge branch 'v26' 2025-10-23 15:02:46 -07:00
Evan dd9ad7472f update header ads (#2266)
## Description:

1. Remove SpawnAds and replace it with AdTimer which will delete the
in-game ad after the first minute.
2. remove login blocker UI, we don't use it anymore
3. convert TerritoryPatternsModal & GutterAds to use event based when
checking for flares
4. remove window.PageOS.session.newPageView(); because it was throwing
an exception
5. Convert SpawnTimer to a lit element to give it a higher z-index to
stay above the header ad

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
2025-10-23 15:02:13 -07:00
Michal Martínek 8e278a5fd8 Made leaderboard entries bold for teammates (#2221)
## Description:
Closes #2185.
Made leaderboard entries **bold** all your for **teamates**. Before it
was only bold for your player.
_Your player should still be bold even when is undefined._

Didn't add any tests - not sure if there is any testing for these type
of things.

### collapsed leaderboard list
<img width="1920" height="1080" alt="Snímek obrazovky 2025-10-22 182432"
src="https://github.com/user-attachments/assets/6241fda7-6e1e-47c0-a6a0-7eaf4b95e8b8"
/>

### expanded leaderboard
<img width="1920" height="1008" alt="Snímek obrazovky 2025-10-22 182539"
src="https://github.com/user-attachments/assets/22d1089f-62ae-4fb3-8ff1-e7ddc75c100e"
/>

### player not yet spawned
<img width="1920" height="1008" alt="Snímek obrazovky 2025-10-22 183858"
src="https://github.com/user-attachments/assets/2e7f3856-a084-4043-8e65-cf0653a901e5"
/>



## 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
- [ ] 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:
michal7952
2025-10-22 19:07:40 -07:00
evanpelle 0f09bd3aa9 bugfix: check if modal is not null before checking if it contains isModalOpen 2025-10-21 16:17:33 -07:00
evanpelle 3c329e86b2 Merge branch 'v26' 2025-10-21 14:19:30 -07:00
Evan 4ada4c7375 feature: basic matchmaking (#2227)
## Description:

Implement a basic matchmaking modal that connects to the api service and
waits for a game id. It then waits until the game starts and connects to
it.

Workers use long polling to check in with the matchmaking server and
receive player assignments.

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-21 14:08:07 -07:00
Vivacious Box dddf54be0b Add deletion duration and indicators (#2216)
## Description:

Adds a timer before self deleting units
Adds a loading bar under deleting units
Adds a timer in radial menu for clarity purposes


![deletecd](https://github.com/user-attachments/assets/613bf742-ef90-42b5-a258-b928daae6aaa)

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

Mr.Box

---------

Co-authored-by: Evan <evanpelle@gmail.com>
2025-10-21 10:07:14 -07:00
VariableVince 4673808dc0 Fix annex surrounded main cluster disconnected player (#2241)
## Description:

When a main cluster is fully surrounded, the surrounding player is able
to attack them (based on AttackLogic in DefaultConfig). But so far
wasn't able to annex them.

Fix: turned around an isFriendly check in PlayerExecution. This way if
this.player is disconnected, they can get annexed, allied/team mate or
not.

This also means that in the edge case of surrounding player going AFK,
the enclosed main cluster can attack the disconnected surrounding player
and maybe fight it's way out of being enclosed.

Meant as hotfix for v26.

Reported here:
https://discord.com/channels/1284581928254701718/1429252618995105923/1429252618995105923

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

tryout33
2025-10-21 10:06:23 -07:00
Abdallah Bahrawi fb3d2e2c6f Polished Player Panel (#2235)
## Description:

- Polished Player Panel UI.
- Made alliance list unstructured.
- Removed blur background.

## Please complete the following:

- [ ] I have added screenshots for all UI updates
- [ ] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [ ] I have added relevant tests to the test directory
- [ ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

abodcraft1

---------

Co-authored-by: Evan <evanpelle@gmail.com>
2025-10-21 10:05:14 -07:00
Abdallah Bahrawi 373e3ef44a fix Request icon stuck for nations (#2234)
## Description:

fixes https://github.com/openfrontio/OpenFrontIO/issues/1955

Describe the PR.

Bots previously created requests directly, skipping timeout cleanup and
causing
a stuck “request sent” icon when unhandled. Using
AllianceRequestExecution makes
bots follow the same lifecycle as humans, so requests expire correctly.
## Please complete the following:

- [ ] I have added screenshots for all UI updates
- [ ] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [ ] I have added relevant tests to the test directory
- [ ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

abodcraft1

---------

Co-authored-by: Evan <evanpelle@gmail.com>
2025-10-21 09:55:54 -07:00
MaxHT0x 19597a37d9 Fix slow radial menu animation for mobile players (#2201) (#2248)
## Description:

Closes #2201

Remove CSS transition from SVG element that was causing the radial menu
to animate from its previous position to the new clicked position. This
was creating delays of up to 2 seconds for mobile players, making the
game unplayable on mobile devices.

The viewport clamping functionality (from PR #1817) is preserved - the
menu now appears instantly at the correct clamped position instead of
animating to it.

I wasn't sure if this should only apply for mobile players, but making
it so sounded too much trouble for what it's worth so its removed
entirely

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

stackk.
2025-10-21 09:49:33 -07:00
Duwibi d5174d02ec Readd Translation Discord link (#2255)
## Description:
Updated translation instructions and added new Discord link.

## Please complete the following:

- [ ] I have added screenshots for all UI updates
- [ ] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [ ] I have added relevant tests to the test directory
- [ ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

DISCORD_USERNAME
Nikola123

---------

Co-authored-by: Evan <evanpelle@gmail.com>
Co-authored-by: Loymdayddaud <145969603+TheGiraffe3@users.noreply.github.com>
2025-10-21 09:48:49 -07:00
evanpelle 73bf583452 update section 7 attribution terms 2025-10-18 17:26:30 -07:00
Vivacious Box f161c94ff4 Max timer (#1289)
## Description:

Adds a max timer setting
The timer starts at max timer and goes down, becoming red if reaching <
1 min
The player with the biggest territory wins at the end of the timer


![image](https://github.com/user-attachments/assets/888099fc-95ae-4303-8c80-c850e58d36e2)

## 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:

Vivacious Box

---------

Co-authored-by: Loymdayddaud <145969603+TheGiraffe3@users.noreply.github.com>
2025-10-17 17:09:10 -07:00
Aotumuri 75ca2fb349 Reduce redundant toggle strings to stay within Crowdin limits (#2219)
## Description:

Purpose: to reduce redundant strings and avoid exceeding Crowdin’s text
limit.

- Replaced _enabled/_disabled text with shared ..._desc in
SettingsModal.ts.

<img width="432" height="645" alt="スクリーンショット 2025-10-17 21 38 47"
src="https://github.com/user-attachments/assets/10942de4-1b2c-4df4-8811-95190463a2ab"
/>


## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

Aotumuri

Co-authored-by: Evan <evanpelle@gmail.com>
2025-10-17 14:39:33 -07:00
Aotumuri 06de3f1e8f mls (v4.8) (#2218)
## Description:

This is the final MLS for v26. Starting from the next PR, we’ll move on
to v27.

mls for v26
Version identifier within MLS: v4.7

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

Aotumuri
2025-10-17 14:27:47 -07:00
VariableVince 94a30bc4c7 Add Reddit link to footer on homepage (#2223)
## Description:

Add Reddit link to the footer on the homepage. Left of _Join the
Discord!_ and to the right of _Wiki_.

Before:
<img width="1917" height="342" alt="image"
src="https://github.com/user-attachments/assets/d5a105eb-d284-45ab-af6b-431967d293bb"
/>

After:
<img width="1915" height="372" alt="image"
src="https://github.com/user-attachments/assets/e4bb505b-ce5b-4880-adb2-bb66cd4bdc3a"
/>


## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

tryout33
2025-10-17 14:24:29 -07:00
Aotumuri 19081bf21b Add PlayerInfoModal (#2058)
## Description:

This PR adds the Player Status display to the AccountModal.
<img width="573" height="640" alt="スクリーンショット 2025-10-11 6 44 25"
src="https://github.com/user-attachments/assets/54c36bde-7c9c-4431-8ac9-e7f4089971f4"
/>


(origin pr:https://github.com/openfrontio/OpenFrontIO/pull/1758)

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

aotumuri

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-10-16 20:01:19 -07:00
DevelopingTom 4eaf3de5de Add destructed structure FX (#2210)
## Description:

New FX on building destruction

Icon level:

https://github.com/user-attachments/assets/0ba5e557-a5d7-436f-8a58-2843d4c99332

Pixel art level:

https://github.com/user-attachments/assets/12002df6-eb46-4853-b84f-4f81ce7c3528


## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

IngloriousTom

---------

Co-authored-by: Evan <evanpelle@gmail.com>
2025-10-16 19:58:13 -07:00
icslucas 141c431a93 Enzo video for tutorial (#2208)
## Description:
enzo video
Describe the PR.
enzo video for tutorial

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:
Lucas
2025-10-17 02:57:14 +00:00
VariableVince 144920eb53 Fix 100% owned in team stats (#2217)
## Description:

When a team owns 100% of the land, it would show "1.0e2%" because of
toPrecision(2). Fix this by keeping the same precision as for other
numbers, but just returning 100 for 100%.

It probably wasn't really noticed before since full land ownership
doesn't occur much. Chances of 100% in team stats are a bit higher since
fallout is now taken into account.

Only a picture of the before situation:
<img width="725" height="84" alt="100 percent"
src="https://github.com/user-attachments/assets/f45edbc5-e740-4157-8a0b-cdc2981ced24"
/>

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

tryout33
2025-10-16 19:49:46 -07:00
evanpelle f552b00661 bugfix: use FlagSchema to validate flag v0.26.6 2025-10-15 09:46:34 -07:00
Evan 2ad9c6f302 bugfix: sending alliance to afk crashes game (#2202)
## Description:

Afk players are marked as not friendly, the canSendAllianceRequest was
returning true even if already allied because isFriendly was false. This
was allowing alliance requests to people we were already allied with.

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
v0.26.5
2025-10-14 21:50:50 -07:00
evanpelle 5540eff24c Merge branch 'v26' 2025-10-14 20:24:15 -07:00
evanpelle 349e7acb61 bugfix: have Privilege support flags v0.26.4 2025-10-14 20:07:05 -07:00
evanpelle eea8db7a06 delete warship when player is afk 2025-10-14 19:51:58 -07:00
evanpelle 9ab35a0436 bugfix: don't use bigint for zod schema as it causes json parsing issues v0.26.3 2025-10-14 19:05:53 -07:00
evanpelle 5579fcf91b update win_modal territory pattern to say go ad free v0.26.2 2025-10-14 18:01:16 -07:00
Evan 090b0756b7 Allow donation in team games. (#2198)
## Description:

Was a bug disabling donation in public team games.

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
v0.26.1
2025-10-14 16:10:32 -07:00
Hiphex fee2f822ed Fix spelling typos and improve code quality (#2186)
## Description:
  This PR fixes several bugs and improves code quality:

- Fix spelling typos: "recieved" → "received" in Transport.ts and
GameServer.ts
  - Fix comment typo: "isn'te" → "isn't" in TerrainLayer.ts
- Improve WebSocket cleanup in Transport.ts leaveGame() by replacing
empty onclose handler with proper
   killExistingSocket() call
- Add console.warn for image decode failures in StructureLayer.ts
instead of silent catch
  - Remove commented dead code in DevConfig.ts

  ## Testing
All 288 tests pass. Development build completes successfully. No
breaking changes.

  ## Files Changed
  - src/client/Transport.ts
  - src/server/GameServer.ts
  - src/client/graphics/layers/TerrainLayer.ts
  - src/client/graphics/layers/StructureLayer.ts
  - src/core/configuration/DevConfig.ts

## Checklist:
- [x] I have added screenshots for all UI updates (N/A - no UI changes)
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file (N/A - no user-facing text)
- [x] I have added relevant tests to the test directory (All 288
existing tests pass - no new tests needed for typo fixes)
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

  Discord: hiphex_33496

Hiphex

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-14 22:07:49 +00:00
Evan bce27f1a6b don't show ads if skin has been purchased, fixed ads not getting removed sometimes (#2196)
## Description:

Now checks if player has any "pattern" flares and does not show ads.
Also set visible=false when hiding ads, sometimes the ads were not
getting destroyed properly.

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
v0.26.0
2025-10-14 13:55:30 -07:00
evanpelle 5f6b85ebfc Merge branch 'v26' 2025-10-14 12:03:43 -07:00
evanpelle 810b12b7ff Merge branch 'v25' into v26 2025-10-14 12:02:44 -07:00
VariableVince 69fc14f1fd Fix user having to click 3-4x times before building is deleted (#2195)
## Description:

There is a 5 second cooldown between building deletions (as was proposed
here:
https://github.com/openfrontio/OpenFrontIO/pull/1609#issuecomment-3146188728).

But this cooldown is only checked when in DeleteUnitExecution from
canDeleteUnit in PlayerImpl.
The delete button in RadialMenuElements always gets True back from
canDeleteUnit in GameView.

This results in a user seeing an enabled Delete button after just
deleting another building. And being able to click it, but no deletion
would happen. So they have to click 3-4 times before it 'works'.

Fix: also apply the 5s cooldown when deciding to disable the button. 

In the fix in canDeleteUnit in GameView, added +1 to the current game
tick. So the Delete button is enabled 1 tick before DeleteUnitExecution
would get True back from canDeleteUnit in PlayerImpl. Between seeing and
clicking the button is probably 1 tick anyway, and sometimes also after
clicking it and the execution it takes another tick so this is safe.
Also tested the other way around: after deletion the button should
immediately not be visible, while it can take 2 ticks before GameView
gets lastDeleteUnitTick back from PlayerImpl. But since the Radial menu
is closed after clicking the button, i couldn't open it fast enough
again to still see the button enabled (ie. it was always already neatly
disabled). And if someone with an auto-clicker were to be able to click
it still, their attempt would still be blocked by the cooldown check in
DeleteUnitExecution.

BEFORE:

https://github.com/user-attachments/assets/17242c39-982e-47c6-89f2-6fe22a296c7d

AFTER:

https://github.com/user-attachments/assets/dfe20111-3313-4ad2-95a9-0152c0270c08

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

tryout33

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
v0.26.0-beta4
2025-10-14 11:18:50 -07:00
VariableVince 2f67c45a17 Cleanup redundant code win tad performance back (#2194)
## Description:

Cleanup code & small perf improvement

Gave it v26 milestone because it gives a little perf bump at no cost,
all the removed code isn't used anywhere so can be safely deleted.
Triple checked.

- Remove 'setFocusedPlayer' and 'checkTileUnderCursor' (not to be
confused by still in use 'getTileUnderCursor') from ClientGameRunner,
'_focusedPlayer' and 'setFocusedPlayer' (not to be confused with
still-in-use 'focusedPlayer') from GameView, and 'setFocusedPlayer' from
TransformHander.
These are remnants of PR #304, the first one that added highlighting
territory. The remants are still ran for every mouse-move, costing some
performance for no reason. _focusedPlayer is never used anywhere
anymore, only calculated and set.

It was later adapted from #387. But ultimately almost completely
disabled because it was too performance-costly, from commits 15c2cc1 and
then ec895af.

The thing that remained was permanent highlight of the player's own
border. For that, function 'focusedPlayer' in GameView is still used by
'drawFocusedPlayerHighlight' in TerritoryLayer. But it simply returns
myPlayer instead of the obsolete _focusedPlayer that it returned
earlier. Function 'focusedPlayer' still had the annotation "// TODO:
renable when performance issues are fixed." which i removed. Because
another PR for highlighting other's territory already followed it up
with its own functions, so chances of needing to change 'focusedPlayer'
back are very slim.

Later PR #1320 introduced a new attempt for highlighting territory in
the alternate view. It used its own equivalent functions in
TerritoryLayer for MouseOver and updateHighlightedTerritory (the latter
being the equivalent of the old checkTileUnderCursor in
ClientGameRunner). That was also disabled in part due to perfomance
cost, and now only shows border color changes. All this to say: the
remnants of PR 320 and 387 have long been redundant.

- Main: removed uncommented chatModal code, which was never used and
leftover from tests during development probably.

- PlayerActionHandler: removed handleQuickChat and the
sendQuickChatEvent import it needed. It was added in PR Multi-level
radial menu #1018. But the new Radial menu in the meantime moved to
using ChatIntegration.ts to send the chat event, or from there opened
the original Chat Modal which then sent the chat event. Later on, chat
was even removed from the Radial menu. 'handleQuickChat' is used nowhere
anymore and isn't needed. This is maybe also the case for
ChatIntegration, but i didn't remove it because it may still be enabled
again in the future for UI changes or something.

- OptionsMenu: removed, also from index.html (options-menu). This menu
has been succeeded by GameRightSidebar (game-right-sidebar for
index.html) for awhile now.

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

tryout33
2025-10-14 11:12:37 -07:00