Rework avatars.

Now we have a concept of an avatar at the server, realm, and scene level
and we have the groundwork for a realm store. New uesrs no longer props,
they get a default avatar. New system supports gender
{male,female,neutral} and {child,adult}.
This commit is contained in:
Evan Carroll 2026-01-22 21:04:27 -06:00
parent e4abdb183f
commit 6fb90e42c3
55 changed files with 7392 additions and 512 deletions

View file

@ -31,6 +31,10 @@ pub fn api_router() -> Router<AppState> {
"/auth/register-guest",
axum::routing::post(auth::register_guest),
)
.route(
"/auth/preferences",
axum::routing::put(auth::update_preferences),
)
// Realm routes (READ-ONLY)
.route("/realms", get(realms::list_realms))
.route("/realms/{slug}", get(realms::get_realm))
@ -62,6 +66,17 @@ pub fn api_router() -> Router<AppState> {
"/realms/{slug}/avatar/slot",
axum::routing::put(avatars::assign_slot).delete(avatars::clear_slot),
)
// Avatar store routes
.route("/server/avatars", get(avatars::list_server_avatars))
.route("/realms/{slug}/avatars", get(avatars::list_realm_avatars))
.route(
"/realms/{slug}/avatar/select",
axum::routing::post(avatars::select_avatar),
)
.route(
"/realms/{slug}/avatar/selection",
axum::routing::delete(avatars::clear_avatar_selection),
)
// User inventory routes
.route("/user/{uuid}/inventory", get(inventory::get_user_inventory))
.route(