sc4
Version:
A command line utility for automating SimCity 4 modding tasks & modifying savegames
136 lines (135 loc) • 3.35 kB
TypeScript
import { type Entry } from 'sc4/core';
type EntryLike = Entry | {
type?: number;
group?: number;
instance: number;
id?: string;
dbpf?: {
file?: string;
};
};
type DependencyOptions = {
entry: EntryLike;
};
type ToLinesOptions = {
width?: number;
level?: number;
root?: boolean;
};
export declare abstract class Dependency {
entry: EntryLike;
abstract kind: string;
constructor({ entry }: DependencyOptions);
toString(opts?: {}): string;
abstract toLines(...args: any[]): string[];
get id(): string | undefined;
get children(): Dependency[];
}
export declare class Lot extends Dependency {
kind: string;
name: string;
foundation: Dependency | null;
building: Dependency | null;
textures: Dependency[];
props: Dependency[];
flora: Dependency[];
parent: Dependency | null;
constructor(opts: DependencyOptions & {
name: string;
});
get children(): Dependency[];
toLines(opts?: ToLinesOptions): string[];
}
export declare const getLotSetter: (lot: Lot, type: number) => ((object: Dependency) => Dependency) | (() => undefined);
export declare class Family extends Dependency {
kind: string;
familyId: number | undefined;
elements: Dependency[];
constructor(children: Dependency[], id?: number);
toLines({ width, level }: ToLinesOptions): string[];
get id(): string;
get children(): Dependency[];
}
export declare class Texture extends Dependency {
kind: string;
toLines({ width, level, root }: ToLinesOptions): string[];
}
export declare class Model extends Dependency {
kind: string;
toLines({ width, level }?: ToLinesOptions): string[];
}
declare const exemplarTypes: {
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
6: string;
7: string;
8: string;
9: string;
10: string;
11: string;
12: string;
13: string;
14: string;
15: string;
16: string;
17: string;
18: string;
19: string;
20: string;
21: string;
22: string;
23: string;
24: string;
25: string;
30: string;
31: string;
32: string;
33: string;
34: string;
35: string;
36: string;
37: string;
38: string;
39: string;
40: string;
};
export type ExemplarProp = [name: string, dep: Dependency];
export declare class Exemplar extends Dependency {
kind: string;
exemplarType: keyof typeof exemplarTypes;
name: string;
parent: Dependency | null;
models: Dependency[];
props: ExemplarProp[];
constructor(opts: DependencyOptions & {
exemplarType: number;
name: string;
});
get children(): Dependency[];
toLines({ width, level, root }?: ToLinesOptions): string[];
}
export declare class Raw extends Dependency {
kind: string;
get label(): string | undefined;
toLines({ width, root }?: ToLinesOptions): string[];
}
export type MissingOptions = {
type?: number;
group?: number;
instance: number;
resource: string;
parent: Entry;
};
export declare class Missing extends Dependency {
kind: string;
resource: string;
parent: Entry;
constructor(opts: MissingOptions);
toLines({ width, level }?: ToLinesOptions): string[];
get id(): string;
}
export {};