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
@@ -0,0 +1,560 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
4
+ local ____constants = require("constants")
5
+ local VectorZero = ____constants.VectorZero
6
+ local ____entitiesSpecific = require("functions.entitiesSpecific")
7
+ local getPickups = ____entitiesSpecific.getPickups
8
+ local removeAllPickups = ____entitiesSpecific.removeAllPickups
9
+ local spawnPickup = ____entitiesSpecific.spawnPickup
10
+ --- Helper function to get all of the battery entities in the room.
11
+ --
12
+ -- @param batterySubType Optional. If specified, will only get the batteries that match the
13
+ -- sub-type. Default is -1, which matches every sub-type.
14
+ function ____exports.getBatteries(self, batterySubType)
15
+ if batterySubType == nil then
16
+ batterySubType = -1
17
+ end
18
+ return getPickups(nil, PickupVariant.LIL_BATTERY, batterySubType)
19
+ end
20
+ --- Helper function to get all of the bomb entities in the room. (Specifically, this refers to bomb
21
+ -- pickups, not the `EntityBomb` class.)
22
+ --
23
+ -- @param bombSubType Optional. If specified, will only get the bombs that match the sub-type.
24
+ -- Default is -1, which matches every sub-type.
25
+ function ____exports.getBombPickups(self, bombSubType)
26
+ if bombSubType == nil then
27
+ bombSubType = -1
28
+ end
29
+ return getPickups(nil, PickupVariant.BOMB, bombSubType)
30
+ end
31
+ --- Helper function to get all of the card entities in the room.
32
+ --
33
+ -- @param card Optional. If specified, will only get the cards that match the sub-type. Default is
34
+ -- -1, which matches every sub-type.
35
+ function ____exports.getCards(self, card)
36
+ if card == nil then
37
+ card = -1
38
+ end
39
+ return getPickups(nil, PickupVariant.TAROT_CARD, card)
40
+ end
41
+ --- Helper function to get all of the coin pickup entities in the room.
42
+ --
43
+ -- @param coinSubType Optional. If specified, will only get the coins that match the sub-type.
44
+ -- Default is -1, which matches every sub-type.
45
+ function ____exports.getCoins(self, coinSubType)
46
+ if coinSubType == nil then
47
+ coinSubType = -1
48
+ end
49
+ return getPickups(nil, PickupVariant.COIN, coinSubType)
50
+ end
51
+ --- Helper function to get all of the collectible entities in the room.
52
+ --
53
+ -- @param collectibleType Optional. If specified, will only get the collectibles that match the
54
+ -- sub-type. Default is -1, which matches every sub-type.
55
+ function ____exports.getCollectibles(self, collectibleType)
56
+ if collectibleType == nil then
57
+ collectibleType = -1
58
+ end
59
+ return getPickups(nil, PickupVariant.COLLECTIBLE, collectibleType)
60
+ end
61
+ --- Helper function to get all of the heart pickup entities in the room.
62
+ --
63
+ -- @param heartSubType Optional. If specified, will only get the hearts that match the sub-type.
64
+ -- Default is -1, which matches every sub-type.
65
+ function ____exports.getHearts(self, heartSubType)
66
+ if heartSubType == nil then
67
+ heartSubType = -1
68
+ end
69
+ return getPickups(nil, PickupVariant.HEART, heartSubType)
70
+ end
71
+ --- Helper function to get all of the key pickup entities in the room.
72
+ --
73
+ -- @param keySubType Optional. If specified, will only get the keys that match the sub-type. Default
74
+ -- is -1, which matches every sub-type.
75
+ function ____exports.getKeys(self, keySubType)
76
+ if keySubType == nil then
77
+ keySubType = -1
78
+ end
79
+ return getPickups(nil, PickupVariant.KEY, keySubType)
80
+ end
81
+ --- Helper function to get all of the pill entities in the room.
82
+ --
83
+ -- @param pillColor Optional. If specified, will only get the pills that match the sub-type. Default
84
+ -- is -1, which matches every sub-type.
85
+ function ____exports.getPills(self, pillColor)
86
+ if pillColor == nil then
87
+ pillColor = -1
88
+ end
89
+ return getPickups(nil, PickupVariant.PILL, pillColor)
90
+ end
91
+ --- Helper function to get all of the sack (i.e. grab bag) entities in the room.
92
+ --
93
+ -- @param sackSubType Optional. If specified, will only get the sacks that match the sub-type.
94
+ -- Default is -1, which matches every sub-type.
95
+ function ____exports.getSacks(self, sackSubType)
96
+ if sackSubType == nil then
97
+ sackSubType = -1
98
+ end
99
+ return getPickups(nil, PickupVariant.SACK, sackSubType)
100
+ end
101
+ --- Helper function to get all of the trinket entities in the room.
102
+ --
103
+ -- @param trinketType Optional. If specified, will only get the trinkets that match the sub-type.
104
+ -- Default is -1, which matches every sub-type.
105
+ function ____exports.getTrinkets(self, trinketType)
106
+ if trinketType == nil then
107
+ trinketType = -1
108
+ end
109
+ return getPickups(nil, PickupVariant.TRINKET, trinketType)
110
+ end
111
+ --- Helper function to remove all of the batteries in the room.
112
+ --
113
+ -- @param batterySubType Optional. If specified, will only remove the batteries that match this
114
+ -- sub-type. Default is -1, which matches every sub-type.
115
+ -- @param cap Optional. If specified, will only remove the given amount of cards.
116
+ -- @returns The batteries that were removed.
117
+ function ____exports.removeAllBatteries(self, batterySubType, cap)
118
+ if batterySubType == nil then
119
+ batterySubType = -1
120
+ end
121
+ return removeAllPickups(nil, PickupVariant.LIL_BATTERY, batterySubType, cap)
122
+ end
123
+ --- Helper function to remove all of the bomb pickups in the room. (Specifically, this refers to bomb
124
+ -- pickups, not the `EntityBomb` class.)
125
+ --
126
+ -- @param bombSubType Optional. If specified, will only remove bombs that match this sub-type.
127
+ -- Default is -1, which matches every sub-type.
128
+ -- @param cap Optional. If specified, will only remove the given amount of bombs.
129
+ -- @returns The bombs that were removed.
130
+ function ____exports.removeAllBombPickups(self, bombSubType, cap)
131
+ if bombSubType == nil then
132
+ bombSubType = -1
133
+ end
134
+ return removeAllPickups(nil, PickupVariant.BOMB, bombSubType, cap)
135
+ end
136
+ --- Helper function to remove all of the cards in the room.
137
+ --
138
+ -- @param card Optional. If specified, will only remove cards that match this sub-type. Default is
139
+ -- -1, which matches every sub-type.
140
+ -- @param cap Optional. If specified, will only remove the given amount of cards.
141
+ -- @returns The cards that were removed.
142
+ function ____exports.removeAllCards(self, card, cap)
143
+ if card == nil then
144
+ card = -1
145
+ end
146
+ return removeAllPickups(nil, PickupVariant.TAROT_CARD, card, cap)
147
+ end
148
+ --- Helper function to remove all of the coins in the room.
149
+ --
150
+ -- @param coinSubType Optional. If specified, will only remove coins that match this sub-type.
151
+ -- Default is -1, which matches every sub-type.
152
+ -- @param cap Optional. If specified, will only remove the given amount of coins.
153
+ -- @returns The coins that were removed.
154
+ function ____exports.removeAllCoins(self, coinSubType, cap)
155
+ return removeAllPickups(nil, PickupVariant.COIN, coinSubType, cap)
156
+ end
157
+ --- Helper function to remove all of the collectibles in the room.
158
+ --
159
+ -- @param collectibleType Optional. If specified, will only remove collectibles that match this
160
+ -- sub-type. Default is -1, which matches every sub-type.
161
+ -- @param cap Optional. If specified, will only remove the given amount of collectibles.
162
+ -- @returns The collectibles that were removed.
163
+ function ____exports.removeAllCollectibles(self, collectibleType, cap)
164
+ return removeAllPickups(nil, PickupVariant.COLLECTIBLE, collectibleType, cap)
165
+ end
166
+ --- Helper function to remove all of the heart pickup entities in the room.
167
+ --
168
+ -- @param heartSubType Optional. If specified, will only remove hearts that match this sub-type.
169
+ -- Default is -1, which matches every sub-type.
170
+ -- @param cap Optional. If specified, will only remove the given amount of hearts.
171
+ -- @returns The hearts that were removed.
172
+ function ____exports.removeAllHearts(self, heartSubType, cap)
173
+ return removeAllPickups(nil, PickupVariant.HEART, heartSubType, cap)
174
+ end
175
+ --- Helper function to remove all of the keys in the room.
176
+ --
177
+ -- @param keySubType Optional. If specified, will only remove keys that match this sub-type. Default
178
+ -- is -1, which matches every sub-type.
179
+ -- @param cap Optional. If specified, will only remove the given amount of keys.
180
+ -- @returns The keys that were removed.
181
+ function ____exports.removeAllKeys(self, keySubType, cap)
182
+ return removeAllPickups(nil, PickupVariant.KEY, keySubType, cap)
183
+ end
184
+ --- Helper function to remove all of the pills in the room.
185
+ --
186
+ -- @param pillColor Optional. If specified, will only remove pills that match this sub-type. Default
187
+ -- is -1, which matches every sub-type.
188
+ -- @param cap Optional. If specified, will only remove the given amount of pills.
189
+ -- @returns The pills that were removed.
190
+ function ____exports.removeAllPills(self, pillColor, cap)
191
+ return removeAllPickups(nil, PickupVariant.PILL, pillColor, cap)
192
+ end
193
+ --- Helper function to remove all of the sacks (i.e. grab bags) in the room.
194
+ --
195
+ -- @param sackSubType Optional. If specified, will only remove sacks that match this sub-type.
196
+ -- Default is -1, which matches every sub-type.
197
+ -- @param cap Optional. If specified, will only remove the given amount of sacks.
198
+ -- @returns The sacks that were removed.
199
+ function ____exports.removeAllSacks(self, sackSubType, cap)
200
+ return removeAllPickups(nil, PickupVariant.TRINKET, sackSubType, cap)
201
+ end
202
+ --- Helper function to remove all of the trinkets in the room.
203
+ --
204
+ -- @param trinketType Optional. If specified, will only remove trinkets that match this sub-type.
205
+ -- Default is -1, which matches every sub-type.
206
+ -- @param cap Optional. If specified, will only remove the given amount of trinkets.
207
+ -- @returns The trinkets that were removed.
208
+ function ____exports.removeAllTrinkets(self, trinketType, cap)
209
+ return removeAllPickups(nil, PickupVariant.TRINKET, trinketType, cap)
210
+ end
211
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90).
212
+ function ____exports.spawnBattery(self, batterySubType, position, velocity, spawner, seedOrRNG)
213
+ if velocity == nil then
214
+ velocity = VectorZero
215
+ end
216
+ if spawner == nil then
217
+ spawner = nil
218
+ end
219
+ if seedOrRNG == nil then
220
+ seedOrRNG = nil
221
+ end
222
+ return spawnPickup(
223
+ nil,
224
+ PickupVariant.LIL_BATTERY,
225
+ batterySubType,
226
+ position,
227
+ velocity,
228
+ spawner,
229
+ seedOrRNG
230
+ )
231
+ end
232
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90)
233
+ -- and a specific seed.
234
+ function ____exports.spawnBatteryWithSeed(self, batterySubType, position, seedOrRNG, velocity, spawner)
235
+ if velocity == nil then
236
+ velocity = VectorZero
237
+ end
238
+ if spawner == nil then
239
+ spawner = nil
240
+ end
241
+ return ____exports.spawnBattery(
242
+ nil,
243
+ batterySubType,
244
+ position,
245
+ velocity,
246
+ spawner,
247
+ seedOrRNG
248
+ )
249
+ end
250
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.BOMB` (40).
251
+ function ____exports.spawnBombPickup(self, bombSubType, position, velocity, spawner, seedOrRNG)
252
+ if velocity == nil then
253
+ velocity = VectorZero
254
+ end
255
+ if spawner == nil then
256
+ spawner = nil
257
+ end
258
+ if seedOrRNG == nil then
259
+ seedOrRNG = nil
260
+ end
261
+ return spawnPickup(
262
+ nil,
263
+ PickupVariant.BOMB,
264
+ bombSubType,
265
+ position,
266
+ velocity,
267
+ spawner,
268
+ seedOrRNG
269
+ )
270
+ end
271
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.BOMB` (40) and a
272
+ -- specific seed.
273
+ function ____exports.spawnBombPickupWithSeed(self, bombSubType, position, seedOrRNG, velocity, spawner)
274
+ if velocity == nil then
275
+ velocity = VectorZero
276
+ end
277
+ if spawner == nil then
278
+ spawner = nil
279
+ end
280
+ return ____exports.spawnBombPickup(
281
+ nil,
282
+ bombSubType,
283
+ position,
284
+ velocity,
285
+ spawner,
286
+ seedOrRNG
287
+ )
288
+ end
289
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
290
+ function ____exports.spawnCard(self, subType, position, velocity, spawner, seedOrRNG)
291
+ if velocity == nil then
292
+ velocity = VectorZero
293
+ end
294
+ if spawner == nil then
295
+ spawner = nil
296
+ end
297
+ if seedOrRNG == nil then
298
+ seedOrRNG = nil
299
+ end
300
+ return spawnPickup(
301
+ nil,
302
+ PickupVariant.TAROT_CARD,
303
+ subType,
304
+ position,
305
+ velocity,
306
+ spawner,
307
+ seedOrRNG
308
+ )
309
+ end
310
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300)
311
+ -- and a specific seed.
312
+ function ____exports.spawnCardWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
313
+ if velocity == nil then
314
+ velocity = VectorZero
315
+ end
316
+ if spawner == nil then
317
+ spawner = nil
318
+ end
319
+ return ____exports.spawnCard(
320
+ nil,
321
+ subType,
322
+ position,
323
+ velocity,
324
+ spawner,
325
+ seedOrRNG
326
+ )
327
+ end
328
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20).
329
+ function ____exports.spawnCoin(self, subType, position, velocity, spawner, seedOrRNG)
330
+ if velocity == nil then
331
+ velocity = VectorZero
332
+ end
333
+ if spawner == nil then
334
+ spawner = nil
335
+ end
336
+ if seedOrRNG == nil then
337
+ seedOrRNG = nil
338
+ end
339
+ return spawnPickup(
340
+ nil,
341
+ PickupVariant.COIN,
342
+ subType,
343
+ position,
344
+ velocity,
345
+ spawner,
346
+ seedOrRNG
347
+ )
348
+ end
349
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20) and a
350
+ -- specific seed.
351
+ function ____exports.spawnCoinWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
352
+ if velocity == nil then
353
+ velocity = VectorZero
354
+ end
355
+ if spawner == nil then
356
+ spawner = nil
357
+ end
358
+ return ____exports.spawnCoin(
359
+ nil,
360
+ subType,
361
+ position,
362
+ velocity,
363
+ spawner,
364
+ seedOrRNG
365
+ )
366
+ end
367
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10).
368
+ function ____exports.spawnHeart(self, subType, position, velocity, spawner, seedOrRNG)
369
+ if velocity == nil then
370
+ velocity = VectorZero
371
+ end
372
+ if spawner == nil then
373
+ spawner = nil
374
+ end
375
+ if seedOrRNG == nil then
376
+ seedOrRNG = nil
377
+ end
378
+ return spawnPickup(
379
+ nil,
380
+ PickupVariant.HEART,
381
+ subType,
382
+ position,
383
+ velocity,
384
+ spawner,
385
+ seedOrRNG
386
+ )
387
+ end
388
+ function ____exports.spawnHeartWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
389
+ if velocity == nil then
390
+ velocity = VectorZero
391
+ end
392
+ if spawner == nil then
393
+ spawner = nil
394
+ end
395
+ return ____exports.spawnHeart(
396
+ nil,
397
+ subType,
398
+ position,
399
+ velocity,
400
+ spawner,
401
+ seedOrRNG
402
+ )
403
+ end
404
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30).
405
+ function ____exports.spawnKey(self, subType, position, velocity, spawner, seedOrRNG)
406
+ if velocity == nil then
407
+ velocity = VectorZero
408
+ end
409
+ if spawner == nil then
410
+ spawner = nil
411
+ end
412
+ if seedOrRNG == nil then
413
+ seedOrRNG = nil
414
+ end
415
+ return spawnPickup(
416
+ nil,
417
+ PickupVariant.KEY,
418
+ subType,
419
+ position,
420
+ velocity,
421
+ spawner,
422
+ seedOrRNG
423
+ )
424
+ end
425
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30) and a
426
+ -- specific seed.
427
+ function ____exports.spawnKeyWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
428
+ if velocity == nil then
429
+ velocity = VectorZero
430
+ end
431
+ if spawner == nil then
432
+ spawner = nil
433
+ end
434
+ return ____exports.spawnKey(
435
+ nil,
436
+ subType,
437
+ position,
438
+ velocity,
439
+ spawner,
440
+ seedOrRNG
441
+ )
442
+ end
443
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70).
444
+ function ____exports.spawnPill(self, pillColor, position, velocity, spawner, seedOrRNG)
445
+ if velocity == nil then
446
+ velocity = VectorZero
447
+ end
448
+ if spawner == nil then
449
+ spawner = nil
450
+ end
451
+ if seedOrRNG == nil then
452
+ seedOrRNG = nil
453
+ end
454
+ return spawnPickup(
455
+ nil,
456
+ PickupVariant.PILL,
457
+ pillColor,
458
+ position,
459
+ velocity,
460
+ spawner,
461
+ seedOrRNG
462
+ )
463
+ end
464
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70) and a
465
+ -- specific seed.
466
+ function ____exports.spawnPillWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
467
+ if velocity == nil then
468
+ velocity = VectorZero
469
+ end
470
+ if spawner == nil then
471
+ spawner = nil
472
+ end
473
+ return ____exports.spawnPill(
474
+ nil,
475
+ subType,
476
+ position,
477
+ velocity,
478
+ spawner,
479
+ seedOrRNG
480
+ )
481
+ end
482
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69).
483
+ function ____exports.spawnSack(self, subType, position, velocity, spawner, seedOrRNG)
484
+ if velocity == nil then
485
+ velocity = VectorZero
486
+ end
487
+ if spawner == nil then
488
+ spawner = nil
489
+ end
490
+ if seedOrRNG == nil then
491
+ seedOrRNG = nil
492
+ end
493
+ return spawnPickup(
494
+ nil,
495
+ PickupVariant.SACK,
496
+ subType,
497
+ position,
498
+ velocity,
499
+ spawner,
500
+ seedOrRNG
501
+ )
502
+ end
503
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69) and a
504
+ -- specific seed.
505
+ function ____exports.spawnSackWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
506
+ if velocity == nil then
507
+ velocity = VectorZero
508
+ end
509
+ if spawner == nil then
510
+ spawner = nil
511
+ end
512
+ return ____exports.spawnSack(
513
+ nil,
514
+ subType,
515
+ position,
516
+ velocity,
517
+ spawner,
518
+ seedOrRNG
519
+ )
520
+ end
521
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350).
522
+ function ____exports.spawnTrinket(self, subType, position, velocity, spawner, seedOrRNG)
523
+ if velocity == nil then
524
+ velocity = VectorZero
525
+ end
526
+ if spawner == nil then
527
+ spawner = nil
528
+ end
529
+ if seedOrRNG == nil then
530
+ seedOrRNG = nil
531
+ end
532
+ return spawnPickup(
533
+ nil,
534
+ PickupVariant.TRINKET,
535
+ subType,
536
+ position,
537
+ velocity,
538
+ spawner,
539
+ seedOrRNG
540
+ )
541
+ end
542
+ --- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350) and
543
+ -- a specific seed.
544
+ function ____exports.spawnTrinketWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
545
+ if velocity == nil then
546
+ velocity = VectorZero
547
+ end
548
+ if spawner == nil then
549
+ spawner = nil
550
+ end
551
+ return ____exports.spawnTrinket(
552
+ nil,
553
+ subType,
554
+ position,
555
+ velocity,
556
+ spawner,
557
+ seedOrRNG
558
+ )
559
+ end
560
+ return ____exports
@@ -15,12 +15,12 @@ local ____charge = require("functions.charge")
15
15
  local getTotalCharge = ____charge.getTotalCharge
16
16
  local ____enums = require("functions.enums")
17
17
  local getEnumValues = ____enums.getEnumValues
18
- local ____player = require("functions.player")
19
- local getPlayerBlackHearts = ____player.getPlayerBlackHearts
20
- local getPlayerHearts = ____player.getPlayerHearts
21
- local getPlayerSoulHearts = ____player.getPlayerSoulHearts
22
- local isCharacter = ____player.isCharacter
23
- local setActiveItem = ____player.setActiveItem
18
+ local ____players = require("functions.players")
19
+ local getPlayerBlackHearts = ____players.getPlayerBlackHearts
20
+ local getPlayerHearts = ____players.getPlayerHearts
21
+ local getPlayerSoulHearts = ____players.getPlayerSoulHearts
22
+ local isCharacter = ____players.isCharacter
23
+ local setActiveItem = ____players.setActiveItem
24
24
  function ____exports.removeAllPlayerHealth(self, player)
25
25
  local goldenHearts = player:GetGoldenHearts()
26
26
  local eternalHearts = player:GetEternalHearts()
@@ -328,4 +328,4 @@ export declare function setBlindfold(player: EntityPlayer, enabled: boolean, mod
328
328
  * any costumes.
329
329
  */
330
330
  export declare function useActiveItemTemp(player: EntityPlayer, collectibleType: CollectibleType): void;
331
- //# sourceMappingURL=player.d.ts.map
331
+ //# sourceMappingURL=players.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAET,eAAe,EAIf,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAwBjD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,GACb,IAAI,CA4CN;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAGT;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAGrE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,kBAAkB,EAAE,UAAU,EAAE,GAAG,OAAO,CAIxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CASjE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAK1E;AAED;;;;;;;;;;;GAWG;A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Y,GAAG,IAAI,CAIlE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
File without changes
@@ -13,8 +13,8 @@ local ____PocketItemType = require("enums.PocketItemType")
13
13
  local PocketItemType = ____PocketItemType.PocketItemType
14
14
  local ____enums = require("functions.enums")
15
15
  local getEnumValues = ____enums.getEnumValues
16
- local ____player = require("functions.player")
17
- local isCharacter = ____player.isCharacter
16
+ local ____players = require("functions.players")
17
+ local isCharacter = ____players.isCharacter
18
18
  --- Use this helper function as a workaround for the `EntityPlayer.GetPocketItem` method not working
19
19
  -- correctly.
20
20
  --
@@ -10,14 +10,14 @@ local ____cachedClasses = require("cachedClasses")
10
10
  local game = ____cachedClasses.game
11
11
  local ____constants = require("constants")
12
12
  local DISTANCE_OF_GRID_TILE = ____constants.DISTANCE_OF_GRID_TILE
13
- local ____entity = require("functions.entity")
14
- local getEntities = ____entity.getEntities
15
- local ____entitySpecific = require("functions.entitySpecific")
16
- local getEffects = ____entitySpecific.getEffects
17
- local ____player = require("functions.player")
18
- local getPlayerCloserThan = ____player.getPlayerCloserThan
13
+ local ____entities = require("functions.entities")
14
+ local getEntities = ____entities.getEntities
15
+ local ____entitiesSpecific = require("functions.entitiesSpecific")
16
+ local getEffects = ____entitiesSpecific.getEffects
19
17
  local ____playerIndex = require("functions.playerIndex")
20
18
  local getPlayers = ____playerIndex.getPlayers
19
+ local ____players = require("functions.players")
20
+ local getPlayerCloserThan = ____players.getPlayerCloserThan
21
21
  local MAX_FIND_FREE_POSITION_ATTEMPTS = 100
22
22
  function ____exports.anyEntityCloserThan(self, entities, position, distance)
23
23
  return __TS__ArraySome(
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Helper function to check if all of the pressure plates in the room are pushed.
3
+ *
4
+ * In this context, "pressure plates" refers to the grid entities that you have to press down in
5
+ * order for the room to be cleared. This function ignores other types of pressure plates, such as
6
+ * the ones that you press to get a reward, the ones that you press to start a Greed Mode wave, and
7
+ * so on.
8
+ */
9
+ export declare function isAllPressurePlatesPushed(): boolean;
10
+ //# sourceMappingURL=pressurePlate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pressurePlate.d.ts","sourceRoot":"","sources":["../../src/functions/pressurePlate.ts"],"names":[],"mappings":"AAOA;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,IAAI,OAAO,CAanD"}
@@ -0,0 +1,29 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
3
+ local ____exports = {}
4
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
5
+ local PressurePlateState = ____isaac_2Dtypescript_2Ddefinitions.PressurePlateState
6
+ local PressurePlateVariant = ____isaac_2Dtypescript_2Ddefinitions.PressurePlateVariant
7
+ local ____cachedClasses = require("cachedClasses")
8
+ local game = ____cachedClasses.game
9
+ local ____gridEntitiesSpecific = require("functions.gridEntitiesSpecific")
10
+ local getPressurePlates = ____gridEntitiesSpecific.getPressurePlates
11
+ --- Helper function to check if all of the pressure plates in the room are pushed.
12
+ --
13
+ -- In this context, "pressure plates" refers to the grid entities that you have to press down in
14
+ -- order for the room to be cleared. This function ignores other types of pressure plates, such as
15
+ -- the ones that you press to get a reward, the ones that you press to start a Greed Mode wave, and
16
+ -- so on.
17
+ function ____exports.isAllPressurePlatesPushed(self)
18
+ local room = game:GetRoom()
19
+ local hasPressurePlates = room:HasTriggerPressurePlates()
20
+ if not hasPressurePlates then
21
+ return true
22
+ end
23
+ local pressurePlates = getPressurePlates(nil, PressurePlateVariant.PRESSURE_PLATE)
24
+ return __TS__ArrayEvery(
25
+ pressurePlates,
26
+ function(____, pressurePlate) return pressurePlate.State == PressurePlateState.PRESSURE_PLATE_PRESSED end
27
+ )
28
+ end
29
+ return ____exports