Commit Graph

2095 Commits

Author SHA1 Message Date
Scott Anderson f0ebe195ee Log public id (#1278)
## Description:

Log player public id to the console.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-06-26 14:08:27 -07:00
evanpelle af451be606 improve astar perf (#1268)
## Description:

Created test that has astar pathfind from top left to bottom right of
giant world map.

* Before these changes: took ~950ms
* replaced queue with fastqueue library: ~600ms
* Changes heuristic to be more greedy (1.1 * dist => 2 * dist): ~90ms

Resulting in a roughly 10x improvement.

Other paths also saw improvements as well, although not as dramatic.

## Please complete the following:

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

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

evan
2025-06-26 12:52:31 -07:00
Scott Anderson 1b1ed9bf3f UrlEncode patterns in cosmetics.json (#1273)
## Description:

Use base64url encoding for patterns.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-06-25 20:20:08 -07:00
Daniel b181c6c15d Keybind Ground Attack (#1258)
## Description:

- Implement ground attack logic in ClientGameRunner
- Move cursor location logic from doBoatAttackUnderCursor to
getTileUnderCursor for reusability.
- New keybind G for Ground Attack
- Add translations for ground attack labels in English

## Please complete the following:

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

<img width="902" alt="image"
src="https://github.com/user-attachments/assets/54bb3178-af2e-4715-bfa2-82b7fe0e8e85"
/>

*The getTileUnderCursor() and doGroundAttackUnderCursor() methods are
private with many dependencies. I did not do isolated unit testing and
thus zero tests where added.

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

eng.la

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-25 15:21:54 +00:00
Scott Anderson a9e1dc853e Fix pattern locking logic (#1270)
## Description:

Fix pattern locking 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
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-06-25 08:06:01 -07:00
Scott Anderson 325a99c5d7 Cleanup log spam in TerritoryPatternsModal (#1269)
## Description:

Cleanup log spam in TerritoryPatternsModal

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-06-24 15:06:13 -07:00
Scott Anderson 0e3ccdd96f White Rabbit pattern (#1264)
## Description:

Add a White Rabbit pattern.


![image](https://github.com/user-attachments/assets/69c89c03-fd08-4139-a24d-649fc3ed16cb)

![image](https://github.com/user-attachments/assets/8abb0dd4-b963-47ee-9f04-71eb2711cbb0)

## Please complete the following:

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

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-24 13:55:07 -07:00
Scott Anderson 13f0c2303e bug: StatsSchema zod validation error (#1267)
## Description:

Fix a bug in the StatsSchema zod validation logic. In zod v4, the
`record` function has been renamed to `partialRecord`, and the new
`record` function requires that all keys are present. We intentionally
omit empty stats, so this causes a zod validation error.

Example error:

```
Connection error!
 game id: VSEtmKpJ, client id: 0UMrA84F
Error: ✖ Invalid input: expected array, received undefined
  → at allPlayersStats.0UMrA84F.units.wshp
✖ Invalid input: expected array, received undefined
  → at allPlayersStats.0UMrA84F.units.saml
Stack: 
```

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-06-24 13:50:36 -07:00
Scott Anderson 4680b04656 Refactor cosmetics.json (#1263)
## Description:

- Refactor cosmetics.json to use base64 as the lookup key, to reduce the
complexity of lookup.
- Add refine() logic to PatternSchema to check if the pattern is valid.
- Split PatternDecoder class out of Cosmetic.ts to resolve temporal
deadzone caused by static parsing of cosmetics.json with the new
refine().

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-06-23 20:14:36 -07:00
evanpelle 1ce282d41b Move map metadata to map manifest (#1262)
## Description:

To simply the map binary data, remove height & width data to the
manifest

## Please complete the following:

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

## Please put your Discord username so you can be contacted if a bug or
regression is found:
evan
2025-06-23 14:50:18 -07:00
maxime.io ecabdfe4bc Allow boat discount based on number of units owned (#1261)
## Description:

The boat discount cannot be abused and when you’re stuck on a small
island, kind of isolated and low on resources, being able to afford a
boat with your last few gold can. A last move resistance and fun to
play.

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

devalnor
2025-06-23 19:20:46 +00:00
maxime.io 629ce68604 Show a red alert frame when the player is betrayed (#1195)
## Description:

With the alert frame, we're notified and can view the event using a
“Focus” button that moves the map to the traitor, or dismiss it with a
“Dismiss” button. The alert auto-dismisses after a few seconds.

**Because this feature provides an advantage, the trade-off is having to
wait a full 10 seconds or manually clicking “Dismiss” to close it.**

- Show a red alert frame animation when the player is betrayed.
- ~~The alert frame can be dismissed manually.~~
- The alert frame is automatically dismissed after ~~10~~ 3 seconds.
- If the user doesn’t want to see it at all, they can disable it in the
settings.

![Capture d’écran 2025-06-16 à 20 09
51](https://github.com/user-attachments/assets/2897ae16-85d6-4201-ac5b-e60b0cb18add)
![Capture d’écran 2025-06-16 à 20 10
24](https://github.com/user-attachments/assets/088edf08-20fe-4dae-8c00-cbcd24004bd0)
![Capture d’écran 2025-06-16 à 20 10
50](https://github.com/user-attachments/assets/894296aa-c753-429f-8c5d-edd881deec48)
![Capture d’écran 2025-06-16 à 20 11
14](https://github.com/user-attachments/assets/29503958-0042-4614-8db2-2663cadee441)

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

This is my first PR let me know if anything needs improvement!

devalnor
2025-06-23 19:15:30 +00:00
evanpelle b48770faf0 Move maps generation out of repo, new map structure (#1256)
## Description:

Move map generation outside of main repo, it has been rewritten in Go
and is much faster. Also refactor how maps are stored, one dir per map.
The map binaries are basically identical to before. Some maps like
Africa have 1% difference in bytes, but playing it looks exactly the
same.

Use lazy loading for map data access so only needed files are accessed.

Unit tests now load map binary instead of regenerating it from scratch,
speeding them up.

## Please complete the following:

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

## Please put your Discord username so you can be contacted if a bug or
regression is found:
evan
2025-06-23 11:23:56 -07:00
Scott Anderson 06b18892e4 Fix singleplayer check (#1260)
## Description:

Fix a broken check for singleplayer that relied on the `any` type to
mask undefined field access.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors
2025-06-23 09:42:22 -07:00
Scott Anderson 5c4692bc29 Discounts can only be used one time (#892)
## Description:

Discounts on structures and warships can only be used one time.

## Please complete the following:

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

---------

Co-authored-by: Scott Anderson <scottanderson@users.noreply.github.com>
2025-06-22 21:23:20 -07:00
Aotumuri b71acdc993 Patterned territory (#786)
## Description:
This is meant to give players more customization options.
Permission handling hasn’t really been implemented yet.
## 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:

aotumuri
2025-06-22 23:57:24 -04:00
Scott Anderson c5ada4d384 Remove maxTokenAge (#1255)
## Description:

Remove the `maxTokenAge` argument, as this prevents players from using
valid tokens on the final day of the 7-day session. The `jwtVerify`
function already verifies that the `exp` claim is in the future and the
`iat` claim is in the past, so there is no concern about using expired
tokens.

## Please complete the following:

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

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-22 16:37:43 -04:00
evanpelle be001d11a2 Add back the trade ship send stat (#1253)
## Description:

trade ship send stats was erroneously removed, add it back

## Please complete the following:

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

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

evan
2025-06-22 12:24:46 -04:00
DevelopingTom 43397779fa Add trains (#1159)
## Description:

Add a rail network to handle train stations/railroad between structures.

Changes:
- `RailNetwork` is responsible for the train station graph. Use it to
connect new `TrainStations`
- A `RailRoad` connects two `TrainStation`
- No loop possible in the rail network
- Train stations handles its railroads
- Added a layer to draw the railroads under the structures

#### Clusters
- To speed up computations, each `TrainStation` references its own
cluster
- A cluster is a list of `TrainStation` connected with each other,
created by the `RailNetwork` when connecting the station
- Train stations spawn trains randomly depending on its current cluster
size
- A `TrainStation` decides randomly of the train destination by picking
one from the cluster

#### Production building:
- Added a factory which has no gameplay impact currently. _To be
discussed._

#### Train stops:
- When a train reaches a factory, it's filled with a "cargo". The loaded
trains has no impact currently. _To be discussed._
- When a train reaches a city, the player earn 10k gold
- When a train reaches a port, it sends a new tradeship if possible
- If a destination/source is destroyed, the train & railroad are deleted
too


https://github.com/user-attachments/assets/42375c17-9e04-4a42-98d0-708c81ffd609


https://github.com/user-attachments/assets/fbecdb53-a516-4df8-87fb-1f9a62c4efa0



## Please complete the following:

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

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

IngloriousTom

---------

Co-authored-by: Scott Anderson <scottanderson@users.noreply.github.com>
2025-06-22 08:14:08 -07:00
Scott Anderson 0f2008a68d Simplify ClientMessage handling (#1235)
## Description:

- Expand the try/catch block in socket message handlers to encapsulate
all possible throwers.
- Remove unnecessary zod schema parsing of outgoing messages.
- Avoid unnecessary serialization and deserialization in singleplayer.

## Please complete the following:

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

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-22 02:34:45 +00:00
evanpelle ce991f97a7 Refactor radial menu (#1246)
## Description:

Refactor & clean up the Radial menu.
* Only show certain build menu items, depending on whether or not you
clicked on your own territory
* show items as greyed out instead of just the disabled icon
* remove back button on hover trigger

## Please complete the following:

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

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

evan
2025-06-21 19:29:30 -07:00
VariableVince e907993f51 Remove babel-jest from devDependencies (#1247)
## Description:

Tiny change, remove babel-jest from devDependencies. 

(This PR was intented to remove more from package-lock.json. So we could
get rid of two npm warnings about deprecated glob version, and
unsupported inflight from the underlying test-exclude dependency which
is part of the babel-plugin-istanbul dependency.

But then i found out that more packages have babel-jest and
babel-plugin-istanbul as dependencies themselves.

However, we don't use babel-jest directly. Normally it is used as a
transformer for tests, but we use ts-jest for that in jest.config.ts.
And we don't use it anywhere else. That's why we don't need it in
devdependencies, even if other packages still install it.

https://jestjs.io/docs/code-transformation
https://www.npmjs.com/package/babel-jest
https://kulshekhar.github.io/ts-jest/ )

## Please complete the following:

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

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

tryout33
2025-06-21 18:36:39 -04:00
evanpelle b87f23afea fix is valid ref (#1240)
## Description:

Fix the isValidRef check. Calling x() or y() on invalid ref causes it to
throw exception.
## Please complete the following:

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

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

DISCORD_USERNAME
2025-06-20 19:40:23 +00:00
evanpelle 9ae544595b fix bad tile crash (#1237)
## Description:

Sending invalid coords can cause game to crash. Make sure to validate
tile ref.

## Please complete the following:

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

## Please put your Discord username so you can be contacted if a bug or
regression is found:
evan
2025-06-20 09:49:55 -07:00
tnhnblgl 0cd663df02 Logout Button Fix (#1234)
## Description:
Fixes #1230 
Now after logout,button doesn't disappear

## Please complete the following:

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

## Please put your Discord username so you can be contacted if a bug or
regression is found:
dovg
2025-06-19 17:05:20 -04:00
tnhnblgl bd4fe45056 Pot issue fix (#1233)
## Description:
Fixes #1232 
Fixes #1231 

Add handle's 

## Please complete the following:

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

## Please put your Discord username so you can be contacted if a bug or
regression is found:
dovg
2025-06-19 13:27:25 -07:00
Scott Anderson 5895aa7882 Simplfiy LangSelector (#1226)
## Description:

Simplify how translations work. 

## Please complete the following:

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

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-19 20:01:51 +00:00
Scott Anderson 2dad1dc9a6 Record MIRV warhead intercepted stats, perf improvements (#1220)
## Description:

- Record MIRV warhead intercepted stats.
- Refactor `nearbyUnits()` to accept a predicate, and combine related
unnecessary `filter()` and `map()` calls.

## Please complete the following:

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

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-19 12:58:27 -07:00
Omri 3597f7b326 upgrade to zod 4 (#1161)
## Description:
updates zod to v4
closes #873 

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

omrih

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-19 19:34:05 +00:00
evanpelle e58bc89b67 add spawn ads (#1228)
## Description:

Adds a bottom rail add during the spawn phase if player has played over
5 games.
Also only show the death screen ad if player has played a couple of
games.

This keeps the experience ad-free for the first few games.
<img width="1003" alt="74fb6676-273d-4b58-9fcb-50ec438c4e27"
src="https://github.com/user-attachments/assets/fedca20f-7b31-4a06-be57-bde5bd0118f0"
/>

## Please complete the following:

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

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

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-19 10:36:46 -07:00
VariableVince 51eccf512b Dependency removals and updates (#1215)
## Description:

Update rest of Jest to v30. Fixes  #1205 and complements #1206.

Remove some more unused dependencies, complements #1207:

- @types/uuid (since uuid is updated to v11, see below)
- @types/raphael
- node-addon-api
- node-gyp
- priority-queue-typescript (@datastructures-js/priority-queue stays)
- rate-limiter-flexible
- wheelnav
- raphael

Update some others too:

- ~~@types/node: ^24.0.1 (guess it would go along with dockerfile
node:24-slim)~~
- copy-webpack-plugin: ^13.0.0 (not affected by the breaking change:
only affects use of globOptions, while we only use options in
webpack.config.js)
- lint-staged: ^16.1.2 (not affected by the major changes in v16 it
seems https://github.com/lint-staged/lint-staged/releases)
- node-gyp: ^11.2.0 (breaking change v11 was drop of node v16, not
affected)
- sharp: ^0.34.2 (0.34 contains braking changes.
https://sharp.pixelplumbing.com/changelog/#v0340---4th-april-2025.
However, we don't use the touched functions so no braking changes for us
(array of images to one image or to gif, ensureAlpha or removeAlpha,
animated:true which was fixed in 0.34.2 already, info.size, background
metadata).
- sinon: ^21.0.0 (Not sure if this is used and stil needed? Two breaking
changes since our v18, one method that was never used apparently, and
two others that we probably also not use as i couldn't find anything on
it)
- uuid: ^11.1.0 (https://github.com/uuidjs/uuid#readme . We're not
affected by the breaking changes. We don't use parse(), stringify(), or
pass an option#buf argument in UsernameInput.ts where we use uuidv4.
Supports Typescript from v11 and advises to remove @types/uuid from
dependencies because of that)
- webpack-cli: ^6.0.1 (v6 had breaking changes but none of those are
applicable to us. We don't use the commands or option in the webpack
scripts in package.json. And our node, webpack and webpack-dev-server
versions are newer).

## Please complete the following:

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

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

tryout33
2025-06-19 01:01:57 +02:00
evanpelle cb97fb3410 Delay win modal (#1224)
## Description:

Have the win modal come up on slight delay to allow ad loading. Have
buttons appear ~2 seconds later so there is enough ad dwell time.

## Please complete the following:

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

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

DISCORD_USERNAME
2025-06-18 14:27:04 -07:00
evanpelle 8c2ce025af ads on death screen (#1223)
## Description:
Show the gutter ads only when the win/lose modal is active.

Describe the PR.
<img width="1899" alt="Screenshot 2025-06-18 at 1 14 36 PM"
src="https://github.com/user-attachments/assets/86b20d48-6b07-4058-8dff-8447cf565e02"
/>

## Please complete the following:

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

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

DISCORD_USERNAME
evan
2025-06-18 13:16:30 -07:00
Scott Anderson 85d94e484a Schema cleanup (#1219)
## Description:

Cleanup schemas that are using `z.discriminatedUnion()`.

## Please complete the following:

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

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-18 03:29:49 -04:00
Scott Anderson c0ada43740 Update default version number (#1218)
## Description:

Update the default version number displayed on openfront.dev builds.

## Please complete the following:

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

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-18 02:57:46 -04:00
VariableVince 6fd063f7c8 Fix build menu on water tile (#1216)
## Description:

This PR accidentally introduced a regression:
https://github.com/openfrontio/OpenFrontIO/pull/1192

The build menu part of the new radial menu now doesn't open on a water
tile, so you can't build a warship.

Fix is removing the unnecessary check for params.selected === null, as
it may actually be null in this case. Only check needed to keep PR1192's
problem fixed for the Build menu is the params === undefined check.

BEFORE:

https://github.com/user-attachments/assets/54e0fb3d-8bb1-4263-989a-81fd63ec1f5b

AFTER 1:

https://github.com/user-attachments/assets/056d30d0-b50c-46dd-bdc0-ee90349212ef

AFTER 2, showing that PR1192 issue is still fixed (no errors in
console):

https://github.com/user-attachments/assets/df598635-20a5-4d45-a1fc-1e8193f71db3

## Please complete the following:

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

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

tryout33
2025-06-18 01:46:40 -04:00
evanpelle 4480871f65 have worker send error back to client (#1178)
## Description:
On error, send the message back to the client before closing the
websocket.

## Please complete the following:

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

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

<DISCORD USERNAME>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-17 20:13:37 -07:00
evanpelle c052ab04e0 Fix gutter ads, move in-game add to bottom right corner. (#1214)
## Description:

Move the in-game add to underneath the control panel, ensure both are
320px.

Remove black squares on home page when user has ad blocker 

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

<img width="420" alt="Screenshot 2025-06-17 at 7 13 51 PM"
src="https://github.com/user-attachments/assets/2177e0b3-de1b-4196-afd7-2ceca412e9fe"
/>
2025-06-17 19:18:30 -07:00
DiesselOne b7ee1caa52 * update leaderboard align (#1189)
## Description:
This fix issue of leaderboard overlaping other elements. 
Also give option to dispaly ads below leaderboard since on desktop they
are next to each other

## Please complete the following:

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

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

Diessel

![image](https://github.com/user-attachments/assets/28d1a952-b9b1-4990-9a2a-59d221f5c007)

![image](https://github.com/user-attachmen
![Snímek obrazovky 2025-06-17 v 18 28
12](https://github.com/user-attachments/assets/f00bd060-361a-4c2f-98dd-1849f7d705ff)
ts/assets/5886ceb2-2d15-4b0e-9c30-8c61b0255f48)
![Snímek obrazovky 2025-06-17 v 18 28
36](https://github.com/user-attachments/assets/a60943ef-7865-43fa-a400-a7bd381b6ea3)
![Snímek obrazovky 2025-06-17 v 18 28
19](https://github.com/user-attachments/assets/7a328e7a-5a97-4b71-bb7a-40adac2d45c3)

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-06-17 13:32:27 -07:00
Scott Anderson ab48a320ed Update release workflow (#1212)
## Description:

Update the release workflow.

## Please complete the following:

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

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-17 16:11:03 -04:00
Scott Anderson b102d1f299 Add a 30 minute timeout to actions (#1210)
## Description:

Add a 30 minute timeout to all GitHub actions.

## Please complete the following:

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

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-17 15:16:37 -04:00
Scott Anderson ce5c14222b Update webpack-dev-server to 5.2.2 (#1207)
## Description:

Update package dependencies to resolve security warnings, and remove a
few unused depenencies.

## Please complete the following:

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

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-17 17:44:07 +00:00
evanpelle 538257b8f8 add playwire ads (#1128)
## Description:
Add ads on the left and right gutters on homepage, one small in game add
above the control panel.


## Please complete the following:

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

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

evan
<img width="1710" alt="Screenshot 2025-06-17 at 10 06 02 AM"
src="https://github.com/user-attachments/assets/1f8d0114-be2b-4fb4-90e2-86d1c5119b04"
/>

<img width="368" alt="Screenshot 2025-06-17 at 10 06 32 AM"
src="https://github.com/user-attachments/assets/8b56f92a-a9c9-47e1-8d85-23d8c4dbf773"
/>


![Uploading Screenshot 2025-06-17 at 10.07.38 AM.png…]()
2025-06-17 10:10:29 -07:00
evanpelle 7d93b484bd fix websocket error (#1208)
## Description:

When updating tunnel creation, the port was switched to 3000, so it
pointed to master, it should be pointed to port 80 (nginx) so that nginx
can route requests to the appropriate worker.

Also fixed some ws handling.

## Please complete the following:

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

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

DISCORD_USERNAME
2025-06-17 09:46:13 -07:00
evanpelle 2d565d16a1 Fix unnecessary join check (#1209)
We are already parsing ClientJoinMessageSchema so we know it's type is
"join".
2025-06-17 09:40:28 -07:00
Scott Anderson e7c963310c Release workflow (#1202)
## Description:

Add a new release workflow to test releases.

## Please complete the following:

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

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-17 02:00:17 -04:00
Scott Anderson fe0b6890b8 Jest v30 (#1206)
## Description:

Upgrade to Jest v30. Fixes #1205

## Please complete the following:

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

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-17 01:25:35 -04:00
Andrew Niziolek 69737542ea REV - Improved Username Censoring (#1119)
## Description:
The present implementation of the obscenity library leaves some
transformers un-used or in improper order damaging the overall
effectiveness of the implementation.

## Please complete the following:

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

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

ajaxburger
2025-06-17 05:10:26 +00:00
Scott Anderson b9a379e21c cache busting: Import version, changelog (#1201)
## Description:

Import version, changelog statically using webpack for cache busting
purposes.

## Please complete the following:

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

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-17 00:25:18 -04:00
Scott Anderson ec4ef01d99 Hash-based routing (#1198)
## Description:

Implement hash-based routing.

Fixes #1111

## Please complete the following:

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

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-06-16 18:45:53 -07:00