sc4
Version:
A command line utility for automating SimCity 4 modding tasks & modifying savegames
72 lines (71 loc) • 1.87 kB
TypeScript
import Stream from './stream.js';
import WriteBuffer from './write-buffer.js';
import Unknown from './unknown.js';
import { kFileType } from './symbols.js';
import type Pointer from './pointer.js';
import type { dword, tiles, word } from 'sc4/types';
import type { NetworkOccupantType } from './types.js';
export declare class NetworkIndex {
static [kFileType]: 1779401394;
mem: number;
crc: number;
major: number;
cityTiles: number;
tiles: NetworkIndexTile[];
intersections: NetworkIntersection[];
transitEnabledTiles: TransitEnabledTile[];
tileX: number;
tileZ: number;
yIntersections: ComplexIntersection[];
u: Unknown;
parse(buffer: Stream | Uint8Array): void;
toBuffer(): Uint8Array<ArrayBufferLike>;
tile(): NetworkIndexTile;
}
export default NetworkIndex;
type ParseOptions = {
citySize: tiles;
};
export declare class NetworkIndexTile {
x: tiles;
z: tiles;
pointer: Pointer<NetworkOccupantType>;
blocks: any[];
automata: any[];
reps: Uint8Array[];
reps2: any[];
u: Unknown;
parse(rs: Stream, { citySize }: ParseOptions): void;
write(ws: WriteBuffer, { citySize }: ParseOptions): void;
}
declare class NetworkIntersection {
pointer: Pointer | null;
west: any;
north: any;
east: any;
south: any;
u: Unknown;
parse(rs: Stream): void;
write(ws: WriteBuffer): void;
}
declare class TransitEnabledTile {
x: word;
z: word;
dword: dword;
pointer: Pointer | null;
parse(rs: Stream): void;
write(ws: WriteBuffer): void;
}
type DirType = {
array: dword[];
word: word;
};
declare class ComplexIntersection {
pointer: Pointer | null;
west: DirType | null;
north: DirType | null;
east: DirType | null;
south: DirType | null;
parse(rs: Stream): void;
write(ws: WriteBuffer): void;
}