Commit Graph

1551 Commits

Author SHA1 Message Date
Evan 25c18cdae2 format README 2025-04-05 10:10:36 -07:00
Evan 21752aa214 add perf improvements: don't draw full boat tail, make nukes calculations slightly more efficient 2025-04-05 10:10:15 -07:00
Evan 9837401a1b make atom bombs 500k 2025-04-04 17:02:19 -07:00
Evan 1435be00c5 bugfix: bots slider invisible on firefox 2025-04-04 16:56:13 -07:00
Duwibi e9c885644b Add English flag (#418)
## Description:

This PR adds a 50/50 English/US flag that represents the English
language in the language selection menu.

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

<Nikola123>
2025-04-04 16:44:32 -07:00
Evan b947b764b7 bugfix: npe when winner is null 2025-04-04 16:10:16 -07:00
Evan 2cb8c239cf make sendBoat() more efficient: find random tiles instead of doing a breadth first search 2025-04-04 16:04:57 -07:00
Evan 190a67b72a delete tradeship if path not found 2025-04-04 12:11:10 -07:00
Evan 9fe64c15a8 update GameStartingModal imports to fix build 2025-04-04 10:19:54 -07:00
kanekane0448 a97a608dce Add Alt + Click hotkey for sending emotes (#408)
## Description:

Allows the player to Alt + Click to send emotes to other players or
themself in order to ease communication.
Of course, the hotkey can be something different. Alt + Click is just a
suggestion.


![image](https://github.com/user-attachments/assets/9762c4f0-f62d-4c39-ba35-468ac3f5ddaa)

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

kanekane0448

PS: The new emoji table looks really good!

---------

Co-authored-by: kanekane0448 <no@mail.pls>
2025-04-04 10:15:59 -07:00
Evan 924ca2c69e bugfix: humans start with zero troops on teams, also removed manpower argument to addPlayer() 2025-04-04 10:03:00 -07:00
Duwibi 51bbf2becd Fix difference in translation strings regarding the new Between Two Seas map (#416)
##Description:
I renamed all instances of "TwoSeas" to "BetweenTwoSeas". That way it
lowers the confusion but more importrantly - it removes the difference
between the translation strings for the map.

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

<Nikola123>
2025-04-04 09:42:56 -07:00
Duwibi c700b7956f Update translations (#419)
## Description:

This PR updates the translations for: Bulgarian, Russian, Ukrainian,
German, Polish and Dutch

Acknowledgements for the MLS project:
Bulgarian🇧🇬: Nikola123 & NewHappyRabbit
Japanese🇯🇵: Aotumuri & daimyo_panda2
French🇫🇷: cldprv, gx2 & Lucasisc
Dutch🇳🇱: cldprv & tryout33
German🇩🇪: Pilkey & jacks0n
Spanish🇪🇸: 6uzm4n
Russian🇷🇺: Rulfam
Ukrainian🇺🇦: Rulfam
Polish🇵🇱: zibi, RinkyDinky & Rulfam

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

<Nikola123>
2025-04-04 09:42:26 -07:00
Duwibi 38e3e04831 Update README.md to include instructions on how to help with translation (#420)
## Description:

Updates the README.md file to include instructions on how to help with
translation

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

<Nikola123>
2025-04-04 09:42:02 -07:00
Evan abc68bf9a4 rename GameStartingModal 2025-04-04 08:54:09 -07:00
Evan 9d1b4f35e4 bugfix: SpawnExecution was not attaching PlayerExecution to humans
bugfix: WinModal was saying player died even if they hadn't spawned

added hasSpawned() method to player
2025-04-03 20:12:36 -07:00
Evan a3a05f9ed2 bugfix: start troops were set at zero, username was not set in singleplayer 2025-04-03 20:02:22 -07:00
Evan 9fa3691c5c bugfix: SpawnExecution couldn't find existing player because Game.Players() only returns alive players. This caused SpawnExecution to respawn each human player. 2025-04-03 19:31:42 -07:00
Evan e1a299c8c5 center hostlobbymodal start button 2025-04-03 17:13:16 -07:00
Evan fbfc46f2cb remove 0. prefix for version number 2025-04-03 16:24:02 -07:00
Evan 3b5853ccbc removed db/ dir, has been moved to another repo 2025-04-03 16:21:35 -07:00
Evan 3db2b4f5f3 remove electron/ dir, moved to different repo 2025-04-03 16:20:38 -07:00
Evan 2fd7bbaddf fix build, rename GameStartingModal.ts 2025-04-03 16:16:23 -07:00
Scott Anderson 10c411b1ee bug: lastEmojiSet is never used (#406)
## Description:

In the existing code, lastEmojiSent can only ever be set if it is
already set, causing it to never be used. This change updates the logic
to work as intended.

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

fake.neo

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-03 16:12:07 -07:00
APuddle210 f94da14d1f Created MapPlaylist class (#405)
## Description:

Creates new MapPlaylist class, which contains the expanded may playlist
logic. Currently implements two distinct playlists, one for big maps,
and another for small. Designed with future need for more types of
playlist in mind.

It pulls from the big playlist two for every one time it pulls from the
small playlist.

Moved out of the Master.ts as requested.

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

aPuddle
2025-04-03 16:09:34 -07:00
kanekane0448 647805de70 Update instructions english (#407)
Expand information on
- Attack ratio mechanics
- Traitor mechanics
- Warship mechanics

For the English version only!


![image](https://github.com/user-attachments/assets/bb9dfd91-18c6-415e-adbc-813f964504ea)

![image](https://github.com/user-attachments/assets/88a89ca5-0aa4-4189-9573-4581e99cbb77)

![image](https://github.com/user-attachments/assets/784f98cd-bcd0-4810-a2be-b55a12c9029f)

## Description:

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

kanekane0448
(I can't guarantee that I regularly check for new messages though. I
just log in when I want to talk about the game.)

---------

Co-authored-by: kanekane0448 <no@mail.pls>
2025-04-03 16:07:31 -07:00
Guzmán 15abe17ace Fix translations, mainly the Spanish one (#410)
First of the probably many many PRs that would benefit from #409
2025-04-03 16:03:00 -07:00
Rémi Simonnin 879e7fdde0 Create esperanto translation (#411)
## Description: Creation of the esperanto translation

## Please complete the following:

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

r3ms
2025-04-03 16:02:28 -07:00
jacks0n 7a38d009d9 Hide wrongly displayed "Hide" button on main page (#403)
## Description:
A previous commit made the "Hide" button of the event log visible on the
main page. This hides it again, as before.

![image](https://github.com/user-attachments/assets/83e7dbe8-9af7-4719-8c74-f89076345a4a)

## 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>
jacks0n
2025-04-03 16:01:50 -07:00
Evan 9504bdae2d Merge branch 'main' of github.com:openfrontio/OpenFrontIO 2025-04-03 15:42:43 -07:00
Evan 950344c0bd created prestart message: add 2 second delay before starting public games to allow all players to connect 2025-04-03 15:42:25 -07:00
Aotumuri 607e5b5ff0 MLS-PACK (#355)
## 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 commit pack
This PR refactors and improves the language selection experience:
• Centralizes all language-related logic in LangSelector.ts &
LanguageModal.ts
	•	Redesigns the language selection UI for better UX across devices
	•	Adds new translations and supports more languages
Changes .w.
• Language selection is now handled entirely inside LangSelector.ts &
LanguageModal.ts
	•	Prevents background scrolling when open
	•	Highlights the current language at the top
	•	Always shows English second
	•	Shows browser language third (if different from current)
	•	All other languages are sorted alphabetically by English name
	•	Debug option is shown at the end when pressing D
	•	The language list is scrollable when it exceeds screen height
	
Supported Languages
["en", "ja", "fr", "bg", "nl", "ru", "ua", "de"]

Added Translation Keys
```
"lang": {
  "en": "English",
  "native": "English",
  "svg": "xx"
},
"map": {
  "map": "Map"
},
"game_starting_modal": {
  "title": "Game is Starting...",
  "desc": "Preparing for the lobby to start. Please wait."
},
"difficulty": {
  "difficulty": "Difficulty"
}
```

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

Translation collaborator
- Nikola123 (He was a very big help from setting up the translation site
to adding the json. Thank you so much!)
I don't have permission from my collaborators to display their names
here, so I'll put the discord link here

https://discord.com/channels/1284581928254701718/1352553113612980224/1352553113612980224
- tryout33

Collaborators from other servers.
- CCC Group (This is not Culture Convenience Club. Think of it like a
server where developers of various games are playing.)
- People who fixed the UI and found bugs.
meow02952 (discord id) <- This person also gave me a code suggestion.
Thanks!
moon_spear (discord id)
ww_what_ww (discord id)
Azuna (he doesn't have discord account)
- People who corrected translations, etc.
_kyoyume_ (discord id)
_ultrasuper_ (discord id)
grueg (he doesn't have discord account)

# If I forgot to include your name, or if you’d like your name to be
added, please let me know via Gmail or Discord.

---------

Co-authored-by: Duwibi <86431918+Duwibi@users.noreply.github.com>
2025-04-02 20:37:36 -07:00
Evan f09801fe3e rebalance: MIRV 25M, city cap at 2M 2025-04-02 18:25:31 -07:00
MRH 71b43de1c6 Locked focus/highlighting option (#387)
## Description:

I've added the option to toggle the Territory highlighting focus from
the current behaviour where the focus set by the currently hovered
player, to "locked focus" which will always focus/highlight your player
territory.

While the highlighting is very helpful to identify your own borders,
especially if you share borders with a player with the same colors, I
find it very distracting, and makes the game feel laggy.

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

mrh0


![image](https://github.com/user-attachments/assets/aa427233-425d-487e-bfe5-42b390561ab7)

![image](https://github.com/user-attachments/assets/f9a065a3-0fcf-481f-888d-b5781e3717c1)
2025-04-02 18:09:33 -07:00
Scott Anderson 52f64db6d3 Fix various ESLint violations (#402)
## Description:

Fixes a number of ESLint violations. Although I have tested these
changes through the local dev server, I don't have a high confidence
that the testing is sufficient, as I am new to this codebase. This
change would benefit from heightened scrutiny.

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

fake.neo

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-02 18:06:08 -07:00
Evan 77a60d5a00 attempt reconnect if no messages received for 5 seconds. 2025-04-02 16:50:58 -07:00
Evan 118a826025 Add teams to public lobby 2025-04-02 13:46:11 -07:00
Evan 1e480b7939 require 95% to win on teams 2025-04-02 13:06:38 -07:00
Evan ddbb536918 add teams progress to spawnbar 2025-04-02 12:57:46 -07:00
APuddle210 71ddeca7f0 Map Revisions, one Addition, and Adjustment to Lobby Max Player based on Map Sizes (#389)
## Description:

Implementation of separate lobby playlists, one for large maps another
for small, with the implementation framework being easily adjusted for
additional playlist categories in the future (such as fantasy maps).

Addition of new map 'Between Two Seas' a small map, replacing Black Sea
in the public lobby rotation (Black Sea retained for singleplayer or
private lobbies.

Adjustments to lobbyMaxPlayer configuration function. Broke out into
tranches by map pixel count, commented to communicate to other collabs
which tranch to place their map in. This change pairs well with the
adjustment to lobby map selection to alternate between big and small
maps. For the Potato (and mobile) players.

Revision to Mena, adding lakes and rivers.

Revisions to Japan, adding lakes and rivers, slight change of bounds to
include more mainland and less ocean.


![image](https://github.com/user-attachments/assets/434ad418-3ad4-40d4-841f-2ab71d13effd)


![image](https://github.com/user-attachments/assets/c46863b4-6a29-494f-82f0-d249c5017c1d)


![image](https://github.com/user-attachments/assets/c1e10fc4-b5e8-465a-a4eb-d325447df954)


The below no longer applies, I talked to Duwibi (Nikola123) who
explained the source of the issue is outside my control, but that he was
taking the action necessary to resolve.

The only issue still present after testing the the display of the map
name for Between Two Seas on the Public Lobby button. I've asked for
assistance with this issue on the Discord and will submit a fix as soon
as I can figure out its cause. Does not impact gameplay and its 3:30am
so hopefully this issue is not enough to prevent a merge as aside from a
quick fix PR, I don't think I'll be able to do any more work until after
this weekend.


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

aPuddle
2025-04-02 10:45:37 -07:00
michaelabilliot 524498ac75 Added Game of thrones map (#390)
## Description: The entire world from game of thrones

Thanks to apuddle7 on discord for helping me a lot with this map
especially the rivers

![Screenshot 2025-04-01 at 19 35
09](https://github.com/user-attachments/assets/d96e2de5-06f4-4103-877b-0dbf33a34137)
![Screenshot 2025-04-01 at 19 36
25](https://github.com/user-attachments/assets/22ccd251-e7ef-4f7e-b943-afa2e9c445ae)
![Screenshot 2025-04-01 at 19 23
11](https://github.com/user-attachments/assets/aa4de47b-c5bd-4610-ba84-713a4b4f7da3)

## 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: 
lunhuiyan1718
2025-04-02 10:25:57 -07:00
Poddster 90cb238b25 Resort emoji table, added 👑🏡🛡️🎯🐔🤌, removed 🤙 (#400)
## Description:

I found the old emoji table hard to use in the heat of combat, so I:

1. Reordered it, focusing on putting the arrows in a logical
orientation, and each other emoji in some kind of cohesive group.
2. Replace a duplicated 😭 with 👑, useful for telling the idiots
attacking you to instead attack the crown, otherwise you'd both dead.
3. Added 🏡🛡️🎯 as I thought they would be useful for mocking/hinting to
other payers about ports/warships/cities/defence posts, despite making
the table one line longer. The target was mainly added to put something
in the middle of the new arrow keypad-layout.
4. Replaced 🤙 with 🐔🤌. I feel 👍👎 already does what  does, so remove it
to make space for something else: another insult (🐔). I've never seen
'call me' (🤙) used in-game, or even know what it means in the context of
the game. But chef's kiss 🤌 is meme-worthy and fun to send to other
players.

old: 

![Image](https://github.com/user-attachments/assets/75816197-8d5e-4aee-989f-94207f9ab3ec)

new:

![Image](https://github.com/user-attachments/assets/5fd14788-dc16-4744-ab4e-7b3942ad8694)

See #399 

I've given this a try and I find it much easier to locate and send the
kind of emoji I want. The only real oddity are the hearts being all the
way down there. But they weren't even together last time, so it's still
an improvement.


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

`poddster` aka `Pod#7003` in the old system
2025-04-02 10:24:14 -07:00
Aotumuri c314984fbf Fixed SAM Icon in help modal (#398)
## Description:
The SAM launcher icon is missing again, fixed.
## 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:

aotumuri
2025-04-02 10:23:04 -07:00
Aotumuri 4c776629f3 Optimize Water Tile Distance Calculation with BFS (Manhattan Distance) (#396)
## Description:
Replaced with BFS from shoreline tiles to propagate Manhattan distances
efficiently in O(W) time.
I’ve confirmed that the results match the previous implementation, but
please double-check on your end as well just to be safe.
I’d also like to get input from aPuddle.

## 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>
aotumuri
2025-04-02 10:22:37 -07:00
Scott Anderson f58d9c1f8d Create an editorconfig file (#392)
An editorconfig file helps to maintain consistent style across different
editors. Many editors support using the `.editorconfig` file to
determine settings such as indentation level out of the box. Most IDEs
that do not have support out of the box have a simple plugin available.
Even tools such as prettier use this file (see
https://prettier.io/docs/configuration#editorconfig). See
https://editorconfig.org/ for more information.

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

fake.neo

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-02 10:03:15 -07:00
Scott Anderson 9a3983d014 ESLint improvements (#388)
## Description

Adds various features to improve the DX with eslint:

### Webpack

- Use `eslint-webpack-plugin` for better observability of lint errors
during development.

### Ignored files

- Enable `.gitignore` support for eslint.

### Commit hook

- Add `eslint --fix` to pre-commit hook.

### Github actions
- Add eslint check to a new github action workflow.
- Use `eslint-formatter-gha` to annotate PR files with lint failures
(see the Files changed tab,
[example](https://github.com/openfrontio/OpenFrontIO/pull/388/commits/73862230be5aad7b18e122b1cd4ab05fc9570b2c)).


![image](https://github.com/user-attachments/assets/b399b92e-8eb0-48e1-92b7-ce630ccf12e1)

## Testing

These changes have been validated through local testing and through
Github workflows.

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

fake.neo

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-02 09:09:38 -07:00
Quentin Siruguet 8de3a5f106 Add notifications for troops attacking wilderness (#363)
+Retreat cost no soldiers when coming back from wilderness
+ Also work with contamined area


![image](https://github.com/user-attachments/assets/6dda168c-aade-4ba5-ac2a-6de028fbaf6d)

![image](https://github.com/user-attachments/assets/89966516-e86d-4d06-8b32-3bf36179eea1)


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

quentin.qsi
2025-04-02 08:37:58 -07:00
Evan 0976f4da0a Merge branch 'main' of github.com:openfrontio/OpenFrontIO 2025-03-31 13:33:13 -07:00
Evan 57f20746bc make bottom radial ally/traitor button 2025-03-31 13:33:10 -07:00
Duwibi 79516e84d4 Update index.html (#386)
## Description:

I changed the discord link to be the updated one

<Nikola123>
2025-03-31 13:11:12 -07:00