isaacscript-common 6.6.3 → 6.7.0

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.
Files changed (262) hide show
  1. package/dist/callbacks/customRevive.lua +4 -4
  2. package/dist/callbacks/postCursedTeleport.lua +2 -2
  3. package/dist/callbacks/postCustomDoorEnter.d.ts +1 -1
  4. package/dist/callbacks/postCustomDoorEnter.lua +6 -6
  5. package/dist/callbacks/postDiceRoomActivated.lua +2 -2
  6. package/dist/callbacks/postFlip.lua +3 -3
  7. package/dist/callbacks/postGridEntity.lua +3 -3
  8. package/dist/callbacks/postGridEntityCollision.lua +3 -3
  9. package/dist/callbacks/postGridEntityRender.lua +2 -2
  10. package/dist/callbacks/postNewRoomEarly.lua +5 -5
  11. package/dist/callbacks/postPickupCollect.lua +2 -2
  12. package/dist/callbacks/postPitRender.lua +2 -2
  13. package/dist/callbacks/postPitUpdate.lua +2 -2
  14. package/dist/callbacks/postPlayerCollectible.lua +2 -2
  15. package/dist/callbacks/postPoopRender.lua +2 -2
  16. package/dist/callbacks/postPoopUpdate.lua +2 -2
  17. package/dist/callbacks/postPressurePlateRender.lua +2 -2
  18. package/dist/callbacks/postPressurePlateUpdate.lua +2 -2
  19. package/dist/callbacks/postPurchase.lua +2 -2
  20. package/dist/callbacks/postRockRender.lua +2 -2
  21. package/dist/callbacks/postRockUpdate.lua +2 -2
  22. package/dist/callbacks/postSlotInitUpdate.lua +2 -2
  23. package/dist/callbacks/postSlotRender.lua +2 -2
  24. package/dist/callbacks/postSpikesRender.lua +2 -2
  25. package/dist/callbacks/postSpikesUpdate.lua +2 -2
  26. package/dist/callbacks/postTNTRender.lua +2 -2
  27. package/dist/callbacks/postTNTUpdate.lua +2 -2
  28. package/dist/callbacks/preBerserkDeath.lua +2 -2
  29. package/dist/callbacks/preNewLevel.lua +2 -2
  30. package/dist/callbacks/subscriptions/postDoorRender.d.ts +2 -3
  31. package/dist/callbacks/subscriptions/postDoorRender.d.ts.map +1 -1
  32. package/dist/callbacks/subscriptions/postDoorRender.lua +3 -3
  33. package/dist/callbacks/subscriptions/postDoorUpdate.d.ts +2 -3
  34. package/dist/callbacks/subscriptions/postDoorUpdate.d.ts.map +1 -1
  35. package/dist/callbacks/subscriptions/postDoorUpdate.lua +3 -3
  36. package/dist/callbacks/subscriptions/postPitRender.d.ts +2 -3
  37. package/dist/callbacks/subscriptions/postPitRender.d.ts.map +1 -1
  38. package/dist/callbacks/subscriptions/postPitRender.lua +3 -3
  39. package/dist/callbacks/subscriptions/postPitUpdate.d.ts +2 -3
  40. package/dist/callbacks/subscriptions/postPitUpdate.d.ts.map +1 -1
  41. package/dist/callbacks/subscriptions/postPitUpdate.lua +3 -3
  42. package/dist/callbacks/subscriptions/postPoopRender.d.ts +2 -3
  43. package/dist/callbacks/subscriptions/postPoopRender.d.ts.map +1 -1
  44. package/dist/callbacks/subscriptions/postPoopRender.lua +3 -3
  45. package/dist/callbacks/subscriptions/postPoopUpdate.d.ts +2 -3
  46. package/dist/callbacks/subscriptions/postPoopUpdate.d.ts.map +1 -1
  47. package/dist/callbacks/subscriptions/postPoopUpdate.lua +3 -3
  48. package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts +2 -3
  49. package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts.map +1 -1
  50. package/dist/callbacks/subscriptions/postPressurePlateRender.lua +3 -3
  51. package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts +2 -3
  52. package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts.map +1 -1
  53. package/dist/callbacks/subscriptions/postPressurePlateUpdate.lua +3 -3
  54. package/dist/enums/private/SerializationBrand.d.ts +0 -4
  55. package/dist/enums/private/SerializationBrand.d.ts.map +1 -1
  56. package/dist/features/characterStats.lua +2 -2
  57. package/dist/features/collectibleItemPoolType.lua +2 -2
  58. package/dist/features/customGridEntity.d.ts.map +1 -1
  59. package/dist/features/customGridEntity.lua +5 -5
  60. package/dist/features/customStage/backdrop.lua +2 -2
  61. package/dist/features/customStage/{gridEntities.d.ts → customStageGridEntities.d.ts} +1 -1
  62. package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -0
  63. package/dist/features/customStage/{gridEntities.lua → customStageGridEntities.lua} +8 -8
  64. package/dist/features/customStage/{util.d.ts → customStageUtils.d.ts} +1 -1
  65. package/dist/features/customStage/customStageUtils.d.ts.map +1 -0
  66. package/dist/features/customStage/{util.lua → customStageUtils.lua} +0 -0
  67. package/dist/features/customStage/exports.lua +4 -4
  68. package/dist/features/customStage/init.lua +6 -6
  69. package/dist/features/customStage/shadows.lua +2 -2
  70. package/dist/features/customStage/versusScreen.lua +4 -4
  71. package/dist/features/debugDisplay/v.lua +4 -4
  72. package/dist/features/deployJSONRoom.lua +20 -20
  73. package/dist/features/extraConsoleCommands/commandsSubroutines.lua +3 -3
  74. package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
  75. package/dist/features/extraConsoleCommands/listCommands.lua +14 -14
  76. package/dist/features/pause.lua +2 -2
  77. package/dist/features/persistentEntities.lua +2 -2
  78. package/dist/features/preventCollectibleRotation.lua +2 -2
  79. package/dist/features/saveDataManager/exports.d.ts.map +1 -1
  80. package/dist/features/saveDataManager/merge.lua +4 -3
  81. package/dist/features/sirenHelpers.lua +2 -2
  82. package/dist/functions/ambush.lua +5 -5
  83. package/dist/functions/array.d.ts.map +1 -1
  84. package/dist/functions/array.lua +1 -1
  85. package/dist/functions/{boss.d.ts → bosses.d.ts} +22 -4
  86. package/dist/functions/bosses.d.ts.map +1 -0
  87. package/dist/functions/{boss.lua → bosses.lua} +38 -13
  88. package/dist/functions/collectibleTag.lua +2 -2
  89. package/dist/functions/collectibles.lua +5 -5
  90. package/dist/functions/deepCopy.d.ts +8 -5
  91. package/dist/functions/deepCopy.d.ts.map +1 -1
  92. package/dist/functions/deepCopy.lua +142 -38
  93. package/dist/functions/deepCopyTests.d.ts +6 -1
  94. package/dist/functions/deepCopyTests.d.ts.map +1 -1
  95. package/dist/functions/deepCopyTests.lua +19 -16
  96. package/dist/functions/{entity.d.ts → entities.d.ts} +21 -19
  97. package/dist/functions/entities.d.ts.map +1 -0
  98. package/dist/functions/{entity.lua → entities.lua} +25 -20
  99. package/dist/functions/{entitySpecific.d.ts → entitiesSpecific.d.ts} +145 -68
  100. package/dist/functions/entitiesSpecific.d.ts.map +1 -0
  101. package/dist/functions/{entitySpecific.lua → entitiesSpecific.lua} +203 -65
  102. package/dist/functions/familiars.lua +2 -2
  103. package/dist/functions/{gridEntity.d.ts → gridEntities.d.ts} +48 -17
  104. package/dist/functions/gridEntities.d.ts.map +1 -0
  105. package/dist/functions/{gridEntity.lua → gridEntities.lua} +140 -90
  106. package/dist/functions/gridEntitiesSpecific.d.ts +141 -0
  107. package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -0
  108. package/dist/functions/gridEntitiesSpecific.lua +366 -0
  109. package/dist/functions/log.d.ts +1 -1
  110. package/dist/functions/log.d.ts.map +1 -1
  111. package/dist/functions/log.lua +16 -12
  112. package/dist/functions/mergeTests.d.ts +7 -1
  113. package/dist/functions/mergeTests.d.ts.map +1 -1
  114. package/dist/functions/mergeTests.lua +86 -7
  115. package/dist/functions/{npc.d.ts → npcs.d.ts} +24 -2
  116. package/dist/functions/npcs.d.ts.map +1 -0
  117. package/dist/functions/{npc.lua → npcs.lua} +44 -9
  118. package/dist/functions/pickups.d.ts +4 -119
  119. package/dist/functions/pickups.d.ts.map +1 -1
  120. package/dist/functions/pickups.lua +10 -439
  121. package/dist/functions/pickupsSpecific.d.ts +229 -0
  122. package/dist/functions/pickupsSpecific.d.ts.map +1 -0
  123. package/dist/functions/pickupsSpecific.lua +560 -0
  124. package/dist/functions/playerHealth.lua +6 -6
  125. package/dist/functions/{player.d.ts → players.d.ts} +1 -1
  126. package/dist/functions/players.d.ts.map +1 -0
  127. package/dist/functions/{player.lua → players.lua} +0 -0
  128. package/dist/functions/pocketItems.lua +2 -2
  129. package/dist/functions/positionVelocity.lua +6 -6
  130. package/dist/functions/pressurePlate.d.ts +10 -0
  131. package/dist/functions/pressurePlate.d.ts.map +1 -0
  132. package/dist/functions/pressurePlate.lua +29 -0
  133. package/dist/functions/revive.lua +7 -7
  134. package/dist/functions/rooms.lua +2 -2
  135. package/dist/functions/saveFile.lua +3 -3
  136. package/dist/functions/spawnCollectible.lua +4 -4
  137. package/dist/functions/{sprite.d.ts → sprites.d.ts} +1 -1
  138. package/dist/functions/sprites.d.ts.map +1 -0
  139. package/dist/functions/{sprite.lua → sprites.lua} +0 -0
  140. package/dist/functions/table.d.ts +1 -1
  141. package/dist/functions/table.lua +1 -1
  142. package/dist/functions/transformations.lua +2 -2
  143. package/dist/functions/trinketGive.lua +2 -2
  144. package/dist/functions/trinkets.lua +6 -6
  145. package/dist/functions/utils.d.ts +7 -0
  146. package/dist/functions/utils.d.ts.map +1 -1
  147. package/dist/functions/utils.lua +35 -22
  148. package/dist/index.d.ts +10 -8
  149. package/dist/index.d.ts.map +1 -1
  150. package/dist/index.lua +26 -10
  151. package/dist/types/AnyGridEntity.d.ts +10 -0
  152. package/dist/types/AnyGridEntity.d.ts.map +1 -0
  153. package/dist/types/AnyGridEntity.lua +2 -0
  154. package/package.json +2 -2
  155. package/src/callbacks/customRevive.ts +2 -2
  156. package/src/callbacks/postCursedTeleport.ts +2 -2
  157. package/src/callbacks/postCustomDoorEnter.ts +3 -3
  158. package/src/callbacks/postDiceRoomActivated.ts +1 -1
  159. package/src/callbacks/postFlip.ts +1 -1
  160. package/src/callbacks/postGridEntity.ts +1 -1
  161. package/src/callbacks/postGridEntityCollision.ts +1 -1
  162. package/src/callbacks/postGridEntityRender.ts +1 -1
  163. package/src/callbacks/postNewRoomEarly.ts +9 -3
  164. package/src/callbacks/postPickupCollect.ts +1 -1
  165. package/src/callbacks/postPitRender.ts +1 -1
  166. package/src/callbacks/postPitUpdate.ts +1 -1
  167. package/src/callbacks/postPlayerCollectible.ts +2 -2
  168. package/src/callbacks/postPoopRender.ts +1 -1
  169. package/src/callbacks/postPoopUpdate.ts +1 -1
  170. package/src/callbacks/postPressurePlateRender.ts +1 -1
  171. package/src/callbacks/postPressurePlateUpdate.ts +1 -1
  172. package/src/callbacks/postPurchase.ts +1 -1
  173. package/src/callbacks/postRockRender.ts +1 -1
  174. package/src/callbacks/postRockUpdate.ts +1 -1
  175. package/src/callbacks/postSacrifice.ts +1 -1
  176. package/src/callbacks/postSlotInitUpdate.ts +1 -1
  177. package/src/callbacks/postSlotRender.ts +1 -1
  178. package/src/callbacks/postSpikesRender.ts +1 -1
  179. package/src/callbacks/postSpikesUpdate.ts +1 -1
  180. package/src/callbacks/postTNTRender.ts +1 -1
  181. package/src/callbacks/postTNTUpdate.ts +1 -1
  182. package/src/callbacks/preBerserkDeath.ts +1 -1
  183. package/src/callbacks/preNewLevel.ts +1 -1
  184. package/src/callbacks/subscriptions/postDoorRender.ts +7 -5
  185. package/src/callbacks/subscriptions/postDoorUpdate.ts +7 -5
  186. package/src/callbacks/subscriptions/postPitRender.ts +6 -7
  187. package/src/callbacks/subscriptions/postPitUpdate.ts +6 -7
  188. package/src/callbacks/subscriptions/postPoopRender.ts +7 -5
  189. package/src/callbacks/subscriptions/postPoopUpdate.ts +7 -5
  190. package/src/callbacks/subscriptions/postPressurePlateRender.ts +7 -5
  191. package/src/callbacks/subscriptions/postPressurePlateUpdate.ts +7 -5
  192. package/src/enums/private/SerializationBrand.ts +0 -4
  193. package/src/features/characterStats.ts +1 -1
  194. package/src/features/collectibleItemPoolType.ts +1 -1
  195. package/src/features/customGridEntity.ts +6 -3
  196. package/src/features/customStage/backdrop.ts +1 -1
  197. package/src/features/customStage/{gridEntities.ts → customStageGridEntities.ts} +3 -3
  198. package/src/features/customStage/{util.ts → customStageUtils.ts} +0 -0
  199. package/src/features/customStage/exports.ts +2 -2
  200. package/src/features/customStage/init.ts +1 -1
  201. package/src/features/customStage/shadows.ts +1 -1
  202. package/src/features/customStage/versusScreen.ts +2 -2
  203. package/src/features/debugDisplay/v.ts +2 -2
  204. package/src/features/deployJSONRoom.ts +11 -7
  205. package/src/features/extraConsoleCommands/commandsSubroutines.ts +2 -2
  206. package/src/features/extraConsoleCommands/listCommands.ts +13 -9
  207. package/src/features/pause.ts +1 -1
  208. package/src/features/persistentEntities.ts +2 -2
  209. package/src/features/preventCollectibleRotation.ts +1 -1
  210. package/src/features/saveDataManager/exports.ts +7 -4
  211. package/src/features/saveDataManager/merge.ts +3 -3
  212. package/src/features/sirenHelpers.ts +1 -1
  213. package/src/functions/ambush.ts +2 -2
  214. package/src/functions/array.ts +5 -2
  215. package/src/functions/bitwise.ts +2 -2
  216. package/src/functions/{boss.ts → bosses.ts} +29 -21
  217. package/src/functions/collectibleTag.ts +1 -1
  218. package/src/functions/collectibles.ts +2 -2
  219. package/src/functions/deepCopy.ts +98 -19
  220. package/src/functions/deepCopyTests.ts +75 -19
  221. package/src/functions/{entity.ts → entities.ts} +23 -21
  222. package/src/functions/{entitySpecific.ts → entitiesSpecific.ts} +170 -99
  223. package/src/functions/familiars.ts +1 -1
  224. package/src/functions/{gridEntity.ts → gridEntities.ts} +110 -34
  225. package/src/functions/gridEntitiesSpecific.ts +490 -0
  226. package/src/functions/log.ts +19 -10
  227. package/src/functions/mergeTests.ts +152 -4
  228. package/src/functions/{npc.ts → npcs.ts} +42 -11
  229. package/src/functions/pickups.ts +8 -475
  230. package/src/functions/pickupsSpecific.ts +613 -0
  231. package/src/functions/playerHealth.ts +1 -1
  232. package/src/functions/{player.ts → players.ts} +0 -0
  233. package/src/functions/pocketItems.ts +1 -1
  234. package/src/functions/positionVelocity.ts +3 -3
  235. package/src/functions/pressurePlate.ts +29 -0
  236. package/src/functions/revive.ts +2 -2
  237. package/src/functions/rooms.ts +1 -1
  238. package/src/functions/saveFile.ts +1 -1
  239. package/src/functions/spawnCollectible.ts +2 -2
  240. package/src/functions/{sprite.ts → sprites.ts} +0 -0
  241. package/src/functions/table.ts +1 -1
  242. package/src/functions/transformations.ts +1 -1
  243. package/src/functions/trinketGive.ts +4 -4
  244. package/src/functions/trinkets.ts +3 -3
  245. package/src/functions/tstlClass.ts +1 -1
  246. package/src/functions/ui.ts +3 -3
  247. package/src/functions/utils.ts +32 -13
  248. package/src/index.ts +10 -8
  249. package/src/types/AnyGridEntity.ts +9 -0
  250. package/dist/features/customStage/gridEntities.d.ts.map +0 -1
  251. package/dist/features/customStage/util.d.ts.map +0 -1
  252. package/dist/functions/boss.d.ts.map +0 -1
  253. package/dist/functions/entity.d.ts.map +0 -1
  254. package/dist/functions/entitySpecific.d.ts.map +0 -1
  255. package/dist/functions/gridEntity.d.ts.map +0 -1
  256. package/dist/functions/gridEntitySpecific.d.ts +0 -29
  257. package/dist/functions/gridEntitySpecific.d.ts.map +0 -1
  258. package/dist/functions/gridEntitySpecific.lua +0 -114
  259. package/dist/functions/npc.d.ts.map +0 -1
  260. package/dist/functions/player.d.ts.map +0 -1
  261. package/dist/functions/sprite.d.ts.map +0 -1
  262. package/src/functions/gridEntitySpecific.ts +0 -143
@@ -22,11 +22,11 @@ local RaglingVariant = ____isaac_2Dtypescript_2Ddefinitions.RaglingVariant
22
22
  local VisVariant = ____isaac_2Dtypescript_2Ddefinitions.VisVariant
23
23
  local ____constants = require("constants")
24
24
  local EGGY_STATE_FRAME_OF_FINAL_SPIDER = ____constants.EGGY_STATE_FRAME_OF_FINAL_SPIDER
25
- local ____entity = require("functions.entity")
26
- local getFilteredNewEntities = ____entity.getFilteredNewEntities
27
- local ____entitySpecific = require("functions.entitySpecific")
28
- local getNPCs = ____entitySpecific.getNPCs
29
- local getProjectiles = ____entitySpecific.getProjectiles
25
+ local ____entities = require("functions.entities")
26
+ local getFilteredNewEntities = ____entities.getFilteredNewEntities
27
+ local ____entitiesSpecific = require("functions.entitiesSpecific")
28
+ local getNPCs = ____entitiesSpecific.getNPCs
29
+ local getProjectiles = ____entitiesSpecific.getProjectiles
30
30
  --- Checks for specific NPCs that have "CanShutDoors" set to true naturally by the game, but should
31
31
  -- not actually keep the doors closed (like Death's scythes).
32
32
  function ____exports.isAliveExceptionNPC(self, npc)
@@ -109,15 +109,32 @@ end
109
109
  --
110
110
  -- This function will not include NPCs on an internal blacklist, such as Death's scythes or Big Horn
111
111
  -- holes.
112
- function ____exports.getAliveNPCs(self, matchingEntityType, matchingVariant, matchingSubType, ignoreFriendly)
112
+ --
113
+ -- @param entityType Optional. If specified, will only get the NPCs that match the type. Default is
114
+ -- -1, which matches every type.
115
+ -- @param variant Optional. If specified, will only get the NPCs that match the variant. Default is
116
+ -- -1, which matches every variant.
117
+ -- @param subType Optional. If specified, will only get the NPCs that match the sub-type. Default is
118
+ -- -1, which matches every sub-type.
119
+ -- @param ignoreFriendly Optional. Default is false.
120
+ function ____exports.getAliveNPCs(self, entityType, variant, subType, ignoreFriendly)
121
+ if entityType == nil then
122
+ entityType = -1
123
+ end
124
+ if variant == nil then
125
+ variant = -1
126
+ end
127
+ if subType == nil then
128
+ subType = -1
129
+ end
113
130
  if ignoreFriendly == nil then
114
131
  ignoreFriendly = false
115
132
  end
116
133
  local npcs = getNPCs(
117
134
  nil,
118
- matchingEntityType,
119
- matchingVariant,
120
- matchingSubType,
135
+ entityType,
136
+ variant,
137
+ subType,
121
138
  ignoreFriendly
122
139
  )
123
140
  return __TS__ArrayFilter(
@@ -125,4 +142,22 @@ function ____exports.getAliveNPCs(self, matchingEntityType, matchingVariant, mat
125
142
  function(____, npc) return not npc:IsDead() and not ____exports.isAliveExceptionNPC(nil, npc) end
126
143
  )
127
144
  end
145
+ --- The base game `EntityNPC.FireProjectiles` method does not return anything, which is a problem in
146
+ -- situations where you need to work with the fired projectiles. This function invokes that method,
147
+ -- and then returns the projectiles that were spawned.
148
+ --
149
+ -- @param npc The EntityNPC firing projectiles.
150
+ -- @param position The starting position of the projectiles.
151
+ -- @param velocity The starting velocity of the projectiles.
152
+ -- @param projectilesMode A ProjectilesMode enum value defining how to fire the projectiles.
153
+ -- @param projectileParams A ProjectileParams object containing various parameters for the
154
+ -- projectiles.
155
+ -- @returns An array of EntityProjectiles containing all fired projectiles.
156
+ function ____exports.npcFireProjectiles(self, npc, position, velocity, projectilesMode, projectileParams)
157
+ local oldEntities = getProjectiles(nil)
158
+ npc:FireProjectiles(position, velocity, projectilesMode, projectileParams)
159
+ local newEntities = getProjectiles(nil)
160
+ local filteredNewEntities = getFilteredNewEntities(nil, oldEntities, newEntities)
161
+ return filteredNewEntities
162
+ end
128
163
  return ____exports
@@ -1,133 +1,18 @@
1
- import { BatterySubType, Card, CoinSubType, CollectibleType, HeartSubType, KeySubType, PillColor, SackSubType, TrinketType } from "isaac-typescript-definitions";
2
- /** Helper function to get all of the battery entities in the room. */
3
- export declare function getBatteries(matchingSubType?: BatterySubType | -1): EntityPickupBattery[];
4
- /** Helper function to get all of the card entities in the room. */
5
- export declare function getCards(matchingSubType?: Card | -1): EntityPickupCard[];
1
+ import { CoinSubType } from "isaac-typescript-definitions";
6
2
  /**
7
3
  * Helper function to get the corresponding coin amount from a `CoinSubType`. Returns 1 for modded
8
4
  * sub-types.
9
5
  */
10
6
  export declare function getCoinValue(coinSubType: CoinSubType): int;
11
- /** Helper function to get all of the coin pickup entities in the room. */
12
- export declare function getCoins(matchingSubType?: CoinSubType | -1): EntityPickupCoin[];
13
- /** Helper function to get all of the collectible entities in the room. */
14
- export declare function getCollectibles(matchingSubType?: CollectibleType | -1): EntityPickupCollectible[];
15
- /** Helper function to get all of the heart pickup entities in the room. */
16
- export declare function getHearts(matchingSubType?: HeartSubType | -1): EntityPickupHeart[];
17
- /** Helper function to get all of the key pickup entities in the room. */
18
- export declare function getKeys(matchingSubType?: KeySubType | -1): EntityPickupKey[];
19
- /** Helper function to get all of the pill entities in the room. */
20
- export declare function getPills(matchingSubType?: PillColor | -1): EntityPickupPill[];
21
7
  /** Helper function to get all of the red heart pickup entities in the room. */
22
8
  export declare function getRedHearts(): EntityPickupHeart[];
23
- /** Helper function to get all of the sack (i.e. grab bag) entities in the room. */
24
- export declare function getSacks(matchingSubType?: SackSubType | -1): EntityPickupSack[];
25
- /** Helper function to get all of the trinket entities in the room. */
26
- export declare function getTrinkets(matchingSubType?: TrinketType | -1): EntityPickupTrinket[];
27
9
  export declare function isChest(pickup: EntityPickup): boolean;
28
10
  export declare function isRedHeart(pickup: EntityPickup): boolean;
29
11
  /**
30
- * Helper function to remove all of the batteries in the room.
12
+ * Helper function to remove all of the red heart pickup entities in the room.
31
13
  *
32
- * @param batterySubType Optional. If specified, will only remove cards that match this sub-type.
33
- * @param cap Optional. If specified, will only remove the given amount of cards.
34
- * @returns True if one or more cards were removed, false otherwise.
35
- */
36
- export declare function removeAllBatteries(batterySubType?: BatterySubType, cap?: int): EntityPickupBattery[];
37
- /**
38
- * Helper function to remove all of the cards in the room.
39
- *
40
- * @param card Optional. If specified, will only remove cards that match this sub-type.
41
- * @param cap Optional. If specified, will only remove the given amount of cards.
42
- * @returns True if one or more cards were removed, false otherwise.
43
- */
44
- export declare function removeAllCards(card?: Card, cap?: int): EntityPickupCard[];
45
- /**
46
- * Helper function to remove all of the coins in the room.
47
- *
48
- * @param coinSubType Optional. If specified, will only remove coins that match this sub-type.
49
- * @param cap Optional. If specified, will only remove the given amount of coins.
50
- * @returns True if one or more coins were removed, false otherwise.
51
- */
52
- export declare function removeAllCoins(coinSubType?: CoinSubType, cap?: int): EntityPickupCoin[];
53
- /**
54
- * Helper function to remove all of the collectibles in the room.
55
- *
56
- * @param collectibleType Optional. If specified, will only remove collectibles that match this
57
- * collectible type.
58
- * @param cap Optional. If specified, will only remove the given amount of collectibles.
59
- * @returns True if one or more collectibles were removed, false otherwise.
60
- */
61
- export declare function removeAllCollectibles(collectibleType?: CollectibleType, cap?: int): EntityPickupCollectible[];
62
- /**
63
- * Helper function to remove all of the hearts in the room.
64
- *
65
- * @param heartSubType Optional. If specified, will only remove hearts that match this sub-type.
66
14
  * @param cap Optional. If specified, will only remove the given amount of hearts.
67
- * @returns True if one or more hearts were removed, false otherwise.
68
- */
69
- export declare function removeAllHearts(heartSubType?: HeartSubType, cap?: int): EntityPickupHeart[];
70
- /**
71
- * Helper function to remove all of the keys in the room.
72
- *
73
- * @param keySubType Optional. If specified, will only remove keys that match this sub-type.
74
- * @param cap Optional. If specified, will only remove the given amount of keys.
75
- * @returns True if one or more keys were removed, false otherwise.
76
- */
77
- export declare function removeAllKeys(keySubType?: KeySubType, cap?: int): EntityPickupKey[];
78
- /**
79
- * Helper function to remove all of the pills in the room.
80
- *
81
- * @param pillColor Optional. If specified, will only remove pills that match this color.
82
- * @param cap Optional. If specified, will only remove the given amount of pills.
83
- * @returns True if one or more pills were removed, false otherwise.
84
- */
85
- export declare function removeAllPills(pillColor?: PillColor, cap?: int): EntityPickupPill[];
86
- /**
87
- * Helper function to remove all of the sacks (i.e. grab bags) in the room.
88
- *
89
- * @param sackSubType Optional. If specified, will only remove sacks that match this sub-type.
90
- * @param cap Optional. If specified, will only remove the given amount of trinkets.
91
- * @returns True if one or more trinkets were removed, false otherwise.
92
- */
93
- export declare function removeAllSacks(sackSubType?: SackSubType, cap?: int): EntityPickupSack[];
94
- /**
95
- * Helper function to remove all of the trinkets in the room.
96
- *
97
- * @param trinketType Optional. If specified, will only remove trinkets that match this trinket
98
- * type.
99
- * @param cap Optional. If specified, will only remove the given amount of trinkets.
100
- * @returns True if one or more trinkets were removed, false otherwise.
101
- */
102
- export declare function removeAllTrinkets(trinketType?: TrinketType, cap?: int): EntityPickupTrinket[];
103
- /**
104
- * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90).
105
- */
106
- export declare function spawnBattery(subType: BatterySubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupBattery;
107
- export declare function spawnBatteryWithSeed(subType: BatterySubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupBattery;
108
- /**
109
- * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
110
- */
111
- export declare function spawnCard(subType: Card, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCard;
112
- export declare function spawnCardWithSeed(subType: Card, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCard;
113
- /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20). */
114
- export declare function spawnCoin(subType: CoinSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCoin;
115
- export declare function spawnCoinWithSeed(subType: CoinSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupCoin;
116
- /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10). */
117
- export declare function spawnHeart(subType: HeartSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupHeart;
118
- export declare function spawnHeartWithSeed(subType: HeartSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupHeart;
119
- /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30). */
120
- export declare function spawnKey(subType: KeySubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupKey;
121
- export declare function spawnKeyWithSeed(subType: KeySubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupKey;
122
- /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70). */
123
- export declare function spawnPill(pillColor: PillColor, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupPill;
124
- export declare function spawnPillWithSeed(subType: PillColor, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupPill;
125
- /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69). */
126
- export declare function spawnSack(subType: SackSubType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupSack;
127
- export declare function spawnSackWithSeed(subType: SackSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupSack;
128
- /**
129
- * Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350).
15
+ * @returns The red hearts that were removed.
130
16
  */
131
- export declare function spawnTrinket(subType: TrinketType, position: Vector, velocity?: Vector, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupTrinket;
132
- export declare function spawnTrinketWithSeed(subType: TrinketType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined): EntityPickupTrinket;
17
+ export declare function removeAllRedHearts(cap?: int): EntityPickupHeart[];
133
18
  //# sourceMappingURL=pickups.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pickups.d.ts","sourceRoot":"","sources":["../../src/functions/pickups.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,IAAI,EACJ,WAAW,EACX,eAAe,EACf,YAAY,EACZ,UAAU,EAEV,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAWtC,sEAAsE;AACtE,wBAAgB,YAAY,CAC1B,eAAe,GAAE,cAAc,GAAG,CAAC,CAAM,GACxC,mBAAmB,EAAE,CAKvB;AAED,mEAAmE;AACnE,wBAAgB,QAAQ,CAAC,eAAe,GAAE,IAAI,GAAG,CAAC,CAAM,GAAG,gBAAgB,EAAE,CAK5E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,GAAG,CAK1D;AAED,0EAA0E;AAC1E,wBAAgB,QAAQ,CACtB,eAAe,GAAE,WAAW,GAAG,CAAC,CAAM,GACrC,gBAAgB,EAAE,CAEpB;AAED,0EAA0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