Commit Graph

68 Commits

Author SHA1 Message Date
Scott Anderson 70745faac4 Enable strictNullChecks, eqeqeq (#436)
## Description:

Improve type safety and runtime correctness by:
1. Enabling TypeScript's
[strictNullChecks](https://www.typescriptlang.org/tsconfig/#strictNullChecks)
compiler option.
2. Replacing all loose equality operators (`==` and `!=`) with strict
equality operators (`===` and `!==`).
3. Cleaning up of type declarations, null handling logic, and equality
expressions throughout the project.

Currently, the code allows implicit assumptions that `null` and
`undefined` are interchangeable, and relies on type-coercing equality
checks that can introduce subtle bugs. These practices make it difficult
to reason about when values may be absent and hinder the effectiveness
of static analysis.

Migrating to strict null checks and enforcing strict equality
comparisons will clarify intent, reduce bugs, and make the codebase
safer and easier to maintain.

Fixes #466 

## 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>
Co-authored-by: evanpelle <openfrontio@gmail.com>
2025-05-15 16:39:40 -07:00
Aotumuri 5ddc25897f Add quick chat (#412)
## Description:

Fixes #480 

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

<DISCORD USERNAME>
2025-05-08 09:00:25 -07:00
evanpelle d6a412aa50 implement duos (#630)
## Description:
Implement Duos team mode.
Also assign teams to nations at the start instead of assigning them
randomly on spawn. This gives more consistent team sizes

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

Co-authored-by: evan <openfrontio@gmail.com>
2025-04-30 13:47:35 -07:00
evanpelle 84287b8dfa Multi src astar (#594)
## Description:
Samples border shore tiles and uses multi-a* for determining the
transport ship spawn cell.

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

---------

Co-authored-by: evan <openfrontio@gmail.com>
2025-04-23 10:16:43 -07:00
evanpelle 71849b47cd better transport ship spawn (#587)
## Description:

Taken from PR #506

Improve transport source tile by considering border extremums

Only calculate better spawn tile for humans, and have the sender
calculate it and send the src tile in the intent for better performance.

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

Co-authored-by: evan <openfrontio@gmail.com>
2025-04-21 19:49:17 -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 8b6895d745 add prettier import plugin 2025-03-31 13:09:27 -07:00
Aotumuri 745017aee2 Added Gold & Troop donate button (#373)
## 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

Changed the icon for the troop donation button, as it looked like it was
donating gold.
I replaced it with a soldier icon to better reflect its function.
Additionally, I updated the icon below it to clearly represent gold
donation instead.

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

The cat is because of an extension I have put in. Please ignore it.
<img width="345" alt="スクリーンショット 2025-03-30 10 13 06"
src="https://github.com/user-attachments/assets/9088be1a-57b4-4d10-9507-ca8dc0fcc68c"
/>
<img width="396" alt="スクリーンショット 2025-03-30 10 18 10"
src="https://github.com/user-attachments/assets/2555fd24-0bbc-4b40-8f80-ccf43a1e9a75"
/>

---------

Co-authored-by: Evan <evanpelle@gmail.com>
2025-03-31 10:51:05 -07:00
evanpelle ab3f4fbac1 All players must join game before spawn (#380)
## Description:
The server stores all players that have joined, and once the game starts
it sends a list of players to all clients. Players cannot join after the
game has started. Server now generated the PlayerID instead of the
client.

The is necessary for team mode, we need to know how who is playing the
game before it starts so we can properly assign teams based on clans.

## 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-30 17:04:29 -07:00
Ilan Schemoul 275de50fcd feat: move warship (#196) 2025-03-14 16:30:30 -07:00
ilan schemoul 9a1f916f4d feat: cancel attack
Canceling attack takes time and incurs a malus (loose some troops).
Also prettier fixed a file HostLobbyModal.
2025-03-03 22:06:35 +01:00
evanpelle 0a077ebf4d Merge pull request #100 from d3n0x8/scrollAttackRatio
add shift + scroll command in HelpModal hotkeys table
2025-03-02 18:34:04 +01:00
Evan f894276ef0 fix execution validation, verify that clientID own playerID to prevent spoofing 2025-02-18 17:13:08 -08:00
Evan 40966ca3b9 format all files with prettier 2025-02-12 08:28:15 -08:00
NewHappyRabbit 949f68287e Added flags 2025-02-11 23:34:19 +02:00
Evan 2fa576c841 sanitize profane usernames 2025-02-08 19:00:35 -08:00
Evan 1594a45dac have buildings take time to construct 2025-02-08 13:53:58 -08:00
Evan b643a6357b implement mirv 2025-02-04 11:53:41 -08:00
Evan bbf72bd14f simply start population calculation 2025-02-03 12:37:04 -08:00
Evan c109d23f9f combine battleship + destroyer => warship. 2025-02-02 14:31:30 -08:00
Evan 4ee37323f9 format codebase with prettier 2025-02-01 12:05:11 -08:00
evanpelle de1dbff570 combine Game & MutableGame 2025-02-01 12:05:11 -08:00
evanpelle 7d15c0c065 combine Player & MutablePlayer interfaces 2025-02-01 12:05:11 -08:00
Evan f0f5bae79f thread_split: convert all tile to tileref 2025-02-01 12:05:11 -08:00
evanpelle 162b6dc349 in progress 2025-02-01 12:05:11 -08:00
evanpelle 7673cf03ac multithreading: radial menu works 2025-02-01 12:05:11 -08:00
Evan 8443095d89 create game runner 2025-02-01 12:05:11 -08:00
Evan f6b739e263 validate usernames on change, fix public lobby highlight bug, validate
strings with zod for safety
2025-01-02 09:02:23 -08:00
evanpelle 57cbf5c55e Refactor: Split config into Config and ServerConfig 2024-12-25 14:04:19 -08:00
evanpelle e1d22193c1 render emoji on top of name, better trade notification 2024-12-10 20:28:39 -08:00
evanpelle 601f606a7f save game stats to bigquery, update enums 2024-12-10 20:28:39 -08:00
Evan da7637477c add Oceania and North America maps 2024-12-08 20:56:19 -08:00
Evan 2d2df14ae3 add GameConfig to Game 2024-12-07 09:45:39 -08:00
evanpelle e068a9afc7 implement cities 2024-12-04 16:27:07 -08:00
Evan e7039d3e07 add defense post unit (no execution) 2024-11-30 20:54:42 -08:00
Evan 4899196613 refactor: move worker into worker file 2024-11-29 15:57:39 -08:00
Evan 020d193667 create async path finder, trade ships use async when captured 2024-11-29 15:41:13 -08:00
Evan 3e4f4e42cf created path finding web worker 2024-11-29 11:34:03 -08:00
Evan 8abc5e4aed implement battleship 2024-11-26 10:15:54 -08:00
Evan 18ac34ae45 Created hydrogen bomb 2024-11-20 19:55:42 -08:00
Evan e26230275b add missile silo 2024-11-16 11:45:28 -08:00
Evan 4236a580e3 working on port 2024-11-15 20:43:15 -08:00
Evan 975750b294 destroyer moves upwards 2024-11-15 20:43:15 -08:00
evanpelle c7951d77c0 adding destroyer 2024-11-15 20:43:15 -08:00
Evan 60751150bf added gold, troops, workers slider 2024-11-03 20:11:04 -08:00
Evan 2afecf0f39 create troop slider 2024-11-03 12:37:56 -08:00
Evan a31a35c038 remove setnameexecution because unused, create DisplayName on Player 2024-10-31 20:30:17 -07:00
Evan 56d4b924fa add difficulties 2024-10-23 21:08:24 -07:00
evanpelle 33a85d521a create nuke execution & schema 2024-10-19 08:46:41 -07:00
evanpelle 180769bf35 create leaderboard, max 18 char name 2024-10-11 20:48:55 -07:00