Commit Graph

1477 Commits

Author SHA1 Message Date
Ilan Schemoul c890ae1507 feat: message to explain debuff to traitors (#351) 2025-03-28 17:37:47 -07:00
Mittanicz b20a10564b Range fix (#362)
## 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:

Diessel
![Snímek obrazovky 2025-03-28 v 10 28
49](https://github.com/user-attachments/assets/f514484a-7a2f-443c-b42b-39a0d4694673)
![Snímek obrazovky 2025-03-28 v 10 29
09](https://github.com/user-attachments/assets/f7514d84-b9ca-4d9b-bca5-f6ad587d3793)
2025-03-28 14:40:12 -07:00
PilkeySEK 24b2339ad4 Add 'mode' and 'game_mode' translations to German (#364)
## 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`

Before vs. After (there is no good translation for "FFA" and "Teams" is
the same):

![image](https://github.com/user-attachments/assets/8fdbeee1-4d39-4846-9553-3d1de96e22a9)

![image](https://github.com/user-attachments/assets/91fb678f-f2fb-49fb-9619-785d045013a2)
2025-03-28 14:36:06 -07:00
Evan 8dd5f654ff Attacks don't create embargos against bots because they can't trade anyways 2025-03-28 14:02:29 -07:00
Evan 1e69a66ed1 make bots have more muted colors 2025-03-28 13:53:58 -07:00
Evan ec0d635a9b single color for read and blue, put bots in their own team 2025-03-28 13:42:53 -07:00
Evan 9e76f4b049 support team mode with dark theme 2025-03-28 11:48:12 -07:00
Evan 5c258bfca6 Move lang-selector into a lit element. This is required so we can import the lang json files using webpack file hashing. We need file hashing to bust the cache. 2025-03-28 10:57:30 -07:00
evanpelle d8fe41de7a teams (#349) 2025-03-27 20:43:56 -07:00
Evan 9ed1fe865c bugfix: ports not spawning on coastline 2025-03-27 19:08:46 -07:00
evanpelle 099dc74a36 fix webpack: always copy over static contents (#360)
The problem with the file check, was it only checked if a file was
missing and not if it changed.

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

evan
2025-03-27 17:52:10 -07:00
Ilan Schemoul 60be8b236a fix compilation (#359)
## Please complete the following:
just a compilation bug fix. npm run dev is how i test

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

respectful pinguin
2025-03-27 17:34:30 -07:00
Guzmán 1551f7b646 Add Spanish translation (#356)
Basic Spanish translation.
2025-03-27 16:42:53 -07:00
Ilan Schemoul 6834f0683f embargo if attacked (#353)
## Responsibility Acknowledgment

- [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 basic manual testing:
  - Significantly slows down the entire development process
  - Blocks releases and new features for all contributors
  - Harms the project's reliability and reputation
- Places additional debugging burden on maintainers who already have
limited time
- Diverts valuable resources away from new development and improvements
  - Makes me seen as a loser
  - Makes me more likely to go to hell
2025-03-27 16:39:37 -07:00
Ilan Schemoul f2193edc7c priortize ally ports and close ports (#335)
2x more likely to trade with ports belonging to an ally OR close.
3x more likely to trade with ports belonging to an ally AND close.
Add trading tests
2025-03-27 16:09:58 -07:00
Readixyee 665a8c3823 Executions dont switch owner (#326)
when an building is taken over by another player the execution for it
doesnt change its owner this makes it so when a sam is captured it tries
to intercept your own nukes and doesnt intercept the ones by the
previous player

this change makes executions of buildings automaticly switch their owner
2025-03-27 16:03:15 -07:00
Evan b8e750e31e bugfix: SAM launcher in build menu when disable nukes set 2025-03-26 17:05:06 -07:00
Evan 9868c87a4b fix HostLobbyModal checkboxes by making ids unique 2025-03-26 17:02:43 -07:00
Evan 4a703db490 pr template: request author's discord username 2025-03-26 16:43:24 -07:00
Evan 44d0dd4d4b update pr template 2025-03-26 16:30:13 -07:00
Evan df43f90fb5 add pull request template 2025-03-26 16:04:22 -07:00
Evan bf12f5354b put game config after updating nuke option 2025-03-26 15:15:12 -07:00
PilkeySEK baeb04da20 Add German translation (#348)
I did it 100% by myself so it might not be perfect
2025-03-26 11:11:02 -07:00
Mittanicz 6678d6e36e Image optimalization (#343)
I have minify images and convert them to webp format that reduce size
and keep quality.
Reduce size of bg image since its already blured by css so no need to
have it that big.

Reduce size of thumbs and helper images in helper modals should be fine
since they will not exceed the container size. Even that make them
larger than containter just to be safe
2025-03-26 10:05:45 -07:00
Readixyee 6b07446965 unitgrid instead of defensepostgrid (#265)
added a unitgrid instead of a defensepostgrid for all units to be able
to see if a tile is inside the range of a unit by a custom distance

this is used for the sam launcher to draw a circle around the area it
protects

removed all parts that use the defensepostgrid and made it use the
unitgrid instead
2025-03-26 10:00:37 -07:00
Duwibi b8dd53513d Updating translations for NL and BG (#345)
This PR adds the strings for "enemy panel", "iceland" and "pangaea". It
also organises the json file in a different way due to the start of use
of Crowdin (it doesn't interfere in any way with the functionality of
the translations). It also edits the existing translations for the
languages.

Credits:
- Bulgarian - Nikola123
- Dutch - cldprv, tryout33
2025-03-25 14:48:20 -07:00
Evan 25d5cc3702 Update client code to GPL 2025-03-25 14:35:14 -07:00
MRH 9866dbb73a Added map Pangaea (#320)
This map was made by mashing up the world map and putting it in the
general shape of the super-continent
[Pangaea](https://en.wikipedia.org/wiki/Pangaea) It's not super accurate
but the continents are generally in the right places and the nations are
more or less the same as on World, placed in the general location where
they would have been. Hope this is good enough to be added into the
game; even if only among custom lobby maps!
2025-03-25 08:14:29 -07:00
Aotumuri 583217cdb6 Corrected some translations. (#336)
Corrected some translations.

---------

Co-authored-by: Cldprv <dubois.cnm@tutanota.com>
Co-authored-by: jacks0n <rosty.west89@gmail.com>
2025-03-25 08:12:58 -07:00
Mittanicz ebe142a62a Layout setup (#338)
Create css strucure, clean up the index html and use proper tags.
Visualy minor changes, but this allow us maint better visuals and start
the css standards that will help us future
2025-03-25 08:11:58 -07:00
Evan 4849da4fa6 update version 2025-03-24 21:37:03 -07:00
APuddle210 40befee080 Optimize terrain map gen perf (#334)
### Summary
Investigated and resolved slow execution time of this script since the
addition of the thumbnail generation functionality. Determined that
thumbnail generation was not the source of the increased execution time,
likely due instead to change from bun back to npm. Some other minor
improvements made.

### Execution Time Optimizations
Investigated which components of the process were taking the most time
and determined the longest running component to be the
`removeSmallLakes()` function. Research determined that the `.forEach`
looping method to be significantly slower than the `for (const var of
vars)` method and replaced all instances of the former with the latter.

Further review identified possibility to reduce the number of calls to
the getArea() function by combining the `removeSmallLakes()` with the
`processOcean()` function, which was already determining the size of all
bodies of water.

After revision to the `forEach` loops and inclusion of
`removeSmallLakes()` within `processOcean()`, the next slowest executing
component was the `processDistToLand()` function. Aside from being slow
this function was also difficult to understand. Revised function perform
Manhattan distance calculations against the `shorelineWaters[]` array
and identify the minimum value rather than walking out from the
shoreline using the `neighbors()`. This change yielded between ~35% -
~45% faster execution times for this function (~275 seconds -> ~150
seconds; ~225 seconds -> ~165 seconds).

The change to `processDistToLand()` was tested by running the new
version of the function alongside the old version of the function and
having any differences in the calculated distance to land printed to the
console. Initially the test identified errors arising from a reference
to an x coordinate value that should have been a y coordinate value.
Once resolved no further differences were found.  

### Other Minor Changes
Changes to `processOcean()` now also explicitly prevent the largest body
of water from being removed, regardless of what value is passed in for
`removeSmall`, and additionally nest the calls to `processShore()` and
`processDistToLand()` within this function rather than within
`generateMap()` for better comprehensibility. `processOcean()` renamed
to `processWater`.

Also inserted additional console.log lines to better communicate state
of the scripts during runtime, removed unnecessary export statement from
`createMiniMap()` function which requires parameters not readily
available from outside contexts (and which was not called externally
anyways). Revised multiple instances where `terrain` was used to refer
to a single item of a Terrain[][] array to instead use `tile` for
comprehensibility, and consistency with the terminology used elsewhere
in the application.

Added an explicit variable declaration of `removeSmall` to the
generateTerrainMaps.ts file and included it in the call to
`generateMap()` to make toggling this option easier in the future. Moved
the `min_lake_size` constant out of the relevant function and to the top
of the TerrainMapGenerator.ts file for better visibility and consistency
with where `min_island_size` is being declared.
2025-03-24 20:32:51 -07:00
Duwibi 42bb043b0a Add the Bulgarian language (#314)
Adding the base bulgarian language json file and making it usable in
game. This PR is building on top of the multi language support PR. Note:
Needs PR #316 to work!
2025-03-24 20:31:44 -07:00
Aotumuri 9088adeb7a Translate all out-of-game UI (start screen, lobbies, etc.) (#316)
This PR adds full translation support for all out-of-game UI elements,
including the start screen, public/private lobby modals, and other
pre-game interfaces.

All static text has been externalized to en.json and ja.json for future
language support.
If you find any spots that are not yet translated (missing from the
JSON), please let me know.
Thanks a lot!

This is a follow-up to PR
[#305](https://github.com/openfrontio/OpenFrontIO/pull/305).

---------

Co-authored-by: Cldprv <dubois.cnm@tutanota.com>
Co-authored-by: jacks0n <rosty.west89@gmail.com>
2025-03-24 17:12:04 -07:00
Aotumuri f188af6029 Added SAM icon due to missing asset (#318)
There was a report on Discord about the SAM icon not displaying
correctly.

https://discord.com/channels/1284581928254701718/1353348395506466937/1353348395506466937
After checking the CSS, I found that it was referencing a non-existent
path.
Since there was no dedicated image for the SAM, I created a custom one
to replace it.

Let me know if any adjustments are needed!
Thank you!
<img width="324" alt="スクリーンショット 2025-03-23 22 53 38"
src="https://github.com/user-attachments/assets/157f9b70-615c-4454-baaf-7f0c33e98ecf"
/>
<img width="759" alt="スクリーンショット 2025-03-23 22 42 33"
src="https://github.com/user-attachments/assets/35f3ea51-5804-4007-8e8d-40659f47276a"
/>
2025-03-24 15:47:07 -07:00
Aotumuri 7773754e84 Fixed flag not displaying for West Virginia (#319)
The flag for West Virginia was not displaying correctly.
This was due to a mismatch between the key (West_Virginia) and the
displayed name (West Virginia).
I corrected the key reference to ensure the flag loads properly.
<img width="171" alt="スクリーンショット 2025-03-23 23 02 02"
src="https://github.com/user-attachments/assets/be18538b-18e5-462c-b52e-b37d6399ae08"
/>
2025-03-24 15:45:23 -07:00
Duwibi ab44751b08 Adding Iceland map (#323)
This is a map of Iceland. It has 8 nations - the 8 regions of Iceland.

![IcelandScreenshot](https://github.com/user-attachments/assets/1debe786-1dac-4274-85e2-9a0c090bd3b0)

![IcelandScreenshot1](https://github.com/user-attachments/assets/681e4a8f-4603-4434-9714-d76b49b82a6e)

![IcelandScreenshot2](https://github.com/user-attachments/assets/69841915-14f4-4e13-961f-c5e523668d41)

![IcelandScreenshot3](https://github.com/user-attachments/assets/51225d7a-c1df-4890-a56f-d459fe62a534)

![IcelandScreenshot4](https://github.com/user-attachments/assets/a5880022-765f-4e62-8f55-2b93d8b89f84)

![IcelandScreenshot5](https://github.com/user-attachments/assets/ec0d6efc-1056-45a1-ad03-152cb5a2baf6)

![IcelandScreenshot6](https://github.com/user-attachments/assets/56c8c8cb-2b3d-41e0-a55d-37b21b4442e3)

![IcelandScreenshot7](https://github.com/user-attachments/assets/b7a7833c-ef64-4067-a44f-c8a762bed0bc)

![IcelandScreenshot8](https://github.com/user-attachments/assets/d9edd402-7885-4e26-95c6-33d387493a80)
2025-03-24 15:44:57 -07:00
MRH 6a82b8eefc Improved structure legibility (#332)
Updated structure icon border rendering to improve legibility, I often
find that I miss important enemy structures like SAM launchers as they
share a similar icon to many other structures.

Supported shapes:
- Square (SAM, Missile)
- Round (City, Port)
- Hexagon (Defense post)
- Diamond (not used, square rotated 45deg)


![image](https://github.com/user-attachments/assets/85e70f6a-b9d1-4837-b3fb-230d752675db)
2025-03-24 15:34:14 -07:00
MRH 5a1451b430 Improved options panel (#328)
Minor improvements to options-panel and player info panel.

- Improved time display
- Added margin to align with leaderboard
- Better option button layout
- Added flag to player info


![image](https://github.com/user-attachments/assets/b51c8239-caf5-4526-97ac-a33a9d22eff2)
2025-03-24 10:42:49 -07:00
Mittanicz 166ef92970 Create base components button, modal .. (#331)
Create base components with shared styles, as start of make ui better.
For now shoul look same but underhood new copoments are used.

This should be first PR that handle this and many more comes. I am in
rush due conflict with other ppl, but should work as i tested.

Testing again and look at structure

Main goal i have global css not scope in component die loading times and
size of elements. (Modal due nature of lit and shadow dom is exception,
maybe later find better way).

Documenting the components will happen later as base components
establish their usage.
2025-03-24 10:34:27 -07:00
Evan f7c6b0d585 add node-exporter to setup 2025-03-22 17:01:51 -07:00
Evan 2080b4ebe7 use loki plugin to push logs 2025-03-22 13:26:47 -07:00
evanpelle f87394062d add steam libraries, make electron a separate node package (#313) 2025-03-22 10:45:51 -07:00
evanpelle f6e2ca371f Add electron deployment (#312) 2025-03-22 09:29:07 -07:00
Evan f408738db9 update MIRV to 20M 2025-03-22 08:42:57 -07:00
Duwibi b72032e6f1 Added Australia map with 7 bots and their flags (#306)
This is a map of the Australian country. It has 7 bots - the 7 states of
the country. This is my first time making a pull request, so I'm sorry
if i messed something up or something doesn't work.
2025-03-21 15:49:10 -07:00
Readixyee e02361c2f4 Disable nukes option (#237)
This makes it possible to disable all nukes as well as missile silos
from the game in privat lobbies and singleplayer games
2025-03-21 13:52:36 -07:00
Aotumuri c4614fe0ba Add multi-language support to the start screen and help-modal (#305)
This pull request adds multi-language support to the start screen.
Languages are managed via JSON files, making it easy to add new
languages in the future.

I added a basic language selection button for switching between
languages.
However, I believe it would benefit from a better design — my design
skills are limited, so I apologize in advance.

Looking forward to your feedback and possible design improvements.
2025-03-21 13:51:04 -07:00
APuddle210 2392f3a2fe Update NorthAmerica.json (#303)
Just removing some bots from the densest populated parts of the map.
Hopefully will improve responsiveness of the game for some players when
on this map.

Also correcting the map dimensions in the json (I forgot to update
those).
2025-03-21 10:21:24 -07:00
APuddle210 2cac950574 Add gateway map to rotation (#301)
Changes made via GitHub editor. I'll test as soon as I get home ~2.5-3
hours from now.
2025-03-21 10:19:59 -07:00