import { LogicAction } from "../game"; import { Color } from "../types"; import { DeepPartial } from "../../../util/data"; import { Actionable } from "../action/actionable"; import { Chained, Proxied } from "../action/chain"; import { Sentence, SentencePrompt, SentenceUserConfig, SingleWord } from "../elements/character/sentence"; export type CharacterConfig = { color?: Color; }; export interface Character { (content: string, config?: SentenceUserConfig): Proxied>; (content: Sentence): Proxied>; (content: SentencePrompt, config?: SentenceUserConfig): Proxied>; (texts: TemplateStringsArray, ...words: SingleWord[]): Proxied>; } export declare class Character extends Actionable { constructor(name: string | null, config?: DeepPartial); /** * Say something * @example * ```typescript * character.say("Hello, world!"); * ``` * @example * ```typescript * character * .say("Hello, world!") * .say("Hello, world!"); * ``` * @example * ```typescript * character.say(new Sentence(character, [ * "Hello, ", * new Word("world", {color: "#f00"}), // Some words can be colored * ])); * @example * ```typescript * character.say`Hello, ${Word.color("world", "#f00")}!`; * ``` * @example * ```typescript * character`Hello, ${Word.color("world", "#f00")}!`; * ``` * @chainable */ say(content: string, config?: SentenceUserConfig): Proxied>; say(content: Sentence): Proxied>; say(content: SentencePrompt, config?: SentenceUserConfig): Proxied>; say(texts: TemplateStringsArray, ...words: SingleWord[]): Proxied>; /** * Set the display name that will appear in the dialog box for future actions. * @param name - The new label to show above the next sentences. * @returns The character instance to keep chaining dialogs. * @chainable * @example * ```ts * character.setName("Alice (angry)").say("What do you want?"); * ``` */ setName(name: string): Proxied>; apply(content: string, config?: SentenceUserConfig): Proxied>; apply(content: Sentence): Proxied>; apply(content: SentencePrompt, config?: SentenceUserConfig): Proxied>; apply(texts: TemplateStringsArray, ...words: SingleWord[]): Proxied>; } export declare const Narrator: Character;