Commit Graph

1723 Commits

Author SHA1 Message Date
Ghis fd193d2190 Fix non valid SafeString flag codes (#1135)
## Description:
Removed unicode in the following flag file names to prevent error, which
lead to not be able to start a game with it.

- Ceará
- 1_Northern Uí Néill
- Pará
- São Paulo
- 1_Southern Uí Néill

related to https://github.com/openfrontio/OpenFrontIO/pull/1133

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

ghisloufou
2025-06-10 16:10:50 -07:00
Scott Anderson 786f4807b3 Move version and changelog to files (#1109)
## Description:

Move these assets to files so that they can be replaced with generated
assets in the future.

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

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-10 16:10:50 -07:00
evanpelle eb9f2cba59 counter attack doesn't cancel out attack (#1132)
## Description:
Instead of a counter attack cancelling out the initial attack, both
attacks run concurrently. This results in a more dynamic frontline.

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

<DISCORD USERNAME>
2025-06-10 16:10:50 -07:00
evanpelle bd58b28e43 use newer attack, delete existing attack (#1134)
## Description:
Also when a new attack is sent when there's an existing attack, have the
new attack delete the existing attack. This causes attack to "reset" and
use the entire border when a new attack is sent.

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

<DISCORD USERNAME>
2025-06-10 16:10:49 -07:00
VariableVince 8c12c572a4 Fix Māori flag name (#1133)
## Description:

Removed unicode in Māori flag file name to prevent error, which lead to
not be able to start a game with it.

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

tryout33
2025-06-10 16:10:49 -07:00
Scott Anderson dccf2b3866 Avoid using as to cast values (#1115)
## Description:

- Use `<argument> is <type>` return type declarations in favor of `as`.
- Use `satisfies` instead of `as`.

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

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-10 16:10:49 -07:00
evanpelle e45840c4cf increase nuke speed from 4 to 6 (#1125)
## Description:
Since nukes take a curved/longer paths nukes take too long to reach
their target. This PR increases their speed by 50%.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-06-10 16:10:49 -07:00
its-sii 0614a7b271 Adding unit info modal translation support. (#1122)
## Description:
Adding translation support for unit info modal. 
## 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

Regression test to make sure UI is still displaying as expected

![image](https://github.com/user-attachments/assets/bad18084-a4bb-479c-a3dd-74c9c541fdb0)

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

sii
2025-06-10 16:10:49 -07:00
evanpelle 0ff4ff25b7 fix duplicate websocket handler (#1124)
## Description:
Turns out ws.on adds a new listener, it doesn't remove the existing
listener. so it turns out we had both worker & game server listening to
messages. this only got noticed because we close web socket connection
on parsing failure.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-06-10 16:10:49 -07:00
Christopher Mesona 892a6552d4 fix: correct mac modifier and emoji key detection in input handler (#1118)
## Description:

Fixes Command and Option Keys for Mac. Shows this modification in help


![image](https://github.com/user-attachments/assets/81f884c2-6929-48cf-a8e5-3fde6290df34)

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

George

Co-authored-by: cmesona <christopher.mesona@ubisoft.com>
2025-06-10 16:10:49 -07:00
VariableVince 515b9efa42 Optimizations for botbehaviour (#1114)
## Description:

Some optimizations for bot & fakehuman execution. Better performance
measured using profiling, at the start of a game or in singple player,
but since the circumstances differ it is not a very reliable comparison.

--- In BotExecution:
Added getNeighborTraitorToAttack in Botbehavior to use in maybeAttack.
No caching for playerNeighbors array, because although it could be
re-used up to two times in selectRandomEnemy, maybeAttack runs every
tick and selectEnemy only every 10 seconds so the cache overhead would
not be worth it.

--- In Botbehavior:
Put repeated code in dedicated functions for readability, maintainance
ease, and reduce the chances of forgetting to update the timestamp for
enemyUpdated. Can be seen as a follow-up to PRs #434 and #946.

-- In both selectEnemy and selectRandomEnemy: 
Put the first if this.enemy === null statement parenthesis, around the
two checks below. Because if there's already an enemy (if forgetEnemies
hasn't nullified it, enemy === null is false at the first if statement),
then enemy === null will still be false for the two checks below the
first. No need to check it thrice then. Once inside the first if
statement (when enemy === null is true), then we need to check it two
times more in case the code inside already set an enemy.

-- In selectEnemy under 'Prefer neighboring bots': 
Removed unneccessary check for enemy === null.
Replaced sort with more performant for loop.

-- In selectRandomEnemy:
Under 'Select a traitor as an enemy', if a traitor is a friendly player,
they got less odds to be chosen as enemy over an unfriendly player, but
they weren't ruled out. While below in the Sanity Check, we specifically
rule out friendly players as enemy and set enemy=null. So excluded
friendly players under 'Select a traitor as an enemy' instead of only
giving them lower odds.

Use the new shared method getNeighborTraitorToAttack.

-- In checkIncomingAttacks, since we're only interested in the max
value, replaced sort with loop that makes a single pass through the
attacks to find the largest one.

-- For shouldAcceptAllianceRequest, #1049 added tests and improved
readability of Alliance requests.

It may have also deoptimized it a bit. Const notTooManyAlliances would,
in the past, not be computed if requestorIsMuchLarger was already found
to be true. Since the readability changes, tooManyAlliances was always
computed regardless of the value of requestorIsMuchLarger.

This PR attempts to address this too, while still keeping it as readable
hopefully.

Also choose for early returns to optimize a bit more. So if isTraitor is
true, don't compute any further and just return false immediately etc.

Switched the order of testing for noMalice and isTraitor. Traitor status
used to be throughout the game, now it's only 30 seconds or will be
maybe 45 seconds to 1 minute. So the chances of someone asking for
alliance and being a traitor at the same time have decreased. isMalice
chances could be bigger.

Removed the named constants and choose to put them in comments, so
readability should be about the same as #1049 intended. Kept the braces
for the if statements because otherwise Prettier would misalign the
comments.)

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

tryout33
2025-06-10 16:10:49 -07:00
Doo 9e26326cd3 Remove duplicate gold accumulation in team stats calculation (#1010)
## Description:

Gold was counted twice.

Fixing issue https://github.com/openfrontio/OpenFrontIO/issues/1009

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

.doo

---------

Co-authored-by: rldtech <r.le-disez+oplab@groupeonepoint.com>
Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-10 16:10:49 -07:00
evanpelle a61dfeb1e4 cloudflare fixed tunnel name (#1096)
## Description:
The binary created a new tunnel on startup, and if the container crashed
looped, then it would generate 100s of tunnels causing us to reach the
1000 tunnel limit.

Now the config is stored on a mounted volume, so if the container
restarts it sees the existing config and does not create a new tunnel.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-06-10 16:10:49 -07:00
VariableVince 4709fc31c5 Fix: Hide username validation error in-game (#1110)
## Description:

Empty username results in error box "Username must be at least 8
characters long.".

You can't open single player or private lobby modals, but you can still
join a public lobby. Your player name will then be "xxx".

The error box isn't hidden in-game however. This fixes it.

BEFORE

![Before
1](https://github.com/user-attachments/assets/8233749f-e625-41d6-8aef-f42e033c7c63)

![Before
2](https://github.com/user-attachments/assets/26a21669-1a86-4d1d-9f2c-1b208a503c4c)

AFTER


![After](https://github.com/user-attachments/assets/14a05491-cf05-46eb-ab8e-9847cd7cf094)

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

tryout33
2025-06-10 16:10:49 -07:00
Scott Anderson 9d937d727e Fix bug in FakeHumanExecution (#1102)
## Description:

Fix a bug causing an exception to be thrown which crashes the game.

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

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-10 16:10:49 -07:00
Max Lundgren afd42d9b24 Add filters tabs to EvensDisplay to let users filter events (#1080)
## Description:
Big update to the EventsDisplay

- Style update for EventsDisplay, look & feel similar to other windows
- Component now hidden during spawn phase
- Adds new functionality for filtering events by category. Allows the
player to remove specific event types
- Displays latest gold amount, decays after 5 seconds

<img width="1147" alt="Screenshot 2025-06-07 at 20 18 55"
src="https://github.com/user-attachments/assets/11c39818-55ad-4ba1-a998-360057e2856c"
/>

<img width="422" alt="Screenshot 2025-06-07 at 19 01 55"
src="https://github.com/user-attachments/assets/09c0b998-6046-49fb-9fba-33b4f57f337b"
/>

<img width="444" alt="Screenshot 2025-06-07 at 20 20 25"
src="https://github.com/user-attachments/assets/022deadc-3a49-442a-85f5-f1cd128a5805"
/>

![Screen Shot 2025-06-07 at 20 32
07](https://github.com/user-attachments/assets/d8575ea0-109d-4841-b661-b233201a304a)



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

maxion_


Fixes #1025 
Fixes #1034
2025-06-10 16:10:49 -07:00
Scott Anderson fd5a463b66 Nations can spawn cities without a port (#1072)
## Description:

Allow nations to spawn cities even if they do not have a port.

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

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-10 16:10:49 -07:00
evanpelle a4e508d3d4 Disable donations public ffa matches (#1097)
## Description:
Some players have created a script to auto donate to themselves. So we
should disable donation in public ffa matches.

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

<DISCORD USERNAME>
2025-06-10 16:10:49 -07:00
evanpelle ebbf4dd5e5 refactor radial, fix boat on terra nullius not working fixes (#1095)
## Description:
refactor the MenuElements to be more decoupled by passing in MenuParams.

Fix boat not working on terra nullius.

fixes #1088

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

<DISCORD USERNAME>
2025-06-10 16:10:49 -07:00
Max Lundgren a084f35c2d rename Event interface -> GameEvent (#1094)
## Description:
Rename the `Event` interface `GameEvent` as `Event` shadows the browser
API `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
- [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:

maxion_
2025-06-10 16:10:49 -07:00
Max Lundgren 28af93b55d #1086 prevent clicking on other structures than your own (#1087)
## Description:
Prevent opening UnitInfoModal for other structures than your own

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

maxion_
2025-06-10 16:10:49 -07:00
Max Lundgren 3d5ff8c9b4 Add back #646 - trade ship gold by travelled distance (#1085)
## Description:
Return #646 - gold from tradeships by travelled distance

https://github.com/openfrontio/OpenFrontIO/pull/646/

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

maxion_
2025-06-10 16:10:49 -07:00
E-EE-E af2fa309d9 Update PlayerImpl.ts (#1079)
## Description:
The removeTroops function works with the given parameter value of 1.

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

<DISCORD USERNAME>
_bjkim_
2025-06-10 16:10:49 -07:00
evanpelle 2d21e4fa20 kick existing client when duplicate persistent id is found (#1077)
## Description:
Kick the existing client instead of the new client because this was
causing issues with replays. Players were unable to replay a game if
they were a player.

## 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
2025-06-10 16:10:49 -07:00
VariableVince eb857875e7 Fix broken flag images (#1078)
## Description:

Some flag images are missing from the flag menu, and can thus not be
used as a flag by the player in the game.

This this fixes that by equating the names in countries.json to the
filenames of the flags.

Example of missing flag image from before this fix:


![afbeelding](https://github.com/user-attachments/assets/ec7aecdc-ee69-4852-98f9-14f3dc05febc)


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

tryout33
2025-06-10 16:10:49 -07:00
oleksandr-shysh 8a1eeacafd Multi-level radial menu (#1018)
## Description:

- Refactored the radial menu to enable multi-level functionality.
- Organized the actions into submenus.

<img width="192" alt="Знімок екрана 2025-06-03 о 16 33 24"
src="https://github.com/user-attachments/assets/6dae9792-bcae-4fc9-8ce4-1203d0efbfac"
/>
<img width="313" alt="Знімок екрана 2025-06-03 о 16 34 17"
src="https://github.com/user-attachments/assets/5d78098f-b05b-40c4-bd70-8f2e3c08da2b"
/>
<img width="308" alt="Знімок екрана 2025-06-03 о 16 40 22"
src="https://github.com/user-attachments/assets/01b00906-9e8b-47e9-8f97-cfd3c023c352"
/>
<img width="277" alt="Знімок екрана 2025-06-03 о 16 37 04"
src="https://github.com/user-attachments/assets/60718c5b-8544-43e6-b891-2833d7fb789a"
/>
<img width="353" alt="Знімок екрана 2025-06-03 о 16 36 32"
src="https://github.com/user-attachments/assets/8c35a0f8-5588-470f-8af4-8e6d4ba66d88"
/>


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

oleksandr037617_47021

---------

Co-authored-by: Oleksandr Shysh <oleksandr.s@develops.today>
Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-10 16:10:49 -07:00
VariableVince ad2928e084 Duo partner SP always same: randomize players before team assignment (#1051)
## Description:

See report here:
https://discord.com/channels/1284581928254701718/1378762423175221319

In Singleplayer Teams > Duos, your duo partner will be the same every
time. In World map for example, it will always Norway.

Fix: randomizing Nation players before their team assignment. This is
done for all Team modes in Singleplayer and Multiplayer.

Other behaviour is unchanged. Clan-players keep their own assignment
logic, and Human non-clan player assignment stays the same. The human in
singleplayer Duos mode lands in Team 1 everytime but with a different
Nation as other team member.

BEFORE
![Before SP Duos
modal](https://github.com/user-attachments/assets/78628b06-d621-4203-86ae-046e081a46fb)

![Before SP Duos always Team
1](https://github.com/user-attachments/assets/6e7ec19c-b1e5-4642-beb9-93b723a27618)

![Before SP Duos always Team 1 always Norway team
member](https://github.com/user-attachments/assets/34794d16-ce90-43ca-a5c2-9827e7c944f5)


AFTER

![After SP Duos Team 1 random duo
partner](https://github.com/user-attachments/assets/5a1d7d6a-74f2-472f-a0ff-ad94e9ae80bd)


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

tryout33
2025-06-10 16:10:49 -07:00
evanpelle 8192fe1cfe fix cloudflare tunnels (#1076)
The Server didn't have correct permissions to create the directory for
the cloudflare config. Have docker do it instead. Also the credentials
file key was incorrect.
2025-06-10 16:10:49 -07:00
Scott Anderson fcc2574ffc bug: logout (#1073)
Fixes #1069

## Description:

Fix logout bug by wrapping ternary expression.

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

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-10 16:10:48 -07:00
tnhnblgl 9798aff8db Add Boat hotkey (#1060)
## Description:
Pressing B to fast boat

![Screenshot_2025-06-06-09-32-53-865_com android
chrome](https://github.com/user-attachments/assets/cdd4aefe-0088-4334-bf69-7cf3b32b6db6)

## 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:
dovg
2025-06-10 16:10:48 -07:00
evanpelle 585e3a945b have master create tunnels for all workers #780 (#1042)
## Description:
We want to move away from using nginx to cloudflare to route among
workers. This will simplify the nginx config, move routing computation
off the server, and make it easier to implement a multi-host
architecture.

The worker tunnels are not currently used.

I also moved the tunnel creation from startup.sh to Server. The shell
script was getting too complex.


## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

evan
2025-06-10 16:10:48 -07:00
Théodore Léon 9f9fa9ca8b Monitoring client connections (#941)
## Description:
Disconnected client detection :
If a client haven't send a ping to the server since more than 30 seconds
They will then be marked disconnected with a dedicated icon.
No action are yet taken, this allows for extensive in-game test before
adding the *consequences* of the player leaving the game.
I also added extensive unit tests, lessening the risk of regression for
the future.


![image](https://github.com/user-attachments/assets/884e5e99-15e8-4544-bd52-7524542cc82a)



## 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:
theodoreleon.aetarax

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-10 16:10:48 -07:00
evanpelle 936df2b171 format code with prettier 2025-06-10 16:10:48 -07:00
Léo Joly 55206ca41f [Cleanup] Pass Player into execution constructor instead of PlayerID (#1022)
## Description:
Answering issue:  #1017 
[Cleanup] Pass Player into the execution constructor instead of PlayerID

I have tested the changes running and playing a full game. I do not know
other way to test the changes, please inform me ❤️

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

Lele

---------

Co-authored-by: lva <lva@rovsing.dk>
2025-06-10 16:10:48 -07:00
Arnaud Moreau 080cf8f3f8 Improve readability of alliance acceptation logic for bots and add tests (#1049)
## Description:
The method deciding whether bots should accept an alliance used to use
multiple variables with negated names (notTraitor, notMalice,
notTooManyAlliances). For readability, I have negated their value in
order to given them a positive name (isTraitor, hasMalice,
tooManyAlliances).

I have also added tests for the alliances acceptation/rejection behavior
of bots.

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

Discord: nephty
2025-06-10 16:10:48 -07:00
Max Lundgren dd45f64953 Show alliances on the PlayerPanel (#1053)
## Description:
Added a list of Alliances to the PlayerPanel. Displays `None` if player
has no Alliances

<img width="272" alt="Screenshot 2025-06-05 at 19 55 26"
src="https://github.com/user-attachments/assets/1378a56b-5033-45fa-b173-6b17054d40a3"
/>
<img width="318" alt="Screenshot 2025-06-05 at 19 54 41"
src="https://github.com/user-attachments/assets/4d931cef-67a0-4dc9-a02c-13b0cce46864"
/>
## 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:

maxion_
2025-06-10 16:10:48 -07:00
Scott Anderson 51164ad138 AI nukes avoid SAM launchers (#1045)
## Description:

AI nukes avoid SAM launchers

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

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-10 16:10:48 -07:00
evanpelle 1c1026451f removed unused import to fix prettier error 2025-06-10 16:10:48 -07:00
DevelopingTom cff708c0b4 SAMs should target only nukes aimed at nearby targets (#1038)
## Description:

Currently, SAMs target any nuke within range. This can be frustrating
when a random SAM from another player intercepts your nuke, especially
since nukes follow a curved trajectory, leaving little room to adjust
their path.

This change modifies how SAMs intercept nukes: they will now only target
those whose impact points are near the SAM.
The “target range” is still generous, allowing players to defend against
Hydrogen bombs, while preventing random SAMs to intercept your valued
nukes.

In this example, the target was the opponent missile silo:


https://github.com/user-attachments/assets/0d8be2ac-e04d-44a4-a67e-54836cce8899



## 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-06-10 16:10:48 -07:00
Scott Anderson 5adeb8ab17 Close socket on ClientMessageSchema, improve zod error (#1003)
## Description:

- Close the socket on parse failure.
- Use `safeParse` and `prettifyError` to improve logging output on zod
validation failures.

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

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-10 16:10:48 -07:00
Andrew Niziolek d5e055d6f4 Rev: Update "Japan and Neighbors" map to "East Asia" (#1007)
**Closes Issue #1001.**

_Will require updates to translations for each language but English is
in place as are pointers to relevant map files and thumbnails._

## Description:
All assets and references to the Japan and Neighbors map have been
updated to reflect East Asia.

**New Behavior**
![East Asia
Map](https://github.com/user-attachments/assets/64192590-bbb7-4408-a99b-7455de295d2b)

**Old Behavior**
![Japan and Neighbors named
map](https://github.com/user-attachments/assets/ba44dd56-1470-4c74-a70d-bd7fd8f3c795)

Game test is functioning. Other languages will need to be updated for
their displayed text to align.

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

ajaxburger
_My git name is included in my nickname on the server._

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-10 16:10:48 -07:00
Demonessica fa14fc43bb Center map on start (#1013)
## Description:
- Adds logic to hard-set the transform handler directly to a new
position, without a movement animation
- Implements #1004

![image](https://github.com/user-attachments/assets/e7298f33-fd8f-4828-94f7-2422c8e5cdb0)

![image](https://github.com/user-attachments/assets/6177c164-da68-47c3-9fc5-1c445027b881)

![image](https://github.com/user-attachments/assets/c0580034-0c7d-48b5-96f8-0d84fcb0f738)


- removed a second initialization of the TransformHandler to prevent
transformation desyncs between layers. Incidentally this probably fixes
#62

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

demonessica

---------

Co-authored-by: tnhnblgl <51187395+tnhnblgl@users.noreply.github.com>
2025-06-10 16:10:48 -07:00
falc e952c122b0 Changed consolex to console logging (#1036)
## Description:
Changed from consolex to console
## 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:

@qqkedsi
2025-06-10 16:10:47 -07:00
evanpelle 8912e4a68c attack based on density 2025-06-03 21:07:42 -07:00
Scott Anderson a02037ae1c Fix discord login issue (#1028)
Fixes #1016

## Description:

Fix the zod user schema validation to make roles optional. This was
causing a validation error when looking up the user's roles.

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

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-03 19:33:35 -07:00
evanpelle 270244c835 ensure that player records maintain the same order as in start info, this caused replay issues, as players were assigned to the wrong team 2025-06-03 17:35:00 -07:00
evanpelle 4eff20b502 bugfix: checking is socket was null broke hash verification on replay 2025-06-03 17:34:19 -07:00
evanpelle f5a561398c page.redirect was not a function, causing the url not to redirect. als remove the # check so we are no longer serving ads 2025-06-03 16:37:19 -07:00
falc b29cc56abc added ratio controls (#963)
## Description:
added custom controls for attack ration to user setting
## 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:

@qqkedsi
![Screenshot from 2025-05-31
01-18-30](https://github.com/user-attachments/assets/2460aab2-51ef-46d9-9d05-53e84dd57b29)

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-03 15:54:54 -07:00
Doo 2151d267fa Fixnukeboatbug (#1011)
## Description:
Fixes : https://github.com/openfrontio/OpenFrontIO/issues/958
Use the actual troop count on the boat unit when it lands, not the
original this.troops value.
Tested locally with all nukes type and it works fine.



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

.doo

---------

Co-authored-by: rldtech <r.le-disez+oplab@groupeonepoint.com>
Co-authored-by: tnhnblgl <51187395+tnhnblgl@users.noreply.github.com>
2025-06-03 07:22:13 -07:00