isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
25 lines (22 loc) • 1.21 kB
text/typescript
import { RoomShape } from "isaac-typescript-definitions";
import { newReadonlyVector } from "../functions/readOnly";
const TWO_BY_TWO_BOTTOM_RIGHT_POSITION = newReadonlyVector(25, 13);
const ONE_BY_TWO_VERTICAL_BOTTOM_RIGHT_POSITION = newReadonlyVector(12, 13);
/**
* "Vector(0, 0)" corresponds to the top left tile of a room, not including the walls. (The top-left
* wall would be at "Vector(-1, -1)".)
*/
export const ROOM_SHAPE_TO_BOTTOM_RIGHT_POSITION = {
[]: newReadonlyVector(12, 6), // 1
[]: newReadonlyVector(12, 4), // 2
[]: newReadonlyVector(8, 6), // 3
[]: ONE_BY_TWO_VERTICAL_BOTTOM_RIGHT_POSITION, // 4
[]: newReadonlyVector(8, 13), // 5
[]: newReadonlyVector(25, 6), // 6
[]: newReadonlyVector(25, 4), // 7
[]: TWO_BY_TWO_BOTTOM_RIGHT_POSITION, // 8
[]: TWO_BY_TWO_BOTTOM_RIGHT_POSITION, // 9
[]: TWO_BY_TWO_BOTTOM_RIGHT_POSITION, // 10
[]: TWO_BY_TWO_BOTTOM_RIGHT_POSITION, // 11
[]: ONE_BY_TWO_VERTICAL_BOTTOM_RIGHT_POSITION, // 12
} as const satisfies Record<RoomShape, Readonly<Vector>>;