Commit Graph

2602 Commits

Author SHA1 Message Date
Restart2008 ba3bf8e797 fix: Resolve userSettings is null error in worker
This commit fixes the "userSettings is null" error that occurred in the worker when trying to join or create a game.

- Introduced IUserSettings interface to define the contract for user settings used in the worker.

- Updated UserSettings class to implement IUserSettings and provide a getData() method for serialization.

- Modified WorkerMessages to include serialized user settings in the InitMessage.

- Passed user settings from ClientGameRunner to WorkerClient, and then to the worker.

- Updated createGameRunner to accept IUserSettings and pass it to getConfig.

- Corrected type inconsistencies across various configuration and theme classes to align with IUserSettings.

- Re-added missing imports in relevant files.
2025-10-26 18:18:47 -07:00
Restart2008 9d94505d24 fix: Resolve userSettings is null error in worker
This commit fixes the "userSettings is null" error that occurred in the worker when trying to join or create a game.

- Introduced IUserSettings interface to define the contract for user settings used in the worker.

- Updated UserSettings class to implement IUserSettings and provide a getData() method for serialization.

- Modified WorkerMessages to include serialized user settings in the InitMessage.

- Passed user settings from ClientGameRunner to WorkerClient, and then to the worker.

- Updated createGameRunner to accept IUserSettings and pass it to getConfig.

- Corrected type inconsistencies across various configuration and theme classes to align with IUserSettings.

- Re-added missing imports in relevant files.
2025-10-26 18:07:08 -07:00
Restart2008 215511de5d fix: Resolve userSettings is null error in worker
This commit fixes the "userSettings is null" error that occurred in the worker when trying to join or create a game.

- Introduced IUserSettings interface to define the contract for user settings used in the worker.

- Updated UserSettings class to implement IUserSettings and provide a getData() method for serialization.

- Modified WorkerMessages to include serialized user settings in the InitMessage.

- Passed user settings from ClientGameRunner to WorkerClient, and then to the worker.

- Updated createGameRunner to accept IUserSettings and pass it to getConfig.

- Corrected type inconsistencies across various configuration and theme classes to align with IUserSettings.

- Re-added missing imports in relevant files.
2025-10-26 17:44:11 -07:00
Restart2008 c79e8022b9 feat: Add colorblind mode
This commit introduces a colorblind mode for red-green color blindness.

- Adds a new color palette with colorblind-friendly colors.

- Adds a user setting to toggle colorblind mode.

- Modifies the color allocation logic to use the new palette when the setting is enabled.

- Adds a button to the settings modal to toggle the feature.
2025-10-26 17:01:17 -07:00
Restart2008 9f1fc12b6b Fix: Correct MIRVExecution tile calculation
The x() method was being called twice, passing a number instead of a TileRef. This has been corrected by removing the redundant call.
2025-10-26 16:22:41 -07:00
Restart2008 bb87e81f9d Feat: Update MIRV fixed travel time to 40 ticks
Changed the MIRV_FIXED_TRAVEL_TIME constant from 20 to 40 ticks in src/core/execution/MIRVExecution.ts to slow down MIRV travel.
2025-10-25 21:21:32 -07:00
Restart2008 9097bcb1bb Feat: Update MIRV fixed travel time to 20 ticks
Changed the MIRV_FIXED_TRAVEL_TIME constant from 5 to 20 ticks in src/core/execution/MIRVExecution.ts.
2025-10-25 21:09:18 -07:00
Restart2008 ec225671fd Fix: Resolve deployment failure due to euclideanDist
Corrected the usage of distance calculation in MIRVExecution.ts.
Previously, euclideanDist was called on the Game object, which does not exist.
Changed to use Math.sqrt(this.mg.euclideanDistSquared()) which is the correct method.

This resolves the TS2339: Property 'euclideanDist' does not exist on type 'Game'. error that caused the deployment to fail.
2025-10-25 20:58:07 -07:00
Restart2008 4d924ef8d1 Fix: Standardize MIRV travel time
Addresses player report regarding unfair and unintuitive MIRV launch delays.
MIRV travel time is now fixed at 5 ticks, independent of click location.

- Modified MIRVExecution.ts to dynamically calculate speed based on a fixed travel time.
- Added MIRVExecution.test.ts to verify the fixed travel time.
2025-10-25 20:51:30 -07:00
Aotumuri 3478b3ab13 Fix: Prevent unbind button overflow and wrap long text in keybind settings (#2287)
## Description:
This PR fixes layout issues in the User Settings → Keybind section where
the “Unbind” button text would overflow in languages with long
translations (e.g., Italian).

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

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

## Please complete the following:

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

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

aotumuri

Co-authored-by: Evan <evanpelle@gmail.com>
2025-10-25 14:35:24 -07:00
unique-coder-124 2137507713 perf(pathfinding): replace array.shift() with index-based iteration for O(1) access (#2264)
## Description:
Replaced Array.shift() in boat path iteration with an index-based loop
to avoid O(n) shifts per step. This reduces per-move cost and keeps
memory usage unchanged. I validated the change by running locally and
confirming behaviour is unchanged.

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

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

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

### Checklist
- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
2025-10-25 14:09:18 -07:00
Abdallah Bahrawi 380eab5d12 Implement Stop/Start trading with all (#2278)
## Description:
fixes #2275 

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

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

## Please complete the following:

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

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

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

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

## Please complete the following:

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

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

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

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

## Please complete the following:

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

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

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

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

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

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

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

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

This addresses issue #2267. 


## Please complete the following:

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

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

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

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

## Please complete the following:

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

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

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

## Description:

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

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

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

### User Spawn Color Updates

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

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

### Other Player Spawn Color Updates

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

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

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

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

### Attached Images

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

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

### Misc.

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

## Please complete the following:

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

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

GlacialDrift
2025-10-24 18:55:01 +00:00
evanpelle f1b70ea26d Merge branch 'v26' 2025-10-23 15:02:46 -07:00
Evan dd9ad7472f update header ads (#2266)
## Description:

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

## Please complete the following:

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

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

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

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

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

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

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



## Please complete the following:

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

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

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

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

## Please complete the following:

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

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

evan

---------

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

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


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

## Please complete the following:

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

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

Mr.Box

---------

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

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

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

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

Meant as hotfix for v26.

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

## Please complete the following:

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

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

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

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

## Please complete the following:

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

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

abodcraft1

---------

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

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

Describe the PR.

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

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

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

abodcraft1

---------

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

Closes #2201

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

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

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

## Please complete the following:

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

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

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

## Please complete the following:

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

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

DISCORD_USERNAME
Nikola123

---------

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

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


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

## Please complete the following:

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

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

Vivacious Box

---------

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

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

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

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


## Please complete the following:

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

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

Aotumuri

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

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

mls for v26
Version identifier within MLS: v4.7

## Please complete the following:

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

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

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

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

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

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


## Please complete the following:

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

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

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

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


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

## Please complete the following:

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

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

aotumuri

---------

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

New FX on building destruction

Icon level:

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

Pixel art level:

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


## Please complete the following:

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

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

IngloriousTom

---------

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

## Please complete the following:

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

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

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

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

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

## Please complete the following:

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

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

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

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

## Please complete the following:

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

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

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

Was a bug disabling donation in public team games.

## Please complete the following:

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

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

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

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

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

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

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

  Discord: hiphex_33496

Hiphex

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

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

## Please complete the following:

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

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

evan
v0.26.0
2025-10-14 13:55:30 -07:00
evanpelle 5f6b85ebfc Merge branch 'v26' 2025-10-14 12:03:43 -07:00
evanpelle 810b12b7ff Merge branch 'v25' into v26 2025-10-14 12:02:44 -07:00