Commit Graph

370 Commits

Author SHA1 Message Date
Loncile 38222bfe34 Strait of Malacca map adition (#3599)
## Description:
Adition of Strait of Malacca map

It adds a new map, requested by
Coolson
awildcoolson
Describe the PR.
The map added is a map inspired by the strait of Malacca, it contains
two large landmasses and some islands
## 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:

lerithmercano

---------

Co-authored-by: Ricky G.P. <realtacoco@gmail.com>
Co-authored-by: VariableVince <24507472+VariableVince@users.noreply.github.com>
2026-04-07 22:12:12 -07:00
VariableVince 341f344ce5 Perf/Refactor(UserSettings): caching makes it 10-20x faster (#3481)
## Description:

Skip slow and blocking LocalStorage reads, replace by a Map. Also some
refactoring.

### Contains

- No out-of-sync issue between main and worker thread: Earlier PRs got a
comment from evan about main & worker.worker thread having their own
version of usersettings and possibly getting out-of-sync (see
https://github.com/openfrontio/OpenFrontIO/pull/760#pullrequestreview-2845155737,
https://github.com/openfrontio/OpenFrontIO/pull/896#pullrequestreview-2871836979
and https://github.com/openfrontio/OpenFrontIO/pull/1266.
But userSettings is not used in files ran by worker.worker, not even 10
months after evan's first comment about it. In GameRunner,
createGameRunner sends NULL to getConfig as argument for userSettings.
And DefaultConfig guards against userSettings being null by throwing an
error, but it has never been thrown which points to worker.worker thread
not using userSettings. So we do not need to worry about syncing between
the threads currently.
(If needed in the future after all, we could quite easily sync it, by
loading the userSettings cache on worker.worker and listening to the
"user-settings-changed" event @scamiv to keep it synced (changes in
WorkerMessages and WorkerClient etc would be needed to handle this).

- Went with cache in UserSettings, not with listening to
"user-settings-changed" event: "user-settings-changed" was added by
@scamiv and is used in PerformanceOverlay. Which is great for single
files that need the very best performance. But having to add that same
system to any file reading settings, scales poorly and would lead to
messy code. Also, a developer could make the mistake of not listening to
the event and it would end up just reading LocalStorage again just like
now. Also a developer might forget removing the listener or so etc. The
cache is a central solution and fast, without changes to other files
needed and future-proof.

- Make sure each setting is cached: UserSettingsModal was using
LocalStorage directly by itself for some things. Made it use the central
UserSettings methods instead so we avoid LocalStorage reads as much as
possible. For this, changed get() and set() in UserSettings to getBool()
and setBool(), to introduce a getString() and setString() for use in
UserSettingsModal while keeping getCached() and setCached() private
within UserSettings.

- Remove unused 'focusLocked' and 'toggleFocusLocked' from UserSettings:
was last changed 11 months ago to just return false. Since then we've
moved to different ways of highlighting and this setting isn't used
anymore. No existing references or callers are left.

- Other files:
-- Have callers call the renamed functions (see point above)
-- Remove userSettings from UILayer and Territorylayer: the variable is
unused in those files. Also remove from GameRenderer when it calls
TerritoryLayer.
-- Cache calls to defaultconfig Theme (which in turn calls dark mode
setting)/Config better in: GameView and Terrainlayer.

### Update on Contents later on
It wasn't really in scope of this PR but further consolidation was
called for. These changes could also pave the way for UserSettingsModal
(main menu) perhaps being partly mergable with SettingsModal (in-game)
one day as it begins to look more like it. Even though UserSettingsModal
still does things its own way, and does console.log where SettingsModal
doesn't, etc. They both have partially different content and settings
but also have a large overlap.

- UserSettings: Removed localStorage call from clearFlag() and setFlag()
which were added after creation of this PR, and were neatly merged in
silence without merge conflicts so i wasn't aware of them yet until now.

- UserSettings: added key constants, exported to use both inside
UserSettings and in files that listen to its events.

- UserSettings 'emitChange': now done from setCached, removed from
setBool, setFlag etc. Also removed from the new setFlag. And from
setPattern even though it emitted "pattern" instead of key name
"territoryPattern"; now it emits the default "territoryPattern" from
PATTERN_KEY which is re-used in Store, TerritoryPatternsModal and
PatternInput.

- UserSettingsModal: made UserSettingsModal call existing toggle
functions in UserSettings, or new or existing getter or setter. We do
not need CustomEvent: checked anymore. In UserSettingsModal, its toggle
functions did not all actually toggle, some like
toggleLeftClickOpensMenu actually just set a value. Based on the
'checked' value of the CustomEvent. But we don't need that 'checked'
value anymore and none of the checks for it inside the toggle functions
in UserSettingsModal, now that we just directly call
toggleLeftClickOpensMenu and others in UserSettings.

- SettingToggle: continuing about not needing CustomEvent anymore: the
old way actually fired two events. The native change event from <input>
and our own CustomEvent from handleChange in SettingToggle. It prevented
handling both events by checking e.detail?.checked === undefined. But
now, the native <input> event is all we need to show the visual toggle
change and trigger @changed in UserSettingsModal which calls the toggle
function.

- Use the toggle functions too from CopyButton and
PerformanceOverlay.ts. In PerformanceOverlay, change in
onUserSettingsChanged was needed because of how setBool works.

- UserSettingsModal 'toggleDarkMode': in UserSettingsModal, removed the
event from toggleDarkMode in UserSettingsModal; nothing is listening to
this event anymore after DarkModeButton.ts was removed some time ago.
Also both UserSettingsModal an UserSettings added/removed "dark" from
the document element. Now that UserSettingsModal calls toggleDarkMode in
UserSettings, we could centralize that. But UserSettings is in core, not
in client like UserSettingsModal. But now that we emit
"user-settings-changed", we could handle it even more centralized and
not have UserSettingsModal or UserSettings touch the element directly.
Instead have Main.ts listen to the event and change it dark mode from
there.

- UserSettings: added claryfing comment to attackRatioIncrement and the
new attackRatio setters/getters, to explain their difference. Noticed a
small omitment in its description and fixed that right away in en.json:
you can change attack ratio increment by shift+mouse wheel scroll or by
hotkey. So made "How much the attack ratio keybinds change per press"
also mention "/scroll."



**BEFORE** (with getDisplayName added back to NameLayer as a fix i will
do soon)
get > getItem in UserSettings
![BEFORE get
getItem](https://github.com/user-attachments/assets/5d2bf8b2-9e68-4c58-9b1f-d5636ee5d7e9)

renderLayer in NameLayer (with getDisplayName added back to NameLayer as
a fix i will do soon)
![BEFORE renderLayer NameLayer
ea](https://github.com/user-attachments/assets/ea12d9a4-2ff3-421b-844c-dbc39e5c3193)

**AFTER** (with getDisplayName added back to NameLayer as a fix i will
do soon)
getCached in UserSettings
![AFTER
getCached](https://github.com/user-attachments/assets/7fb1151f-d289-4420-a257-9fe1f9fbcb8f)

renderLayer in NameLayer (with getDisplayName added back to NameLayer as
a fix i will do soon)
![AFTER renderLayer NameLayer
ea](https://github.com/user-attachments/assets/f844e3d4-d6e5-4774-ba18-ba541f066c76)

## 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
2026-04-06 20:41:57 -07:00
evanpelle f170f034a7 Merge branch 'v30' 2026-04-06 20:38:22 -07:00
evanpelle 0a117aead3 add adfree description to cosmetics 2026-04-06 14:05:50 -07:00
Evan 2d28bfcd01 Add Rarity to cosmetic items (#3587)
## Description:


https://github.com/user-attachments/assets/f2216dec-72aa-497a-89cc-169c2a40021e


* Fortnite-style rarity system for cosmetics: New CosmeticContainer
component applies tier-based visual styling (gradient backgrounds,
glowing borders, hover effects) to flag and pattern cards across 5
rarity tiers: Common, Uncommon, Rare, Epic, and Legendary
* Legendary hover effects: Scale-up animation, pulsing orange glow,
shimmer sweep, rotating border sweep, corner sparkles, and screen
dimming backdrop
* Epic hover effects: Purple shimmer sweep glint on hover
* Purchase button overhaul: Green ember particles on container hover
(non-common only), 40-particle burst stream on button hover, pulsating
green glow, shimmer streak animation, and loading spinner on click
* Clickable cosmetic cards: Clicking anywhere on a purchasable card (not
just the purchase button) triggers the purchase flow
* Refactored components: ArtistInfo renamed to CosmeticInfo (now shows
rarity and color palette in tooltip),
* Forward-compatible rarity schema: rarity field uses .or(z.string()) so
unknown backend values won't break the client


## Please complete the following:

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

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

evan
2026-04-06 11:38:24 -07:00
RickD004 e7029564a2 adds map of the Great Lakes (#3588)
## Description:

Highly requested map. Map of the 5 Great Lakes (Superior, Michigan,
Huron, Erie and Ontario) with adjacent rivers and lakes. Local cities
and towns as nations / NPCs.


https://github.com/user-attachments/assets/157346fa-e3e6-4d63-9f51-46bae002d529

(Kinda obvious we needed this location at some point)

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

tri.star1011
2026-04-05 19:40:43 +00:00
Patrick Plays Badly 6467007fd7 Add map dyslexdria (#3568)
## Description:
Re Add map Dyslexdria. I adjusted the rivers to make boat traffic go
through main channels isntead of shortcuts. Flags adjusted. Correct
thumbnail added

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

## Discord username 
Plays Badly
2026-04-03 12:50:52 -07:00
evanpelle 6ca5cb9701 Revert "Add multiple funny maps april fools day (#3538)"
This reverts commit a7d9652886.
2026-04-01 20:03:33 -07:00
evanpelle 8b9f714d6f Revert "Fix WorldRotated enum value to match lang key 🌐 (#3553)"
This reverts commit 4dda807b03.
2026-04-01 20:02:56 -07:00
evanpelle ff7f459825 Revert "Add Map - Dyslexdria - April Fools (#3413)"
This reverts commit 2bf96db464.
2026-04-01 20:02:37 -07:00
evanpelle 2cf0f5bfd2 Revert "Add Closed-Back for april-folls (#3548)"
This reverts commit 6f3da9c9e0.
2026-04-01 20:02:07 -07:00
evanpelle 23bcca2e9e Revert "Add Closed-Back for april-folls (#3548)"
This reverts commit b9355b7cbf.
2026-04-01 19:44:59 -07:00
evanpelle dfbd17ecff Revert "Add multiple funny maps april fools day (#3538)"
This reverts commit bfb8a9447c.
2026-04-01 19:41:45 -07:00
Aotumuri b9355b7cbf Add Closed-Back for april-folls (#3548)
## Description:

Add Closed-Back for april-folls

## 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
2026-03-31 21:49:45 -07:00
Aotumuri 6f3da9c9e0 Add Closed-Back for april-folls (#3548)
## Description:

Add Closed-Back for april-folls

## 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
2026-03-31 21:49:25 -07:00
Patrick Plays Badly 4c8754bd81 Add Map - Dyslexdria - April Fools (#3413)
Re-submission, previous request was not branched properly.

Add custom map Dyslexdria. Based off of large_world_map_recolor.tif and
rivers from the XL World map. Map is intended for long term use.
Suggesting that map be used as an April Fools gag by replacing thumbnail
and title with 'World' during first run.

<img width="995" height="721" alt="dyslexdria screenshot"
src="https://github.com/user-attachments/assets/8826839f-b4e0-431d-af9c-0b0e43dc601d"
/>

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

- Build log, screen shots, and test videos.
https://discord.com/channels/1284581928254701718/1456890656147374080

PlaysBadly

---------

Co-authored-by: Duwibi <86431918+Duwibi@users.noreply.github.com>
Co-authored-by: VariableVince <24507472+VariableVince@users.noreply.github.com>
2026-03-31 20:07:59 -07:00
FloPinguin 4fef27d014 Fix WorldRotated enum value to match lang key 🌐 (#3553)
Fixes this display bug, says "WORLD ROTATED" now

<img width="235" height="140" alt="image"
src="https://github.com/user-attachments/assets/dc8bb97d-350a-4ced-a63d-f3564479ba41"
/>

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

FloPinguin
2026-03-31 20:07:02 -07:00
Patrick Plays Badly bfb8a9447c Add multiple funny maps april fools day (#3538)
Requesting that these 4 maps be added temporarily for the April Fools
holiday. Included are:
- A wider version of the Amazon River to allow for larger ships.
- An edit of The Box with more varied terrain.
- A modification to The World which optimizes play for mobile users.
- A custom remix to Antarctica which re-adds ice to the map.
All maps are edits of existing work. All maps have been added as their
own individual map files rather than edits to existing files for ease of
management.

<img width="912" height="1067" alt="temp"
src="https://github.com/user-attachments/assets/089ef59f-8bdf-4c86-b479-620b8c220c3a"
/>
https://discord.com/channels/1284581928254701718/1483786939332169830

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

PlaysBadly
2026-03-31 20:01:40 -07:00
Patrick Plays Badly 2bf96db464 Add Map - Dyslexdria - April Fools (#3413)
Re-submission, previous request was not branched properly.


## Description:

Add custom map Dyslexdria. Based off of large_world_map_recolor.tif and
rivers from the XL World map. Map is intended for long term use.
Suggesting that map be used as an April Fools gag by replacing thumbnail
and title with 'World' during first run.

<img width="995" height="721" alt="dyslexdria screenshot"
src="https://github.com/user-attachments/assets/8826839f-b4e0-431d-af9c-0b0e43dc601d"
/>

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


## Following:

- Build log, screen shots, and test videos.
https://discord.com/channels/1284581928254701718/1456890656147374080


## Discord username:

PlaysBadly

---------

Co-authored-by: Duwibi <86431918+Duwibi@users.noreply.github.com>
Co-authored-by: VariableVince <24507472+VariableVince@users.noreply.github.com>
2026-03-31 17:50:23 -07:00
FloPinguin 4dda807b03 Fix WorldRotated enum value to match lang key 🌐 (#3553)
## Description:

Fixes this display bug, says "WORLD ROTATED" now

<img width="235" height="140" alt="image"
src="https://github.com/user-attachments/assets/dc8bb97d-350a-4ced-a63d-f3564479ba41"
/>

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

FloPinguin
2026-03-31 17:04:18 -07:00
Ryan 9b4812f8b8 UI: Search Skin (#3552)
## Description:

Sorta fixes a visual bug:
<img width="1021" height="129" alt="image"
src="https://github.com/user-attachments/assets/2ea46fcd-d85c-4f46-a9b9-28c40b818269"
/>

By adding parity with the flag modal:

<img width="988" height="561" alt="image"
src="https://github.com/user-attachments/assets/29ca0b9f-3887-4867-b67b-8c35b026b021"
/>

(Parity
<img width="1032" height="342" alt="image"
src="https://github.com/user-attachments/assets/b9c551eb-047a-402f-8e7b-c207d967ff38"
/>
)

(code pretty much copy paste from flagmodal)

## Please complete the following:

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

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

w.o.n
2026-03-31 13:18:06 -07:00
Patrick Plays Badly a7d9652886 Add multiple funny maps april fools day (#3538)
## Description:
Requesting that these 4 maps be added temporarily for the April Fools
holiday. Included are:
- A wider version of the Amazon River to allow for larger ships.
- An edit of The Box with more varied terrain.
- A modification to The World which optimizes play for mobile users.
- A custom remix to Antarctica which re-adds ice to the map.
All maps are edits of existing work. All maps have been added as their
own individual map files rather than edits to existing files for ease of
management.

<img width="912" height="1067" alt="temp"
src="https://github.com/user-attachments/assets/089ef59f-8bdf-4c86-b479-620b8c220c3a"
/>
https://discord.com/channels/1284581928254701718/1483786939332169830

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

## Discord username

PlaysBadly
2026-03-31 12:37:34 -07:00
RickD004 6fa9bf692b Add Mediterranean map (#3523)
## Description:

Adds Mediterranean sea map, from Iberia to Asia. Map contains ancient
Roman Empire provinces and its rivals as Nations.
This map was requested by the dev.

elevation data from Opentopography

<img width="2850" height="1450" alt="image"
src="https://github.com/user-attachments/assets/6aa5ba12-f4f7-414d-a712-b90323f1d796"
/>
<img width="590" height="304" alt="Captura de pantalla 2026-03-27
010038"
src="https://github.com/user-attachments/assets/efd1deea-bd88-4ae2-92a0-47a6626a0c0f"
/>
<img width="585" height="302" alt="Captura de pantalla 2026-03-27
005758"
src="https://github.com/user-attachments/assets/a127696e-fe34-424c-a88d-b86b99a5f414"
/>



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

tri.star1011
2026-03-30 13:49:53 -07:00
evanpelle 130315cba1 Merge branch 'v30' 2026-03-30 12:59:29 -07:00
RickD004 217a2c4548 Adds Milky Way Map (#3519)
## Description:

Adds Milky Way galaxy map based on real reconstruction by NASA. Star
density simulated as terrain. Best played in Dark Mode.

Also adds credits to JPL NASA

<img width="532" height="533" alt="Captura de pantalla 2026-03-26
142938"
src="https://github.com/user-attachments/assets/87bb19bb-4e2d-4383-a3e9-6e14b714b84c"
/>

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

tri.star1011
2026-03-26 19:18:30 -07:00
Ryan 7d1ff91078 playerstats to go with infra (#3520)
## Description:

https://github.com/openfrontio/infra/pull/279 to go with this, splits
out 1v1

## Please complete the following:

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

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

w.o.n
2026-03-26 19:05:37 -07:00
Ryan 14a5128e87 playerstats to go with infra (#3520)
## Description:

https://github.com/openfrontio/infra/pull/279 to go with this, splits
out 1v1

## Please complete the following:

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

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

w.o.n
2026-03-26 19:04:33 -07:00
Evan 1c2bd5df31 add not logged in warning to flags modal, refactored to its own lit component (#3521)
## Description:

So players know they are logged out and don't think their purchased
flags dissappeared.

## 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
2026-03-26 16:45:13 -07:00
evanpelle 7fdda33fb9 Merge branch 'v30' 2026-03-25 13:34:34 -07:00
Evan dbba1dccb5 Display the name of the creator for flags & skins (#3510)
## Description:

So artists get credit for the work they do.

## 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
2026-03-24 15:17:25 -07:00
FloPinguin 0dc522413e Close private lobby when host leaves 🚪 (#3503)
## Description:

When the host of a private lobby disconnects before the game starts, the
lobby is now closed:

- **Server:** Detects host disconnection via `creatorPersistentID`
match, kicks all remaining clients with a `host_left` reason, and marks
the game as ended so it's cleaned up by the game manager and can no
longer be joined.
- **Client:** Participants receive an `alert()` saying "The host has
left the lobby." and their JoinLobbyModal is closed automatically via
the `leave-lobby` event.
- **Phase logic:** `phase()` now returns `Finished` for ended private
lobbies that haven't started, preventing the game from lingering in
`Lobby` state.

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

FloPinguin
2026-03-24 13:00:20 -07:00
FloPinguin cf0cf14a1f Add new public game modifiers 🙂 (#3500)
## Description:

Adds 5 new public game modifiers to the Special game mode modifier pool:

- **Ports Disabled** - disables port construction, focus on factories
- **Nukes Disabled** - disables atom bombs, hydrogen bombs, MIRVs,
missile silos and SAM launchers
- **SAMs Disabled** - disables SAM launchers (thats funny, you cant
protect against nukes, have to space out your stuff) (mutually exclusive
with nukes disabled)
- **1M Starting Gold** - gives all players 1M starting gold (was
requested by people, new chill tier alongside existing 5M and 25M)
- **4min Peace Time** - grants 4 minutes of PVP spawn immunity

All `PublicGameModifiers` boolean fields are now optional - inactive
modifiers are omitted from game JSON instead of being serialized as
`false` (stop bloating the JSON size)

I think we have enough modifiers now :) Good variety

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

FloPinguin
2026-03-24 12:57:08 -07:00
Evan 39ad547c04 support for unlockable flags (#3479)
## Description:

Add support for purchasable/gated flags.

* Create a new "Store" modal that renders both skins & flags
* move all store related logic out of TerritoryPatternsModal
* use nation:code for existing nation flags & flag:key for gated flags
* check if user has the appropriate flags before purchasing

## 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
2026-03-23 17:09:18 -07:00
bijx 837458c369 Feat: Tournament Maps (#3483)
## Description:

Introduces 4 new private match maps for the OFM tournament in May.
Includes 2, 3, 4, and 8 player maps. Playtested, and include as many
default nations as the map expects players, named after compass points.
Give it a try at https://tourney-maps.openfront.dev/

<img width="1500" height="1500" alt="image"
src="https://github.com/user-attachments/assets/9138b636-5dd7-4118-82e2-50a5125a7963"
/>

The base images were created from scratch based on prototype designs,
and they were converted from vector versions I made. I haven't decided
on what the names should be for the maps themselves, so for now they're
just `Tourney Map 1`, `Tourney Map 2`, etc. Ideas welcome.


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

bijx
2026-03-21 20:54:49 +00:00
VariableVince 481d0fa3a1 Fix(HelpModal): small updates and fixes (#3473)
## Description:

- fix info icon spacing
- update multiple texts to reflect current state, rewrote
"ui_playeroverlay_desc" further for better readability
- add text for the options menu, and change their order to reflect
current button order
- add missing "Stop trading" icon, is PNG so lazy load
- remove uneccesary lazy loading for an SVG icon (rest of the SVGs
aren't lazy loaded either)

Didn't touch the rest although more incremental updates are needed
following UI and other changes.

Before:
<img width="242" height="82" alt="image"
src="https://github.com/user-attachments/assets/8f38eef6-21e7-4b18-84ef-adc4161a317f"
/>

<img width="357" height="167" alt="image"
src="https://github.com/user-attachments/assets/c6937b5c-c1b2-4560-b40b-94b24a4906cc"
/>

After:
<img width="262" height="95" alt="image"
src="https://github.com/user-attachments/assets/15c1e9f5-3e27-4f4b-8472-5bb70234ab42"
/>

<img width="345" height="203" alt="image"
src="https://github.com/user-attachments/assets/3d3fe3c5-98b2-41fb-8f79-48d02d7ecf9b"
/>

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

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-03-21 12:03:11 -07:00
FloPinguin bf09b9c9be Improve JoinLobbyModal (#3482)
## Description:

Perviously, JoinLobbyModal did not show settings like "Infinite gold" or
"Instant Build" or changed tribe count.
Now it does. Only if the setting differs from the default. I tested a
lot of scenarios, I also thought of the public game modifiers.
And we show a small map image now.

Public game with lots of modifiers:

<img width="780" height="758" alt="Screenshot 2026-03-21 011805"
src="https://github.com/user-attachments/assets/9d3fcaa9-3a50-42b2-a351-ac737ef18230"
/>

A private game with lots of custom settings:

<img width="776" height="530" alt="Screenshot 2026-03-21 011940"
src="https://github.com/user-attachments/assets/8f9a3809-844d-4f24-8f92-46c4ce480f8c"
/>

A private game with disabled units:

<img width="786" height="562" alt="Screenshot 2026-03-21 012134"
src="https://github.com/user-attachments/assets/61058329-1d86-4667-a945-7819b89cbf41"
/>

Regular public FFA (No modifiers):

<img width="780" height="372" alt="Screenshot 2026-03-21 012228"
src="https://github.com/user-attachments/assets/abdc42f0-8f2c-40c1-8719-76c648a12bae"
/>

This PR also includes a fix for UsernameInput:

<img width="910" height="647" alt="Screenshot 2026-03-20 222021"
src="https://github.com/user-attachments/assets/e1922395-9dfc-4b32-b987-e2dbff9af917"
/>

This PR also fixes the default private lobby difficulty in GameManager

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

FloPinguin
2026-03-20 20:43:35 -07:00
VariableVince c29fca477b Fix(HelpModal): small updates and fixes (#3473)
## Description:

- fix info icon spacing
- update multiple texts to reflect current state, rewrote
"ui_playeroverlay_desc" further for better readability
- add text for the options menu, and change their order to reflect
current button order
- add missing "Stop trading" icon, is PNG so lazy load
- remove uneccesary lazy loading for an SVG icon (rest of the SVGs
aren't lazy loaded either)

Didn't touch the rest although more incremental updates are needed
following UI and other changes.

Before:
<img width="242" height="82" alt="image"
src="https://github.com/user-attachments/assets/8f38eef6-21e7-4b18-84ef-adc4161a317f"
/>

<img width="357" height="167" alt="image"
src="https://github.com/user-attachments/assets/c6937b5c-c1b2-4560-b40b-94b24a4906cc"
/>

After:
<img width="262" height="95" alt="image"
src="https://github.com/user-attachments/assets/15c1e9f5-3e27-4f4b-8472-5bb70234ab42"
/>

<img width="345" height="203" alt="image"
src="https://github.com/user-attachments/assets/3d3fe3c5-98b2-41fb-8f79-48d02d7ecf9b"
/>

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

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-03-20 14:03:06 -07:00
Ralfi Salhon 015e3c7d19 feat: Attacking Troops Overlay (#3427)
## Description:

https://troop-advantage-layer.openfront.dev/

Hey OpenFront dev team, I've been really enjoying the game, and the
v0.30 changes have felt great so far. Happy to start contributing!

This PR introduces `AttackingTroopsOverlay`, a layer that renders live
attacker vs. defender troop counts directly on active front lines.
Players can immediately gauge combat strength without leaving the map
view.


![troop-advantage-layer](https://github.com/user-attachments/assets/9e862812-84b4-46cb-a0c6-65fa50320198)

A recent change updates the layer to just the # of attackers and a
symbol for attack/defence:

![visual-front-line](https://github.com/user-attachments/assets/46bc7117-2314-44c9-96fc-8a7e9c6ab5cd)

Left: Perspective of Anon 667 (Blue) | Right: Perspective of Anon332
(Red)

![ezgif-6261e6669d6b972b](https://github.com/user-attachments/assets/734d90c1-8f22-44dc-8f2f-b22e46676f46)

**How it works:**
- Attacker count shown for ground invasions. When attacking, your troop
count will display amber for disadvantageous, and green for advantageous
battles. When defending, the enemy troop count will switch to red if you
are at a severe disadvantage.
- Label position recalculates every tick at 200ms, tracking the front
line as it moves.
- Automatically hidden during Terrain view (spacebar)
- Labels clean up when an attack ends or its target becomes invalid

**Settings:** An "Attacking Troops Overlay" toggle is added to Settings,
enabled by default.
--> the screenshot is old, but the text has been updated
<img width="448" height="410" alt="Settings toggle"
src="https://github.com/user-attachments/assets/2df8ec7a-3f77-48b7-a9b5-ee4a6eed0412"
/>

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

## Discord
Radyus
2026-03-19 15:04:33 -07:00
Aotumuri 1ebe23d9d8 mls (v4.18) (#3470)
## Description:

mls for v30
Version identifier within MLS: 4.18

## 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
2026-03-19 14:52:16 -07:00
Aotumuri f39f3b8d1c mls (v4.18) (#3470)
## Description:

mls for v30
Version identifier within MLS: 4.18

## 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
2026-03-19 14:51:52 -07:00
FloPinguin a30859d132 Fix labels in public lobby modifier display 🏷️ (#3456)
## Description:

Fixes two issues in the join lobby modal's modifier display:

1. **Starting Gold**: Label showed "Starting Gold (Millions)" with value
"5M", duplicating "millions". Now shows "Starting Gold" as the label,
keeping "5M" as the value.
2. **Disable Alliances**: Label showed "Disable Alliances" with value
"Enabled", which is confusing. Now shows "Alliances" as the label with
"Disabled" as the value.

Join Lobby Modal needs a general rework, I will probably make an 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:

FloPinguin
2026-03-17 15:31:11 -07:00
FloPinguin 9785666b98 Fix labels in public lobby modifier display 🏷️ (#3456)
## Description:

Fixes two issues in the join lobby modal's modifier display:

1. **Starting Gold**: Label showed "Starting Gold (Millions)" with value
"5M", duplicating "millions". Now shows "Starting Gold" as the label,
keeping "5M" as the value.
2. **Disable Alliances**: Label showed "Disable Alliances" with value
"Enabled", which is confusing. Now shows "Alliances" as the label with
"Disabled" as the value.

Join Lobby Modal needs a general rework, I will probably make an 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:

FloPinguin
2026-03-17 15:30:52 -07:00
bijx f356f09f81 Feat: Game Speed + Pause keybinds (#3397)
## Description:

Can't tell you how many times I've been playing solo, I try to go change
the speed from `Max` to `x1` and before I've opened the speed controls
and clicked on one the AI completely wipes me. But not to worry, we now
have a pause and speed toggle up/down keybinds!


https://github.com/user-attachments/assets/48692c27-888f-40fb-837a-45e26f262441

Keybinds were added to "Menu Shortcuts" submenu:

<img width="1750" height="1099" alt="image"
src="https://github.com/user-attachments/assets/8c4500d5-f43e-4a1c-9940-04db75bf18cf"
/>

Tested on Solo, custom match, and public lobbies. Pause intent works
correctly on solo and private match (only if you are host), and neither
feature works in public matches, as expected.



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

bijx
2026-03-16 23:16:59 +00:00
Aotumuri 87d1b4d473 mls (v4.17) (#3416)
## Description:

mls for v30
Version identifier within MLS: 4.16

## 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
2026-03-14 23:45:07 +00:00
Bartosz Woźniak 13a965a9c5 Add hotkey descriptions for Escape and Enter actions in HelpModal (#3382)
If this PR fixes an issue, link it below. If not, delete these two
lines.
Resolves #3064

## Description:

Adds Esc and Enter to the Help modal hotkeys section with consistent key
styling and descriptions:

- **Esc** – Shown with label; description: "Closes menu. Cancels unit
build preview."
- **Enter (↵)** – Shown with symbol and label; description: "Confirms
input. Confirms unit build preview."

Both keys use the same keycap style as existing hotkeys. Enter label
uses the standard symbol (↵) in `getKeyLabel()`. New strings are in
`en.json` under `help_modal.action_esc` and `help_modal.action_enter`.

<img width="723" height="427" alt="image"
src="https://github.com/user-attachments/assets/52fc168a-a850-4ac5-ba82-72f7672f476c"
/>


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

.wozniakpl
2026-03-09 21:15:13 -07:00
FloPinguin 3838de1d30 Option to disable alliances + 2 new modifiers for variety 😄 (#3392)
## Description:

Rex had this idea: "It would be funny to have an option in private
lobbies to disable alliances."
I added it as an option.
Now people can choose to live in constant fear of their neighbors 😆 

Also added two new public game modifiers for variety (only for the
special rotation):
- Alliances disabled (low probability)
- x2 gold multiplier (low probability)

Would be nice to squeeze this into v30, last minute?

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

FloPinguin
2026-03-09 21:13:13 -07:00
RickD004 84ae5fc879 Adds Aegean map (#3384)
## Description:

Adds Aegean map, a map centered in the Aegean Sea and the aegean islands
between Greece and Turkey. Map has approx. 1M land tiles, size of
1600x2000.

Nations are named after Ancient Greece era city-states and tribes.
Elevation source from OpenTopography, already credited

<img width="1600" height="2000" alt="image"
src="https://github.com/user-attachments/assets/e4f52d6e-bba4-4641-9eac-31e3ddee354e"
/>
<img width="453" height="445" alt="Captura de pantalla 2026-03-08
141256"
src="https://github.com/user-attachments/assets/5d2bc8cf-1e54-461a-ae0f-9bb2dafc2db6"
/>

This has been a heavily requested map in the community, having
suggestions in the Discord, Subreddit and even in some videos (for
example i saw Ultimus Rex suggest an aegean map when asked what maps he
would like in his last stream)

The map is designed so that the greek and turkish main landmasses are
around 400,000 pixels in area, which combined account for around less or
equal to 80% of the map. This means players will have to cross the sea
to win, and to do so they will have to hop across the islands, which
means there will be heavy warship action, instead of having stalemates
like in most island maps where the gap between islands is too large and
players would rather bomb each other.

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

tri.star1011
2026-03-08 22:05:09 -07:00
RickD004 df62251d3a Add San Francisco map (#3373)
## Description:

Adds San Francisco bay map. 21 nations based on cities and towns of the
area. 1.8M land pixels , size of 2000x1700
Elevation data from Opentopography, already credited. 
Map frequency of 3, as to mirror New York map.

<img width="2000" height="1700" alt="image"
src="https://github.com/user-attachments/assets/dc80a2db-6233-4b50-8f07-bd21c23c8b53"
/>

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

tri.star1011
2026-03-07 20:51:59 -08:00
Damien Gustave b648b102fa feat(chat): add stop trading with all chat option (#3362)
## Description:

Adds a quick chat option to ask a player to stop trading with all. I
wrote it in double quote to inform this is an option as I think most of
the players do not even know about this option.

<img width="892" height="554" alt="image"
src="https://github.com/user-attachments/assets/5a9330f4-e07c-4dd7-a1f2-a1e0e6508f90"
/>

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

```
.delovan
```
2026-03-07 20:38:37 -08:00
FloPinguin c594487f5e Starting gold input in millions with decimal support (#3349)
## Description:

**Starting gold input: use millions**

Changes the starting gold input in singleplayer and host lobby modals to
accept values in millions (e.g. enter `5` for 5M gold). Supports
decimals like `6.6` for 6.6M. The value is multiplied by 1,000,000
before being sent to the game config.

- Label updated to "Starting Gold (Millions)"
- Input uses float parsing with min 0.1, matching gold multiplier
behavior
- JoinLobbyModal shows clean values without unnecessary decimals (e.g.
"5M" not "5.00M")

Previous

<img width="215" height="139" alt="image"
src="https://github.com/user-attachments/assets/00ce5b6d-f74d-4aee-92f5-c9be1a0a6d3d"
/>
<img width="292" height="74" alt="image"
src="https://github.com/user-attachments/assets/4de936a3-22bd-4ffc-8dbe-0d5066f28186"
/>

Now

<img width="216" height="151" alt="image"
src="https://github.com/user-attachments/assets/489de13e-65b5-4b02-a654-5f6f74b165d1"
/>
<img width="292" height="72" alt="image"
src="https://github.com/user-attachments/assets/51723d5a-55ab-4b7b-bbce-011a586eeb44"
/>

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

FloPinguin
2026-03-05 20:48:03 -08:00