Commit Graph

2750 Commits

Author SHA1 Message Date
evanpelle fa9259b1fc don't show train tracks when zoomed out (#2131)
## Description:

When zoomed out the tracks don't alias well and makes the map too busy.

## Please complete the following:

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

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

evan
v0.26.0-beta1
2025-10-02 17:31:48 -07:00
Gabe Kauffman 5b36c02ff0 Implement a "ka-ching" sound effect on kill (#2097)
## Description:
Building off of [this
PR](https://github.com/openfrontio/OpenFrontIO/pull/2090) which
implemented music, I extend this functionality to add sound effects.
Diff will be reduced if and when that PR gets merged!

I think the game would benefit from more sound effects, and adding a
"ka-ching" sound effect on kill seems like an easy place to start.

The ka-ching sound effect was found
[here](https://freesound.org/people/AKkingStudio/sounds/684165/) and is
licensed under Creative Commons.

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

Demo video with sound:

https://github.com/user-attachments/assets/18c857a4-a741-492a-bbc1-68d4f3ba38da


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

---------

Co-authored-by: icslucas <carolinacarazolli@gmail.com>
2025-10-02 16:27:06 -07:00
Aotumuri ed062c9dbc Add test for nation name length and fix names exceeding 27 chars (#2122)
## Description:

Added tests/NationNameLength.test.ts to enforce nation name length ≤27.
Updated manifest.json files in resources/maps with shorter names to pass
the test.
This fix ensures that names will no longer be truncated

Examples of country names that are too long and have their endings cut
off
<img width="231" height="331" alt="スクリーンショット 2025-10-01 10 51 40"
src="https://github.com/user-attachments/assets/8c4611ab-f97b-4606-9834-7816dbd1ee8d"
/>

### Changes
- Replaced overly long country names with shorter common forms:
  - "The Democratic Republic of the Congo" -> "DR Congo"
  - "Democratic Republic of the Congo" -> "DR Congo"
  - "Lao People's Democratic Republic" -> "Laos"
  - "Federated States of Micronesia" -> "Micronesia"
  - "People's Democratic Republic of Algeria" -> "Algeria"
  - "People's Republic of Algeria'" -> "Algeria"


## 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-02 12:58:02 -07:00
Vivacious Box 311d43ab4f Build bar (#2059)
## Description:

Make the unit display bar a proper unit build bar
Add shortcuts for all structures and units
Add ranges for ranged structures and units
Changed the shortcuts to use the key instead of the code for
internationalization purposes


![buildbar](https://github.com/user-attachments/assets/6407dc9c-14b4-40cc-8faa-cdd9e88c9fd2)
<img width="285" height="517" alt="image"
src="https://github.com/user-attachments/assets/91bb01e6-e48c-4255-ace1-306af9cdc25b"
/>

## 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: evanpelle <evanpelle@gmail.com>
Co-authored-by: icslucas <carolinacarazolli@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-02 12:38:28 -07:00
Abdallah Bahrawi 6061c97d78 Fix nations break alliance too ealry bug (#2123)
## Description:
Betrayal was being considered too early (inside shouldAttack), causing
alliances to break before calling attackChance.

## 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-02 11:59:06 -07:00
evanpelle 2c67d2b7bf fix staging deployment - remove nbg1 (#2128)
## Description:

nbg1 host was removed causing the ssh-keyscan to fail which failed the
deployment.

## 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-01 14:51:57 -07:00
evanpelle bc5f18dee8 Hide skins & account login if in iframe (#2126)
## Description:

CrazyGames doesn't allow purchase (must be integrated into their sdk),
so disable it on iframe for now.

## Please complete the following:

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

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

evan
v0.25.21
2025-10-01 12:05:10 -07:00
evanpelle 30856341cd Revert "fix: traitor bug when attacking immediately after initiating an alliance (#2044)"
This reverts commit 6f96788406.
v0.25.20
2025-09-30 15:03:46 -07:00
evanpelle a54af870c2 Updateadstxt (#2121)
## Description:

Update ads.txt

## 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.25.19 v0.25.18
2025-09-30 13:18:03 -07:00
icslucas b31200a3ac MUSIC (#2090)
## Description:
add music to the game
Describe the PR.
add music
<img width="549" height="770" alt="image"
src="https://github.com/user-attachments/assets/d8457d85-6f63-4024-8b69-572f8c9bb225"
/>

## Please complete the following:

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

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

Lucas
2025-09-30 11:13:32 -07:00
Aotumuri d48801d3d7 Enable ESLint rule no-case-declarations (#2113)
## Description:

This PR enables the ESLint rule `no-case-declarations`.
Fixes #1791 

The issue was already assigned, but since there hasn’t been any activity
for about a month, I decided to open this 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

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

aotumuri
2025-09-30 11:11:44 -07:00
Aotumuri 9e9d689175 mls (v4.6) (#2120)
## Description:

mls for v26
Version identifier within MLS: v4.6

## 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-09-30 11:10:34 -07:00
Aotumuri e96d58ab40 Hide dead players from the leaderboard (#2114)
## Description:

Update leaderboard logic to exclude dead players. 
Players (including myPlayer) are only shown if alive.


https://github.com/user-attachments/assets/0a5c0422-4844-41ae-ae0b-3d7d8473491c

## 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-09-30 11:10:17 -07:00
Daniel Popsuevich d16accafef Revoking alliances request during nuke (#2101)
Closes #2071 


## Description:

- Created Functional Test for scenario
- Added an alliance revoker function to 'NukeExection'

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

dpop
2025-09-28 17:56:09 -07:00
Aotumuri 2450ef29ca remove unused map-generator/generated directory (#2107)
## Description:

This PR removes the `map-generator/generated` directory to avoid
confusion.


The current map generation process (`map-generator/main.go`) outputs map
data to:
  - `../resources/maps` (for normal maps)
  - `../tests/testdata/maps` (for test maps)
The `generated` directory is not used anywhere in the current codebase.

Keeping the unused `map-generator/generated` directory may cause
confusion for contributors or users who expect it to be part of the
active map pipeline. Removing it clarifies that only `resources/maps`
and `testdata/maps` are valid output directories.

No functional changes are introduced.
## 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-09-28 17:52:28 -07:00
Aotumuri 62e223a4e9 Keep Lobby ID bar sticky at top of modal (#2108)
## Description:

This PR adjusts the HostLobbyModal so that the lobby ID bar stays
visible at the top of the modal when scrolling.
Fixes #2082 


https://github.com/user-attachments/assets/273b6ebe-3538-4489-b771-67261f7642f8


In this PR, when the ID box became sticky, the background sometimes made
the ID hard to read.
To fix this, I made the background color slightly darker for better
visibility.

## 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-09-28 17:51:54 -07:00
Aotumuri f9cee20b98 Add missing translation keys for performance overlay enabled/disabled (#2110)
## Description:

This PR adds the missing translation keys
(performance_overlay_enabled and performance_overlay_disabled)

## 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-09-28 17:51:19 -07:00
Aotumuri 30a67b626e Remove duplicate CSS rules to improve maintainability (#2111)
## Description:

This PR removes duplicate CSS rule definitions.

.lobby-id-box - Removed duplicate definition, keeping the version with
appropriate margin
.options-section - Consolidated identical duplicate definitions
.option-title - Merged duplicate rules with same styling
.players-list - Removed redundant duplicate definition
.chat-column - Kept the updated version with min-width: 140px

## 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-09-28 17:50:57 -07:00
Aotumuri 623d6557e3 Add Japan map (#2106)
## Description:

This PR adds a new Japan map.

<img width="975" height="967" alt="スクリーンショット 2025-09-28 18 06 11"
src="https://github.com/user-attachments/assets/5ef06c1a-f020-4109-a5df-3cba7a9a074f"
/>

## 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-09-28 17:50:22 -07:00
evanpelle f744788793 create proprietary directory (#2112)
## Description:

Assets in the proprietary directory are copyrighted by OpenFront.

## 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-09-28 17:47:05 -07:00
DevelopingTom c2cf2ce65f Record player deaths (#2102)
## Description:

Record player death ticks and "conquests" (when a player has < 100
tiles).
Tournaments would be easier to manage with those information.

Related infra PR: https://github.com/openfrontio/infra/pull/196

Tested locally with docker/infra repo

## 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-09-27 15:52:50 -07:00
Aotumuri 0843f99b5b use pull_request_target for auto-assign (#2100)
## Description:

With pull_request, the default GITHUB_TOKEN has read-only permissions on
forked PRs.
As a result, the auto-assign action (toshimaru/auto-author-assign)
failed with:

```
Error: Resource not accessible by integration.
```

Using pull_request_target allows the workflow to run with write
permissions on the base repository, enabling author assignment even for
PRs opened from forks

## 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-09-27 15:48:21 -07:00
Aotumuri 6f0c1d33cc Fix wrong og:image path (#2099)
## Description:

The OpenGraph image in index.html was pointing to
/resources/images/GameplayScreenshot.png, which does not exist.
Updated to /images/GameplayScreenshot.png so that preview thumbnails
display correctly on social platforms.

## 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-09-27 15:31:00 -07:00
evanpelle 2b29dfbb9a show steam wishlist on WinModal 25% of the time 2025-09-26 16:01:40 -07:00
Abdallah Bahrawi 6f96788406 fix: traitor bug when attacking immediately after initiating an alliance (#2044)
This PR fixes a critical race condition bug where players could
unintentionally receive the traitor debuff when alliance requests were
accepted mid-attack.

Critical Bug Fixes #1866

**Root Cause:**
Players could bypass UI alliance checks ( isFriendly() ) by accepting
alliances and immediately attacking after that, causing the server to
treat the attack as betrayal
Solution: Added server-side alliance validation in
AttackExecution.init()
This ensures attacks on allies are blocked at the server level.

- Once Bots and Nations decide to attack, they breaks the alliance. I
added maybeConsiderBetrayal(), which currently always returns true. I’ll
add proper logic for alliance-breaking soon on another PR; this didn’t
exist in the code before.

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

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-09-26 15:53:32 -07:00
evanpelle fdb05bf777 Merge branch 'v25' 2025-09-26 10:53:57 -07:00
Abdallah Bahrawi 633556effe fix: implement lazy loading for flag images and clean CSS (#1843)
Flags are now only rendered and fetched when the modal is actually
opened
Additionally, duplicate Tailwind CSS classes have been cleaned up.

- [x] I have added screenshots for all UI updates
No visible UI changes
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
No new user-facing text
- [x] I have added relevant tests to the test directory
No new tests needed for this UI rendering change.
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
regression is found:

abodcraft1
2025-09-26 10:39:12 -07:00
Aotumuri d3fb7544b8 Add discord-user-header (#2084)
## Description:
This PR adds a component to display a Discord user’s avatar and name.
It will not be directly visible in this PR, but in other PRs it will be
shown together with the modal for viewing stats.

It should look like this:
<img width="145" height="67" alt="スクリーンショット 2025-09-23 9 48 04"
src="https://github.com/user-attachments/assets/dd1b3abe-66e5-4961-8e7a-66c1f968a9a6"
/>

## 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-09-25 16:58:01 -07:00
evanpelle 5d9b62da4d add compact map option (#2095)
## Description:

Create mini map option
<img width="741" height="234" alt="Screenshot 2025-09-25 at 4 47 47 PM"
src="https://github.com/user-attachments/assets/6c442698-8e3b-44d5-b07e-c4f0a916c3bc"
/>

## 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-09-25 16:51:25 -07:00
Aotumuri 110a255265 Add player-stats-table (#2088)
## Description:

This PR adds the player-stats-table component, which displays a player’s
statistics in a structured table format.
It focuses on presenting core stats such as building stats, Player
Metrics and more.

The component will later be integrated into the player modal so that
users can view detailed stats alongside other profile information.

It should look like this:
<img width="597" height="386" alt="スクリーンショット 2025-09-23 10 16 59"
src="https://github.com/user-attachments/assets/9ae07a25-982f-45c4-9bf5-21c8b90d4fae"
/>
<img width="551" height="644" alt="スクリーンショット 2025-09-23 10 17 13"
src="https://github.com/user-attachments/assets/1bdbca32-be2f-4c3a-b172-d11914b9a3cf"
/>
<img width="525" height="219" alt="スクリーンショット 2025-09-23 10 17 41"
src="https://github.com/user-attachments/assets/7da45a98-8602-4b25-b455-c51319752de9"
/>


## 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-09-25 12:49:22 -07:00
evanpelle 8419cc7ccd fix donation not set on singleplayer (#2093)
## Description:
Bug: Donation to nations was not allowed in single player mode.

Always allow donation to Nations. Simplify the donation check logic.

## 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-09-24 14:35:58 -07:00
Aotumuri ff0d614b1e Add game-list (#2087)
## Description:
This PR adds the game-list component, which displays a player’s recent
games.
It provides basic functionality such as toggling details and viewing a
specific game, but does not yet include full UI integration.

In later PRs, this component will be shown together with the modal for
viewing player stats.

It should look like this:
<img width="443" height="393" alt="スクリーンショット 2025-09-23 10 04 19"
src="https://github.com/user-attachments/assets/0820acfc-ba61-4629-9c1b-5971458d4bb4"
/>

## 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
https://github.com/openfrontio/OpenFrontIO/pull/1758
2025-09-24 11:11:18 -07:00
John Harkendorff 7a31cd5037 Incoming nuke event filter (#2092)
## Description:

I have found most attack information to not be very useful, particularly
during the late game when MIRVs are flying and cities and ports are
being gained/lost by the hundreds.

However, even in these circumstances I would still like to see incoming
nuke messages.

Attacks filtered out, incoming atom bomb message still appears:
<img width="425" height="166" alt="Screenshot 2025-09-24 at 12 13 07 AM"
src="https://github.com/user-attachments/assets/242f4552-4509-487a-8ac2-bdd7f9cd1d40"
/>

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

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

JohnnyBravo13
2025-09-24 11:09:44 -07:00
Will Dunlop eeb9f0c279 add target visualization for boat attacks (#2025)
## Description:
- Adds warship count, transport count (deployed out of maximum) to unit
display
- Adds a target that appears when a boat attack is dispatched, which
disappears when the boat attack arrives
- Updates the unit display alt text to pass through translation

## Please complete the following:

- [X] I have added screenshots for all UI updates (see below)
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file (in this case it is only alt-text)
- [X] I have added relevant tests to the test directory (n/a, fully
visual)
- [X] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

See new target effect and addition to units display 

As each transport ship arrives, the target draw stops, together with the
effect for the trail.


https://github.com/user-attachments/assets/c36c57d3-e2b7-456e-85ab-1e786bd28a07

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

@dxtron_28992 (my invite is still pending to dev discord)
2025-09-24 11:08:52 -07:00
Franz Vrolijk 019a9dc57c Fixed terrain layer not rendering properly in Firefox (#2083)
## Description:

Fixed terrain layer not rendering properly in Firefox.

- Resize the canvas before working with pixel data
- Changing canvas size (even to the same size) clears the buffer, so
getImageData() taken before resize isn’t valid for putImageData()
(Firefox seems to be more strict in enforcing this than Chrome)

- Replaced getImageData() with createImageData() since the cleared
canvas has no pixel data to read anyway

Before:
<img width="1911" height="1289"
alt="{39DC7F5A-A01C-4D1A-94C5-6DE7A73E6F66}"
src="https://github.com/user-attachments/assets/23f80289-5331-429a-85df-7c330cf8b42b"
/>

After:
<img width="1898" height="1286"
alt="{4D330565-E6F2-4AFC-8191-7E7DB36E065B}"
src="https://github.com/user-attachments/assets/acf62391-3123-4d55-a5ca-fb20f48f2d41"
/>

## 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 **(not
relevant)**
- [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:

franz4557
2025-09-23 16:56:35 -07:00
Tristan b09fc88453 opti : Compress all images losslessly from 140Mo to 30Mo (#2063)
## Description:

Compress all images (.png, .svg, .webp) losslessly from 140Mo to 30Mo.

To confirm : find . -type f \( -iname "*.png" -o -iname "*.svg" -o
-iname "*.webp" \) -exec du -ch {} + | tail -n1
Before : 140M 
Now : 30M

## Please complete the following:

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

Iron_Mine : (300612003138109451)
2025-09-22 10:08:57 -07:00
Duwibi a2d19198a7 Fix the Strait Of Gibraltar map (#2080)
## Description:
This PR fixes the rivers not showing up on the map in-game.

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

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

DISCORD_USERNAME
Nikola123
2025-09-22 09:41:31 -07:00
Duwibi 3f4f5b195b Add Montreal (#2081)
## Description:
This PR adds the Montreal map that was used in OFM with some revisions,
including adding some river and changing the overall topography.

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

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

DISCORD_USERNAME
Nikola123
2025-09-22 09:40:38 -07:00
evanpelle 34c94d20f7 Use http/2 instead of QUIC for cf tunnels (#2075)
## Description:

The cf tunnel drops all connections once every week lately. Using http/2
instead of QUIC will hopefully make it more stable. Also increase retry
count and disable auto update.

## 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.25.17
2025-09-20 17:07:45 -07:00
evanpelle 5b94fe9b74 bugfix: cosmetics not present during replays (#2074)
## Description:

Cosmetics were not being saved into the GameRecord on game completion.

## 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-09-20 11:46:48 -07:00
evanpelle 812773a9ab Update building colors for colored skins (#2073)
## Description:

Skins with custom colors sometimes have lighter secondary color making
the structure icons hard to read. so instead we keep the lighter color
as structure background

## 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-09-20 11:42:42 -07:00
evanpelle a26585a47b Add support for colored patterns (#2062)
## Description:

Add support for colored territory patterns/skins

* Refactored & updated territory pattern rendering to render colored
skins
* rename public from pattern to skin (keep pattern name internally, too
difficult to rename)
* Moved all territory color logic to PlayerView
* Updated WinModal to show colored skins
* Refactored decode logic into a separate function: decodePatternData
* Refactored/updated how cosmetics are sent to server. Players now send
a PlayerCosmeticRefsSchema in the ClientJoinMessage.
PlayerCosmeticRefsSchema just contains names of the cosmetics, and the
server replaces the names/references with actual cosmetic data
* Refactored PastelThemeDark: have it extend Pastel theme so duplicate
logic can be removed.
* 

## 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-09-18 20:00:15 -07:00
evanpelle d2314941fe Merge branch 'v25' 2025-09-18 11:26:53 -07:00
Aotumuri ab53b2f017 Add translate="no" to <html> (#2053)
## Description:

This PR prevents automatic browser translation (e.g., in Chrome) from
triggering immediately upon page load.
This approach is somewhat of a workaround, so it would be better if
another fix could be found.

Please refer to the following issue for the rationale: #2052

Fixes #2052

## 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-09-16 16:54:03 +00:00
Aotumuri a4127960b7 Add function to fetch player information (#2010)
## Description:

This pull request introduces the fetchPlayerById() function together
with its associated schema components.

It represents one part of a series of split pull requests related to the
PlayerInfoModal (Player Profile). Subsequent pull requests will address
UI implementation and additional features.

(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-09-14 15:15:50 -07:00
GOC 835c8d97ce fix(GameRenderer): correct comment typo (#2051)
## Description:

Fix a minor typo in a TODO comment inside `GameRenderer.ts`.

No code behavior was changed.

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

GOC
2025-09-13 09:21:37 -07:00
Abdallah Bahrawi 0a6ab07d2e fix: traitor bug when attacking immediately after initiating an alliance (#2044)
## Description:

This PR fixes a critical race condition bug where players could
unintentionally receive the traitor debuff when alliance requests were
accepted mid-attack.


Critical Bug Fixes #1866

**Root Cause:** 
Players could bypass UI alliance checks ( isFriendly() ) by accepting
alliances and immediately attacking after that, causing the server to
treat the attack as betrayal
Solution: Added server-side alliance validation in
AttackExecution.init()
This ensures attacks on allies are blocked at the server level.

- Once Bots and Nations decide to attack, they breaks the alliance. I
added maybeConsiderBetrayal(), which currently always returns true. I’ll
add proper logic for alliance-breaking soon on another PR; this didn’t
exist in the code before.

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

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-09-13 09:21:21 -07:00
evanpelle 25e8ec0579 use no-cache when retrieving commit.txt to avoid stale commit v0.25.16 2025-09-12 10:27:20 -07:00
evanpelle ab6578a6e3 replace eu with falk1 for deployment v0.25.15 2025-09-12 10:16:20 -07:00
evanpelle d522c33ba3 cache /commit.txt for only 5 seconds to prevent stale git commits v0.25.14 2025-09-12 09:00:49 -07:00