fix(admin): RRO blob switch works for rooms with no RoomScenes row

The seeded Rec Royale rows carry no RoomScenes at all ("Scenes 0"), so the
Sub-rooms tab listed nothing and blob/enable would have 404'd. The admin
list now synthesises the same virtual "Home" entry scene the game-client
details builder does (isVirtual: true, max players = room capacity),
blob/enable creates the real row with the game-side defaults
(RoomsController.GetOrCreateSceneForMutationAsync), and blob/reset copes
with a missing row. Max-players save is disabled on the virtual row.
Test: Room_without_scene_rows_gets_a_virtual_entry_scene_and_enable_creates_it.
This commit is contained in:
Alexa
2026-09-27 23:02:40 +03:00
parent 258183fb94
commit 36c5dd5ca9
4 changed files with 127 additions and 14 deletions
+5 -1
View File
@@ -208,7 +208,11 @@ actions:
room roles, no objects) while nothing is saved. `IsRRO` is derived from
`IsAGRoom`, so the client keeps loading the baked map and only
additionally fetches the blob. Idempotent; a no-op on a sub-room that
already has a blob.
already has a blob. Seeded originals such as Rec Royale have **no
`RoomScenes` row at all** ("Scenes 0"); the list synthesises a virtual
"Home" entry (`isVirtual: true`, max players = room capacity) and enable
creates the real row with the game-side defaults
(`RoomsController.GetOrCreateSceneForMutationAsync`).
- **Reset to baked scene** — `POST api/admin/v1/rooms/{id}/subrooms/{subRoomId}/blob/reset`.
Clears both pointers. This is the escape hatch if a save left the room
unplayable. Saved blobs stay in `RoomDataBlobs`, so the in-game restore