Commit Graph

1850 Commits

Author SHA1 Message Date
1brucben bf0d677d42 border refresh 2025-05-21 11:59:03 +02:00
PilkeySEK 772b72dfef Donate the attackratio instead of 1/3 (#534)
## Description:

The changes introduce a new public uiState property to the PlayerPanel
class and ensure it is assigned from the shared UI state in the
createRenderer function. The troop donation logic in PlayerPanel is
updated to use the attackRatio from uiState to determine the number of
troops to donate, replacing the previous static or null value.

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [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:

PilkeySEK
2025-05-21 04:15:28 -04:00
Duwibi 2f1fc5e998 Lobby size (#745)
## Description:
This PR makes individual max lobby sizes for all of the maps. It also
makes the max players on team mode multiply by 1.5 instead of the
previous 2.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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>
Nikola123

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
Co-authored-by: Scott Anderson <scottanderson@users.noreply.github.com>
2025-05-21 03:52:06 -04:00
Scott Anderson c39ffa91f9 Transition flag from null to undefined (#831)
## Description:

Replace `null` with `undefined` for player flags.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-21 01:53:42 -04:00
Scott Anderson ad045c4a02 Raise timeout to 18h 2025-05-21 01:48:57 -04:00
Scott Anderson aa6e252ff3 bug: Fix the TTL feature in docker staging (#832)
## Description:

Modify the docker run command to allow containers in staging to
terminate.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-21 01:47:17 -04:00
Scott Anderson 95c15de218 Fix deployment status environment (#833)
## Description:

Fix the deployment status environment to match the new environment
names.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-21 01:39:23 -04:00
Scott Anderson 5aa8356513 Record player stats during the game (#784)
## Description:

Record player stats for the analytics worker to import in to to
postgres. This changes defines a new Analytics schema version, `v0.0.2`,
containing additional metadata about each player.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-21 00:10:29 -04:00
Scott Anderson 228f5b13af Landing boats always conquer shore tile (#790)
## Description:

Modifies the transport ship landing logic to always conquer the tile.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-20 13:08:02 -07:00
Scott Anderson 9b0ddc7f77 Update status check names (#822)
## Description:

Github requires unique display names for each required status check.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-19 23:59:17 -04:00
evanpelle b4c0a5b0d2 bugfix: pressing lobby button causes player to attempt to join invalid game 2025-05-19 18:35:36 -07:00
evanpelle d9b4ffa141 update gatekeeper commit 2025-05-19 16:36:41 -07:00
evanpelle 2f6619edbc update gatekeeper 2025-05-19 16:30:25 -07:00
evanpelle d7e7df1df6 Revert "enable otel logs and metrics for staging environments"
This reverts commit c1fe956f4e.
2025-05-19 16:10:37 -07:00
evanpelle bcf7a238c9 have master remove game id if it fails to fetch game from worker 2025-05-19 16:10:09 -07:00
tnhnblgl ca66656b5c Display alliance timer in player panel (#805)
## Description:
Below Traitor: , There will be Alliance Status. And will display timer,
after timer ends will show Alliance Expired. Also this Alliance Status
will only show if player had alliance.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-19 15:29:40 -07:00
1brucben 2cdce06244 Enable Shield (#817)
## Description:
Shield needs enabling
## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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:

1brucben
2025-05-19 11:27:52 -07:00
Scott Anderson 090ef8046c Add hash to Unit interface (#811)
## Description:

- Add `hash()` to the `Unit` interface to avoid casts with `as`.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-19 11:02:50 -07:00
1brucben fa1ed7c653 attack meta changes (#742)
## Description: 
Full changes for the attack meta for v23. These include changes to
attack losses and speed both in general and in relation with defense
posts and fallout. Max population, population growth, and gold
generation are also adjusted. Troops and attack boats sent now count
within max pop. Deployed at attackmeta.openfront.dev

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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:

1brucben
2025-05-19 09:34:42 -07:00
Scott Anderson 285d1f0d8d Update environment defaults (#816)
## Description:

Update environment defaults.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [ ] 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-05-19 07:19:01 -07:00
Scott Anderson da18f7d4b1 Update dockerfile to node 24 (#814)
## Description:

Update Dockerfile to `node:24-slim` to resolve an error about missing
crypto that is preventing JWT cryptographic verification.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-19 00:13:31 -04:00
evanpelle c1fe956f4e enable otel logs and metrics for staging environments 2025-05-18 19:58:09 -07:00
VariableVince 866ff7c487 Rename helpModal images so CDN cache is refreshed on commit (#810)
## Description:

Overwritten images (same file name) from PR
https://github.com/openfrontio/OpenFrontIO/pull/785 took more than a day
to all be shown in Instructions (helpModal) on .dev. Prevent this from
happening on commit to prod by renaming them.

There's talk about cache busting but that isn't implemented (yet) for
now.

Two of the 7 renamed ones:

![afbeelding](https://github.com/user-attachments/assets/71f95659-71ce-4504-9b21-bd02e67c0786)


## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-18 14:13:25 -07:00
evanpelle 0cd32c807a don't, make a copy of input array, instead shuffle it in PseudoRandom.shuffleArray 2025-05-18 14:04:25 -07:00
Vivacious Box 9916f21aab Boat retreat (#705)
## Description:
Add boat retreat (continue #365 by
[QuentinSiruguet](https://github.com/openfrontio/OpenFrontIO/issues?q=is%3Apr+author%3AQuentinSiruguet))

Basically implements all the pending reviews from #365


![retreat](https://github.com/user-attachments/assets/d2c34366-89d0-42ed-9aa7-5ab1f833d780)



## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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:

VivaciousBox

---------

Co-authored-by: Quentin SIRUGUET <quentin.siruguet@gmail.com>
2025-05-18 13:34:42 -07:00
VariableVince 88d9707f6e Fix Player Panel vertical position (top out of view) (#804)
## Description:
Fixes the Player Info Panel top part being out of view, at least on some
screen resolutions. Workaround was changing browser zoom from 100% to
80%, or to scroll to change the vertical position of the panel. This is
now not needed anymore.

Also disables vertical scrolling of the position of the panel itself.
And prevents zooming the background game map.

Position is still not perfect on all resolutions but the top or bottom
won't be out of view anymore. Tested using DevTools. I don't have the
option to deploy a branch (yet?), this may be needed so others can test
on their screens just to be sure.

Normally the current "top-1/2 -translate-y-1/2" should have done the
trick and put the vertical position at 50% of the screen. The root cause
of this not working on all screens may be a parent element or something
else, but touching that could create new UI issues. So fixing it from
within PlayerPanel.ts itself seemed the best choice here.

!! The only actual changes are in lines 228-237. The rest are shifts in
positions or from prettier.

Before:

![Before](https://github.com/user-attachments/assets/776bf8d8-a539-4228-8eec-4fae004e004e)


![scrollbug](https://github.com/user-attachments/assets/b8375818-220d-41a3-aaa7-a65b2cb0729c)


After (don't mind the empty player name box, the fix for that bug isn't
in main yet https://github.com/openfrontio/OpenFrontIO/pull/795):
![After
1920x1200](https://github.com/user-attachments/assets/5a46e38b-bac6-4535-8186-60ae6bbd7c24)


## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-18 13:26:42 -07:00
Duwibi 4f2442ff59 Update Halkidiki.json (#809)
## Description:
Fixed wording in Halkidiki.json

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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>
Nikola123
2025-05-18 16:17:08 -04:00
1brucben 3a18b62b94 gold formula adjusted for new meta (#757)
## Description: 
Gold formula adjusted to form ~ workers ^ .7

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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:

1brucben
2025-05-18 15:52:24 -04:00
DevelopingTom bb24f18285 Add new FX layer and a nuke animation (#807)
## Description:

Changes:
- Added an AnimatedSprite class to handle spritesheets
- New FX layer, displaying cosmectics effects
- New Nuke FX: an animated sprite explosion, and a shockwave effect
- New "Special effects" setting, toggle to deactivate the FX layer for
lower-end hardware / personal taste


#### Note that the animation is a placeholder. It should be replaced
when a better looking one is available.

- Nuke:


https://github.com/user-attachments/assets/6eff1d0d-5081-47ad-932f-2bfcda72cb3c


- Mirv:


https://github.com/user-attachments/assets/3bc891b4-449c-4acb-8e24-e237b423c2a9


- SAM are also using the same Nuke animation. To be improved with a
custom FX:


https://github.com/user-attachments/assets/d65addce-5890-42c2-81e0-3eaa79ed87f3

## Performances:

Excellent since it's not manipulating the underlying imagedata directly.
Profiling during a MIRV with 100's of animations:

![image](https://github.com/user-attachments/assets/3477c963-d10f-493b-bcb1-93b7990d3edb)



### New settings:

- main menu:


![image](https://github.com/user-attachments/assets/5b1127bb-3b89-4c06-b519-fb173301d9fd)

- In game:


![image](https://github.com/user-attachments/assets/ba899253-a7cf-4d1c-8801-da41d2b1536b)


## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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
2025-05-18 12:43:12 -07:00
Scott Anderson 1ebf6d4fab bug: anon names (#795)
## Description:

Fix a bad conflict resolution from enabling `strictNullChecks`.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-18 10:50:08 -07:00
Vivacious Box 95e0e9fa33 Fix regression: put sprite clearing in a distinct method to make the intent clearer (#800)
## Description:
Fix regression on unite sprites drawing, the old code which used 2 for
loops on the same object looked like there was an oversight.
By splitting it in 2 function calls and adding a comment the intent
should be clearer.


Before:

![image](https://github.com/user-attachments/assets/b396f35c-1ca0-4622-a93c-1ad2f728b5b9)

After:

![image](https://github.com/user-attachments/assets/17aa2e0a-4627-42a7-90d4-c6685b22a380)


## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-18 10:49:29 -07:00
Duwibi 35069adee4 Add Halkidiki Map (#799)
## Description:
This PR adds the Halkidiki map. It's a region in Greece with rich
history that is very popular also with tourism.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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>
Nikola123
2025-05-18 09:54:27 -07:00
Vivacious Box 332629de78 Fix mirvhead spamming same location (#801)
## Description:
There is a bug in the proximity check in the mirvhead destination 

This fixes it.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

Vivacious Box
2025-05-18 08:03:04 -07:00
VariableVince 01ef525e11 Update Instructions and text in Build menu/Player panel (#785)
## Description:

New images in Instructions where needed for:
- event panel: wasn't mentioned yet
- infopanel changed: quick chat, donate gold, stop/start trading etc
- player icons: traitor, embargo, requesting alliance
- radial menu: now differs between enemy/ally
- leaderboard: was changed
- options: time display was changed, cookie preferences button is now
visible so kept that in the new image

Some justifcations of part of the textual changes:
- Trade: info was already behind and now updated to include changes from
PR https://github.com/openfrontio/OpenFrontIO/pull/707
- Retreats: weren't yet mentioned. Added this to new info about Event
panel. Including https://github.com/openfrontio/OpenFrontIO/pull/699,
and not-yet-but-soon merged PR
https://github.com/openfrontio/OpenFrontIO/pull/740 and
https://github.com/openfrontio/OpenFrontIO/pull/705
- Radial Menu: close button has been replaced, explain that
right-clicking closes it now.
- Traitor: being a traitor and its consequences, like the changed
defense debuff and effects on trade.
- SAM: launcher hit chanches % changed.
- Port: Battleships > Warships and other changes.
- Warship: made more clear that only enemy trade ships/warships/boats
are captured/destroyed. Made 'attack-click' more clear.
- Boat: the word Boat was used, not Transport ship. While on server and
in code it is called a Transport (ship) too. Tried to clear this up.
Since it is now explained n Instructions, it doesn't have to be
clarified per se elsewhere. Like in Build menu for Warship it says
"Captures trade ships, destroys ships and boats" which can stay this way
as it is now assumed knowledge that boat = transport.
- More uniform capitalisation for 'Openfront' terms: capitalization was
used differently across terms like Info panel and build menu, Alternate
view and Alternate View. Other instances are more ambiguous like "Small
explosive bomb that destroys territory, buildings, ships and boats"
which i kept as is.
- Embargo: the word 'embargo' was deliberately removed earlier, because
it wasn't always understood by target audience
(https://github.com/openfrontio/OpenFrontIO/pull/147). But some remnants
were left. Using 'stop trading' in all but one spot now: it's used as
one-word explanation for the Dollar stop sign player icon, just like
other icons also have short 'Ally' 'Traitor' etc. So the players who do
use the word embargo still have one reference left.

- Build menu: left Warship description as is (see 'Boat:' above).
Updated Port description from "Sends trade ships to allies to generate
gold" to "Sends trade ships to generate gold". Trade is not only with
allies anymore. And there's more details that are in Instructions like
the effects stop/start trading, that don't have to be in the Build menu.
This lessens the chances of having to change the Port description in
Build menu again.

- Player info: changed "Embargo against you" to "Stopped trade with you"
(see 'Embargo:' above).

Keys that need to be (re)translated in MLS:
- NEW keys: info_chat, info_trade, ally_donate_gold, build_menu_desc,
icon_embargo, icon_request, ui_playeroverlay, ui_playeroverlay_desc,
ui_events, ui_events_desc, ui_events_alliance, ui_events_attack,
ui_events_quickchat
- UPDATED keys: info_enemy_desc, ally_betray, build_port_desc,
build_warship_desc, build_sam_desc, icon_crown, icon_traitor,
radial_boat, radial_build, build_menu.desc.port, embargo,
option_settings, build_defense_desc, radial_desc, ui_leaderboard_desc

Font looks weird in screenshots because of zoom 40% in browser to
capture it all:
![Instructions
1](https://github.com/user-attachments/assets/d349bb12-f0ec-407d-b29f-68b25cf98dc1)
![Instructions
2](https://github.com/user-attachments/assets/0d7753b7-99a6-41f3-99d7-182cf1ef57f3)
![Instructions
3](https://github.com/user-attachments/assets/9087f2e3-8e8e-4c77-8ec4-a2410e15d3d3)
![Instructions
4](https://github.com/user-attachments/assets/132c5b61-d211-4fbe-82a9-508feef1ad37)
![Instructions
5](https://github.com/user-attachments/assets/decde07b-9c63-4520-a845-109810c106a4)


![afbeelding](https://github.com/user-attachments/assets/10d12b20-48e9-406e-b3a3-01dbf5a76642)

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Added new UI elements and icons for alliance requests, embargo status,
and gold donation in the help modal and player info panels.
- Introduced detailed sections in the help modal for events, player
overlays, and expanded build menu explanations.

- **Improvements**
- Enhanced and clarified descriptions for leaderboard, event panels,
player overlays, ally betrayal, and build menu items.
- Improved visual grouping, layout, and styling consistency in the help
modal and across UI icons.

- **Style**
- Updated and unified image and icon styles for consistent appearance in
the help modal.
- Added new CSS classes for modal images and icons; removed fixed-size
radial menu image style.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-17 21:04:33 -07:00
Scott Anderson b558bd722d Prevent multiple clients from using the same account (#706)
## Description:

This change blocks a persistent ID from being reused by more than one
client in the same game. This setting is only enabled in staging and
prod.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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-05-17 21:03:05 -07:00
Scott Anderson e4c8b17b48 Fix overly permissive regular expression range (#765)
## Description:

Add escaping to the `-` character to prevent it from specifying a
character range.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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

## Original description

Potential fix for
[https://github.com/openfrontio/OpenFrontIO/security/code-scanning/6](https://github.com/openfrontio/OpenFrontIO/security/code-scanning/6)

To fix the issue, we will replace the ambiguous range `)-_` with an
explicit list of the intended characters. This ensures that the regular
expression is unambiguous and matches only the desired characters. We
will carefully review the rest of the regular expression to ensure no
other overly permissive ranges exist. The updated regular expression
will maintain the same functionality while being more precise.


_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved the clarity of character validation for safe strings,
ensuring consistent handling of special characters. No changes to
user-facing features or functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-05-17 20:41:49 -07:00
evanpelle 2f091bf24b reduce log spam during test: use debug logging for map generation, disable debug logging for unit tests 2025-05-17 18:32:22 -07:00
evanpelle 500b5fcfde Clean up and refactor the Unit class (#769)
## Description:

* Merged similar fields so they can be reused (eg warshipTarget =>
targetUnit)
* simplified isCooldown api
* added "touch" method to send update to UI layer
* standardized on "undefined"


## Please complete the following:

- [ ] I have added screenshots for all UI updates
- [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

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Unified and simplified how unit targets and cooldowns are managed
across all unit types, resulting in more consistent in-game behavior for
nukes, warships, trade ships, and SAM launchers.
- Updated naming and logic for unit targeting and cooldowns, improving
clarity in status displays and interactions.
- Reorganized unit interface and streamlined cooldown handling for
smoother gameplay experience.
- **Bug Fixes**
- Corrected visual indicators for nukes and warships to accurately
reflect their targets.
- **Tests**
- Updated automated tests to align with the new cooldown and targeting
logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-17 17:45:10 -07:00
evanpelle 0871c08858 update version 2025-05-17 08:23:27 -07:00
evanpelle 1a0b3dbe88 LocalServer: call endGame on replay when all turns have been executed 2025-05-17 08:20:02 -07:00
evanpelle 4cba9ae573 bugfix: when warship searches for patrol tile, fallback to allowing a shore tile. Return undefined to prevent unreachable code exception. 2025-05-17 08:19:53 -07:00
Scott Anderson 07122f6b9c Fix traitor duration text (#783)
## Description:

Fix traitor duration text

## Please complete the following:

- [ ] I have added screenshots for all UI updates
- [ ] 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-05-16 19:53:06 -07:00
Scott Anderson e298eafc5a Break alliance on launch (#775)
## Description:

- Break alliances on launch based on speculative damage.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Behavior Changes**
- Alliances are now immediately broken when a nuke is launched and its
incoming message is displayed, rather than only at detonation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-05-16 20:03:51 -04:00
Scott Anderson 3e7fe607e8 PR description check (#766)
## Description:

Adds a PR description checker that enforce that the PR template is being
followed.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Introduced automated validation for pull request descriptions to
ensure required sections and checklist items are completed before
merging.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-05-16 16:18:45 -07:00
Aotumuri 6431153903 Disable send button when required player not selected in quick chat (#767)
## Description:
This PR prevents players from sending Quick Chat messages that require a
player target ([P1]) unless a player has been selected. The Send button
is now disabled in such cases and visually dimmed for clarity.
## Please complete the following:

- [ ] I have added screenshots for all UI updates
- [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

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- The chat send button is now disabled if a required player selection is
missing, preventing unintended sends.

- **Style**
- The chat send button visually indicates when it is disabled with a
gray background and a not-allowed cursor.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-16 16:15:53 -07:00
Scott Anderson 14e284bb40 Update deploy hosts (#774)
## Description:

Update the deploy script with new hosts.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [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

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated deployment workflow to use new deployment targets: "masters"
and "nbg1" (replacing "eu" and "us"), while retaining "staging".
- Adjusted environment variables and SSH setup to support the new
deployment hosts.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-05-16 16:12:52 -07:00
Vivacious Box 1f6642888b Fix capturing isolated clusters (#761)
## Description:
Current behavior:
TerraNullius tiles are taken into account for capturing isolated
clusters
Also isolated clusters can be captured by allies

It might be intended behavior but in case it is not, here is a quick fix


Before:

![capturenuke](https://github.com/user-attachments/assets/d2df37ea-cc35-496e-a7f2-0980c7af29f6)

After:

![capturenuke2](https://github.com/user-attachments/assets/55694e84-ceb3-47b9-96b7-61c9a7b51d3b)


⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
### This will also change capturing isolated clusters while attacking as
long as there is TerraNullius as a neighbor so if it is intended
behavior, please discard.
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️


## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

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

Vivacious Box
2025-05-16 14:33:41 -07:00
Duwibi 4a5b5ed5ff Fix Black Sea map lakes (#772)
## Description:
Fixes Black Sea map lakes

## Please complete the following:

- [ ] I have added screenshots for all UI updates
- [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>
Nikola123
2025-05-16 13:25:47 -07:00
Duwibi 4bf4d564de Fix inverted terrain on Black Sea map (#770)
## Description:
This PR fixes the inverted terrain on the Black Sea map

## Please complete the following:

- [ ] I have added screenshots for all UI updates
- [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>
Nikola123
2025-05-16 11:40:13 -07:00
evanpelle 86ce96fff5 update gatekeeper submodule ref 2025-05-16 10:00:58 -07:00