UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

27 lines (26 loc) 1.74 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ROOM_SHAPE_TO_TOP_LEFT_POSITION = void 0; const isaac_typescript_definitions_1 = require("isaac-typescript-definitions"); const constants_1 = require("../core/constants"); const readOnly_1 = require("../functions/readOnly"); const NARROW_HORIZONTAL_TOP_LEFT_POSITION = (0, readOnly_1.newReadonlyVector)(0, 2); const NARROW_VERTICAL_TOP_LEFT_POSITION = (0, readOnly_1.newReadonlyVector)(4, 0); /** * "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)".) */ exports.ROOM_SHAPE_TO_TOP_LEFT_POSITION = { [isaac_typescript_definitions_1.RoomShape.SHAPE_1x1]: constants_1.VectorZero, // 1 [isaac_typescript_definitions_1.RoomShape.IH]: NARROW_HORIZONTAL_TOP_LEFT_POSITION, // 2 [isaac_typescript_definitions_1.RoomShape.IV]: NARROW_VERTICAL_TOP_LEFT_POSITION, // 3 [isaac_typescript_definitions_1.RoomShape.SHAPE_1x2]: constants_1.VectorZero, // 4 [isaac_typescript_definitions_1.RoomShape.IIV]: NARROW_VERTICAL_TOP_LEFT_POSITION, // 5 [isaac_typescript_definitions_1.RoomShape.SHAPE_2x1]: constants_1.VectorZero, // 6 [isaac_typescript_definitions_1.RoomShape.IIH]: NARROW_HORIZONTAL_TOP_LEFT_POSITION, // 7 [isaac_typescript_definitions_1.RoomShape.SHAPE_2x2]: constants_1.VectorZero, // 8 [isaac_typescript_definitions_1.RoomShape.LTL]: (0, readOnly_1.newReadonlyVector)(13, 0), // 9 [isaac_typescript_definitions_1.RoomShape.LTR]: constants_1.VectorZero, // 10 [isaac_typescript_definitions_1.RoomShape.LBL]: constants_1.VectorZero, // 11 [isaac_typescript_definitions_1.RoomShape.LBR]: constants_1.VectorZero, // 12 };