Commit Graph

12 Commits

Author SHA1 Message Date
Scott Anderson e763ade705 Use bigint for gold (#1000) 2025-06-03 16:50:11 +02:00
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
Evan 38f6af9659 don't warn when langselector hasn't loaded 2025-03-31 13:01:04 -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
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
Evan 5898f0360c floor renderNumber(), have buildmenu refresh on tick 2025-02-20 21:15:54 -08:00
Evan 40966ca3b9 format all files with prettier 2025-02-12 08:28:15 -08:00
Evan 19d0b61869 have events display show outgoing & incoming attacks 2025-02-11 14:09:00 -08:00
Evan 4ee37323f9 format codebase with prettier 2025-02-01 12:05:11 -08:00
evanpelle d11e5bc119 create generateCryptoRnadomUUID to support older browsers 2024-12-18 08:12:27 -08:00
evanpelle 1417808c14 store user's persistent id in bigquery 2024-12-17 14:30:16 -08:00
Evan 722165c401 adding persistent id 2024-12-17 14:30:16 -08:00