Commit Graph

2291 Commits

Author SHA1 Message Date
Antoine dc1f79d090 Fix all strict errors in /client (#1489)
## Description:

Second PR to fix issues in order to enable strict mode.

## Specifics

1. Most important change: Turned off errors for Class variables not
initialized in constructor. I've noticed that pretty much all Classes in
the project have at least one occurence of that issue. And fixing it
properly would require a large refactor across the whole project. So
disabling the rule seems like a good solution in this case.

#1075 

## 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 have read and accepted the CLA aggreement (only required once).

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

azlod
2025-07-29 16:24:52 -04:00
Tyler Hanavan 0726449b6e Don't become traitor when betraying inactive player (#1610)
## Description:

Don't become traitor when betraying inactive player

This PR makes the following changes
- Do not mark the attacking player as a traitor, if they attack/betray
an ally who is disconnected from the game
- Do not send the attacking player the betrayal message (traitor debuff
applied message), if they attack/betray an ally who is disconnected from
the game
- Add test case for traitor debuff being applied if the attacking player
attacks an ally who is still connected to the game
- Add test case for traitor debuff NOT being applied if the attacking
player attacks an ally who is disconnected from the game


I also tested this manually with nuking an allied player who is
connected and nuking an allied player who is disconnected. The logic
worked as expected.

This PR was made in regards to the following issue: #1599 

## 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 have read and accepted the CLA agreement (only required once).

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

slyty
2025-07-28 11:22:07 -07:00
DevelopingTom e8c6b93661 Improve UnitGrid performances by grouping units by type (#1592)
## Description:

Even with the internal grid, `UnitGrid::nearbyUnits` can consume a
significant amount of CPU, where it can account for ~5% of the rendering
thread. Most of this overhead comes from filtering units by type.

This PR improves performance by storing units in type-specific sets,
significantly reducing lookup time.

It reduces the usage to ~1% with this change:
![Sans
titre](https://github.com/user-attachments/assets/f206c2bb-4cdb-4b6e-a628-91b1ec7f56e3)

## 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 have read and accepted the CLA agreement (only required once).

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

IngloriousTom

---------

Co-authored-by: Tom Rouillard <trouilla@mathworks.com>
Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-07-28 00:51:02 -04:00
Scott Anderson 2a3898043c Merge main into v25 2025-07-27 15:25:29 -04:00
djmrFunnyMan 53a8354e32 Fix and update Pluto map (#1587)
## Description:

I've made a mistake and accidentally uploaded the v23 binary instead of
v24. My apolocheese

I also updated the map based on Duwibi's feedback

## 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 have read and accepted the CLA agreement (only required once).

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

aceralex
2025-07-27 14:25:47 -04:00
Aotumuri 866ea17bb4 Change variable name from dKeyPressed to debugKeyPressed in LangSelector (#1583)
## Description:

Renamed dKeyPressed to debugKeyPressed to better reflect the actual key
used for debug mode activation.

## 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 have read and accepted the CLA agreement (only required once).
2025-07-26 20:02:20 -04:00
evanpelle 1cd4fdb75d fix ws mem leak (again) (#1591)
## Description:

The initial memory leak where websockets had references to GameServers
has been fixed. But a new memory leak has been introduced.

A memory dump showed that WebSockerServer was hanging onto 10s of
thousands of closed websockets. I believe it's because
removeAllListeners was removing internal clean up listeners, from the
comment:

* It is bad practice to remove listeners added elsewhere in the code,
* particularly when the EventEmitter instance was created by some other
* component or module (e.g. sockets or file streams).

This PR ensures that removeAllListeners is only called in the close
listener, which is executed after internal cleanup.


## 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 have read and accepted the CLA agreement (only required once).

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

evan
v0.24.10
2025-07-26 13:51:21 -07:00
Aleksey Orekhovsky 9c60fbc7d2 Reduce docker image size further by removing unused dependencies (#1588)
## Description:
This PR continues work on issue #1242 to reduce the size of docker
image. It moves frontend-related packages from dependencies to
devDependencies and completely removes packages that are no longer
referenced anywhere in the codebase. As a result, this further decreases
the image size by approximately 25%.

I'm slightly concerned about removing some `@opentelemetry/*` packages.
Locally the build succeeds and the application appears to work, but I'm
currently unable to verify logging through OpenTelemetry.

## 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 have read and accepted the CLA agreement (only required once).

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

aaa4xu
2025-07-26 16:17:32 -04:00
Duwibi fb1e0585ab Yenisei map (#1517)
## Description:
This is a map of the Yenisei Bay in Russia. It contains 6 nations and
should be all compatable with all of the new map stuff. It has a size of
2000x2500 (which also means that it's larger vertically)

Describe the PR.

## 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
- [ ] I have read and accepted the CLA aggreement (only required once).

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

DISCORD_USERNAME
Nikola123
2025-07-26 14:24:55 -04:00
evanpelle 0f2089c9d0 fix mirv damage scaling (#1590)
## Description:


https://github.com/openfrontio/OpenFrontIO/commit/932d4f3be2cded197e5ed4712a9e9e35963b86a6
made the curve way too steep, so just one MIRVWarhead caused enormous
population damage, so receiving crossfire from a nuke could cause
extensive damage

This PR Makes the curve much more linear, so the first explosions aren't
as deadly. Also change the asymptote to 3%, in practice it ends up being
around 5%.



## 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 have read and accepted the CLA agreement (only required once).

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

evan
2025-07-26 11:23:26 -07:00
djmrFunnyMan 67dea7c60f Temporarily increase iterations cap for transports & warships (#1589)
## Description:

This PR increases the iteration cap for warships & transports, until a
better solution can be found.

Fixes the issue where warships & transports break when pathfinding very
far away.

## 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 have read and accepted the CLA agreement (only required once).

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

aceralex
2025-07-26 10:04:51 -07:00
qunash 13a5349b21 Add Circassian nation (#1577)
## Description:

Adds Circassia as a nation to the `Black Sea` and `Between two seas`
maps. Circassia was a significant country and a historical region in the
North Caucasus that controlled the northeastern Black Sea coast. More
info on Wikipedia: https://en.wikipedia.org/wiki/Circassia

<img width="508" height="315" alt="image"
src="https://github.com/user-attachments/assets/3034c98c-5123-4e28-901f-b194a3f74c46"
/> <img width="504" height="378" alt="image"
src="https://github.com/user-attachments/assets/f63bd6c2-c44a-4620-aac5-c89f3694083a"
/>

## 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 have read and accepted the CLA agreement (only required once).

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

qunash
2025-07-26 17:44:39 +02:00
Brandon Yi 86a06821a5 Ensuring that MutableAlliance::extend is called in test case (#1582)
## Description:

A test case for AllianceExtensionExecution was not actually checking if
the alliance was extended correctly. The method to extend the alliance,
MutableAlliance::extend, was never called during execution of
AllianceExtensionExecution.

The reason the extend() method was not being called is because both mock
players were not alive. This PR spies on the MutableAlliance object to
verify that extend() is correctly called.

Related: https://github.com/openfrontio/OpenFrontIO/pull/1536

## 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 have read and accepted the CLA agreement (only required once).

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

bypie5
2025-07-26 04:10:47 -04:00
Aleksey Orekhovsky 97eb48a650 Reduce docker image size with multi-stage build and dependency pruning (#1581)
## Description:
This PR focuses on trimming down docker image size while keeping runtime
behaviour intact.
This partially addresses #1242 by slimming the production Docker image
by ~33%.
```
$ docker image ls | grep openfront
openfrontio  latest   992fb420f131   1 minute ago   1.05GB   # new
evanpelle/openfront-prod <none> 216c629def78 6 hours ago 1.58GB   # current prod
```

The savings come from three areas:
- Refactor `Dockerfile` into a three‑stage build (dependencies / build /
runtime).
- Installs dev‑only node packages in a throw‑away layer and copies only
production modules to the final image.
- Updated `webpack.config.js` to skip copying `resources/maps/**/*`
which never referenced by the client.

Because the current codebase does not cleanly separate dev/prod
requirements, extensive regression testing is necessary; some latent
prod usage of dev‑only modules might surface.

## 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 have read and accepted the CLA agreement (only required once).

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

aaa4xu

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-07-26 02:36:13 -04:00
Aleksey Orekhovsky 4a38561583 Track gold obtained through eliminations in player stats (#1566)
## Description:
Currently, the game only recorded war gold statistics when a defender
was killed as part of a territory‑annexation sequence. Regular attack
eliminations did not trigger the war gold stat update.

This PR:
- Invokes `stats.goldWar(...)` in the standard elimination code path of
`AttackExecution`, so that any kill - whether by full annexation or
direct attack - correctly increments the attacker's war gold stat.
- A new integration test suite `AttackStats.test.ts` covering both
scenarios

## 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 have read and accepted the CLA aggreement (only required once).

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

aaa4xu
2025-07-26 04:23:29 +00:00
Aotumuri 543d97a69d mls (v4.3) (#1578)
## Description:

mls for v24
Version identifier within MLS: v4.3

## 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 have read and accepted the CLA aggreement (only required once).

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

Aotumuri
2025-07-26 00:05:02 -04:00
floriankilian 48632cc0e0 Add private lobby ID visibility toggle (#1382)
## Description:
Added an eye icon to the lobby ID button so users can hide/show their
lobby ID for privacy. When hidden, it shows dots (••••••••) instead of
the actual ID. Also added a setting in the user settings to control the
default behavior.

**Fixes #1091**

### What's new:
- Click the eye icon to toggle lobby ID visibility
- Global preference in User Settings modal
- Creating a new Lobby will take the set preference from User Settings
- Copy function still works when hidden


![image](https://github.com/user-attachments/assets/3f0b0299-cf49-492a-a1eb-51ec73ba1827)

![image](https://github.com/user-attachments/assets/77c48a89-1910-4bd4-988d-d86d5f3cbf4a)

![image](https://github.com/user-attachments/assets/5d4e16d8-0e91-4cb4-a343-4529172a766e)


## 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
- [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:
[UN]nvm
2025-07-26 00:00:47 -04:00
djmrFunnyMan a743b768a4 Add the Pluto map (#1442)
## Description:
Redoing this PR because the previous one was just a mess. ~~Now
everything is in 1 commit.~~ not anymore

I have added the map of Pluto, based on the discord suggestion that has
41 upvotes.

<img width="2100" height="1300" alt="pluto_final_clean"
src="https://github.com/user-attachments/assets/9eaa44f9-c18e-48ca-89e4-ac59273859f7"
/>

The map looks like this ^

The map doesn't cover all of Pluto, because we simply don't have the
data about the other side. Instead this map covers most of the mapped
area which has high quality height data.

<img width="2438" height="1219" alt="image"
src="https://github.com/user-attachments/assets/c5adfd52-0e92-4cb9-b97b-afd7df822588"
/>


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

aceralex
2025-07-25 23:43:00 -04:00
evanpelle 19274ac10a bugfix: transport ship was using start troops, not ship troops to determine attack (#1576)
## Description:

This caused an issue when getting nuked, the transport ships were not
decreasing

## 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 have read and accepted the CLA agreement (only required once).

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

evan
v0.24.9
2025-07-25 20:40:55 -07:00
evanpelle 58fa523c52 move ally button back to root radial (#1575)
## Description:

The ally slot was removed in v24, add it back

## 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 have read and accepted the CLA agreement (only required once).

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

evan
2025-07-25 17:17:38 -07:00
DevelopingTom 8cbba26ab8 Change how canceled attacks are recorded (#1480)
## Description:

Minor fix:
The `retreat()` function is called everytime the troops have to come
back home:
- alliance between the belligerents
- cluster / player conquest
- canceled attack

Each of those cases are recorded as "canceled" but only the actually
canceled attacks should be recorded as such.


## 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 have read and accepted the CLA aggreement (only required once).

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

IngloriousTom
2025-07-25 23:54:36 +00:00
DevelopingTom c738648460 Add conquest FX (#1390)
## Description:

Add an animation when the player conquer another one.
The FX consists of two parts: short animation, and the gold won.

It is only displayed to the conquering player, so everybody knows who
won the money if multiple people fighted over the last pixel of a
player.

Changes:
  - Add new update `ConquestUpdate`
  - Add new fx `ConquestFx`
  - Merge conquest logic in `Game`


https://github.com/user-attachments/assets/9f985e41-baa4-48a6-927e-3216274f758c

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

IngloriousTom
2025-07-25 19:52:05 -04:00
maxime.io 71fe6a81a0 Improve the alternate view by adding geopolitical colors for territories and hover-based highlighting (#1320)
## Description:

Improve existing alternate view (space bar).
It now displays territories in different colours based on their status
(enemy, allied, or your own).
Hovering over a territory highlights it. I tested several approaches,
and this one delivers excellent performance (on mobile too).
![VERT_OpenFront (ALPHA)
(6)](https://github.com/user-attachments/assets/40eeb4cd-e1dc-4daf-9165-b41f8693494c)


![image](https://github.com/user-attachments/assets/53a24369-698d-4213-9b4c-cb736feee22d)

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


Related issue:
https://github.com/openfrontio/OpenFrontIO/issues/900
https://github.com/openfrontio/OpenFrontIO/issues/484

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

devalnor
2025-07-25 19:50:26 -04:00
DevelopingTom afc5709a1b Add missing factory in player info panel (#1507)
## Description:

The player info panel is missing the factory count. Also only displays
the units available in the current game.
 
Every unit:
<img width="185" height="238" alt="image"
src="https://github.com/user-attachments/assets/52eca7c8-99e0-4234-98d4-8efe1644a92c"
/>

City only:
<img width="186" height="142" alt="image"
src="https://github.com/user-attachments/assets/87aef9f8-697c-4aa0-8bc5-92f016886a9d"
/>


## 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 have read and accepted the CLA aggreement (only required once).

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

IngloriousTom
2025-07-25 23:47:54 +00:00
sidneyprins 79c638c1ca Players on the same team get a distinct color based on the team color (#1297)
## Description:

Instead of all teams having the same color, they get a different color.

### 2 teams


![blue-red](https://github.com/user-attachments/assets/7ec88d25-af1d-42de-8cda-f0ffdc7029d5)

### All teams


![all-teams](https://github.com/user-attachments/assets/97f8a51b-b5a4-40ec-8a96-f749547d354c)

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

pineappleprince

---------

Co-authored-by: Drills Kibo <59177241+drillskibo@users.noreply.github.com>
Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-07-25 19:00:57 -04:00
Scott Anderson 9b6c290ec7 Merge main into v0.25.x 2025-07-25 18:56:22 -04:00
evanpelle 932d4f3be2 Have MIRV damage asymptote to 5% of total population (#1570)
## Description:

Decreasing MIRV warhead blast radius nerfed them too much, so have them
destroy 95% of population.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
v0.24.8
2025-07-25 15:44:32 -07:00
evanpelle 65937b7e69 bugfix: when nuking nearby water, the attacker was not marked as a traitor on launch (#1574)
## Description:

There was a bug where we only checked for betrayals if the target tile
was owned.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-25 18:39:28 -04:00
Andrew Niziolek e2fd7aaa0f PR Template and Action Revsion (#1569)
## Description:

The current PR template and related action contain a spelling error on
the line related to agreeing to the CLA.

## 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 have read and accepted the CLA aggreement (only required once).

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

ajaxburger
2025-07-25 18:31:05 -04:00
evanpelle 1cca6e2ebc fix player overview overlay on mobile (#1572)
## Description:

Regression in v24 that prevented the player overlay from showing when
clicking on mobile.

## 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
- [ ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [ ] I have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-25 12:01:06 -07:00
Aotumuri 1c6aa2bfc3 Improve language code matching logic for locale fallback (#1534)
## Description:

This pull request improves the logic for matching language codes to
supported languages.
Now, the function tries to find the most specific language by splitting
the input code with “-” or “_”, and searching from the longest
combination to the shortest.
If no direct match is found, it searches for all supported language
codes that start with the same base (first two letters) and chooses the
most specific one.
If nothing matches, it defaults to English.

## 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 have read and accepted the CLA aggreement (only required once).

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

aorumuri
2025-07-25 14:08:35 -04:00
evanpelle d010fdbda0 memory leak fix attempt: store websockets and remove listeners when game ends (#1564)
## Description:

This is a temporary fix to remove websocket memory leaks.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
v0.24.7
2025-07-24 16:32:34 -07:00
evanpelle 419aef7751 Call remove all listeners on ws close (#1558)
## Description:

After doing a memory dumb, there is a websocket handler that hadn't been
cleaned up. So ensure removeAllListeners is called.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
v0.24.6
2025-07-24 12:07:58 -07:00
tnhnblgl 8dedb15ce1 Fix troop exploit (#1556)
## Description:
Fixes #1554 (short description)

## 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 have read and accepted the CLA aggreement (only required once).

## Please put your Discord username so you can be contacted if a bug or
regression is found:
dovg
2025-07-24 11:03:40 -07:00
iamlewis f958f0f473 Alliance Time to 5 minutes (#1535)
## Description:

Changes Alliance time to 5 minutes from 10 as per manager meeting

## 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 have read and accepted the CLA aggreement (only required once).

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

Iamlewis
v0.24.5
2025-07-24 00:30:00 +00:00
evanpelle 5273450526 reduce traitor debuff 2025-07-23 17:01:35 -07:00
evanpelle c0889ba538 Close websocket immediately after sending error. (#1551)
## Description:

The delay was unnecessary and caused race conditions

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-23 16:35:11 -07:00
VariableVince ff17d321c7 Fix: display actual Alliance extension message instead of translation key (#1532)
## Description:

On Alliance extension, the key "events_display.alliance_renewed" is
displayed in the Event Panel. Reported in
https://discord.com/channels/1284581928254701718/1397197460085932184

Since displayMessage doesn't expect or do translations, just puts out
hardcoded English messages so far, it doesn't do anything with the
recieved key and just puts it in the Event Panel as is. This PR fixes it
as a follow-up of #1359.

With this, it also introduces a base which can be used to translate
hardcoded messages coming from other Executions. That is out of the
scope of this PR.

PRs #1532 and #1536 both fix issues with Alliance Renewal in v24. If
possible approve 1532 (this one) first and then 1536 not too far after
if github can indeed merge them.

BEFORE:
<img width="533" height="353" alt="alliancerenewbefore"
src="https://github.com/user-attachments/assets/b97f7279-8daf-4049-96fb-1d5a1e360ec4"
/>

AFTER: 
(tested locally with Nations by not checking their answer; they normally
don't answer to alliance renewal request which is another issue)

<img width="787" height="406" alt="After fix"
src="https://github.com/user-attachments/assets/9fc3a0e2-b151-486f-b6ef-692177e387ad"
/>

## 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 have read and accepted the CLA aggreement (only required once).

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

tryout33
2025-07-23 18:44:57 +00:00
VariableVince 563d054ea5 Zod v4 update (#1546)
## Description:

This contains the update from zod 3.25 to 4. Change imports back from
zod/v4 to just zod. No errors in VSCode.

## 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 have read and accepted the CLA aggreement (only required once).

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

tryout33
2025-07-23 14:28:38 -04:00
evanpelle b593034755 migrate setup.sh to grafana cloud (#1528)
## Description:

have otel-collector send metrics to new grafana endpoint

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
v0.24.4
2025-07-23 09:18:06 -07:00
evanpelle d7993e192a transport ship execution: don't refund troops when max boat limit hit (#1537)
## Description:

The TransportShipExecution was refunding the troops when max boat limit
was hit, but the troops were never deducted in the first place, giving
extra troops.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-23 08:43:47 -07:00
Scott Anderson ad720000f3 Update CODEOWNERS (#1529)
## Description:

Rename `core-contributor` to `review-approver`.

## 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
- [ ] I have read and accepted the CLA aggreement (only required once).
2025-07-22 21:11:28 -04:00
evanpelle ed6fca8ac2 add new otel vars to release.yml (#1527)
## Description:

Add new vars to migrate to Grafana Cloud

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
v0.24.3
2025-07-22 13:09:46 -07:00
evanpelle ba421abec2 deploy bugfix: comments not allowed in .env file (#1525)
## Description:

Accidentally added comments to .env file, causing parsing issues.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-22 12:19:49 -07:00
evanpelle 13a717e569 fix server memory leak (#1524)
## Description:

After v24 release, the server had has a bad memory leak, causing worker
memory to rise to 1gb after ~12 hours.

I believed this is caused by not removing listeners on websocket when
kicking a client.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-22 11:26:26 -07:00
evanpelle 042e105fea Add CLA badge (#1523)
## Description:

Add CLA badge to README

## 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
- [ ] I have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-22 10:33:43 -07:00
evanpelle 9a39475e4b Move CLA link to README (#1522) 2025-07-22 10:21:03 -07:00
evanpelle b4d4c03eb6 update CLA to link to gist 2025-07-22 10:07:26 -07:00
evanpelle 49e1281e18 pass in otel secrets in github deploy workflow 2025-07-21 16:40:10 -07:00
evanpelle 6ac0c307d4 Pass new env vars for grafana cloud (#1520)
## Description:

Using new OTEL env vars for grafana cloud

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-21 16:28:08 -07:00