@scml-dol-maplebirch/types 4.3.1 → 4.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/maplebirch.d.ts +77 -4
- package/package.json +1 -1
package/maplebirch.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ import { ScriptingAPI } from '@scml/sc2-verlnir/src/scripting';
|
|
|
22
22
|
import { SettingAPI } from '@scml/sc2-verlnir/src/setting';
|
|
23
23
|
import { SimpleAudioAPI } from '@scml/sc2-verlnir/src/simpleaudio';
|
|
24
24
|
import { SimpleStoreAPI, SimpleStoreInstanceAPI } from '@scml/sc2-verlnir/src/simplestore';
|
|
25
|
-
import { StateAPI } from '@scml/sc2-verlnir/src/state';
|
|
26
25
|
import { StoryAPI } from '@scml/sc2-verlnir/src/story';
|
|
27
26
|
import { TemplateAPI } from '@scml/sc2-verlnir/src/template';
|
|
28
27
|
import { UIAPI } from '@scml/sc2-verlnir/src/ui';
|
|
@@ -64,8 +63,80 @@ declare module 'twine-sugarcube' {
|
|
|
64
63
|
isWidget?: boolean;
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
|
-
interface
|
|
68
|
-
|
|
66
|
+
interface DolStateMoment {
|
|
67
|
+
readonly title: string;
|
|
68
|
+
readonly variables: Record<string, unknown>;
|
|
69
|
+
}
|
|
70
|
+
interface DolStateMetadataAPI {
|
|
71
|
+
clear(): void;
|
|
72
|
+
delete(key: string): boolean;
|
|
73
|
+
entries(): Iterable<[string, unknown]>;
|
|
74
|
+
get(key: string): unknown;
|
|
75
|
+
has(key: string): boolean;
|
|
76
|
+
keys(): Iterable<string>;
|
|
77
|
+
set(key: string, value: unknown): void;
|
|
78
|
+
readonly size: number;
|
|
79
|
+
}
|
|
80
|
+
interface DolStatePRNGAPI {
|
|
81
|
+
init(seed: string | number): void;
|
|
82
|
+
isEnabled(): boolean;
|
|
83
|
+
pull: number;
|
|
84
|
+
readonly seed: string | number;
|
|
85
|
+
str2int(str: string): number;
|
|
86
|
+
test(seed: string | number): boolean;
|
|
87
|
+
peek(): number;
|
|
88
|
+
}
|
|
89
|
+
interface DolStateAPI {
|
|
90
|
+
reset(): void;
|
|
91
|
+
restore(soft?: boolean): boolean;
|
|
92
|
+
marshalForSave(): unknown;
|
|
93
|
+
unmarshalForSave(stateObj: unknown): void;
|
|
94
|
+
readonly expired: string[];
|
|
95
|
+
readonly passages: string[];
|
|
96
|
+
getSessionState(): unknown;
|
|
97
|
+
setSessionState(state: unknown): void;
|
|
98
|
+
readonly active: DolStateMoment;
|
|
99
|
+
readonly activeIndex: number;
|
|
100
|
+
readonly current: DolStateMoment | undefined;
|
|
101
|
+
readonly top: DolStateMoment | undefined;
|
|
102
|
+
readonly bottom: DolStateMoment | undefined;
|
|
103
|
+
readonly history: DolStateMoment[];
|
|
104
|
+
readonly passage: string;
|
|
105
|
+
readonly variables: Record<string, unknown>;
|
|
106
|
+
readonly temporary: Record<string, unknown>;
|
|
107
|
+
readonly length: number;
|
|
108
|
+
readonly size: number;
|
|
109
|
+
readonly turns: number;
|
|
110
|
+
create(): DolStateMoment;
|
|
111
|
+
goTo(index: number): void;
|
|
112
|
+
go(delta: number): void;
|
|
113
|
+
deltaEncode(moments: DolStateMoment[]): unknown;
|
|
114
|
+
deltaDecode(data: unknown): DolStateMoment[];
|
|
115
|
+
readonly prng: DolStatePRNGAPI;
|
|
116
|
+
clearTemporary(): void;
|
|
117
|
+
pushLocal(): void;
|
|
118
|
+
popLocal(): Record<string, unknown> | undefined;
|
|
119
|
+
peekLocal(): Record<string, unknown> | undefined;
|
|
120
|
+
readonly local: Record<string, unknown>;
|
|
121
|
+
clearLocal(): void;
|
|
122
|
+
getVar(path: string): unknown;
|
|
123
|
+
setVar(path: string, value: unknown): void;
|
|
124
|
+
has(offset: number): boolean;
|
|
125
|
+
hasPlayed(passage: string): boolean;
|
|
126
|
+
index(offset?: number): number;
|
|
127
|
+
isEmpty(): boolean;
|
|
128
|
+
peek(offset?: number): DolStateMoment | undefined;
|
|
129
|
+
random(): number;
|
|
130
|
+
readonly metadata: DolStateMetadataAPI;
|
|
131
|
+
readonly qc: unknown;
|
|
132
|
+
qcadd(fn: (...args: unknown[]) => void): void;
|
|
133
|
+
initPRNG(seed: string | number): void;
|
|
134
|
+
restart(): void;
|
|
135
|
+
backward(): void;
|
|
136
|
+
forward(): void;
|
|
137
|
+
display(...args: unknown[]): void;
|
|
138
|
+
show(...args: unknown[]): void;
|
|
139
|
+
play(...args: unknown[]): void;
|
|
69
140
|
}
|
|
70
141
|
interface DolSaveAPI extends SaveAPI {
|
|
71
142
|
serialize(metadata?: any): string;
|
|
@@ -2720,10 +2791,12 @@ declare class NPCSidebarWardrobe {
|
|
|
2720
2791
|
init(): void;
|
|
2721
2792
|
load(modName: string, filePath: string): Promise<void>;
|
|
2722
2793
|
wear(npcName: string, location: string, key: string, cond?: Condition): void;
|
|
2794
|
+
base(npcName: string, modifier: WardrobeModifier): void;
|
|
2723
2795
|
modify(npcName: string, modifier: WardrobeModifier): void;
|
|
2724
2796
|
worn(npcName: string): WardrobeItem;
|
|
2797
|
+
private applyModifiers;
|
|
2725
2798
|
private add;
|
|
2726
|
-
private
|
|
2799
|
+
private mergeClothes;
|
|
2727
2800
|
private select;
|
|
2728
2801
|
private find;
|
|
2729
2802
|
private profile;
|