isaacscript-common 15.1.1 → 15.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3437,6 +3437,16 @@ export declare function emptyArray<T>(array: T[]): void;
3437
3437
  */
3438
3438
  export declare function emptyRoom(): void;
3439
3439
 
3440
+ /**
3441
+ * A string that represents an entity. This is the entity type, variant, and sub-type, all separated
3442
+ * by periods.
3443
+ *
3444
+ * This type is branded for extra type safety.
3445
+ */
3446
+ export declare type EntityID = string & {
3447
+ readonly __entityIDBrand: symbol;
3448
+ };
3449
+
3440
3450
  /**
3441
3451
  * Helper function to return an array of integers with the specified range, inclusive on the lower
3442
3452
  * end and exclusive on the high end. (The "e" stands for exclusive.)
@@ -4361,6 +4371,12 @@ export declare function getCollidingEntitiesWithGridEntity(gridEntity: GridEntit
4361
4371
  */
4362
4372
  export declare function getCombinedBossSet(stage: int): ReadonlySet<string> | undefined;
4363
4373
 
4374
+ /** Helper function to get the entity type, variant, and sub-type from an `EntityID`. */
4375
+ export declare function getConstituentsFromEntityID(entityID: EntityID): [entityType: EntityType, variant: int, subType: int];
4376
+
4377
+ /** Helper function to get the grid entity type and variant from a `GridEntityID`. */
4378
+ export declare function getConstituentsFromGridEntityID(gridEntityID: GridEntityID): [gridEntityType: GridEntityType, variant: int];
4379
+
4364
4380
  /**
4365
4381
  * Helper function to get all of the grid entities of type `GridEntityType.CRAWL_SPACE` (18) in the
4366
4382
  * room.
@@ -4528,12 +4544,12 @@ export declare function getEntityFields(entity: Entity): LuaMap<string, boolean
4528
4544
  export declare function getEntityFromPtrHash(ptrHash: PtrHash): Entity | undefined;
4529
4545
 
4530
4546
  /** Helper function to get a string containing the entity's type, variant, and sub-type. */
4531
- export declare function getEntityID(entity: Entity): string;
4547
+ export declare function getEntityID(entity: Entity): EntityID;
4532
4548
 
4533
4549
  /**
4534
4550
  * Helper function to get a formatted string in the format returned by the `getEntityID` function.
4535
4551
  */
4536
- export declare function getEntityIDFromConstituents(entityType: EntityType, variant: int, subType: int): string;
4552
+ export declare function getEntityIDFromConstituents(entityType: EntityType, variant: int, subType: int): EntityID;
4537
4553
 
4538
4554
  /**
4539
4555
  * Helper function to get a map containing the positions of every entity in the current room.
@@ -4742,13 +4758,13 @@ export declare function getGridEntitiesMap(...gridEntityTypes: GridEntityType[])
4742
4758
  export declare function getGridEntityCollisionPoints(gridEntity: GridEntity): [topLeft: Vector, bottomRight: Vector];
4743
4759
 
4744
4760
  /** Helper function to get a string containing the grid entity's type and variant. */
4745
- export declare function getGridEntityID(gridEntity: GridEntity): string;
4761
+ export declare function getGridEntityID(gridEntity: GridEntity): GridEntityID;
4746
4762
 
4747
4763
  /**
4748
4764
  * Helper function to get a formatted string in the format returned by the `getGridEntityID`
4749
4765
  * function.
4750
4766
  */
4751
- export declare function getGridEntityIDFromConstituents(gridEntityType: GridEntityType, variant: int): string;
4767
+ export declare function getGridEntityIDFromConstituents(gridEntityType: GridEntityType, variant: int): GridEntityID;
4752
4768
 
4753
4769
  /**
4754
4770
  * Helper function to get the grid index delta that a door out of the given room shape would lead
@@ -6484,6 +6500,16 @@ export declare interface GridEntityCustomData {
6484
6500
  defaultAnimation?: string;
6485
6501
  }
6486
6502
 
6503
+ /**
6504
+ * A string that represents a grid entity. This is the entity type and variant separated by a
6505
+ * period.
6506
+ *
6507
+ * This type is branded for extra type safety.
6508
+ */
6509
+ export declare type GridEntityID = string & {
6510
+ readonly __gridEntityIDBrand: symbol;
6511
+ };
6512
+
6487
6513
  declare class GridEntityRenderDetection extends Feature {
6488
6514
  private postGridEntityRender;
6489
6515
  private postGridEntityCustomRender;
@@ -13367,6 +13393,16 @@ export declare type SoulHeartType = HeartSubType.SOUL | HeartSubType.BLACK | Hea
13367
13393
  * need to specify the velocity or spawner.
13368
13394
  *
13369
13395
  * Also see the `spawnWithSeed` helper function.
13396
+ *
13397
+ * @param entityType The `EntityType` of the entity to spawn.
13398
+ * @param variant The variant of the entity to spawn.
13399
+ * @param subType The sub-type of the entity to spawn.
13400
+ * @param position The position of the entity to spawn.
13401
+ * @param velocity Optional. The velocity of the entity to spawn. Default is `VectorZero`.
13402
+ * @param spawner Optional. The entity that will be the `SpawnerEntity`. Default is undefined.
13403
+ * @param seedOrRNG Optional. The seed or RNG object to use to generate the `InitSeed` of the
13404
+ * entity. Default is undefined, which will make the entity spawn with a random
13405
+ * seed using the `Isaac.Spawn` method.
13370
13406
  */
13371
13407
  export declare function spawn(entityType: EntityType, variant: int, subType: int, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): Entity;
13372
13408
 
@@ -13537,6 +13573,19 @@ export declare function spawnEffectWithSeed(effectVariant: EffectVariant, subTyp
13537
13573
  */
13538
13574
  export declare function spawnEmptyCollectible(position: Vector, seedOrRNG?: Seed | RNG): EntityPickup;
13539
13575
 
13576
+ /**
13577
+ * Helper function to spawn the entity corresponding to an `EntityID`.
13578
+ *
13579
+ * @param entityID The `EntityID` of the entity to spawn.
13580
+ * @param position The position of the entity to spawn.
13581
+ * @param velocity Optional. The velocity of the entity to spawn. Default is `VectorZero`.
13582
+ * @param spawner Optional. The entity that will be the `SpawnerEntity`. Default is undefined.
13583
+ * @param seedOrRNG Optional. The seed or RNG object to use to generate the `InitSeed` of the
13584
+ * entity. Default is undefined, which will make the entity spawn with a random
13585
+ * seed using the `Isaac.Spawn` method.
13586
+ */
13587
+ export declare function spawnEntityID(entityID: EntityID, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): Entity;
13588
+
13540
13589
  /**
13541
13590
  * Helper function to spawn a `EntityType.FAMILIAR` (3).
13542
13591
  *
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 15.1.1
3
+ isaacscript-common 15.2.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -19088,15 +19088,19 @@ return ____exports
19088
19088
  end,
19089
19089
  ["src.types.AnyEntity"] = function(...)
19090
19090
  local ____exports = {}
19091
+ return ____exports
19092
+ end,
19093
+ ["src.types.EntityID"] = function(...)
19094
+ local ____exports = {}
19091
19095
  return ____exports
19092
19096
  end,
19093
19097
  ["src.functions.entities"] = function(...)
19094
19098
  local ____lualib = require("lualib_bundle")
19095
19099
  local Set = ____lualib.Set
19100
+ local __TS__StringSplit = ____lualib.__TS__StringSplit
19096
19101
  local __TS__ArrayFind = ____lualib.__TS__ArrayFind
19097
19102
  local __TS__New = ____lualib.__TS__New
19098
19103
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
19099
- local __TS__StringSplit = ____lualib.__TS__StringSplit
19100
19104
  local ____exports = {}
19101
19105
  local setPrimitiveEntityFields
19102
19106
  local ____cachedClasses = require("src.core.cachedClasses")
@@ -19217,6 +19221,26 @@ function ____exports.getClosestEntityTo(self, referenceEntity, entities)
19217
19221
  end
19218
19222
  return closestEntity
19219
19223
  end
19224
+ function ____exports.getConstituentsFromEntityID(self, entityID)
19225
+ local parts = __TS__StringSplit(entityID, ".")
19226
+ if #parts ~= 3 then
19227
+ error("Failed to get the constituents from entity ID: " .. entityID)
19228
+ end
19229
+ local entityTypeString, variantString, subTypeString = table.unpack(parts)
19230
+ local entityType = tonumber(entityTypeString)
19231
+ if entityType == nil then
19232
+ error("Failed to convert the entity type to a number: " .. tostring(entityTypeString))
19233
+ end
19234
+ local variant = tonumber(variantString)
19235
+ if variant == nil then
19236
+ error("Failed to convert the entity variant to a number: " .. tostring(variantString))
19237
+ end
19238
+ local subType = tonumber(subTypeString)
19239
+ if subType == nil then
19240
+ error("Failed to convert the entity sub-type to a number: " .. tostring(subTypeString))
19241
+ end
19242
+ return {entityType, variant, subType}
19243
+ end
19220
19244
  function ____exports.getEntities(self, entityType, variant, subType, ignoreFriendly)
19221
19245
  if entityType == nil then
19222
19246
  entityType = -1
@@ -19411,6 +19435,28 @@ function ____exports.spawn(self, entityType, variant, subType, position, velocit
19411
19435
  seed
19412
19436
  )
19413
19437
  end
19438
+ function ____exports.spawnEntityID(self, entityID, position, velocity, spawner, seedOrRNG)
19439
+ if velocity == nil then
19440
+ velocity = VectorZero
19441
+ end
19442
+ if spawner == nil then
19443
+ spawner = nil
19444
+ end
19445
+ if seedOrRNG == nil then
19446
+ seedOrRNG = nil
19447
+ end
19448
+ local entityType, variant, subType = table.unpack(____exports.getConstituentsFromEntityID(nil, entityID))
19449
+ return ____exports.spawn(
19450
+ nil,
19451
+ entityType,
19452
+ variant,
19453
+ subType,
19454
+ position,
19455
+ velocity,
19456
+ spawner,
19457
+ seedOrRNG
19458
+ )
19459
+ end
19414
19460
  function ____exports.spawnWithSeed(self, entityType, variant, subType, position, seedOrRNG, velocity, spawner)
19415
19461
  if velocity == nil then
19416
19462
  velocity = VectorZero
@@ -24658,6 +24704,10 @@ return ____exports
24658
24704
  end,
24659
24705
  ["src.types.AnyGridEntity"] = function(...)
24660
24706
  local ____exports = {}
24707
+ return ____exports
24708
+ end,
24709
+ ["src.types.GridEntityID"] = function(...)
24710
+ local ____exports = {}
24661
24711
  return ____exports
24662
24712
  end,
24663
24713
  ["src.objects.roomTypeNames"] = function(...)
@@ -25424,6 +25474,7 @@ local ____lualib = require("lualib_bundle")
25424
25474
  local Set = ____lualib.Set
25425
25475
  local __TS__New = ____lualib.__TS__New
25426
25476
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
25477
+ local __TS__StringSplit = ____lualib.__TS__StringSplit
25427
25478
  local Map = ____lualib.Map
25428
25479
  local ____exports = {}
25429
25480
  local getAllGridEntities
@@ -25592,6 +25643,22 @@ function ____exports.getCollidingEntitiesWithGridEntity(self, gridEntity)
25592
25643
  ) end
25593
25644
  )
25594
25645
  end
25646
+ function ____exports.getConstituentsFromGridEntityID(self, gridEntityID)
25647
+ local parts = __TS__StringSplit(gridEntityID, ".")
25648
+ if #parts ~= 2 then
25649
+ error("Failed to get the constituents from grid entity ID: " .. gridEntityID)
25650
+ end
25651
+ local gridEntityTypeString, variantString = table.unpack(parts)
25652
+ local gridEntityType = tonumber(gridEntityTypeString)
25653
+ if gridEntityType == nil then
25654
+ error("Failed to convert the grid entity type to a number: " .. tostring(gridEntityTypeString))
25655
+ end
25656
+ local variant = tonumber(variantString)
25657
+ if variant == nil then
25658
+ error("Failed to convert the grid entity variant to a number: " .. tostring(variantString))
25659
+ end
25660
+ return {gridEntityType, variant}
25661
+ end
25595
25662
  function ____exports.getGridEntities(self, ...)
25596
25663
  local gridEntityTypes = {...}
25597
25664
  local gridEntities = getAllGridEntities(nil)
@@ -25639,7 +25706,7 @@ function ____exports.getGridEntitiesInRadius(self, targetPosition, radius)
25639
25706
  local gridIndex = room:GetGridIndex(position)
25640
25707
  local gridEntity = room:GetGridEntityFromPos(position)
25641
25708
  if gridEntity == nil or registeredGridIndexes:has(gridIndex) then
25642
- goto __continue20
25709
+ goto __continue24
25643
25710
  end
25644
25711
  registeredGridIndexes:add(gridIndex)
25645
25712
  local topLeft, bottomRight = table.unpack(____exports.getGridEntityCollisionPoints(nil, gridEntity))
@@ -25653,7 +25720,7 @@ function ____exports.getGridEntitiesInRadius(self, targetPosition, radius)
25653
25720
  gridEntities[#gridEntities + 1] = gridEntity
25654
25721
  end
25655
25722
  end
25656
- ::__continue20::
25723
+ ::__continue24::
25657
25724
  end
25658
25725
  end
25659
25726
  return gridEntities
@@ -38968,7 +39035,7 @@ function DebugDisplay.prototype.toggleFeature(self, feature, featureName)
38968
39035
  else
38969
39036
  self.mod:initFeature(feature)
38970
39037
  end
38971
- printEnabled(nil, self.player.initialized, featureName .. " display")
39038
+ printEnabled(nil, feature.initialized, featureName .. " display")
38972
39039
  end
38973
39040
  function DebugDisplay.prototype.togglePlayerDisplay(self)
38974
39041
  self:toggleFeature(self.player, "player")
@@ -132,7 +132,7 @@ function DebugDisplay.prototype.toggleFeature(self, feature, featureName)
132
132
  else
133
133
  self.mod:initFeature(feature)
134
134
  end
135
- printEnabled(nil, self.player.initialized, featureName .. " display")
135
+ printEnabled(nil, feature.initialized, featureName .. " display")
136
136
  end
137
137
  function DebugDisplay.prototype.togglePlayerDisplay(self)
138
138
  self:toggleFeature(self.player, "player")
@@ -1,6 +1,7 @@
1
1
  /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  import { EntityType } from "isaac-typescript-definitions";
3
3
  import { AnyEntity } from "../types/AnyEntity";
4
+ import { EntityID } from "../types/EntityID";
4
5
  /**
5
6
  * Helper function to count the number of entities in room. Use this over the vanilla
6
7
  * `Isaac.CountEntities` method to avoid having to specify a spawner and to handle ignoring charmed
@@ -35,6 +36,8 @@ export declare function doesEntityExist(entityType?: EntityType, variant?: numbe
35
36
  * ```
36
37
  */
37
38
  export declare function getClosestEntityTo<T extends AnyEntity>(referenceEntity: Entity, entities: T[]): T | undefined;
39
+ /** Helper function to get the entity type, variant, and sub-type from an `EntityID`. */
40
+ export declare function getConstituentsFromEntityID(entityID: EntityID): [entityType: EntityType, variant: int, subType: int];
38
41
  /**
39
42
  * Helper function to get all of the entities in the room or all of the entities that match a
40
43
  * specific entity type / variant / sub-type.
@@ -78,11 +81,11 @@ export declare function getEntityFields(entity: Entity): LuaMap<string, boolean
78
81
  */
79
82
  export declare function getEntityFromPtrHash(ptrHash: PtrHash): Entity | undefined;
80
83
  /** Helper function to get a string containing the entity's type, variant, and sub-type. */
81
- export declare function getEntityID(entity: Entity): string;
84
+ export declare function getEntityID(entity: Entity): EntityID;
82
85
  /**
83
86
  * Helper function to get a formatted string in the format returned by the `getEntityID` function.
84
87
  */
85
- export declare function getEntityIDFromConstituents(entityType: EntityType, variant: int, subType: int): string;
88
+ export declare function getEntityIDFromConstituents(entityType: EntityType, variant: int, subType: int): EntityID;
86
89
  /**
87
90
  * Helper function to compare two different arrays of entities. Returns the entities that are in the
88
91
  * second array but not in the first array.
@@ -170,8 +173,30 @@ export declare function setEntityRandomColor(entity: Entity): void;
170
173
  * need to specify the velocity or spawner.
171
174
  *
172
175
  * Also see the `spawnWithSeed` helper function.
176
+ *
177
+ * @param entityType The `EntityType` of the entity to spawn.
178
+ * @param variant The variant of the entity to spawn.
179
+ * @param subType The sub-type of the entity to spawn.
180
+ * @param position The position of the entity to spawn.
181
+ * @param velocity Optional. The velocity of the entity to spawn. Default is `VectorZero`.
182
+ * @param spawner Optional. The entity that will be the `SpawnerEntity`. Default is undefined.
183
+ * @param seedOrRNG Optional. The seed or RNG object to use to generate the `InitSeed` of the
184
+ * entity. Default is undefined, which will make the entity spawn with a random
185
+ * seed using the `Isaac.Spawn` method.
173
186
  */
174
187
  export declare function spawn(entityType: EntityType, variant: int, subType: int, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): Entity;
188
+ /**
189
+ * Helper function to spawn the entity corresponding to an `EntityID`.
190
+ *
191
+ * @param entityID The `EntityID` of the entity to spawn.
192
+ * @param position The position of the entity to spawn.
193
+ * @param velocity Optional. The velocity of the entity to spawn. Default is `VectorZero`.
194
+ * @param spawner Optional. The entity that will be the `SpawnerEntity`. Default is undefined.
195
+ * @param seedOrRNG Optional. The seed or RNG object to use to generate the `InitSeed` of the
196
+ * entity. Default is undefined, which will make the entity spawn with a random
197
+ * seed using the `Isaac.Spawn` method.
198
+ */
199
+ export declare function spawnEntityID(entityID: EntityID, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): Entity;
175
200
  /**
176
201
  * Helper function to spawn an entity. Use this instead of the `Game.Spawn` method if you do not
177
202
  * need to specify the velocity or spawner.
@@ -1 +1 @@
1
- {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../../src/functions/entities.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAK1D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAkB/C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cA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require("lualib_bundle")
2
2
  local Set = ____lualib.Set
3
+ local __TS__StringSplit = ____lualib.__TS__StringSplit
3
4
  local __TS__ArrayFind = ____lualib.__TS__ArrayFind
4
5
  local __TS__New = ____lualib.__TS__New
5
6
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
6
- local __TS__StringSplit = ____lualib.__TS__StringSplit
7
7
  local ____exports = {}
8
8
  local setPrimitiveEntityFields
9
9
  local ____cachedClasses = require("src.core.cachedClasses")
@@ -155,6 +155,27 @@ function ____exports.getClosestEntityTo(self, referenceEntity, entities)
155
155
  end
156
156
  return closestEntity
157
157
  end
158
+ --- Helper function to get the entity type, variant, and sub-type from an `EntityID`.
159
+ function ____exports.getConstituentsFromEntityID(self, entityID)
160
+ local parts = __TS__StringSplit(entityID, ".")
161
+ if #parts ~= 3 then
162
+ error("Failed to get the constituents from entity ID: " .. entityID)
163
+ end
164
+ local entityTypeString, variantString, subTypeString = table.unpack(parts)
165
+ local entityType = tonumber(entityTypeString)
166
+ if entityType == nil then
167
+ error("Failed to convert the entity type to a number: " .. tostring(entityTypeString))
168
+ end
169
+ local variant = tonumber(variantString)
170
+ if variant == nil then
171
+ error("Failed to convert the entity variant to a number: " .. tostring(variantString))
172
+ end
173
+ local subType = tonumber(subTypeString)
174
+ if subType == nil then
175
+ error("Failed to convert the entity sub-type to a number: " .. tostring(subTypeString))
176
+ end
177
+ return {entityType, variant, subType}
178
+ end
158
179
  --- Helper function to get all of the entities in the room or all of the entities that match a
159
180
  -- specific entity type / variant / sub-type.
160
181
  --
@@ -395,6 +416,16 @@ end
395
416
  -- need to specify the velocity or spawner.
396
417
  --
397
418
  -- Also see the `spawnWithSeed` helper function.
419
+ --
420
+ -- @param entityType The `EntityType` of the entity to spawn.
421
+ -- @param variant The variant of the entity to spawn.
422
+ -- @param subType The sub-type of the entity to spawn.
423
+ -- @param position The position of the entity to spawn.
424
+ -- @param velocity Optional. The velocity of the entity to spawn. Default is `VectorZero`.
425
+ -- @param spawner Optional. The entity that will be the `SpawnerEntity`. Default is undefined.
426
+ -- @param seedOrRNG Optional. The seed or RNG object to use to generate the `InitSeed` of the
427
+ -- entity. Default is undefined, which will make the entity spawn with a random
428
+ -- seed using the `Isaac.Spawn` method.
398
429
  function ____exports.spawn(self, entityType, variant, subType, position, velocity, spawner, seedOrRNG)
399
430
  if velocity == nil then
400
431
  velocity = VectorZero
@@ -434,6 +465,37 @@ function ____exports.spawn(self, entityType, variant, subType, position, velocit
434
465
  seed
435
466
  )
436
467
  end
468
+ --- Helper function to spawn the entity corresponding to an `EntityID`.
469
+ --
470
+ -- @param entityID The `EntityID` of the entity to spawn.
471
+ -- @param position The position of the entity to spawn.
472
+ -- @param velocity Optional. The velocity of the entity to spawn. Default is `VectorZero`.
473
+ -- @param spawner Optional. The entity that will be the `SpawnerEntity`. Default is undefined.
474
+ -- @param seedOrRNG Optional. The seed or RNG object to use to generate the `InitSeed` of the
475
+ -- entity. Default is undefined, which will make the entity spawn with a random
476
+ -- seed using the `Isaac.Spawn` method.
477
+ function ____exports.spawnEntityID(self, entityID, position, velocity, spawner, seedOrRNG)
478
+ if velocity == nil then
479
+ velocity = VectorZero
480
+ end
481
+ if spawner == nil then
482
+ spawner = nil
483
+ end
484
+ if seedOrRNG == nil then
485
+ seedOrRNG = nil
486
+ end
487
+ local entityType, variant, subType = table.unpack(____exports.getConstituentsFromEntityID(nil, entityID))
488
+ return ____exports.spawn(
489
+ nil,
490
+ entityType,
491
+ variant,
492
+ subType,
493
+ position,
494
+ velocity,
495
+ spawner,
496
+ seedOrRNG
497
+ )
498
+ end
437
499
  --- Helper function to spawn an entity. Use this instead of the `Game.Spawn` method if you do not
438
500
  -- need to specify the velocity or spawner.
439
501
  function ____exports.spawnWithSeed(self, entityType, variant, subType, position, seedOrRNG, velocity, spawner)
@@ -1,5 +1,6 @@
1
1
  import { GridEntityType, GridEntityXMLType } from "isaac-typescript-definitions";
2
2
  import { AnyGridEntity } from "../types/AnyGridEntity";
3
+ import { GridEntityID } from "../types/GridEntityID";
3
4
  /**
4
5
  * Helper function to convert the grid entity type found in a room XML file to the corresponding
5
6
  * grid entity type and variant normally used by the game. For example, a rock is represented as
@@ -20,6 +21,8 @@ export declare function getAllGridIndexes(): int[];
20
21
  * not have collision yet in that callback.
21
22
  */
22
23
  export declare function getCollidingEntitiesWithGridEntity(gridEntity: GridEntity): Entity[];
24
+ /** Helper function to get the grid entity type and variant from a `GridEntityID`. */
25
+ export declare function getConstituentsFromGridEntityID(gridEntityID: GridEntityID): [gridEntityType: GridEntityType, variant: int];
23
26
  /**
24
27
  * Helper function to get every grid entity in the current room.
25
28
  *
@@ -65,12 +68,12 @@ export declare function getGridEntitiesMap(...gridEntityTypes: GridEntityType[])
65
68
  /** Helper function to get the top left and bottom right corners of a given grid entity. */
66
69
  export declare function getGridEntityCollisionPoints(gridEntity: GridEntity): [topLeft: Vector, bottomRight: Vector];
67
70
  /** Helper function to get a string containing the grid entity's type and variant. */
68
- export declare function getGridEntityID(gridEntity: GridEntity): string;
71
+ export declare function getGridEntityID(gridEntity: GridEntity): GridEntityID;
69
72
  /**
70
73
  * Helper function to get a formatted string in the format returned by the `getGridEntityID`
71
74
  * function.
72
75
  */
73
- export declare function getGridEntityIDFromConstituents(gridEntityType: GridEntityType, variant: int): string;
76
+ export declare function getGridEntityIDFromConstituents(gridEntityType: GridEntityType, variant: int): GridEntityID;
74
77
  /**
75
78
  * Helper function to get all of the grid entities in the room that specifically match the type and
76
79
  * variant provided.
@@ -1 +1 @@
1
- {"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EACd,iBAAiB,EAIlB,MAAM,8BAA8B,CAAC;AAStC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAgCvD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,GAAG,GACxB,CAAC,c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,EAAE,EAClB,UAAU,EAAE,UAAU,GACrB,IAAI,CAON;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,aAAa,EACxD,YAAY,EAAE,CAAC,EAAE,EACjB,UAAU,EAAE,OAAO,EACnB,GAAG,CAAC,EAAE,GAAG,GACR,CAAC,EAAE,CAoBL;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC9B,qBAAqB,EAAE,UAAU,GAAG,GAAG,EACvC,UAAU,EAAE,OAAO,GAClB,IAAI,CAqCN;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAGnE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,gBAAgB,EAAE,GAAG,GAAG,IAAI,CA4B1D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,cAAc,EAAE,cAAc,EAC9B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAExB;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAgCxB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU,GAAG,SAAS,CAkBtE"}
@@ -2,6 +2,7 @@ local ____lualib = require("lualib_bundle")
2
2
  local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
5
+ local __TS__StringSplit = ____lualib.__TS__StringSplit
5
6
  local Map = ____lualib.Map
6
7
  local ____exports = {}
7
8
  local getAllGridEntities
@@ -202,6 +203,23 @@ function ____exports.getCollidingEntitiesWithGridEntity(self, gridEntity)
202
203
  ) end
203
204
  )
204
205
  end
206
+ --- Helper function to get the grid entity type and variant from a `GridEntityID`.
207
+ function ____exports.getConstituentsFromGridEntityID(self, gridEntityID)
208
+ local parts = __TS__StringSplit(gridEntityID, ".")
209
+ if #parts ~= 2 then
210
+ error("Failed to get the constituents from grid entity ID: " .. gridEntityID)
211
+ end
212
+ local gridEntityTypeString, variantString = table.unpack(parts)
213
+ local gridEntityType = tonumber(gridEntityTypeString)
214
+ if gridEntityType == nil then
215
+ error("Failed to convert the grid entity type to a number: " .. tostring(gridEntityTypeString))
216
+ end
217
+ local variant = tonumber(variantString)
218
+ if variant == nil then
219
+ error("Failed to convert the grid entity variant to a number: " .. tostring(variantString))
220
+ end
221
+ return {gridEntityType, variant}
222
+ end
205
223
  --- Helper function to get every grid entity in the current room.
206
224
  --
207
225
  -- Use this function with no arguments to get every grid entity, or specify a variadic amount of
@@ -276,7 +294,7 @@ function ____exports.getGridEntitiesInRadius(self, targetPosition, radius)
276
294
  local gridIndex = room:GetGridIndex(position)
277
295
  local gridEntity = room:GetGridEntityFromPos(position)
278
296
  if gridEntity == nil or registeredGridIndexes:has(gridIndex) then
279
- goto __continue20
297
+ goto __continue24
280
298
  end
281
299
  registeredGridIndexes:add(gridIndex)
282
300
  local topLeft, bottomRight = table.unpack(____exports.getGridEntityCollisionPoints(nil, gridEntity))
@@ -290,7 +308,7 @@ function ____exports.getGridEntitiesInRadius(self, targetPosition, radius)
290
308
  gridEntities[#gridEntities + 1] = gridEntity
291
309
  end
292
310
  end
293
- ::__continue20::
311
+ ::__continue24::
294
312
  end
295
313
  end
296
314
  return gridEntities
@@ -145,7 +145,9 @@ export * from "./types/AnyFunction";
145
145
  export * from "./types/AnyGridEntity";
146
146
  export * from "./types/CollectibleIndex";
147
147
  export * from "./types/ConversionHeartSubType";
148
+ export * from "./types/EntityID";
148
149
  export * from "./types/FunctionTuple";
150
+ export * from "./types/GridEntityID";
149
151
  export * from "./types/HasAllEnumKeys";
150
152
  export * from "./types/HasFunction";
151
153
  export * from "./types/Immutable";
@@ -1 +1 @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B,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A string that represents an entity. This is the entity type, variant, and sub-type, all separated
3
+ * by periods.
4
+ *
5
+ * This type is branded for extra type safety.
6
+ */
7
+ export declare type EntityID = string & {
8
+ readonly __entityIDBrand: symbol;
9
+ };
10
+ //# sourceMappingURL=EntityID.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityID.d.ts","sourceRoot":"","sources":["../../../src/types/EntityID.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,QAAQ,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ local ____exports = {}
2
+ return ____exports
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A string that represents a grid entity. This is the entity type and variant separated by a
3
+ * period.
4
+ *
5
+ * This type is branded for extra type safety.
6
+ */
7
+ export declare type GridEntityID = string & {
8
+ readonly __gridEntityIDBrand: symbol;
9
+ };
10
+ //# sourceMappingURL=GridEntityID.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridEntityID.d.ts","sourceRoot":"","sources":["../../../src/types/GridEntityID.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,YAAY,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ local ____exports = {}
2
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "15.1.1",
3
+ "version": "15.2.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -296,7 +296,7 @@ export class DebugDisplay extends Feature {
296
296
  this.mod.initFeature(feature);
297
297
  }
298
298
 
299
- printEnabled(this.player.initialized, `${featureName} display`);
299
+ printEnabled(feature.initialized, `${featureName} display`);
300
300
  }
301
301
 
302
302
  /**