feat: add native Tomie adapter and strict import compatibility checks
This commit is contained in:
1 parent
c8d83b3fe7
commit
57a4edcbfd
45 files changed
+2985
-71
No files matched your search
@@ -16,10 +16,10 @@ export interface SaveMeta {
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface SaveApi {
|
||||
export interface SaveApi<T = SaveData> {
|
||||
list(): Promise<SaveMeta[]>;
|
||||
get(slot: string): Promise<SaveData | null>;
|
||||
put(slot: string, title: string, data: SaveData): Promise<void>;
|
||||
get(slot: string): Promise<T | null>;
|
||||
put(slot: string, title: string, data: T): Promise<void>;
|
||||
remove(slot: string): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -799,6 +799,10 @@ export class Engine {
|
||||
|
||||
private characterFor(node: Node): { char: CharacterDef; name: string; mode: string } {
|
||||
const who: string | undefined = node.who;
|
||||
if (this.game.engine === "naninovel" && node.whoStr !== undefined) {
|
||||
const entry = this.game.naniResources?.CharacterNames?.[node.whoStr]?.[0];
|
||||
return { char: {}, name: this.interp(entry ? this.tr.line(entry.tid, entry.text) : this.tr.str(node.whoStr)), mode: "adv" };
|
||||
}
|
||||
if (node.whoStr !== undefined) return { char: {}, name: this.interp(this.tr.str(node.whoStr)), mode: "adv" };
|
||||
if (!who || who === "narrator") return { char: {}, name: "", mode: "adv" };
|
||||
if (who === "centered" || who === "vcentered") return { char: {}, name: "", mode: "centered" };
|
||||
|
||||
Reference in new issue
Block a user