isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
181 lines (143 loc) • 4.41 kB
text/typescript
import {
CrawlSpaceVariant,
GridEntityType,
GridEntityXMLType,
PitVariant,
PoopGridEntityVariant,
PressurePlateVariant,
RockVariant,
StatueVariant,
TrapdoorVariant,
} from "isaac-typescript-definitions";
import { ReadonlyMap } from "../types/ReadonlyMap";
/**
* This maps the GridEntityXMLType (i.e. the type contained in the room XML/STB file) to the
* GridEntityType and the variant used by the game.
*/
export const GRID_ENTITY_XML_MAP = new ReadonlyMap<
GridEntityXMLType,
[]
>([
// 0
[]],
// 1000
[]],
// 1001
[]],
// 1002
[]],
// 1003
[]],
// 1008
[]],
// 1009
[
GridEntityXMLType.ROCK_EVENT,
[],
],
// 1010
[]],
// 1011
[]],
// 1300
[]],
// GridEntityXMLType.FIREPLACE (1400) and GridEntityXMLType.RED_FIREPLACE (1410) are intentionally
// not mapped; the game converts these to EntityType.FIREPLACE (33). Manually spawning the grid
// version of the fireplace will result in a bugged entity.
// 1490
[
GridEntityXMLType.POOP_RED,
[],
],
// 1494
[
GridEntityXMLType.POOP_RAINBOW,
[],
],
// 1495
[
GridEntityXMLType.POOP_CORNY,
[],
],
// 1496
[
GridEntityXMLType.POOP_GOLDEN,
[],
],
// 1497
[
GridEntityXMLType.POOP_BLACK,
[],
],
// 1498
[
GridEntityXMLType.POOP_WHITE,
[],
],
// GridEntityXMLType.POOP_GIGA (1499) is intentionally not mapped; the game converts this to four
// different grid entities that are all next to each other:
// - PoopVariant.GIGA_TOP_LEFT (7)
// - PoopVariant.GIGA_TOP_RIGHT (8)
// - PoopVariant.GIGA_BOTTOM_LEFT (9)
// - PoopVariant.GIGA_BOTTOM_RIGHT (10)
// 1500
[]],
// 1501
[
GridEntityXMLType.POOP_CHARMING,
[],
],
// 1900
[]],
// 1901
[]],
// 1930
[]],
// 1931
[]],
// 1940
[]],
// 1999
[]],
// 3000
[]],
// 3001
[
GridEntityXMLType.FISSURE_SPAWNER,
[],
],
// 3009 - `GridEntityXMLType.PIT_EVENT` spawns as a normal pit with VarData equal to 1. VarData
// must be manually handled by any code that uses this mapping.)
[]],
// 4000
[]],
// 4500
[
GridEntityXMLType.PRESSURE_PLATE,
[],
],
// 5000
[
GridEntityXMLType.STATUE_DEVIL,
[],
],
// 5001
[
GridEntityXMLType.STATUE_ANGEL,
[],
],
// 6100
[]],
// 9000
[
GridEntityXMLType.TRAPDOOR,
[],
],
// 9100
[
GridEntityXMLType.CRAWL_SPACE,
[],
],
// 10000
[]],
]);