Refactor player and room to support adding effects.
This commit is contained in:
29
types.ts
Normal file
29
types.ts
Normal file
@ -0,0 +1,29 @@
|
||||
export * from "./data/rooms.ts";
|
||||
|
||||
export interface Item {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface Effect<T> {
|
||||
name: string;
|
||||
properties: T;
|
||||
source: "player" | "scene";
|
||||
}
|
||||
|
||||
export interface VesselProperties {
|
||||
items?: Item[];
|
||||
}
|
||||
|
||||
export interface SceneProperties extends VesselProperties {
|
||||
description?: string;
|
||||
shortDescription?: string;
|
||||
}
|
||||
|
||||
export interface Conditions<T> {
|
||||
effects: Effect<T>[];
|
||||
}
|
||||
|
||||
export interface GameData<T> {
|
||||
conditions: Conditions<T>;
|
||||
properties: SceneProperties;
|
||||
}
|
Reference in New Issue
Block a user