Commit Graph

2617 Commits

Author SHA1 Message Date
evanpelle bb5ccbfa2c reduce statement test coverage to 21% 2025-10-29 16:29:13 -07:00
Ryan Barlow 323a5b59b2 SAM Radius (#2307)
## Description:

Adds a radius to SAM sites - but only when hovering/ghost mode for
sam/atom/hydrogen.

solves #1157 

<img width="395" height="321" alt="image"
src="https://github.com/user-attachments/assets/130c5fe5-c0d3-4637-bce5-11eec74b652a"
/>
<img width="561" height="468" alt="image"
src="https://github.com/user-attachments/assets/9b30149b-8596-4dd4-8399-908593c95e0d"
/>
<img width="844" height="634" alt="image"
src="https://github.com/user-attachments/assets/dafcca96-3f79-4985-88f4-935d461888f0"
/>
<img width="665" height="668" alt="image"
src="https://github.com/user-attachments/assets/924fdf7b-2cb6-4f64-9438-7412838f3d09"
/>
 

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

w.o.n

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Evan <evanpelle@gmail.com>
2025-10-29 22:51:59 +00:00
DevelopingTom b7519ab9b1 Add new nuke preview FX (#2322)
## Description:

New FX played to preview the nuke explosion area (follow up of
https://github.com/openfrontio/OpenFrontIO/pull/2309)
Will prevent over-nuking the same area in team games



![nuke_area](https://github.com/user-attachments/assets/cbff20b0-3650-43ab-9d93-43211856f12e)

Visuals inspired from
https://github.com/openfrontio/OpenFrontIO/pull/1814 (@ryanbarlow97)

## 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: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-29 20:02:16 +00:00
VariableVince ecced3c6d0 Fix: remove duplicate setting of _troops from ControlPanel (#2315)
## Description:

PR https://github.com/openfrontio/OpenFrontIO/pull/1676 introduced a
duplicate line of code in ControlPanel. Resulting in _troops being set
twice in a row. Remove one to keep only the oldest one.

## 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-28 17:47:26 -07:00
Vivacious Box 9e694b498b Fill the range indicator with white for better clarity (#2319)
## Description:

Fill the range indicators

<img width="287" height="200" alt="image"
src="https://github.com/user-attachments/assets/2c75cb13-0574-40c9-be48-2f28cf77734e"
/>

## 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
2025-10-28 23:40:01 +00:00
Adarsh Das 0789f0d7f8 Add Nations Vs Players Game Mode (#2233)
## Description:
Fixes: #676 
This PR adds Players Vs Nations as a game mode in the menu.

For this change I have added two mutually exclusive option for this
mode:
1. Match number of nations to number of players who have joined
2. Set the number of nations to a fixed value

### Screenshots:
#### Options in Single player mode
<img width="1025" height="790" alt="image"
src="https://github.com/user-attachments/assets/c0685ea5-94f5-43c7-a9e5-390835fc94e9"
/>
<img width="1005" height="795" alt="image"
src="https://github.com/user-attachments/assets/dddba015-a424-40dd-a0fe-2571fd7b0fba"
/>

#### Options in lobby mode
<img width="1015" height="888" alt="image"
src="https://github.com/user-attachments/assets/45bc865b-c6a8-4b6a-9062-4eb499c1ea36"
/>

#### Example gameplay (1 Human Vs 90 Nations)
<img width="1888" height="912" alt="image"
src="https://github.com/user-attachments/assets/38faec75-171f-4358-a3be-93630cca1587"
/>


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

saphereye

---------

Co-authored-by: Evan <evanpelle@gmail.com>
2025-10-28 16:40:30 -07:00
evanpelle 02bdaaa2c6 Merge branch 'v26' 2025-10-28 14:10:27 -07:00
evanpelle 4f00c4a12c Increase public game ffa frequency to 3:2 ffa:teams v0.26.11 2025-10-28 14:05:07 -07:00
Ryan Barlow 7dd45e8dd4 Bomb target location (same logic as naval invasions) (#2309)
## Description:

Added logic to hydro/atom bombs - using same FX as the boat invasion
(keeping PR smaller, can add more UX for hydro/atoms later)

Only you & teammates can see the target.

<img width="747" height="356" alt="image"
src="https://github.com/user-attachments/assets/bc1aaec0-8b41-4def-92ee-9f076a8cd550"
/>


Viewpoint from two players:
<img width="1667" height="680" alt="image"
src="https://github.com/user-attachments/assets/76e96ad1-af09-4584-a71a-823c85b6e26b"
/>



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

w.o.n
2025-10-28 09:03:33 +00:00
Evan 3fd38e7306 Add clanTag to GameRecord for archiving (#2314)
## Description:

This will be used to determine clan winners in the api layer.

## 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.10
2025-10-27 20:05:09 -07:00
Mike Harris b8fab0d359 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-27 19:25:46 -07:00
Lavodan cb744b49fc Fix incorrect display of ability to upgrade enemy units (#2308)
## Description:

Fixes #2135.
Adds an owner check to canUpgradeUnit to prevent enemy units from
seemingly being able to be upgraded when Ctrl+clicked on

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

Lavodan
2025-10-27 21:13:05 +00:00
Thomas Cruveilher 4a9a19631e fix(client): do not spam public lobbies requests by waiting for previous request to end before firing a new one (#2276)
## Description:

This PR aims to (quickly, not definitely) address
https://github.com/openfrontio/OpenFrontIO/issues/2274 as I believe
that's an urgent DDOS problem with the frontend design.

I am looking at the backend to understand the underlying issue.

## How was this tested:

I added a 2 seconds "sleep" to the endpoint `public_lobbies` to simulate
loads.

The frontend would do request every seconds, which kept piling up on the
server and decreased performances, cf screenshot, instead of resolving
every 2 seconds, each subsequent request would take longer than the
previous one.
<img width="849" height="263" alt="Screenshot 2025-10-23 at 23 36 37"
src="https://github.com/user-attachments/assets/31ded504-a72e-4794-9c5e-b9b0c675dd33"
/>

After adding the fix to the frontend (which can only trigger 1 request
at a time, waiting for the previous one), all request completed in
approximatively 2 seconds as expected, cf screenshot.

<img width="849" height="263" alt="Screenshot 2025-10-23 at 23 36 54"
src="https://github.com/user-attachments/assets/bc680642-407a-4a55-aeed-6a03bad35327"
/>

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

sorikairo

Co-authored-by: Vivacious Box <jon@rouillard.org>
2025-10-27 21:06:12 +00:00
evanpelle 74197d49e4 update API.md to include type parameter in games/ endpoint 2025-10-27 13:22:37 -07:00
evanpelle 48909d5d25 Add API.md to document public api 2025-10-27 12:45:10 -07:00
DevelopingTom df8118e27d Resize structure sprites so they don't leave pixels behind when deleted (#2304)
## Description:

Reduce halloween sprites size so they don't leave pixel behinds when
deleted

## 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-26 23:05:30 +01:00
VariableVince 91f1748d70 Perf: remove redundant code from PlayerExecution (#2299)
## Description:

Remove some lines of code that do nothing in surroundedBySamePlayer,
gain a small bit of performance back. The code says "if it is an ocean
shore tile but not an ocean shore tile" which can never be true.


(Why where the lines there and why can they be removed:

Before you were able to boat on a lake, you had no escape from your land
if it bordered a lake and no ocean. So it was logical, if you bordered a
lake with your cluster, to still treat it as fully surrounded annexable
land.

This is why this code was added in [this
commit](https://github.com/openfrontio/OpenFrontIO/commit/ee56d687484131c092599434247b3a036e0e9668)
back then:

`const isOceanShore = this.mg.isOceanShore(tile); if
(this.mg.isShore(tile) && !isOceanShore) { continue; }`

But [this newer
commit](https://github.com/openfrontio/OpenFrontIO/commit/c1383d76f1f76c5e5f9be3a6f30b8f3010258540#diff-fb1101a2b50dd7c353d082ff7a3351cff5469b8249b3ebca91c10573a3dfaaf1)
made it so you could from then on boat on lakes. So you have an escape
from your cluster since then. And just like being on the edge of the map
or when bordering the ocean, this means your cluster won't get annexed.

However, while the updated code for PlayerExecution in the last commit
does its work as intended (it does not exclude lake shore tiles
anymore)... The code contradicts itself:

`const isOceanShore = this.mg.isOceanShore(tile); if
(this.mg.isOceanShore(tile) && !isOceanShore) { continue;}`

Conclusion: the code on lines 136-138 can be deleted because it
literally says "if it is an ocean shore tile but not an ocean shore
tile" which can never be true. Also remove the const and check
isOceanShore directly in the if statement.)

## 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-26 21:48:54 +00:00
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