- parseTowns(res, removeAccents?): Promise<{
area: number;
balance?: number;
board?: string;
bounds: TownBounds;
colours: {
fill: `#${string}`;
outline: `#${string}`;
};
councillors: string[];
flags: {
capital: boolean;
public: boolean;
pvp: boolean;
};
foundedTimestamp: number;
founder?: string;
mayor: string;
name: string;
nation: string;
opacities?: {
fill: Opacity;
outline: Opacity;
};
outlaws?: string[];
points: {
x: number;
z: number;
}[];
residents: string[];
timestamps?: {
founded: number;
joinedNation?: number;
};
trusted?: string[];
wealth?: number;
wikis?: {
nation?: string;
town?: string;
};
x: number;
z: number;
}[]> Parameters
- res: {
control: boolean;
hide: boolean;
id: "towny" | "chunky";
markers: {
anchor?: Point2D;
color?: `#${string}`;
fill?: boolean;
fillColor?: `#${string}`;
fillOpacity?: Opacity;
icon?: string;
opacity?: Opacity;
point?: Point2D;
points?: StrictPoint2D[] | StrictPoint2D[][][];
popup: string;
size?: Point2D;
tooltip: string;
tooltip_anchor?: Point2D;
type: SquaremapAreaType;
}[];
name: string;
order: number;
timestamp: number;
z_index: number;
}control: boolean
hide: boolean
id: "towny" | "chunky"
markers: {
anchor?: Point2D;
color?: `#${string}`;
fill?: boolean;
fillColor?: `#${string}`;
fillOpacity?: Opacity;
icon?: string;
opacity?: Opacity;
point?: Point2D;
points?: StrictPoint2D[] | StrictPoint2D[][][];
popup: string;
size?: Point2D;
tooltip: string;
tooltip_anchor?: Point2D;
type: SquaremapAreaType;
}[]
name: string
order: number
timestamp: number
z_index: number
- removeAccents: boolean = false
Returns Promise<{
area: number;
balance?: number;
board?: string;
bounds: TownBounds;
colours: {
fill: `#${string}`;
outline: `#${string}`;
};
councillors: string[];
flags: {
capital: boolean;
public: boolean;
pvp: boolean;
};
foundedTimestamp: number;
founder?: string;
mayor: string;
name: string;
nation: string;
opacities?: {
fill: Opacity;
outline: Opacity;
};
outlaws?: string[];
points: {
x: number;
z: number;
}[];
residents: string[];
timestamps?: {
founded: number;
joinedNation?: number;
};
trusted?: string[];
wealth?: number;
wikis?: {
nation?: string;
town?: string;
};
x: number;
z: number;
}[]>