earthmc
Version:
An unofficial EarthMC library providing handy methods and extensive info.
103 lines • 3.57 kB
TypeScript
import type Squaremap from "./Squaremap.js";
import { type NotFoundError } from "../../utils/errors.js";
import type { EntityApi } from "../../helpers/EntityApi.js";
import type { SquaremapNation, SquaremapTown, StrictPoint2D } from "../../types/index.js";
declare class Nations implements EntityApi<SquaremapNation | NotFoundError> {
#private;
get map(): Squaremap;
constructor(map: Squaremap);
readonly get: (...names: string[]) => Promise<NotFoundError | {
name: string;
king: string;
towns: string[];
residents: string[];
area: number;
capital: import("../../types/nation.js").NationCapital;
uuid?: string;
wiki?: string;
status?: import("../../types/oapi.js").RawEntityStatus;
stats?: import("../../types/oapi.js").RawEntityStats & {
numTowns?: number;
};
spawn?: import("../../types/oapi.js").RawEntitySpawn;
ranks?: {
[key: string]: string[];
};
allies?: string[];
enemies?: string[];
mapColorHexCode?: string;
wealth?: number;
councillors: string[];
} | (NotFoundError | {
name: string;
king: string;
towns: string[];
residents: string[];
area: number;
capital: import("../../types/nation.js").NationCapital;
uuid?: string;
wiki?: string;
status?: import("../../types/oapi.js").RawEntityStatus;
stats?: import("../../types/oapi.js").RawEntityStats & {
numTowns?: number;
};
spawn?: import("../../types/oapi.js").RawEntitySpawn;
ranks?: {
[key: string]: string[];
};
allies?: string[];
enemies?: string[];
mapColorHexCode?: string;
wealth?: number;
councillors: string[];
})[]>;
readonly all: (towns?: SquaremapTown[]) => Promise<SquaremapNation[]>;
readonly nearby: (location: StrictPoint2D, radius: StrictPoint2D, nations?: SquaremapNation[]) => Promise<{
name: string;
king: string;
towns: string[];
residents: string[];
area: number;
capital: import("../../types/nation.js").NationCapital;
uuid?: string;
wiki?: string;
status?: import("../../types/oapi.js").RawEntityStatus;
stats?: import("../../types/oapi.js").RawEntityStats & {
numTowns?: number;
};
spawn?: import("../../types/oapi.js").RawEntitySpawn;
ranks?: {
[key: string]: string[];
};
allies?: string[];
enemies?: string[];
mapColorHexCode?: string;
wealth?: number;
councillors: string[];
}[]>;
readonly joinable: (townName: string, nationless?: boolean) => Promise<{
name: string;
king: string;
towns: string[];
residents: string[];
area: number;
capital: import("../../types/nation.js").NationCapital;
uuid?: string;
wiki?: string;
status?: import("../../types/oapi.js").RawEntityStatus;
stats?: import("../../types/oapi.js").RawEntityStats & {
numTowns?: number;
};
spawn?: import("../../types/oapi.js").RawEntitySpawn;
ranks?: {
[key: string]: string[];
};
allies?: string[];
enemies?: string[];
mapColorHexCode?: string;
wealth?: number;
councillors: string[];
}[]>;
}
export { Nations, Nations as default };
//# sourceMappingURL=Nations.d.ts.map