32 Commits

Author SHA1 Message Date
Moka
41380b39b9
[Hotfix] Fix manifest getting loaded before the game is initialized (#4739)
* Fix manifest being used before the game is initialized

* bump game version

* make manifest fix more future proof

* Revert "make manifest fix more future proof"

This reverts commit 32591b35d0438dac99eb2ea29cd6757e3086008a.

* fix locales path for offline builds
2024-10-27 21:32:30 +01:00
Frederico Santos
908784b011 Merge branch 'main' of github.com:pagefaultgames/pokerogue into pokerogue-main 2024-10-26 22:43:47 +01:00
Frederico Santos
a9a73863e8 Comment out startGame call on manifest fetch failure 2024-10-26 22:43:15 +01:00
flx-sta
95386861bb
[Qol][Refactor] i18n lazy-loading (#4327)
* move: locales files to `/public` (from `/src`)

* install: i18next-http-backend module

* implement: i18next language lazy-loading

* remove: all `config.ts` files (for locales)

* disable: enConfig import in i18next.d.ts

* remove: console.log from utils.camelCaseToKebabCase()

* remove localization tests

we don't need to test if i18next is working.
This is the job of i18next itself

* mock i18next for tests

* fix: tests that have to use the i18next key now

instead of the english translation

* fix: absolute-avarice-encounter test

* fix: loading mystery-encounter translations

with lazy-load

* fix: 2 mystery encounter translation loading

* replace: i18next mocks any vi.fn() calls

* fix: new namespace usage in ME tests

now using "mysteryEncounters/..."

* fix: delibirdy encounter not being language specific

the encounter was checking if the modifier name includes `Berry` which is only true for english. Instead it has to check if the modifier is an instance of BerryModifier

* fix: the-expert-pokemon-breeder

the new i18n pattern requires a different namespacing which has been adopted

* fix: GTS encounter tests

* add: `MockText.on()`

* fix: berries abound test

* chore: apply review suggestion

from @DayKev

* update i18next.d.ts

* chore: fix i18next.d.ts

* fix: `dialogue-misc` switchup between `en` and `ja`

* move: `SpeciesFormKey` into enum

there was an issue with circular dependencies

* replace: `#app/enums/` with `#enums/` for `SpeciesFormKey` imports

* re-sync locales from `beta`

* rename: `ca_ES` -> `ca-ES`

* rename: `pt_BR` -> `pt-BR`

* rename: `zh_CN` -> `zh-CN`

* rename: `zh_TW` -> `zh-TW`

* fix loading Species-Form-Key in poemon-evo.

* update: i18next `supporterLngs` ...

and remove `nonExplicitSupportedLngs`

* fix: `${namespace}.` -> `${namespace}:`

thanks @MokaStitcher
2024-10-01 21:55:16 +01:00
flx-sta
2bd07cb84e
fix and optimize imports (#4061)
- remove any `.js` extension imports
- remove unncessary dynamic imports of `modifier.ts` file. The file was being imported statically & dynamically. Made it pure static
- increase vite chunk-size warning limit

Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
2024-09-07 21:37:37 -07:00
雪霁
872f05d2a7
centralize module typing overrides (#1786)
* optimize typings with declaration file
2024-08-24 12:46:16 -07:00
Matthew
e2a9f76926
more specific font unicode ranges and add unifont to existing families (#2459) 2024-06-20 11:28:47 -04:00
Matthew Olker
8c596c6f33 update zh font to unicode to fit both 2024-06-10 23:21:19 -04:00
Matthew
5248160112
add zh localization font (#2066) 2024-06-10 21:36:09 -04:00
Benjamin Odom
a163a420bd
Fixes etPositionRelative Errors (#1514) 2024-05-28 17:16:14 -04:00
Greenlamp2
e2be6ba002
added rule no-trailing-spaces (#1307) 2024-05-23 18:45:04 -05:00
Greenlamp2
bac6c22973
ESLint - The Essential Linter and Formatter for JavaScript and TypeScript (#1224)
* eslint config + packages

* updated eslint config

* fix the issue eslint adding ;;;; at interfaces

* first round with eslint --fix .

* removed config for unused export

* Revert "first round with eslint --fix ."

This reverts commit 77a88e0895f7c3389cb223651b90d918af778fe9.

* removed config for camelCase

* for real this time, first round of eslint --fix .

* halfway to manual eslint fix

* eslint done

* added "how to setup" the hook to eslint --fix each new file before commit (if wanted)

* removed eslintrc config file duplicat

* fix human error + ignore build folder + merge overrides

* added curly brace style + eslint

* applied double quote linter rule

* added lefthook

* test precommit

* test precommit

* test precommit

* test precommit

* test precommit

* test precommit

* test precommit

* github action to run eslint

* added node_modules to ignore eslint

* different action for typescript

* no need for different glob (default src)

* node 20

* node 20

* removed no longer needed install file

* remove hooks part from README

* eslint fixes

---------

Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
2024-05-23 11:03:10 -04:00
Flashfyre
3a7a48fe83 Temporarily disable error handling 2024-05-02 09:00:36 -04:00
James Lin
0185dd639e
Catch global errors and rejected promises and display them in an alert box. (#351)
* Catch errors and rejected promises.

* Clean up
2024-05-02 08:44:10 -04:00
Flashfyre
ba71d2750b Load files from manifest for caching 2024-04-23 22:00:23 -04:00
Flashfyre
4057fbf846 Formatting consistency changes 2024-04-15 19:45:10 -04:00
Hans Sorongon
1b41bdb8e3 Added built-in support for gamepads using Phaser.Gamepad 2024-04-15 19:45:10 -04:00
Flashfyre
5bed242002 Add Lock Capsule item and update reroll logic 2024-04-05 10:14:49 -04:00
Flashfyre
72dc263552 Implement variation of loading screen by @rationality6 2024-04-01 19:56:46 -04:00
Flashfyre
879971ae2b Add ""title"" screen and save data slots 2024-03-14 21:49:49 -04:00
Flashfyre
eedad7d678 Add boss health bars 2024-01-07 23:17:24 -05:00
Flashfyre
8063472bac Add accounts, login, and registration 2023-12-30 20:19:33 -05:00
Flashfyre
aa94e044ab Add egg gacha system and various minor changes
Add egg gacha system; remove certain mythical Pokemon from the wild pool as egg exclusive; add egg vouchers with UI; rework Shiny Charm odds; fix trainer Pokemon shiny odds not properly ignoring Shiny Charm modifier
2023-12-19 23:51:48 -05:00
Flashfyre
47181ea868 Add generation 8 Pokemon and new biomes 2023-12-14 00:41:35 -05:00
Flashfyre
c62cb27cdb Reimplement one-hit KO effect 2023-11-07 22:23:42 -05:00
Flashfyre
245d07b307 Fix seed not resetting every run 2023-10-19 22:19:14 -04:00
Flashfyre
83c70889fc Implement trainer battles and various changes
Implement trainer battles; add dialogue functionality; add random session seed for predictable random results; remove capitalization from text; add full party heal after every 10 waves
2023-10-18 18:01:15 -04:00
Flashfyre
23de25d585 Implement nineslice for some UI windows 2023-06-16 12:13:52 -04:00
Flashfyre
bf2eca2851 Add shader for sprite tone 2023-06-02 18:33:51 -04:00
Flashfyre
b11e391e7a Add evolution items and new modifiers 2023-04-14 18:21:33 -04:00
Flashfyre
1cf81869d0 Add Pokemon Reborn move animations 2023-04-03 20:47:41 -04:00
Flashfyre
2f17903d30 Initial commit 2023-03-28 14:54:52 -04:00