wip: paperdoll

This commit is contained in:
2026-03-19 21:06:13 -07:00
parent 81ae1f18e1
commit 66c2f7e8e9
8 changed files with 326 additions and 1 deletions
+9
View File
@@ -5,6 +5,15 @@
* @author Naomi Carrigan
*/
export type { ApotheosisData } from "./interfaces/apotheosis.js";
export type {
Accessory,
Appearance,
HairColour,
HairStyle,
Outfit,
SkinTone,
} from "./interfaces/appearance.js";
export { defaultAppearance } from "./interfaces/appearance.js";
export type {
Companion,
CompanionBonus,
@@ -0,0 +1,50 @@
/**
* @file Appearance type for the paper doll customisation system.
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Hikari
*/
type SkinTone = "pale" | "light" | "tan" | "medium" | "dark";
type HairStyle =
| "short"
| "shoulder"
| "long"
| "ponytail"
| "twintails"
| "bun";
type HairColour =
| "brown"
| "black"
| "blonde"
| "red"
| "auburn"
| "silver"
| "blue"
| "purple"
| "pink";
type Outfit = "warrior" | "mage" | "rogue" | "archer" | "bard" | "ranger";
type Accessory = "none" | "glasses" | "hat" | "cape";
interface Appearance {
skinTone: SkinTone;
hairStyle: HairStyle;
hairColour: HairColour;
outfit: Outfit;
accessory: Accessory;
}
const defaultAppearance: Appearance = {
accessory: "none",
hairColour: "brown",
hairStyle: "short",
outfit: "warrior",
skinTone: "pale",
};
export type { Accessory, Appearance, HairColour, HairStyle, Outfit, SkinTone };
export { defaultAppearance };
@@ -7,6 +7,7 @@
import type { Achievement } from "./achievement.js";
import type { Adventurer } from "./adventurer.js";
import type { ApotheosisData } from "./apotheosis.js";
import type { Appearance } from "./appearance.js";
import type { Boss } from "./boss.js";
import type { CodexState } from "./codex.js";
import type { CompanionState } from "./companion.js";
@@ -98,6 +99,12 @@ interface GameState {
* Schema version — used to detect saves from older game versions.
*/
schemaVersion?: number;
/**
* Paper doll appearance customisation — optional for backwards compatibility.
* Persists across prestige and transcendence resets.
*/
appearance?: Appearance;
}
export type { GameState };