Slim skins

This commit is contained in:
2026-09-27 13:55:46 -03:00
parent d822267bd3
commit d0cbec1846
8 changed files with 89 additions and 13 deletions
+6
View File
@@ -31,6 +31,7 @@ export interface SavedPlayer {
vitals?: SavedVitals;
// base64 png, see /skin
skin?: string;
slim?: boolean;
}
export class ServerPlayer {
@@ -56,6 +57,8 @@ export class ServerPlayer {
screen: OpenScreen | undefined;
// base64 png, see /skin. undefined is the default skin
skin: string | undefined;
// the skin is for the model with 3 pixel wide arms
slim = false;
// a /skin download is on its way, one at a time
downloading_skin = false;
@@ -81,6 +84,7 @@ export class ServerPlayer {
yaw: this.yaw,
pitch: this.pitch,
skin: this.skin,
slim: this.slim || undefined,
};
}
@@ -95,6 +99,7 @@ export class ServerPlayer {
inventory: this.inventory.to_data(),
vitals: this.vitals.save(),
skin: this.skin,
slim: this.slim || undefined,
};
}
@@ -108,5 +113,6 @@ export class ServerPlayer {
this.inventory.load(saved.inventory);
this.vitals.load(saved.vitals);
this.skin = saved.skin;
this.slim = saved.slim ?? false;
}
}