Commit Graph

2236 Commits

Author SHA1 Message Date
DevelopingTom 585cf8fdb8 Fix dead players sending alliance requests (#1508)
## Description:

Prevent unholly alliances with the undead.

## 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 have read and accepted the CLA aggreement (only required once).

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

IngloriousTom
2025-07-20 04:13:36 -04:00
Aotumuri b7cfdb7376 Make SpawnAd loading text translatable using translateText (#1393)
## Description:
Replaced the hardcoded "loading" text in the SpawnAd component with
`translateText("spawn_ad.loading")` for proper localization.

## 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-07-20 07:23:12 +00:00
Aotumuri 20821e99aa Fix issue where territory-patterns-modal is occasionally not translated (#1505)
## Description:

Fixes a problem where the territory-patterns-modal sometimes appears in
the previous language if it is opened immediately after changing the
language.

## 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 have read and accepted the CLA aggreement (only required once).

## Please put your Discord username so you can be contacted if a bug or
regression is found:
aotumuri
2025-07-20 07:20:07 +00:00
Aotumuri d47f5507ee Fix .github/workflows/pr-description.yml to support current PR structure (#1506)
## Description:

This PR fixes an issue in .github/workflows/pr-description.yml where the
logic for detecting checkboxes did not match the current PR format.
The condition was incorrect, so it has been updated to correctly
validate the checkbox 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
- [x] I have read and accepted the CLA aggreement (only required once).

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

aotumuri
2025-07-20 07:14:36 +00:00
DevelopingTom fdbe8c6490 Fix memory leak (#1502)
## Description:

GameView does not update its unit grid when units move, which can result
in memory leaks.

## 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 have read and accepted the CLA aggreement (only required once).

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

IngloriousTom
2025-07-20 03:11:36 -04:00
Scott Anderson 123787e299 Attempt to fix bigint serialization issue (#1501)
## Description:

Attempt to fix bigint serialization issue

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [ ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [ ] I have read and accepted the CLA aggreement (only required once).
v0.24.1
2025-07-19 18:35:57 -07:00
Aotumuri 11e92246f2 Fix modal not closing when game starts (#1504)
## Description:
When a player joins a public game and opens a modal (such as the news
modal) while waiting for the game to start, the modal is not dismissed
when the game begins. This leaves the modal visible even after the match
has started.

<img width="1374" height="841" alt="スクリーンショット 2025-07-20 10 25 16"
src="https://github.com/user-attachments/assets/e7170e79-0f4c-442a-bbb9-cce23aa676e7"
/>

This PR fixes the bug described above.

## 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 have read and accepted the CLA aggreement (only required once).

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

aotumuri
2025-07-19 18:27:52 -07:00
evanpelle 741d627644 reduce regen rate for bots (#1503)
## Description:

in v24 they are have become stronger due to new behavior, so reduce
regen rate to compensate.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-19 18:08:10 -07:00
Aotumuri cf2b6494ff Make footer links translatable (#1417)
## Description:

This PR makes the footer link labels ("Privacy Policy" and "Terms of
Service") translatable via the i18n system.

## 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-07-19 18:14:25 +00:00
evanpelle 4dda53b564 remove all ws listeners (#1498)
## Description:

v24 introduced a memory leak in the worker. It may be caused by
improperly cleaning up websockets.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-19 09:35:13 -07:00
Aotumuri 13f94ed36e test lang_code and filename mismatch (#1441)
## Description:

Ensure that each lang_code matches its corresponding filename in
language JSON files.

## 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-07-19 09:04:15 +00:00
Aotumuri 705c1ff00c mls (v4.2) (#1492)
## Description:

mls for v24
Version identifier within MLS: v4.2

## 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 have read and accepted the CLA aggreement (only required once).

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

aotumuri
2025-07-18 18:48:44 -04:00
evanpelle cef2a853dc increase player panel z index so it is on top of spawn timer (#1488)
## Description:

The spawn timer menu was blocking the exit button of the player panel on
mobile

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
v0.24.0
2025-07-18 10:55:21 -07:00
evanpelle b39fe625cc increase MIRV to 35M (#1487)
## Description:

The new MIRV leaves land contiguous making targets much easier to
invade. So increase price to 35M to compensate.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-18 10:53:49 -07:00
DevelopingTom 7b2a204b8e Add close button to emoji table (#1479)
## Description:

Add a close button for the Emoji table, and switch the modal to
TailWind.

<img width="698" height="1161" alt="image"
src="https://github.com/user-attachments/assets/45c998d8-e584-4d83-9177-036679828586"
/>




https://github.com/user-attachments/assets/999baf1b-1cdb-409c-a1f0-12d8298dc638



## 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 have read and accepted the CLA aggreement (only required once).

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

IngloriousTom
2025-07-18 13:46:30 -04:00
Aotumuri 028f1cad87 Fix language code mismatch during language switching (#1416)
## Description:
fixes #1413 
https://github.com/openfrontio/OpenFrontIO/issues/1413
## 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-07-18 17:41:28 +00:00
evanpelle 267fcfc147 meta: reduce port gold multiplier & trade ship frequency (#1486)
## Description:

The port bonus was too high causing too many MIRVs, reduce the port
bonus & reduce trade ship spawn chances slightly

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-18 09:27:03 -07:00
evanpelle 58cad61041 fix pop & gold not showing up on mobile UI (#1484)
## Description:

The Pop & gold was not visible on mobile devices.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-18 09:16:39 -07:00
Aotumuri 2292993995 bug fix?: Hide UnitDisplay frame when all unit types are disabled (#1392)
## Description:

This PR updates the UnitDisplay component so that when all unit types
(City, Factory, Port, Defense Post, Missile Silo, SAM Launcher) are
disabled in the game config, the UI frame itself will also be hidden.

This is a box that shows how many and what types of units the player
currently owns.
There’s a feature where, if unit types are disabled in the settings, the
corresponding parts of the UI will disappear.

However, if all unit types are disabled, for some reason the outer
container still remains visible.
While this might not be a critical issue, I feel it’s unnecessary and
redundant, so I’d like to remove it.

Alternatively, we could consider keeping the box as a kind of
placeholder to indicate that some kind of menu might appear there.
But since it serves no purpose during gameplay in that state, I think it
would just be meaningless UI.

before
<img width="1049" alt="スクリーンショット 2025-07-10 12 49 37"
src="https://github.com/user-attachments/assets/b0cf12ba-0c20-4b21-bf9f-cb17fec6817b"
/>
<img width="44" alt="スクリーンショット 2025-07-10 12 49 47"
src="https://github.com/user-attachments/assets/61e1960b-56d4-4dc8-80e7-27e49cb2d0e3"
/>

after
<img width="967" alt="スクリーンショット 2025-07-10 12 48 08"
src="https://github.com/user-attachments/assets/dfc90243-e4d6-4663-bff5-5be34453e80b"
/>

## 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-07-18 08:55:55 -07:00
evanpelle 259b73e58d fix build menu not showing correct # units 2025-07-18 08:51:57 -07:00
evanpelle 02d66b7885 fix squad allocator color palette (#1483)
## Description:

We were just doing a simple hash of the team id, causing them to be
random. now we use the the color delta function for squads as well.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-18 08:49:10 -07:00
evanpelle d4755a71fe remove spawn ad (#1482)
## Description:

It is not being destroyed on start for some users.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-18 08:47:46 -07:00
evanpelle a221fee921 Have port destination likelihood scale with level (#1473)
## Description:

Having a high level port would increase the number of outgoing
tradeships, but not the number of incoming tradeships. Now the the
chances of a tradeship landing on a port is scaled with the port's level

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
v0.24.0-prerelease
2025-07-17 19:21:27 -07:00
floriankilian ad642bc0ab Fix Regex to allow Umlaute "üÜ" in username (#1466)
## Description:

Modified the regex pattern & full unicode support (/u)

1) Allow Umlaute "üÜ" in usernames on client-side
2) Allow Umlaute "üÜ" in usernames on server-side

Before only the name "üÜüÜ" would have been possible as the pattern was
|üÜ -> or "üÜ" as a combined sequence
|[üÜ] -> or either one of these letters



## Please complete the following:

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

Not 100% sure what/where else to test. I started couple of private
lobbies with various names.

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

[UN nvm]
2025-07-17 17:56:30 -07:00
evanpelle 9fca546745 alert on ws 1002 error (#1472)
## Description:

Alert the error when a user is unauthorized to join a game. Previously
it would just log an error and the user would have no idea why they
couldn't join a game (if for example they were using a restricted
pattern). Now the user gets an alert. We should make this a proper modal
in the future.

## Please complete the following:

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

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

evan
2025-07-17 16:03:01 -07:00
evanpelle 1d5d721c50 fix control panel & events display scaling on mobile (#1471)
## Description:

The Control panel & events display were not scaling properly on mobile,
now when screen is small enough they take the entire width, this keeps
the behavior in line with v23.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-17 14:57:38 -07:00
evanpelle d89babea04 leaderboard bugfix: show by default for medium to large screens. (#1470)
## Description:

removes the unnecessary check in tick() which was causing the
leaderboard to not be shown by default on smaller screens.

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-17 11:19:58 -07:00
evanpelle 6bad34a2a3 fix team leaderboard margin (#1469)
## Description:

The team leaderboard had a large top margin. This PR aligns the team
leaderboard with the player leaderboard.

<img width="758" height="541" alt="Screenshot 2025-07-17 at 8 55 04 AM"
src="https://github.com/user-attachments/assets/9c9b6b67-e448-4419-8625-644e6e8584c7"
/>

## 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 have read and accepted the CLA aggreement (only required once).

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

evan
2025-07-17 09:00:20 -07:00
evanpelle b5c1ae1bbf Increase traitor punishment (#1456)
During playtesting the traitor punishment still wasn't harsh enough.
2025-07-17 08:01:53 -07:00
evanpelle 87678b7969 Increase trade ship spawn rate (#1455)
## Description:

During play testing not enough trade ships were spawning in the mid-late
game. This increases their spawn rate and max number of ships.

## 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-07-16 20:24:01 -07:00
evanpelle b25d54334c update pr template to have CLA checkbox. (#1465)
## Description:

update pr template to have CLA checkbox.

## 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-07-16 19:27:48 -07:00
evanpelle ae5941f97d Create CLA.md (#1462)
## Description:

Create CLA.md

## 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-07-16 19:00:13 -07:00
VariableVince 161f7dbd00 Fix: attack on ally even with greyed out button (#1460)
## Description:

Bugfix for: when clicking the central radial menu button (attack button)
on an ally, the ally would be attacked. And you'd inadvertently get a
traitor debuff. Even if the button was greyed out (#1426), the attack
would still happen.

BEFORE:

https://github.com/user-attachments/assets/833bf587-211f-4e6e-86b8-6374ca6f3d6c

AFTER:

https://github.com/user-attachments/assets/38e4ae6d-caac-47c9-9b0d-57bacdd7a846

## Please complete the following:

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

tryout
2025-07-16 18:53:57 -07:00
evanpelle b7d3871f29 Update asset license (#1458)
## Description:

Update nc cc with commercial exemption for OpenFront LLC to be more
clear.

## 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-07-16 18:32:14 -07:00
VariableVince c7af6c04c5 Fix: "Game speed" not "Replay speed" during Single player game (#1457)
## Description:

Fix for regression. In #1145, "Game speed" was added to show in Single
player instead of "Replay speed", and then in #1243 again. But after the
changes in #1415 it no longer worked, although some code remained.

Before:
<img width="417" height="161" alt="Replay speed when in single player
game"
src="https://github.com/user-attachments/assets/ff9aac99-6948-4c10-bb30-36ba5973c12e"
/>

After:
<img width="392" height="178" alt="Game speed instead of Replay speed"
src="https://github.com/user-attachments/assets/3beb712a-2539-46c5-a50a-eda593a5417c"
/>

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [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-07-16 20:35:16 -04:00
VariableVince b850a2f93d Tradeship performance (#1448)
## Description:

Small performance improvements for tradeship execution. With the new cap
of 100 tradeships in total, the impact is smaller but still there.

Also added jlrouillard's (Vivacious Box) test with permission from PR
#1449. Tests 100% passed.

- Save tradeship owner, destination port owner and tradeship current
tile in constants for re-use.
- Added check if wasCaptured was already set to true, before comparing
origOwner and tradeship owner and setting wasCaptured to true.
Currently, wasCaptured is set to true once and never back to false
again. This PR keeps it that way but a but faster.
- One less call to pathfinder needed: before calling pathfinder, check
if current tile is destination port tile, and if so call complete. This
is basically the same as pathfinder would do, but less complex without
need for e.g. manhattan distance.
- case PathFindResultType.Completed: isn't needed anymore because of the
above. Kept as fallback. But moved it down in the switch statement, as
there's a low(er) chance the case will ever be true.
- Test if we need to find a new destination port for captured ship:
currently, if this.wasCaptured is true, it will look for a new
destination port each tick again and again. With this PR, only do this
if destination port isn't owned by capturer, or if that port has become
inactive. In tests with thousands of tradeships, went down from 300K+
times setting 'new' port, to only 1250 calls.

**Q:** Will this code work for ships that are captured again, after
being captured already?
**A:** Yes. After wasCaptured is set to true once (after first capture),
we only need to check each tick if the destination port is owned by the
current tradeship owner, to know if we need to assign a new destination
port again.

## 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-07-16 19:27:28 -04:00
evanpelle 712e824ffc Revert MIRV attacks enemy units (#1452)
This reverts commit 185fcb5fb0.

## Description:

This change made the MIRV way too powerful. If two players MIRV each
other it creates a stalemate because it takes so long to recover.

## 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-07-16 15:50:15 -07:00
VariableVince af3dcb77bd Fix: anonymized name isn't used in chat message (#1265)
## Description:

Bugfix:
- Anonymized name isn't used in Event Panel message, instead actual
player name is displayed even if "Hidden names" is enabled. Neither for
the 'P1' name in the chat message, nor for the name in "From name:
message" and "Sent name: message". Fix: in QuickChatExecution, instead
of sender.name() and recipient.name(), send their id(). In
EventsDisplay, from that PlayerID get their displayName.

- There was more in this PR to try to improve readibility and remove
some unused/uncommented code. This was moved later to #1275, which may
be re-opened and brought up-to-date after this PR is merged.

Example screenshot of the bug before the fix, send chat to anonymized
name 'Norwegian Sisterhood' but in Event Panel real name 'Mister Goo'
was displayed:
![Sent Mister Goo instead of anonymous Norwegian
Brotherhood](https://github.com/user-attachments/assets/197e2808-aa85-4271-9c96-c53fe10f6546)

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [ ] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [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-07-15 19:43:31 -04:00
evanpelle 5dd7826192 make radial menu thicker (#1446)
## Description:

The root radial elements had a dead space, causing accidental misclicks.
This PR makes the wider. It also shrinks the back button to prevent
overlap.

## 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
v0.24.0-beta3
2025-07-15 12:08:07 -07:00
evanpelle d4794840f6 Have radial menu refresh when open (#1437)
## Description:

There was a regression where the radial menu would not refresh while
open (eg open radial menu, then get enough gold to build something, the
radial wouldn't update).

Also refactored a bit

## 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-07-15 11:54:33 -07:00
evanpelle 6efc37e97d fix number of land tiles fixes #1409 (#1445)
## Description:

There was a bug in the map generator where shore tiles were counted
twice.

## 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-07-15 11:38:53 -07:00
Scott Anderson 729cc6a500 Restore nation AI (#1440)
## Description:

Restore the nation AI that scaled with difficulty, while only allowing
one of the attack routines to attack.

## 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-07-15 01:20:05 -04:00
Scott Anderson be01b90b25 Eslint (#998)
## Description:

Enable a few eslint rules:
- `@typescript-eslint/no-empty-object-type`
- `@typescript-eslint/no-require-imports`
- `no-useless-escape`

## 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-07-15 00:41:24 -04:00
g-santos-m 31381f67f4 Enable @typescript eslint/prefer nullish coalescing eslint rule (#1420)
## Description:

Fixes #952 
Enabled @typescript-eslint/prefer-nullish-coalescing rule and worked
through every error, introducing ?? and ??= operators or disabling
errors with inline comments where appropriate, to the best of my
ability.

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

g_santos_m
2025-07-15 03:00:06 +00:00
evanpelle ac9a9ec253 fix unit upgrade not considering cost (#1434)
## Description:

bugfix: The price was not considered when checking it upgrading a unit
was allowed.
Also refacted and cleaned up the code a bit.

## 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-07-14 16:32:05 -07:00
floriankilian 211c2ff49d Followup: news-button: blue-glow; simpler localStorage (#1431)
## Description:

Changed the localStorage key from "news-button-last-seen-version" to a
simpler "version" in the NewsButton component.
And reverting a coderabbit recommendation in the css file, that
eliminated the blue glow effect.

Follow-up to #1385

<img width="808" height="845" alt="Screenshot 2025-07-14 205018"
src="https://github.com/user-attachments/assets/8c26c36c-ee2e-4a53-af61-f371eefd102a"
/>

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

[UN]nvm
2025-07-14 15:12:12 -04:00
DevelopingTom 29b587cdae Factory spawns trains (#1408)
## Description:

- Change trains so it spawns from factories only
- Increase train frequency as they will now spawn from a single
structure.
- Factory will spawn more trains depending on its level
- Fix port to connect to nearby railroads
- Add factory description

## 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: Tom Rouillard <trouilla@mathworks.com>
Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-07-14 08:59:51 -07:00
evanpelle 1e73293d4f remove radial animation, fix back button (#1427)
## Description:

Removed the animation from the radial menu, it now pops up instantly
Also fixed bug where back button was grayed out

## 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-07-14 08:57:38 -07:00
evanpelle 79505c41c8 radial menu attack self bugfix (#1426)
## Description:

bugfix where the radial center button was active when clicking on your
own territory.

## 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-07-13 18:09:41 -07:00
evanpelle da8aeedd8b Leaderboard improvements (#1424)
## Description:

1. Made leaderboard smaller
2. replaced show top 5/show all with a +/- to save space
3. show leaderboard by default on larger screens

<img width="458" height="393" alt="Screenshot 2025-07-13 at 5 27 10 PM"
src="https://github.com/user-attachments/assets/c18c732b-8b1e-4b71-89aa-b807ceb91e30"
/>

## 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-07-13 17:48:04 -07:00