Commit Graph

2462 Commits

Author SHA1 Message Date
icslucas fd3574e6f0 Update package-lock.json 2025-09-23 19:40:05 +02:00
Tristan b09fc88453 opti : Compress all images losslessly from 140Mo to 30Mo (#2063)
## Description:

Compress all images (.png, .svg, .webp) losslessly from 140Mo to 30Mo.

To confirm : find . -type f \( -iname "*.png" -o -iname "*.svg" -o
-iname "*.webp" \) -exec du -ch {} + | tail -n1
Before : 140M 
Now : 30M

## Please complete the following:

- [X ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

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

Iron_Mine : (300612003138109451)
2025-09-22 10:08:57 -07:00
Duwibi a2d19198a7 Fix the Strait Of Gibraltar map (#2080)
## Description:
This PR fixes the rivers not showing up on the map in-game.

Describe the PR.

## Please complete the following:

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

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

DISCORD_USERNAME
Nikola123
2025-09-22 09:41:31 -07:00
Duwibi 3f4f5b195b Add Montreal (#2081)
## Description:
This PR adds the Montreal map that was used in OFM with some revisions,
including adding some river and changing the overall topography.

Describe the PR.

## Please complete the following:

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

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

DISCORD_USERNAME
Nikola123
2025-09-22 09:40:38 -07:00
evanpelle d2314941fe Merge branch 'v25' 2025-09-18 11:26:53 -07:00
Aotumuri ab53b2f017 Add translate="no" to <html> (#2053)
## Description:

This PR prevents automatic browser translation (e.g., in Chrome) from
triggering immediately upon page load.
This approach is somewhat of a workaround, so it would be better if
another fix could be found.

Please refer to the following issue for the rationale: #2052

Fixes #2052

## Please complete the following:

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

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

Aotumuri

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-09-16 16:54:03 +00:00
Aotumuri a4127960b7 Add function to fetch player information (#2010)
## Description:

This pull request introduces the fetchPlayerById() function together
with its associated schema components.

It represents one part of a series of split pull requests related to the
PlayerInfoModal (Player Profile). Subsequent pull requests will address
UI implementation and additional features.

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

## Please complete the following:

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

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

aotumuri

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-09-14 15:15:50 -07:00
GOC 835c8d97ce fix(GameRenderer): correct comment typo (#2051)
## Description:

Fix a minor typo in a TODO comment inside `GameRenderer.ts`.

No code behavior was changed.

## Please complete the following:

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

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

GOC
2025-09-13 09:21:37 -07:00
Abdallah Bahrawi 0a6ab07d2e fix: traitor bug when attacking immediately after initiating an alliance (#2044)
## Description:

This PR fixes a critical race condition bug where players could
unintentionally receive the traitor debuff when alliance requests were
accepted mid-attack.


Critical Bug Fixes #1866

**Root Cause:** 
Players could bypass UI alliance checks ( isFriendly() ) by accepting
alliances and immediately attacking after that, causing the server to
treat the attack as betrayal
Solution: Added server-side alliance validation in
AttackExecution.init()
This ensures attacks on allies are blocked at the server level.

- Once Bots and Nations decide to attack, they breaks the alliance. I
added maybeConsiderBetrayal(), which currently always returns true. I’ll
add proper logic for alliance-breaking soon on another PR; this didn’t
exist in the code before.

## Please complete the following:

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

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

abodcraft1

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-09-13 09:21:21 -07:00
evanpelle 25e8ec0579 use no-cache when retrieving commit.txt to avoid stale commit v0.25.16 2025-09-12 10:27:20 -07:00
evanpelle ab6578a6e3 replace eu with falk1 for deployment v0.25.15 2025-09-12 10:16:20 -07:00
evanpelle d522c33ba3 cache /commit.txt for only 5 seconds to prevent stale git commits v0.25.14 2025-09-12 09:00:49 -07:00
evanpelle ce4fd058c5 change production machine from nbg1 to falk1 2025-09-12 08:48:10 -07:00
evanpelle 9d24ab53ad bugfix: use replacer when stringifying gamerecord for bigints 2025-09-12 08:30:31 -07:00
evanpelle 272c362182 bugfix: use Basic prefix for otel metrics v0.25.13 2025-09-11 22:19:21 -07:00
evanpelle b46d76932d add falk1 server to deployment v0.25.11 2025-09-11 21:30:52 -07:00
evanpelle 95ad22873f Trim git comment to remove trailing \n 2025-09-11 21:29:10 -07:00
evanpelle 50dd062945 Logger: just use Basic + secret 2025-09-11 21:28:03 -07:00
evanpelle e26d164ef0 allow just otel key to avoid spaces in env variables v0.25.10 2025-09-11 19:48:02 -07:00
evanpelle ec5f95ef22 add falk1 server to deployment v0.25.12 2025-09-11 19:02:12 -07:00
Loymdayddaud eeef3e2c97 Add auto-assign PR author workflow (#1983)
## Description:

Adds a GitHub Action to automatically assign a PR author when they
create the author.
This PR tests itself.

replaces #1822 

## Please complete the following:

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

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

loymdayddaud

Co-authored-by: TheGiraffe3 <TheGiraffe3@users.noreply.github.com>
2025-09-11 18:20:43 -07:00
eshen16 3ba0d8dced Player names are hidden when zoomed in too much (#2043)
## Description:
Player names are hidden, except small sized fonts, when zoomed in too
much(near max), improving user experience by allowing users to see
structures clearly without the obstruction of text

## 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(no need)
- [x] I have added relevant tests to the test directory(n/a)
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Video
[video](https://streamable.com/e/mlrfqo?)

## Please put your Discord username so you can be contacted if a bug or
regression is found:
_federalagent
2025-09-11 18:18:12 -07:00
Baeck Dong Jae a68d0174f2 pseudorandom.ts minor fixes (#2046)
## Description:

in src/core/pseudorandom.ts
a helper function of nextint is defined but never used. 
instead, this.rng is used. those are replaced.

also, shuffleArray originally would self-shuffle at i=0 for the
conditional being i>=0, fixed to 0.

## Please complete the following:

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

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

jack_45183
2025-09-11 18:08:43 -07:00
evanpelle eec3b0e2bb Fetch archived games from api, allow development against production & staging (#2045)
## Description:

Instead of going through the game server to fetch archived games, have
the client fetch from api directly. Also loosen up cors restrictions &
domain checks so localhost:9000 can talk to staging or production
servers

related to  #1571

## Please complete the following:

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

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

evan
v0.25.9
2025-09-11 14:07:07 -07:00
Restart 648b5427f1 New Lobby Values (#2040)
## Description:

New lobby values based on the average amount of tiles a player owns once
all the bots are dead, per map.

## Please complete the following:

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

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

bingbing567_27231
2025-09-10 14:52:02 -07:00
evanpelle 319508c360 bugfix: archive error, use replacer (#2041)
## Description:

Use replacer when serializing GameRecord json

## Please complete the following:

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

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

evan
v0.25.8
2025-09-10 07:36:42 -07:00
evanpelle 5ffb4a41b7 Fix back button, show join in singleplayer (#2039)
## Description:

Add #refresh in the history so when back button is pressed the homepage
is reloaded

Add the join code in singleplayer because singleplayer games are now
replayable

## Please complete the following:

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

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

evan
v0.25.7
2025-09-09 19:10:07 -07:00
evanpelle fd0fbfab9e Fix archive (#2035)
## Description:

Describe the PR.

## Please complete the following:

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

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

evan
2025-09-09 14:37:06 -07:00
evanpelle defb6bb1d4 Store full game for singleplayer, add more validation (#2031)
## Description:

onunload allows up to 64kb, but reducing the number of hash messages and
compressing using gzip, we can reduce the GameRecord size to stay under
64kb. I played a 10 minute game and the compressed GameRecord was only a
few kb.

Also verify the game is singleplayer and has only 1 player

## Please complete the following:

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

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

evan
2025-09-08 18:14:08 -07:00
evanpelle 043462e28a Archive games by using the api service endpoint instead of R2 (#2030)
## Description:

This removes the dependencies on R2, and allows contributors to replay
games without R2 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

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

evan
2025-09-08 16:36:20 -07:00
Loymdayddaud b6758894b3 Tag inactive pull requests as stale (#1993)
## Description:

Adds a new action to check pull requests every day. If there hasn't been
any action taken in three weeks, the PR gets the `stale` label. Replaces
#1183 and should help with #962.
This action uses a `start date` so that already-existing PRs aren't
affected.

**Before Merging** there should be a discussion: do we want to add
labels indicating who PRs are waiting on? We could add `waiting on
triage` & `waiting on author`/`waiting on OP`, and use actions to
add/remove those labels.

## Please complete the following:

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

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

loymdayddaud

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-09-07 20:08:33 -07:00
Roan 1c28b7064d Close modal when clicking outside the modal (#2017)
## Description:

Small QoL update where when you click outside of the main content of the
modal it closes the modal.

## Please complete the following:

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

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

rovi.

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-09-07 19:56:53 -07:00
Roan f23632278c Fix white border of blurry background (#2016)
## Description:

Small change to remove the white blurry border on the background image.
This was due to the filter kernel also including the white html
background.

Before:
<img width="2559" height="1251" alt="image"
src="https://github.com/user-attachments/assets/f52ea3e7-4da0-4e74-a8bd-26686eccf05e"
/>

After:
<img width="2559" height="1249" alt="image"
src="https://github.com/user-attachments/assets/16a756ad-6e78-4d4a-bcc3-b65b93e393d3"
/>

This also works on light mode but the change is less pronounced so I
haven't included images.

## Please complete the following:

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

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

Please comment on this PR
2025-09-07 19:56:43 -07:00
Aotumuri 00d4aa4613 mls (v4.5) (#2020)
## Description:

mls for v26
Version identifier within MLS: v4.5

## Please complete the following:

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

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

Aotumuri
2025-09-07 19:54:22 -07:00
DevelopingTom 63a14738cd Redesign Player info overlay (#2000)
## Description:

Redesign the player info panel to match the bottom panel.

Changes:
- Added alliance timeout
- Various css restyling

Old:
<img width="180" height="276" alt="image"
src="https://github.com/user-attachments/assets/4ae8994b-868c-4eb8-b42a-85f0f0ec2f96"
/>


New:
<img width="179" height="239" alt="image"
src="https://github.com/user-attachments/assets/c29c34e5-5bfd-468e-9947-e0ac319fbccf"
/>


## Please complete the following:

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

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

IngloriousTom

---------

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-09-08 02:47:30 +00:00
evanpelle 27837012cf perf: Update myplayer only on tick (#2029)
## Description:

During replays, myPlayer() was undefined, causing to search through all
clients an each call. Instead just update myPlayer on on tick/update.

## Please complete the following:

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

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

evan
2025-09-07 19:42:53 -07:00
evanpelle 9c91992603 Support affiliate patterns (#2027)
## Description:

Patterns have an optional affiliateCode that is associated with an
affiliate/youtuber. These patterns are not shown by default. You can see
them by going to openfront.io/#affiliate=XXX


## Please complete the following:

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

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

evan
2025-09-07 14:36:44 -07:00
evanpelle b0f8eb862e Implement vote for winner (#2013)
## Description:

Require majority of ips to report a winner.

## Please complete the following:

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

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

evan
2025-09-05 14:32:16 -07:00
evanpelle 9a434fd03a remove gatekeeper submodule because it is not AGPL compatible (#2012)
## Description:

Gatekeeper is a private submodule was planned to be used for security,
bot detection etc, but actually just a no op. Since gatekeeper is
private, it's not AGPL compatible.

## Please complete the following:

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

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

evan
2025-09-05 13:25:09 -07:00
Mark 0c9149e5b7 Add missing factory description in instructions (fixes #1974) (#2005)
## Description:

Added missing factory description to instructions and improved some
instruction texts. Fixes #1974.

![Screenshot 2025-09-04
222654](https://github.com/user-attachments/assets/8a33dee6-86d4-4ffe-b5f6-695be28d580f)

## Please complete the following:

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

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

---------

Co-authored-by: izub <3972940+izub@users.noreply.github.com>
2025-09-05 19:56:43 +00:00
yanir 8010688d27 Feat/breathing animation around spawn cell (#1951)
## Description:

Noticed many people are struggling to see where they choose to spawn or
forget where they chose , what leads to confusion.
solved it with this animation around the spawning player cell.


![giphy](https://github.com/user-attachments/assets/938f7dc8-97cb-40d0-8222-9f8ddbc2b21f)

<img width="231" height="265" alt="image"
src="https://github.com/user-attachments/assets/22e157a5-301d-4d41-8f2c-21a9dd09a1f6"
/>




ALSO: Added a missing translation for hebrew


## Please complete the following:

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

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

boostry

Co-authored-by: evanpelle <evanpelle@gmail.com>
2025-09-05 18:25:17 +00:00
yanir 76723e6739 Minor changes to the flag-input-modal (#1975)
## Description:

Noticed things were a bit not centered and title had Modal in it.

<img width="643" height="271" alt="image"
src="https://github.com/user-attachments/assets/15e113b7-9d77-42d8-8eb0-9b55f8cdbd19"
/>
<div>↓</div>

<img width="643" height="271" alt="image"
src="https://github.com/user-attachments/assets/aaa64ede-dd1f-44e3-afde-982bd67a1367"
/>

<div>---------------------------------------------------------------------------------------------------------------------------</div>
<img width="867" height="420" alt="image"
src="https://github.com/user-attachments/assets/af545ff4-3d2b-417d-8a96-c8594ffea754"
/>
<div>↓</div>
<img width="867" height="420" alt="image"
src="https://github.com/user-attachments/assets/d3380df7-1c78-40be-8dd2-162768773af6"
/>


## Please complete the following:

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

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

boostry
2025-09-05 18:21:53 +00:00
evanpelle f156e92d58 remove gatekeeper submodule because it is not AGPL compatible (#2012)
## Description:

Gatekeeper is a private submodule was planned to be used for security,
bot detection etc, but actually just a no op. Since gatekeeper is
private, it's not AGPL compatible.

## Please complete the following:

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

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

evan
2025-09-05 10:11:16 -07:00
evanpelle 3927db9583 Update license: AGPL & CC SA (#2009)
## Description:

Update project license: all code agpl v3, all assets: CC-SA

## Please complete the following:

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

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

evan
2025-09-04 20:38:39 -07:00
evanpelle 9d5c108b83 move resources out of non-commercial (#2008)
## Description:

Move assets out of non-commercial so they can be relicensed to Creative
Commons BY-SA 4.0 in a follow up PR

## Please complete the following:

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

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

evan
2025-09-04 19:00:33 -07:00
evanpelle 8bb3e64cb8 Move map generator into main repo (#2006)
## Description:

Move the MapGenerator repo into OpenFrontIO so we don't need to copy
generated map files over.

## Please complete the following:

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

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

evan
2025-09-04 18:45:41 -07:00
Moki 💤 584acea7ed Fix: Rework wheel and touch handling for pan and zoom (#1956)
## Description:

Fixes https://github.com/openfrontio/OpenFrontIO/issues/1827.

Summary:
- Restore the code of `onScroll()` method which was modified by #1717.
- Rework he `wheel` event logic to better distinguish between trackpad
pans and mouse wheel zooms. It now uses a heuristic where any scroll
event with a horizontal component (`deltaX !== 0`) is treated as a pan,
while purely vertical scrolls are treated as a zoom. This is a
compromise that fixes mouse wheel behavior, with the trade-off that
vertical-only trackpad swipes now also zoom (which is difficult for
human fingers to trigger).
- Solve the screen jittering problem when touching the screen by 2
fingers (which because when the second finger touches, `lastPointerX`
and `lastPointerY` are not recalculated in time.).

**Screen recording before fixing:**

(macbook, broken scroll zoom)


https://github.com/user-attachments/assets/5ba0fc24-2aec-4ecb-ab0f-2b0a0574d57e

(iphone, 2-fingers drag works well, but screen jittering exists)


https://github.com/user-attachments/assets/374f4f0f-688c-4b75-a20a-177144556c8c

**and after fixing:**

(macbook, scroll works well)


https://github.com/user-attachments/assets/b7e3447f-9936-4971-90c4-8644d0a9619d

(iphone, 2-fingers drag works well, no screen jittering)


https://github.com/user-attachments/assets/9d952082-a672-42b6-a117-7a9fed6ea5f0



## Please complete the following:

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

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

yumika8269
2025-09-04 14:43:13 -07:00
Pierre Bertier 8746df69fd Added trackpad support for moving maps (#1717)
## Description:

Added 2-fingers control for map with trackpad

## 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 agreement (only required once).

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

pierre_brtr
2025-09-04 14:43:09 -07:00
evanpelle 1fa2685495 format using prettier 2025-09-03 19:32:35 -07:00
Scott Anderson fc8e6637eb Difficulty translation key (#1959)
Move the key to name mapping for difficulties into the translation
system.

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