Commit Graph

38 Commits

Author SHA1 Message Date
Hay1tsme
2640f23a00 ongeki: fix opt reader 2025-04-09 00:10:54 -04:00
Hay1tsme
9a14e54328 ongeki: add opts to reader 2025-04-08 17:59:19 -04:00
Hay1tsme
1cab68006d add opt static tables 2025-04-07 18:31:11 -04:00
Dniel97
fbcc53aeae ongeki: update ongeki_static_tech_music_uk 2025-03-26 21:20:22 +01:00
Dniel97
a2f71dc553 ongeki: bright MEMORY Act.3 support added 2025-03-26 15:25:34 +01:00
Hay1tsme
360dfdfdc1 Merge pull request 'ongeki: use the latest applicable version' (#200) from akanyan/artemis:fix/ongeki/versions into develop
Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/200
2025-02-22 15:24:55 +00:00
Hay1tsme
0f52b89033 remove deprecated warn 2025-02-21 23:51:59 -05:00
akanyan
59a3c28134 ongeki: use the latest applicable version 2025-01-20 22:34:05 +00:00
akanyan
fa667d15f2 ongeki: proper handling of music ranking list 2025-01-06 18:39:49 +00:00
beerpsi
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: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/185
Co-authored-by: beerpsi <beerpsi@duck.com>
Co-committed-by: beerpsi <beerpsi@duck.com>
2024-11-16 19:10:29 +00:00
akanyan
f8db1e2149 ongeki: fix clearstatus type 2024-05-29 18:59:07 +09:00
Midorica
4c33dac96a Ongeki: fixed missing await under get_tech_count 2024-05-01 07:57:21 -04:00
Kumubou
1346bab911 Implement get_tech_count (it was stubbed out) 2024-04-17 00:45:05 +00:00
beerpsi
40a0817009 CHUNITHM & O.N.G.E.K.I.: Handle userRatingBase*List (#113)
These tables are not used by the game, but are useful for anyone wanting to develop a web UI showing what the player's rating consists of. As such, instead of storing them in JSON columns, I've split them out, one row per each entry.

Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/113
Co-authored-by: beerpsi <beerpsi@duck.com>
Co-committed-by: beerpsi <beerpsi@duck.com>
2024-03-14 14:44:32 +00:00
Hay1tsme
05586df08a move to async database 2024-01-09 14:42:17 -05:00
Hay1tsme
262155f83f ongeki: fix handle_upsert_client_setting_api_request 2023-12-04 11:40:20 -05:00
Hay1tsme
936316f129 ongeki: fix put_client_setting_data 2023-12-04 11:34:58 -05:00
phantomlan
cf0c34cafb fixup technical challenge event 2023-11-26 00:12:23 +01:00
phantomlan
dcebc5c21a update item.py put_mission_point 2023-11-15 15:11:39 +01:00
phantomlan
b56a5f020b add rollback sql
move GP support to table in DB
small fixes
2023-11-13 03:26:09 +01:00
phantomlan
d663b1ef7c fix foreign key issue 2023-11-13 03:03:04 +01:00
phantomlan
530016ef84 i ate one ) 2023-11-13 02:01:56 +00:00
phantomlan
f81c53558e - Add ClientTestmode upsert
- Add ClientSetting upsert
- Add endDate for Events
- Add Upgrade Schema
- Small bugfixes for events
2023-11-13 02:01:56 +00:00
phantomlan
d2e2c14074 update Event Ranking, Tech Challenge, and Music Ranking 2023-11-13 02:01:56 +00:00
phantomlan
1897e8002d add RewardList support
add PresentList support
add reading rewards to read.py
add Ranking Music List support
2023-11-13 02:01:56 +00:00
phantomlan
4da886a083 - Add Ranking Event Support
- Add Technical Challenge Event Support
- Fix Event Enumeration for EVT_TYPES as Enum starts with 1, to be in spec with what game expects, also add missing Max EVT_TYPE
- Add documentation on how to properly configure and run Events for ONGEKI
2023-11-13 02:01:56 +00:00
Wanich Keatkajonjumroen
ed46ea33e3 Added version select in session, removed get_profile_data_ignore_version, renamed scripts file 2023-09-09 06:55:18 +09:00
Wanich Keatkajonjumroen
16d801aff5 Rival Delete functionality 2023-09-02 07:40:57 +09:00
Wanich Keatkajonjumroen
147d7adaaf Frontend for adding rivals, versionless backend function to support 2023-09-02 06:21:02 +09:00
Hay1tsme
88a1462304 logger: change from warn to warning 2023-08-08 10:17:56 -04:00
Dniel97
6a41dac46c ongeki: card maker config added, small fixes, improved credits
- Changed the credits config to the default 370 instead of 360
- Added `start_date` to the events to show new events
- Fixed Card Maker Gachas to only allow "Select Gacha" once
- Fixed the `get_profile_rating_log` database query
2023-07-12 11:25:46 +02:00
Kevin Trocolli
238d437519 reformat with black in preperation for merge to master 2023-04-23 21:04:52 -04:00
Dniel97
2af7751504 Added support for maimai and Chunithm in Card Maker 1.34/1.35 (#14)
Co-authored-by: Dniel97 <Dniel97@noreply.gitea.tendokyu.moe>
Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/14
Co-authored-by: Dniel97 <dniel97@noreply.gitea.tendokyu.moe>
Co-committed-by: Dniel97 <dniel97@noreply.gitea.tendokyu.moe>
2023-03-15 20:03:22 +00:00
Hay1tsme
a76bb94eb1 let black do it's magic 2023-03-09 11:38:58 -05:00
Dniel97
74f3ab7c3f cm: added support for 1.36, fixed importer
- Added support for Card Maker 1.36.xx
- Added cards importer to ONGEKI importer
- Added 4 new 1.36 gachas (requires importing them from opt files)
- Fixed version for Card Maker opt importer
2023-03-05 23:54:13 +01:00
Dniel97
3acc2dc197 Initial Card Maker ONGEKI support 2023-03-04 00:22:08 +01:00
Midorica
3791b2b238 Adding Ongeki Bright Memory support 2023-03-03 00:00:22 -05:00
Hay1tsme
7e3396a7ff add back games, conform them to new title dispatch 2023-02-17 01:02:21 -05:00