1046 Commits

Author SHA1 Message Date
4a89b21943 refactor(core): Remove game ID whitelist logic in ALLNET authentication
- Removed the code related to game ID whitelist validation
- Simplified the ALLNET authentication process
- This change does not affect game authentication in the development environment and should be considered a bugfix
2025-01-09 16:47:49 +08:00
3adec85031 feat(titles): Add MAI2 DX China version game code
- Added Mai2Constants.GAME_CODE_DX_CHN in titles/mai2/__init__.py
- This modification adds support for the China version of MAI2 DX
2025-01-09 16:44:28 +08:00
47b2ba82b7 feat(mai2): Add API request function to handle game NG word list
- Add handle_get_game_ng_word_list_api_request function
- Return an empty sensitive word list, including exact match and partial match lists - for maimai DX China version
2025-01-09 16:27:09 +08:00
3776a19b94 correct china game code 2025-01-09 05:37:03 +00:00
8a15b04adb feat(mai2): Add PRiSM version support
- Add Mai2Prism class inheriting from Mai2BuddiesPlus, implementing basic functionality for PRiSM version
- Add Mai2Prism reference and version check logic in index.py
- Implement API request handling methods for new features in PRiSM version
2025-01-08 19:26:07 +08:00
14714e695c fix config 2025-01-08 11:00:10 +00:00
4e3af1b80f feat(core): Add support for Maimai DX CN
- Add ChimeDB configuration and related processing logic
- Implement network initialization and file download functionality for Maimai DX CN
- Update game version constants and configurations to support the CN version
- Optimize data encryption and decryption processes to meet CN requirements
2025-01-08 18:57:22 +08:00
0cf41ff389 TUI: add card management screen 2024-12-20 17:40:55 -05:00
e93fcfd706 Merge pull request 'Fix: AimeDB Felica LookupEx rename package parameter' (#188) from SoulGateKey/artemis:lookup_fix into develop
Reviewed-on: Hay1tsme/artemis#188
2024-12-19 06:41:02 +00:00
b81d5c9cc5 adb: fix minor logging typo 2024-12-19 01:37:50 -05:00
6a305d2514 Merge pull request '[database] fix invalid transaction being left open' (#187) from beerpsi/artemis:fix/invalid-transaction into develop
Reviewed-on: Hay1tsme/artemis#187
2024-12-19 06:14:45 +00:00
e8c90634b6 Merge pull request '[chunithm] fix rival music not showing up in game' (#190) from beerpsi/artemis:fix/chunithm/rivals into develop
Reviewed-on: Hay1tsme/artemis#190
2024-12-19 06:14:10 +00:00
5d2f0eaae6 Merge pull request '[chunithm] support luminous+' (#193) from beerpsi/artemis:feat/chunithm/luminousplus into develop
Reviewed-on: Hay1tsme/artemis#193
2024-12-19 06:13:49 +00:00
5475b52336 [chunithm] support luminous+ 2024-12-19 13:03:37 +07:00
f830764990 tui: fix minor alignment issue 2024-12-19 00:21:39 -05:00
e8cd6e9596 tui: add user lookup 2024-12-19 00:17:00 -05:00
326b5988af add half-working TUI 2024-12-18 16:35:28 -05:00
e8ea328e77 mai2: add add_consec_login call if get_consec_login returns None #189 2024-12-15 20:21:03 -05:00
1dceff456d cxb: added missing r which fixes an issue on ubuntu 24.04.1 2024-12-15 20:16:18 -05:00
fe8f365d8a [chunithm] fix rival music not showing up in game 2024-12-12 20:49:39 +07:00
d6d98d20cb fix: typing shenanigans 2024-12-12 20:47:34 +07:00
5ecc7984c7 Fix: AimeDB Felica LookupEx rename package parameter 2024-12-08 08:44:32 +08:00
d797e5f6b7 Merge pull request 'update develop' (#4) from Hay1tsme/artemis:develop into develop
Reviewed-on: SoulGateKey/artemis#4
2024-12-08 00:12:03 +00:00
a8f5ef1550 allnet: properly dfi encode downloadorder responses 2024-12-01 14:19:55 -05:00
383859388e chuni: fix 'NoneType' object has no attribute 'split' in score.py 2024-11-29 22:20:55 -05:00
476a911df9 [database] fix invalid transaction being left open 2024-11-25 20:13:51 +07:00
fe9a04ef8e Merge pull request 'develop' (#3) from Hay1tsme/artemis:develop into develop
Reviewed-on: SoulGateKey/artemis#3
2024-11-20 19:25:36 +00:00
58a5177a30 use SQL's limit/offset pagination for nextIndex/maxCount requests (#185)
Instead of retrieving the entire list of items/characters/scores/etc. at once (and even store them in memory), use SQL's `LIMIT ... OFFSET ...` pagination so we only take what we need.

Currently only CHUNITHM uses this, but this will also affect maimai DX and O.N.G.E.K.I. once the PR is ready.

Also snuck in a fix for CHUNITHM/maimai DX's `GetUserRivalMusicApi` to respect the `userRivalMusicLevelList` sent by the client.

### How this works

Say we have a `GetUserCharacterApi` request:

```json
{
    "userId": 10000,
    "maxCount": 700,
    "nextIndex": 0
}
```

Instead of getting the entire character list from the database (which can be very large if the user force unlocked everything), add limit/offset to the query:

```python
select(character)
.where(character.c.user == user_id)
.order_by(character.c.id.asc())
.limit(max_count + 1)
.offset(next_index)
```

The query takes `maxCount + 1` items from the database to determine if there is more items than can be returned:

```python
rows = ...

if len(rows) > max_count:
    # return only max_count rows
    next_index += max_count
else:
    # return everything left
    next_index = -1
```

This has the benefit of not needing to load everything into memory (and also having to store server state, as seen in the [`SCORE_BUFFER` list](2274b42358/titles/chuni/base.py (L13)).)

Reviewed-on: Hay1tsme/artemis#185
Co-authored-by: beerpsi <beerpsi@duck.com>
Co-committed-by: beerpsi <beerpsi@duck.com>
2024-11-16 19:10:29 +00:00
cb009f6e23 wacca: tiny cleanup 2024-11-14 12:39:21 -05:00
2274b42358 Merge pull request '[database] make async' (#184) from beerpsi/artemis:fix/async-database into develop
Reviewed-on: Hay1tsme/artemis#184
2024-11-14 06:15:49 +00:00
789d50c406 use AsyncSession directly
see the warnings in https://docs.sqlalchemy.org/en/14/orm/extensions/asyncio.html#using-asyncio-scoped-session
2024-11-14 13:10:14 +07:00
4c33f4282a oops forgot a dependency on aiomysql 2024-11-14 12:38:00 +07:00
bc7524c8fc fix: make database async 2024-11-14 12:36:22 +07:00
1331d473c9 Merge pull request '[mai2] Implement GetGameRankingAPI . Fix photo merge , Add UserScoreRankingAPI handler' (#181) from SoulGateKey/artemis:develop into develop
Reviewed-on: Hay1tsme/artemis#181
2024-11-13 05:37:00 +00:00
b7a006f7ee core: pushing changes regarding MySQL ssl toggle that is now mandatory 2024-11-12 10:53:02 -05:00
65100920e3 Merge pull request '[chuni] web ui - customization support (user box, avatar, map icon, system voice)' (#182) from daydensteve/artemis-develop:chuni_ui_overhaul into develop
Reviewed-on: Hay1tsme/artemis#182
2024-11-12 12:03:14 +00:00
7a307b4d69 Merge pull request 'Fix mai2 photo merge problem and Add UserScoreRankingAPI handler' (#2) from mai2_tournament_support into develop
Reviewed-on: SoulGateKey/artemis#2
2024-11-12 05:42:20 +00:00
f4dff9b4c1 fix: mai2 photos cant be merged 2024-11-11 21:16:19 +08:00
8a6250bebd Formatted log print
Change log level
2024-11-11 21:11:33 +08:00
eb18ad22b8 hardened ui against the db not being upgraded or importer not being ran 2024-11-08 09:17:12 -05:00
954bd565d3 reduced db access with new chuni webui customizations 2024-11-07 20:28:28 -05:00
f272e97eae Formatted log print
Change log level
2024-11-06 02:44:07 +08:00
aa7ae6cb51 Formatted log print 2024-11-06 02:38:18 +08:00
3a44b18d91 fixed erroneously wide trophy select 2024-11-03 19:27:20 -05:00
c8186ccef0 fixed doc typo 2024-11-03 19:20:36 -05:00
4a701a5755 chuni doc updates 2024-11-03 19:19:05 -05:00
f5205801a8 Added customization unlock overrides 2024-11-03 19:12:49 -05:00
626ce6bd96 userbox, avatar, mapicon, and voice ui configuration 2024-11-03 18:37:09 -05:00
e49c70b738 more enums! 2024-11-03 16:37:27 -05:00
c2d4abcc26 db and import updates for userbox, avatar, voice, and map icon 2024-11-03 16:37:05 -05:00