isaacscript-common 31.4.0 → 31.6.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 (196) hide show
  1. package/dist/index.rollup.d.ts +38 -4
  2. package/dist/isaacscript-common.lua +722 -684
  3. package/dist/src/classes/ModFeature.d.ts.map +1 -1
  4. package/dist/src/classes/ModFeature.lua +5 -9
  5. package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
  6. package/dist/src/classes/ModUpgraded.lua +8 -14
  7. package/dist/src/classes/callbacks/PostNewRoomEarly.lua +2 -2
  8. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -1
  9. package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +3 -3
  10. package/dist/src/classes/features/other/CharacterHealthConversion.lua +1 -1
  11. package/dist/src/classes/features/other/CustomItemPools.d.ts.map +1 -1
  12. package/dist/src/classes/features/other/CustomItemPools.lua +12 -6
  13. package/dist/src/classes/features/other/CustomStages.d.ts.map +1 -1
  14. package/dist/src/classes/features/other/CustomStages.lua +12 -14
  15. package/dist/src/classes/features/other/CustomTrapdoors.d.ts.map +1 -1
  16. package/dist/src/classes/features/other/CustomTrapdoors.lua +6 -8
  17. package/dist/src/classes/features/other/DeployJSONRoom.d.ts.map +1 -1
  18. package/dist/src/classes/features/other/DeployJSONRoom.lua +15 -15
  19. package/dist/src/classes/features/other/ModdedElementSets.d.ts.map +1 -1
  20. package/dist/src/classes/features/other/ModdedElementSets.lua +21 -12
  21. package/dist/src/classes/features/other/Pause.d.ts.map +1 -1
  22. package/dist/src/classes/features/other/Pause.lua +4 -6
  23. package/dist/src/classes/features/other/SaveDataManager.d.ts.map +1 -1
  24. package/dist/src/classes/features/other/SaveDataManager.lua +5 -9
  25. package/dist/src/classes/features/other/customStages/backdrop.lua +9 -10
  26. package/dist/src/classes/features/other/debugDisplay/DebugDisplayBomb.d.ts.map +1 -1
  27. package/dist/src/classes/features/other/debugDisplay/DebugDisplayBomb.lua +2 -1
  28. package/dist/src/classes/features/other/debugDisplay/DebugDisplayDoor.d.ts.map +1 -1
  29. package/dist/src/classes/features/other/debugDisplay/DebugDisplayDoor.lua +2 -1
  30. package/dist/src/classes/features/other/debugDisplay/DebugDisplayEffect.d.ts.map +1 -1
  31. package/dist/src/classes/features/other/debugDisplay/DebugDisplayEffect.lua +2 -1
  32. package/dist/src/classes/features/other/debugDisplay/DebugDisplayFamiliar.d.ts.map +1 -1
  33. package/dist/src/classes/features/other/debugDisplay/DebugDisplayFamiliar.lua +2 -1
  34. package/dist/src/classes/features/other/debugDisplay/DebugDisplayKnife.d.ts.map +1 -1
  35. package/dist/src/classes/features/other/debugDisplay/DebugDisplayKnife.lua +2 -1
  36. package/dist/src/classes/features/other/debugDisplay/DebugDisplayLaser.d.ts.map +1 -1
  37. package/dist/src/classes/features/other/debugDisplay/DebugDisplayLaser.lua +2 -1
  38. package/dist/src/classes/features/other/debugDisplay/DebugDisplayNPC.d.ts.map +1 -1
  39. package/dist/src/classes/features/other/debugDisplay/DebugDisplayNPC.lua +2 -1
  40. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPickup.d.ts.map +1 -1
  41. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPickup.lua +2 -1
  42. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPit.d.ts.map +1 -1
  43. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPit.lua +2 -1
  44. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPlayer.d.ts.map +1 -1
  45. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPlayer.lua +2 -1
  46. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPoop.d.ts.map +1 -1
  47. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPoop.lua +2 -1
  48. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPressurePlate.d.ts.map +1 -1
  49. package/dist/src/classes/features/other/debugDisplay/DebugDisplayPressurePlate.lua +2 -1
  50. package/dist/src/classes/features/other/debugDisplay/DebugDisplayProjectile.d.ts.map +1 -1
  51. package/dist/src/classes/features/other/debugDisplay/DebugDisplayProjectile.lua +2 -1
  52. package/dist/src/classes/features/other/debugDisplay/DebugDisplayRock.d.ts.map +1 -1
  53. package/dist/src/classes/features/other/debugDisplay/DebugDisplayRock.lua +2 -1
  54. package/dist/src/classes/features/other/debugDisplay/DebugDisplaySlot.d.ts.map +1 -1
  55. package/dist/src/classes/features/other/debugDisplay/DebugDisplaySlot.lua +2 -1
  56. package/dist/src/classes/features/other/debugDisplay/DebugDisplaySpikes.d.ts.map +1 -1
  57. package/dist/src/classes/features/other/debugDisplay/DebugDisplaySpikes.lua +2 -1
  58. package/dist/src/classes/features/other/debugDisplay/DebugDisplayTNT.d.ts.map +1 -1
  59. package/dist/src/classes/features/other/debugDisplay/DebugDisplayTNT.lua +2 -1
  60. package/dist/src/classes/features/other/debugDisplay/DebugDisplayTear.d.ts.map +1 -1
  61. package/dist/src/classes/features/other/debugDisplay/DebugDisplayTear.lua +2 -1
  62. package/dist/src/classes/features/other/debugDisplay/utils.d.ts +0 -1
  63. package/dist/src/classes/features/other/debugDisplay/utils.d.ts.map +1 -1
  64. package/dist/src/classes/features/other/debugDisplay/utils.lua +0 -17
  65. package/dist/src/classes/features/other/saveDataManager/restoreDefaults.lua +1 -1
  66. package/dist/src/functions/array.d.ts +3 -0
  67. package/dist/src/functions/array.d.ts.map +1 -1
  68. package/dist/src/functions/array.lua +9 -3
  69. package/dist/src/functions/bitSet128.d.ts.map +1 -1
  70. package/dist/src/functions/bitSet128.lua +4 -6
  71. package/dist/src/functions/bitwise.d.ts.map +1 -1
  72. package/dist/src/functions/bitwise.lua +7 -3
  73. package/dist/src/functions/color.d.ts.map +1 -1
  74. package/dist/src/functions/color.lua +5 -9
  75. package/dist/src/functions/deepCopy.lua +23 -31
  76. package/dist/src/functions/entities.d.ts.map +1 -1
  77. package/dist/src/functions/entities.lua +20 -18
  78. package/dist/src/functions/entitiesSpecific.d.ts.map +1 -1
  79. package/dist/src/functions/entitiesSpecific.lua +11 -27
  80. package/dist/src/functions/enums.d.ts +6 -4
  81. package/dist/src/functions/enums.d.ts.map +1 -1
  82. package/dist/src/functions/enums.lua +13 -9
  83. package/dist/src/functions/gridEntities.d.ts.map +1 -1
  84. package/dist/src/functions/gridEntities.lua +18 -11
  85. package/dist/src/functions/gridEntitiesSpecific.d.ts.map +1 -1
  86. package/dist/src/functions/gridEntitiesSpecific.lua +16 -28
  87. package/dist/src/functions/input.d.ts +3 -0
  88. package/dist/src/functions/input.d.ts.map +1 -1
  89. package/dist/src/functions/input.lua +14 -14
  90. package/dist/src/functions/jsonRoom.d.ts.map +1 -1
  91. package/dist/src/functions/jsonRoom.lua +35 -23
  92. package/dist/src/functions/kColor.d.ts.map +1 -1
  93. package/dist/src/functions/kColor.lua +6 -12
  94. package/dist/src/functions/map.d.ts.map +1 -1
  95. package/dist/src/functions/map.lua +3 -3
  96. package/dist/src/functions/minimap.d.ts.map +1 -1
  97. package/dist/src/functions/minimap.lua +17 -9
  98. package/dist/src/functions/players.d.ts.map +1 -1
  99. package/dist/src/functions/players.lua +17 -22
  100. package/dist/src/functions/render.d.ts +16 -0
  101. package/dist/src/functions/render.d.ts.map +1 -0
  102. package/dist/src/functions/render.lua +50 -0
  103. package/dist/src/functions/rng.d.ts.map +1 -1
  104. package/dist/src/functions/rng.lua +3 -3
  105. package/dist/src/functions/roomShapeWalls.d.ts.map +1 -1
  106. package/dist/src/functions/roomShapeWalls.lua +7 -3
  107. package/dist/src/functions/roomTransition.d.ts.map +1 -1
  108. package/dist/src/functions/roomTransition.lua +7 -3
  109. package/dist/src/functions/rooms.d.ts.map +1 -1
  110. package/dist/src/functions/rooms.lua +8 -5
  111. package/dist/src/functions/serialization.d.ts.map +1 -1
  112. package/dist/src/functions/serialization.lua +8 -18
  113. package/dist/src/functions/table.d.ts.map +1 -1
  114. package/dist/src/functions/table.lua +6 -12
  115. package/dist/src/functions/tstlClass.d.ts.map +1 -1
  116. package/dist/src/functions/tstlClass.lua +3 -3
  117. package/dist/src/functions/utils.d.ts +9 -10
  118. package/dist/src/functions/utils.d.ts.map +1 -1
  119. package/dist/src/functions/utils.lua +14 -22
  120. package/dist/src/functions/vector.d.ts.map +1 -1
  121. package/dist/src/functions/vector.lua +4 -6
  122. package/dist/src/functions/weighted.d.ts.map +1 -1
  123. package/dist/src/functions/weighted.lua +7 -3
  124. package/dist/src/index.d.ts +2 -0
  125. package/dist/src/index.d.ts.map +1 -1
  126. package/dist/src/index.lua +8 -0
  127. package/dist/src/sets/bossSets.d.ts.map +1 -1
  128. package/dist/src/sets/bossSets.lua +3 -3
  129. package/dist/src/types/Expand.d.ts +8 -0
  130. package/dist/src/types/Expand.d.ts.map +1 -0
  131. package/dist/src/types/Expand.lua +2 -0
  132. package/package.json +2 -2
  133. package/src/classes/ModFeature.ts +16 -12
  134. package/src/classes/ModUpgraded.ts +18 -16
  135. package/src/classes/callbacks/PostNewRoomEarly.ts +2 -2
  136. package/src/classes/features/callbackLogic/CustomGridEntities.ts +2 -3
  137. package/src/classes/features/other/CharacterHealthConversion.ts +1 -1
  138. package/src/classes/features/other/CustomItemPools.ts +9 -8
  139. package/src/classes/features/other/CustomStages.ts +9 -10
  140. package/src/classes/features/other/CustomTrapdoors.ts +9 -10
  141. package/src/classes/features/other/DeployJSONRoom.ts +21 -21
  142. package/src/classes/features/other/ModdedElementSets.ts +18 -21
  143. package/src/classes/features/other/Pause.ts +9 -6
  144. package/src/classes/features/other/SaveDataManager.ts +14 -16
  145. package/src/classes/features/other/customStages/backdrop.ts +5 -6
  146. package/src/classes/features/other/debugDisplay/DebugDisplayBomb.ts +2 -1
  147. package/src/classes/features/other/debugDisplay/DebugDisplayDoor.ts +2 -1
  148. package/src/classes/features/other/debugDisplay/DebugDisplayEffect.ts +2 -1
  149. package/src/classes/features/other/debugDisplay/DebugDisplayFamiliar.ts +2 -1
  150. package/src/classes/features/other/debugDisplay/DebugDisplayKnife.ts +2 -1
  151. package/src/classes/features/other/debugDisplay/DebugDisplayLaser.ts +2 -1
  152. package/src/classes/features/other/debugDisplay/DebugDisplayNPC.ts +2 -1
  153. package/src/classes/features/other/debugDisplay/DebugDisplayPickup.ts +2 -1
  154. package/src/classes/features/other/debugDisplay/DebugDisplayPit.ts +2 -1
  155. package/src/classes/features/other/debugDisplay/DebugDisplayPlayer.ts +2 -1
  156. package/src/classes/features/other/debugDisplay/DebugDisplayPoop.ts +2 -1
  157. package/src/classes/features/other/debugDisplay/DebugDisplayPressurePlate.ts +2 -1
  158. package/src/classes/features/other/debugDisplay/DebugDisplayProjectile.ts +2 -1
  159. package/src/classes/features/other/debugDisplay/DebugDisplayRock.ts +2 -1
  160. package/src/classes/features/other/debugDisplay/DebugDisplaySlot.ts +2 -1
  161. package/src/classes/features/other/debugDisplay/DebugDisplaySpikes.ts +2 -1
  162. package/src/classes/features/other/debugDisplay/DebugDisplayTNT.ts +2 -1
  163. package/src/classes/features/other/debugDisplay/DebugDisplayTear.ts +2 -1
  164. package/src/classes/features/other/debugDisplay/utils.ts +0 -13
  165. package/src/classes/features/other/saveDataManager/restoreDefaults.ts +1 -1
  166. package/src/functions/array.ts +8 -6
  167. package/src/functions/bitSet128.ts +9 -10
  168. package/src/functions/bitwise.ts +6 -3
  169. package/src/functions/color.ts +13 -15
  170. package/src/functions/deepCopy.ts +18 -24
  171. package/src/functions/deepCopyTests.ts +5 -6
  172. package/src/functions/entities.ts +22 -20
  173. package/src/functions/entitiesSpecific.ts +10 -27
  174. package/src/functions/enums.ts +29 -17
  175. package/src/functions/gridEntities.ts +14 -16
  176. package/src/functions/gridEntitiesSpecific.ts +15 -28
  177. package/src/functions/input.ts +3 -3
  178. package/src/functions/jsonRoom.ts +39 -27
  179. package/src/functions/kColor.ts +17 -20
  180. package/src/functions/map.ts +5 -5
  181. package/src/functions/minimap.ts +16 -15
  182. package/src/functions/players.ts +7 -10
  183. package/src/functions/render.ts +53 -0
  184. package/src/functions/rng.ts +5 -5
  185. package/src/functions/roomShapeWalls.ts +3 -4
  186. package/src/functions/roomTransition.ts +5 -5
  187. package/src/functions/rooms.ts +5 -6
  188. package/src/functions/serialization.ts +25 -30
  189. package/src/functions/table.ts +18 -20
  190. package/src/functions/tstlClass.ts +5 -5
  191. package/src/functions/utils.ts +27 -23
  192. package/src/functions/vector.ts +9 -10
  193. package/src/functions/weighted.ts +5 -5
  194. package/src/index.ts +2 -0
  195. package/src/sets/bossSets.ts +5 -5
  196. package/src/types/Expand.ts +5 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ModFeature.d.ts","sourceRoot":"","sources":["../../../src/classes/ModFeature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AASpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,eAAO,MAAM,yBAAyB,gBAAgB,CAAC;AACvD,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AAyBpE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAc;IAElC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,SAAS,CAAC,yBAAyB,EAC/B,CAAC,CAAC,CAAC,SAAS,OAAO,EACjB,OAAO,EAAE,CAAC,EACV,WAAW,EAAE,CAAC,SAAS,IAAI,GAAG,WAAW,GAAG,iBAAiB,EAC7D,GAAG,YAAY,EAAE,OAAO,EAAE,KACvB,OAAO,CAAC,GACb,IAAI,CAAQ;IAEhB;;;;;OAKG;IACI,WAAW,UAAS;gBAEf,GAAG,EAAE,WAAW,EAAE,IAAI,UAAO;IAQzC;;;;;OAKG;IACI,IAAI,CAAC,IAAI,UAAO,GAAG,IAAI;IAqB9B;;;;;OAKG;IACI,MAAM,IAAI,IAAI;CAGtB"}
1
+ {"version":3,"file":"ModFeature.d.ts","sourceRoot":"","sources":["../../../src/classes/ModFeature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAUpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,eAAO,MAAM,yBAAyB,gBAAgB,CAAC;AACvD,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AAyBpE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAc;IAElC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,SAAS,CAAC,yBAAyB,EAC/B,CAAC,CAAC,CAAC,SAAS,OAAO,EACjB,OAAO,EAAE,CAAC,EACV,WAAW,EAAE,CAAC,SAAS,IAAI,GAAG,WAAW,GAAG,iBAAiB,EAC7D,GAAG,YAAY,EAAE,OAAO,EAAE,KACvB,OAAO,CAAC,GACb,IAAI,CAAQ;IAEhB;;;;;OAKG;IACI,WAAW,UAAS;gBAEf,GAAG,EAAE,WAAW,EAAE,IAAI,UAAO;IAQzC;;;;;OAKG;IACI,IAAI,CAAC,IAAI,UAAO,GAAG,IAAI;IAuB9B;;;;;OAKG;IACI,MAAM,IAAI,IAAI;CAGtB"}
@@ -13,6 +13,8 @@ local ____types = require("src.functions.types")
13
13
  local isFunction = ____types.isFunction
14
14
  local isNumber = ____types.isNumber
15
15
  local isTable = ____types.isTable
16
+ local ____utils = require("src.functions.utils")
17
+ local assertDefined = ____utils.assertDefined
16
18
  function initDecoratedCallbacks(self, modFeature, constructor, tstlClassName, vanilla, init)
17
19
  local modFeatureConstructor = constructor
18
20
  local callbackTuplesKey = vanilla and ____exports.MOD_FEATURE_CALLBACKS_KEY or ____exports.MOD_FEATURE_CUSTOM_CALLBACKS_KEY
@@ -143,9 +145,7 @@ function initSaveDataManager(self, modFeature, tstlClassName, init)
143
145
  local mod = modFeature.mod
144
146
  local saveDataManagerMethodName = init and "saveDataManager" or "saveDataManagerRemove"
145
147
  local saveDataManagerMethod = mod[saveDataManagerMethodName]
146
- if saveDataManagerMethod == nil then
147
- error("Failed to initialize a mod feature class due to having a \"v\" object and not having the save data manager initialized. You must pass \"ISCFeature.SAVE_DATA_MANAGER\" to the \"upgradeMod\" function.")
148
- end
148
+ assertDefined(nil, saveDataManagerMethod, "Failed to initialize a mod feature class due to having a \"v\" object and not having the save data manager initialized. You must pass \"ISCFeature.SAVE_DATA_MANAGER\" to the \"upgradeMod\" function.")
149
149
  if type(saveDataManagerMethod) ~= "function" then
150
150
  error(("The \"" .. saveDataManagerMethodName) .. "\" property of the \"ModUpgraded\" object was not a function.")
151
151
  end
@@ -202,13 +202,9 @@ function ModFeature.prototype.init(self, init)
202
202
  end
203
203
  self.initialized = init
204
204
  local constructor = getTSTLClassConstructor(nil, self)
205
- if constructor == nil then
206
- error("Failed to get the TSTL class constructor for a mod feature.")
207
- end
205
+ assertDefined(nil, constructor, "Failed to get the TSTL class constructor for a mod feature.")
208
206
  local tstlClassName = getTSTLClassName(nil, self)
209
- if tstlClassName == nil then
210
- error("Failed to get the TSTL class name for a mod feature.")
211
- end
207
+ assertDefined(nil, tstlClassName, "Failed to get the TSTL class name for a mod feature.")
212
208
  initDecoratedCallbacks(
213
209
  nil,
214
210
  self,
@@ -1 +1 @@
1
- {"version":3,"file":"ModUpgraded.d.ts","sourceRoot":"","sources":["../../../src/classes/ModUpgraded.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAIhG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAQ/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAMrG;;;;;;;;;;GAUG;AACH,qBAAa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O,CAAC,WAAW;IAgEnB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAqDrB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;CAM5B"}
@@ -29,6 +29,8 @@ local log = ____log.log
29
29
  local ____tstlClass = require("src.functions.tstlClass")
30
30
  local getTSTLClassConstructor = ____tstlClass.getTSTLClassConstructor
31
31
  local getTSTLClassName = ____tstlClass.getTSTLClassName
32
+ local ____utils = require("src.functions.utils")
33
+ local assertDefined = ____utils.assertDefined
32
34
  function getExportedMethodsFromFeature(self, featureClass)
33
35
  local constructor = getTSTLClassConstructor(nil, featureClass)
34
36
  local exportedMethodNames = constructor[EXPORTED_METHOD_NAMES_KEY]
@@ -147,9 +149,7 @@ function ModUpgraded.prototype.logUsedFeatures(self)
147
149
  goto __continue19
148
150
  end
149
151
  local modCallbackCustom = tonumber(modCallbackCustomString)
150
- if modCallbackCustom == nil then
151
- error("Failed to convert an index on the callbacks object to a number.")
152
- end
152
+ assertDefined(nil, modCallbackCustom, "Failed to convert an index on the callbacks object to a number.")
153
153
  log(((("- ModCallbackCustom." .. tostring(ModCallbackCustom[modCallbackCustom])) .. " (") .. tostring(modCallbackCustom)) .. ")")
154
154
  end
155
155
  ::__continue19::
@@ -159,15 +159,13 @@ function ModUpgraded.prototype.logUsedFeatures(self)
159
159
  local featureClass = ____value[2]
160
160
  do
161
161
  if featureClass.numConsumers == 0 then
162
- goto __continue23
162
+ goto __continue22
163
163
  end
164
164
  local iscFeature = tonumber(iscFeatureString)
165
- if iscFeature == nil then
166
- error("Failed to convert an index on the features object to a number.")
167
- end
165
+ assertDefined(nil, iscFeature, "Failed to convert an index on the features object to a number.")
168
166
  log(((("- ISCFeature." .. tostring(ISCFeature[iscFeature])) .. " (") .. tostring(iscFeature)) .. ")")
169
167
  end
170
- ::__continue23::
168
+ ::__continue22::
171
169
  end
172
170
  end
173
171
  function ModUpgraded.prototype.initFeature(self, feature)
@@ -214,9 +212,7 @@ function ModUpgraded.prototype.initFeature(self, feature)
214
212
  end
215
213
  if feature.v ~= nil then
216
214
  local className = getTSTLClassName(nil, feature)
217
- if className == nil then
218
- error("Failed to get the name of a feature.")
219
- end
215
+ assertDefined(nil, className, "Failed to get the name of a feature.")
220
216
  local saveDataManagerClass = self.features[ISCFeature.SAVE_DATA_MANAGER]
221
217
  saveDataManagerClass:saveDataManager(className, feature.v, feature.vConditionalFunc)
222
218
  end
@@ -255,9 +251,7 @@ function ModUpgraded.prototype.uninitFeature(self, feature)
255
251
  end
256
252
  if feature.v ~= nil then
257
253
  local className = getTSTLClassName(nil, feature)
258
- if className == nil then
259
- error("Failed to get the name of a feature.")
260
- end
254
+ assertDefined(nil, className, "Failed to get the name of a feature.")
261
255
  local saveDataManagerClass = self.features[ISCFeature.SAVE_DATA_MANAGER]
262
256
  saveDataManagerClass:saveDataManagerRemove(className)
263
257
  end
@@ -50,14 +50,14 @@ function PostNewRoomEarly.prototype.isNewRoom(self)
50
50
  if topLeftWall == nil then
51
51
  topLeftWall = spawnGridEntity(nil, GridEntityType.WALL, topLeftWallGridIndex)
52
52
  if topLeftWall == nil then
53
- logError("Failed to spawn a new wall (1) for the POST_NEW_ROOM_EARLY callback.")
53
+ logError("Failed to spawn a new wall for the POST_NEW_ROOM_EARLY callback (on the first try).")
54
54
  return false
55
55
  end
56
56
  end
57
57
  if topLeftWall2 == nil then
58
58
  topLeftWall2 = spawnGridEntity(nil, GridEntityType.WALL, rightOfTopWallGridIndex)
59
59
  if topLeftWall2 == nil then
60
- logError("Failed to spawn a new wall (2) for the POST_NEW_ROOM_EARLY callback.")
60
+ logError("Failed to spawn a new wall for the POST_NEW_ROOM_EARLY callback (on the second try).")
61
61
  return false
62
62
  end
63
63
  end
@@ -1 +1 @@
1
- {"version":3,"file":"CustomGridEntities.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/CustomGridEntities.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,kBAAkB,EAClB,cAAc,EAEf,MAAM,8BAA8B,CAAC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,cAAc,EAEf,MAAM,8BAA8B,CAAC;AActC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAErF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAiBhD,qBAAa,kBAAmB,SAAQ,OAAO;IAI7C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IA0B5C,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CA+CzC;IAGF,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CA0BnC;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+EG;IAEI,qBAAqB,CAC1B,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,QAAQ,CAAC,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,EACzB,kBAAkB,iBAA4B,EAC9C,qBAAqB,SAAI,GACxB,UAAU;IAyCb;;;;;;;;;;;;;;;;;OAiBG;IAEI,sBAAsB,CAC3B,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS;IAuCzB;;;;;;OAMG;IAEI,qBAAqB,IAAI,KAAK,CAAC;QACpC,UAAU,EAAE,UAAU,CAAC;QACvB,IAAI,EAAE,oBAAoB,CAAC;KAC5B,CAAC;IAuBF;;;;;;;OAOG;IAEI,uBAAuB,CAC5B,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,cAAc,GAAG,SAAS;IAyB7B;;;;;;OAMG;IAEI,kBAAkB,CAAC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO;CAM5E"}
@@ -29,6 +29,8 @@ local ____roomData = require("src.functions.roomData")
29
29
  local getRoomListIndex = ____roomData.getRoomListIndex
30
30
  local ____types = require("src.functions.types")
31
31
  local isNumber = ____types.isNumber
32
+ local ____utils = require("src.functions.utils")
33
+ local assertDefined = ____utils.assertDefined
32
34
  local ____vector = require("src.functions.vector")
33
35
  local isVector = ____vector.isVector
34
36
  local ____DefaultMap = require("src.classes.DefaultMap")
@@ -122,9 +124,7 @@ function CustomGridEntities.prototype.spawnCustomGridEntity(self, gridEntityType
122
124
  local roomListIndex = getRoomListIndex(nil)
123
125
  local gridIndex = isVector(nil, gridIndexOrPosition) and room:GetGridIndex(gridIndexOrPosition) or gridIndexOrPosition
124
126
  local customGridEntity = spawnGridEntityWithVariant(nil, baseGridEntityType, baseGridEntityVariant, gridIndexOrPosition)
125
- if customGridEntity == nil then
126
- error("Failed to spawn a custom grid entity.")
127
- end
127
+ assertDefined(nil, customGridEntity, "Failed to spawn a custom grid entity.")
128
128
  if gridCollisionClass ~= nil then
129
129
  customGridEntity.CollisionClass = gridCollisionClass
130
130
  end
@@ -74,7 +74,7 @@ function CharacterHealthConversion.prototype.____constructor(self)
74
74
  local character = player:GetPlayerType()
75
75
  local conversionHeartSubType = self.characterHealthReplacementMap:get(character)
76
76
  if conversionHeartSubType == nil then
77
- return
77
+ return nil
78
78
  end
79
79
  convertRedHeartContainers(nil, player, conversionHeartSubType)
80
80
  removeRedHearts(nil, player)
@@ -1 +1 @@
1
- {"version":3,"file":"CustomItemPools.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomItemPools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAO/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAahD,qBAAa,eAAgB,SAAQ,OAAO;IAmB1C,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAE5C;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IAEI,sBAAsB,CAC3B,kBAAkB,EAAE,YAAY,EAChC,YAAY,EAAE,aAAa,CAAC,eAAe,CAAC,GAC3C,IAAI;IAUP;;;;;;;;;;;;;;;;;OAiBG;IAEI,4BAA4B,CACjC,kBAAkB,EAAE,YAAY,EAChC,QAAQ,UAAQ,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,WAAW,kBAAuB,GACjC,eAAe;CA2BnB"}
1
+ {"version":3,"file":"CustomItemPools.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomItemPools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAQ/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAahD,qBAAa,eAAgB,SAAQ,OAAO;IAmB1C,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAE5C;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IAEI,sBAAsB,CAC3B,kBAAkB,EAAE,YAAY,EAChC,YAAY,EAAE,aAAa,CAAC,eAAe,CAAC,GAC3C,IAAI;IAUP;;;;;;;;;;;;;;;;;OAiBG;IAEI,4BAA4B,CACjC,kBAAkB,EAAE,YAAY,EAChC,QAAQ,UAAQ,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,WAAW,kBAAuB,GACjC,eAAe;CA2BnB"}
@@ -17,6 +17,8 @@ local ____map = require("src.functions.map")
17
17
  local copyMap = ____map.copyMap
18
18
  local ____rng = require("src.functions.rng")
19
19
  local getRandomSeed = ____rng.getRandomSeed
20
+ local ____utils = require("src.functions.utils")
21
+ local assertDefined = ____utils.assertDefined
20
22
  local ____weighted = require("src.functions.weighted")
21
23
  local getRandomIndexFromWeightedArray = ____weighted.getRandomIndexFromWeightedArray
22
24
  local ____Feature = require("src.classes.private.Feature")
@@ -53,17 +55,21 @@ function CustomItemPools.prototype.getCustomItemPoolCollectible(self, itemPoolTy
53
55
  defaultItem = CollectibleType.NULL
54
56
  end
55
57
  local customItemPool = v.run.customItemPools:get(itemPoolTypeCustom)
56
- if customItemPool == nil then
57
- error("Failed to find the custom item pool of: " .. tostring(itemPoolTypeCustom))
58
- end
58
+ assertDefined(
59
+ nil,
60
+ customItemPool,
61
+ "Failed to find the custom item pool of: " .. tostring(itemPoolTypeCustom)
62
+ )
59
63
  if #customItemPool == 0 then
60
64
  return defaultItem
61
65
  end
62
66
  local randomIndex = getRandomIndexFromWeightedArray(nil, customItemPool, seedOrRNG)
63
67
  local tuple = customItemPool[randomIndex + 1]
64
- if tuple == nil then
65
- error("Failed to get an element from a custom item pool using a random index of: " .. tostring(randomIndex))
66
- end
68
+ assertDefined(
69
+ nil,
70
+ tuple,
71
+ "Failed to get an element from a custom item pool using a random index of: " .. tostring(randomIndex)
72
+ )
67
73
  if decrease then
68
74
  arrayRemoveIndexInPlace(nil, customItemPool, randomIndex)
69
75
  end
@@ -1 +1 @@
1
- {"version":3,"file":"CustomStages.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomStages.ts"],"names":[],"mappings":"AAyCA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AA2ChD,qBAAa,YAAa,SAAQ,OAAO;IAIvC,oCAAoC;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkC;IAElE,+BAA+B;IAC/B,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAA8B;IAExE,OAAO,CAAC,WAAW,CAAS;IAE5B,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IACxD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAClD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAClD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAyB;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,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAClD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAClD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAyB;IAChE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAmE5C,OAAO,CAAC,uBAAuB;IAc/B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,6BAA6B;IAOrC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAY9B;IAGF,OAAO,CAAC,QAAQ,CAAC,UAAU,CAmBzB;IAEF;;;OAGG;IAEH,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAehC;IAGF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAc5B;IAGF,OAAO,CAAC,QAAQ,CAAC,eAAe,CAU9B;IAEF;;;OAGG;IAEH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAc/B;IAIF,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAe1C;IAGF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAqBjC;IAGF,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAwBnC;IAEF,gDAAgD;IAChD,OAAO,CAAC,iBAAiB;IAgGzB;;;;;;;;;;;;;;;;OAgBG;IAEI,cAAc,CACnB,IAAI,EAAE,MAAM,EACZ,UAAU,UAAO,EACjB,UAAU,UAAO,EACjB,OAAO,UAAQ,GACd,IAAI;IAiGP;;;;;OAKG;IAEI,kBAAkB,IAAI,IAAI;CAGlC"}
@@ -50,6 +50,8 @@ local ____stage = require("src.functions.stage")
50
50
  local setStage = ____stage.setStage
51
51
  local ____types = require("src.functions.types")
52
52
  local asNumber = ____types.asNumber
53
+ local ____utils = require("src.functions.utils")
54
+ local assertDefined = ____utils.assertDefined
53
55
  local ____Feature = require("src.classes.private.Feature")
54
56
  local Feature = ____Feature.Feature
55
57
  local ____backdrop = require("src.classes.features.other.customStages.backdrop")
@@ -118,9 +120,7 @@ function CustomStages.prototype.____constructor(self, customGridEntities, custom
118
120
  self.customStageCachedRoomData = __TS__New(Map)
119
121
  self.usingRedKey = false
120
122
  self.goToCustomStage = function(____, destinationName, destinationStage, _destinationStageType)
121
- if destinationName == nil then
122
- error("Failed to go to a custom stage since the custom trapdoors feature did not pass a destination name to the logic function.")
123
- end
123
+ assertDefined(nil, destinationName, "Failed to go to a custom stage since the custom trapdoors feature did not pass a destination name to the logic function.")
124
124
  local firstFloor = destinationStage == LevelStage.BASEMENT_1
125
125
  self:setCustomStage(destinationName, firstFloor)
126
126
  end
@@ -283,10 +283,10 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
283
283
  for ____, room in ipairs(getRoomsInsideGrid(nil)) do
284
284
  do
285
285
  if room.SafeGridIndex == startingRoomGridIndex then
286
- goto __continue36
286
+ goto __continue35
287
287
  end
288
288
  if room.Data == nil then
289
- goto __continue36
289
+ goto __continue35
290
290
  end
291
291
  local roomType = room.Data.Type
292
292
  local roomShapeMap = customStage.roomTypeMap:get(roomType)
@@ -294,13 +294,13 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
294
294
  if roomType == RoomType.DEFAULT then
295
295
  logError((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") for custom stage: ") .. customStage.name)
296
296
  end
297
- goto __continue36
297
+ goto __continue35
298
298
  end
299
299
  local roomShape = room.Data.Shape
300
300
  local roomDoorSlotFlagMap = roomShapeMap:get(roomShape)
301
301
  if roomDoorSlotFlagMap == nil then
302
302
  logError((((((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") for custom stage: ") .. customStage.name)
303
- goto __continue36
303
+ goto __continue35
304
304
  end
305
305
  local doorSlotFlags = room.Data.Doors
306
306
  local roomsMetadata = roomDoorSlotFlagMap:get(doorSlotFlags)
@@ -310,13 +310,13 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
310
310
  roomsMetadata = roomDoorSlotFlagMap:get(allDoorSlotFlags)
311
311
  if roomsMetadata == nil then
312
312
  logError((((((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") + all doors enabled for custom stage: ") .. customStage.name)
313
- goto __continue36
313
+ goto __continue35
314
314
  end
315
315
  end
316
316
  local randomRoom
317
317
  if roomType == RoomType.BOSS then
318
318
  if customStage.bossPool == nil then
319
- goto __continue36
319
+ goto __continue35
320
320
  end
321
321
  randomRoom = getRandomBossRoomFromPool(
322
322
  nil,
@@ -339,13 +339,13 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
339
339
  )
340
340
  if newRoomData == nil then
341
341
  logError((("Failed to get the room data for room variant " .. tostring(randomRoom.variant)) .. " for custom stage: ") .. customStage.name)
342
- goto __continue36
342
+ goto __continue35
343
343
  end
344
344
  self.customStageCachedRoomData:set(randomRoom.variant, newRoomData)
345
345
  end
346
346
  room.Data = newRoomData
347
347
  end
348
- ::__continue36::
348
+ ::__continue35::
349
349
  end
350
350
  end
351
351
  function CustomStages.prototype.setCustomStage(self, name, firstFloor, streakText, verbose)
@@ -359,9 +359,7 @@ function CustomStages.prototype.setCustomStage(self, name, firstFloor, streakTex
359
359
  verbose = false
360
360
  end
361
361
  local customStage = self.customStagesMap:get(name)
362
- if customStage == nil then
363
- error(("Failed to set the custom stage of \"" .. name) .. "\" because it was not found in the custom stages map. (Try restarting IsaacScript / recompiling the mod / restarting the game, and try again. If that does not work, you probably forgot to define it in your \"tsconfig.json\" file.) See the website for more details on how to set up custom stages.")
364
- end
362
+ assertDefined(nil, customStage, ("Failed to set the custom stage of \"" .. name) .. "\" because it was not found in the custom stages map. (Try restarting IsaacScript / recompiling the mod / restarting the game, and try again. If that does not work, you probably forgot to define it in your \"tsconfig.json\" file.) See the website for more details on how to set up custom stages.")
365
363
  local level = game:GetLevel()
366
364
  local stage = level:GetStage()
367
365
  local seeds = game:GetSeeds()
@@ -1 +1 @@
1
- {"version":3,"file":"CustomTrapdoors.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomTrapdoors.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,UAAU,EAKV,SAAS,EACV,MAAM,8BAA8B,CAAC;AA8BtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAkDhD,qBAAa,eAAgB,SAAQ,OAAO;IAC1C,qCAAqC;IACrC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAO/B;IAKJ;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAY;IAExC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IACxD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAC5C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAC1C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAmD5C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAMzB;IAEF,OAAO,CAAC,2BAA2B;IA+BnC,OAAO,CAAC,8BAA8B;IAmDtC,OAAO,CAAC,6BAA6B;IAsBrC,OAAO,CAAC,kBAAkB;IAqB1B,OAAO,CAAC,4BAA4B;IAiDpC,OAAO,CAAC,iCAAiC;IAsBzC,OAAO,CAAC,eAAe;IAoBvB,OAAO,CAAC,QAAQ,CAAC,kCAAkC,CAcjD;IAEF,OAAO,CAAC,4BAA4B;IAcpC,OAAO,CAAC,kBAAkB;IAc1B,OAAO,CAAC,sBAAsB;IAmB9B,OAAO,CAAC,gCAAgC;IAuCxC,OAAO,CAAC,2BAA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@ -61,6 +61,8 @@ local ____stage = require("src.functions.stage")
61
61
  local setStage = ____stage.setStage
62
62
  local ____tstlClass = require("src.functions.tstlClass")
63
63
  local getTSTLClassName = ____tstlClass.getTSTLClassName
64
+ local ____utils = require("src.functions.utils")
65
+ local assertDefined = ____utils.assertDefined
64
66
  local ____vector = require("src.functions.vector")
65
67
  local isVector = ____vector.isVector
66
68
  local ____ReadonlySet = require("src.types.ReadonlySet")
@@ -277,9 +279,7 @@ function CustomTrapdoors.prototype.checkAllPlayersLayingDownComplete(self)
277
279
  v.run.state = StageTravelState.NONE
278
280
  self:logStateChanged()
279
281
  local tstlClassName = getTSTLClassName(nil, self)
280
- if tstlClassName == nil then
281
- error("Failed to find get the class name for the custom trapdoor feature.")
282
- end
282
+ assertDefined(nil, tstlClassName, "Failed to find get the class name for the custom trapdoor feature.")
283
283
  self.disableInputs:enableAllInputs(tstlClassName)
284
284
  end
285
285
  function CustomTrapdoors.prototype.drawBlackSprite(self)
@@ -328,14 +328,14 @@ function CustomTrapdoors.prototype.checkCustomTrapdoorPlayerTouched(self, gridEn
328
328
  do
329
329
  local player = playerEntity:ToPlayer()
330
330
  if player == nil then
331
- goto __continue43
331
+ goto __continue42
332
332
  end
333
333
  if not self.ponyDetection:isPlayerUsingPony(player) and not isChildPlayer(nil, player) and canPlayerInteractWithTrapdoor(nil, player) then
334
334
  self:playerTouchedCustomTrapdoor(gridEntity, trapdoorDescription, player)
335
335
  return
336
336
  end
337
337
  end
338
- ::__continue43::
338
+ ::__continue42::
339
339
  end
340
340
  end
341
341
  function CustomTrapdoors.prototype.playerTouchedCustomTrapdoor(self, gridEntity, trapdoorDescription, player)
@@ -343,9 +343,7 @@ function CustomTrapdoors.prototype.playerTouchedCustomTrapdoor(self, gridEntity,
343
343
  v.run.customTrapdoorActivated = trapdoorDescription
344
344
  self:logStateChanged()
345
345
  local tstlClassName = getTSTLClassName(nil, self)
346
- if tstlClassName == nil then
347
- error("Failed to find get the class name for the custom trapdoor feature.")
348
- end
346
+ assertDefined(nil, tstlClassName, "Failed to find get the class name for the custom trapdoor feature.")
349
347
  local whitelist = __TS__New(ReadonlySet, {ButtonAction.CONSOLE})
350
348
  self.disableInputs:disableAllInputsExceptFor(tstlClassName, whitelist)
351
349
  setPlayerAttributes(nil, player, gridEntity.Position)
@@ -1 +1 @@
1
- {"version":3,"file":"DeployJSONRoom.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DeployJSONRoom.ts"],"names":[],"mappings":";;AA8BA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,qBAAa,cAAe,SAAQ,OAAO;IACzC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAA2B;IACpE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IAkBpD,OAAO,CAAC,gBAAgB;IAgGxB,OAAO,CAAC,4BAA4B;IAyCpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IAEI,cAAc,CACnB,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,EACvC,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,GACd,IAAI;CAwBR"}
1
+ {"version":3,"file":"DeployJSONRoom.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DeployJSONRoom.ts"],"names":[],"mappings":";;AA+BA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,qBAAa,cAAe,SAAQ,OAAO;IACzC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAA2B;IACpE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IAkBpD,OAAO,CAAC,gBAAgB;IA+FxB,OAAO,CAAC,4BAA4B;IAyCpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IAEI,cAAc,CACnB,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,EACvC,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,GACd,IAAI;CAwBR"}
@@ -48,6 +48,8 @@ local setRoomUncleared = ____rooms.setRoomUncleared
48
48
  local ____types = require("src.functions.types")
49
49
  local asCollectibleType = ____types.asCollectibleType
50
50
  local asNumber = ____types.asNumber
51
+ local ____utils = require("src.functions.utils")
52
+ local assertDefined = ____utils.assertDefined
51
53
  local ____ReadonlySet = require("src.types.ReadonlySet")
52
54
  local ReadonlySet = ____ReadonlySet.ReadonlySet
53
55
  local ____Feature = require("src.classes.private.Feature")
@@ -201,30 +203,28 @@ function DeployJSONRoom.prototype.spawnAllEntities(self, jsonRoom, rng, verbose)
201
203
  for ____, jsonSpawn in ipairs(jsonRoom.spawn) do
202
204
  local xString = jsonSpawn["$"].x
203
205
  local x = tonumber(xString)
204
- if x == nil then
205
- error("Failed to convert the following x coordinate to a number (for a spawn): " .. xString)
206
- end
206
+ assertDefined(nil, x, "Failed to convert the following x coordinate to a number (for a spawn): " .. xString)
207
207
  local yString = jsonSpawn["$"].y
208
208
  local y = tonumber(yString)
209
- if y == nil then
210
- error("Failed to convert the following y coordinate to a number (for a spawn): " .. yString)
211
- end
209
+ assertDefined(nil, y, "Failed to convert the following y coordinate to a number (for a spawn): " .. yString)
212
210
  local jsonEntity = getRandomJSONEntity(nil, jsonSpawn.entity)
213
211
  local entityTypeString = jsonEntity["$"].type
214
212
  local entityTypeNumber = tonumber(entityTypeString)
215
- if entityTypeNumber == nil then
216
- error("Failed to convert the entity type to a number: " .. entityTypeString)
217
- end
213
+ assertDefined(nil, entityTypeNumber, "Failed to convert the entity type to a number: " .. entityTypeString)
218
214
  local variantString = jsonEntity["$"].variant
219
215
  local variant = tonumber(variantString)
220
- if variant == nil then
221
- error("Failed to convert the entity variant to a number: " .. tostring(variant))
222
- end
216
+ assertDefined(
217
+ nil,
218
+ variant,
219
+ "Failed to convert the entity variant to a number: " .. tostring(variant)
220
+ )
223
221
  local subTypeString = jsonEntity["$"].subtype
224
222
  local subType = tonumber(subTypeString)
225
- if subType == nil then
226
- error("Failed to convert the entity sub-type to a number: " .. tostring(subType))
227
- end
223
+ assertDefined(
224
+ nil,
225
+ subType,
226
+ "Failed to convert the entity sub-type to a number: " .. tostring(subType)
227
+ )
228
228
  local isGridEntity = GRID_ENTITY_XML_TYPE_SET:has(entityTypeNumber)
229
229
  if isGridEntity then
230
230
  local gridEntityXMLType = entityTypeNumber
@@ -1 +1 @@
1
- {"version":3,"file":"ModdedElementSets.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/ModdedElementSets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAsCtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AA2BhD,qBAAa,iBAAkB,SAAQ,OAAO;IAC5C,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAyB;IAClE,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA8B;IAErE,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAAyB;IACtE,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAA8B;IAEzE,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAyB;IACrE,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAA8B;IAExE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAqB;IAC1D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA0B;IAE7D,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAqB;IAC9D,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA0B;IAEjE,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAqB;IAC7D,OAAO,CAAC,QAAQ,CAA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C1B,QAAQ;IAKX;;;;;;;;;OASG;IAEI,aAAa,CAClB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,UAAU,GAAE,QAAQ,EAAO,GAC1B,QAAQ;IAMX;;;;;;;;;;;;OAYG;IAEI,8BAA8B,CACnC,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,UAAU,GAAE,eAAe,EAAE,GAAG,SAAS,eAAe,EAAO,GAC9D,eAAe;IASlB;;;;;;;;;;;;OAYG;IAEI,+BAA+B,CACpC,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,UAAU,GAAE,eAAe,EAAE,GAAG,SAAS,eAAe,EAAO,GAC9D,eAAe;IASlB;;;;;;;;;;OAUG;IAEI,eAAe,IAAI,SAAS,WAAW,EAAE;IAKhD;;;;;;;;;;OAUG;IAEI,aAAa,IAAI,WAAW,CAAC,WAAW,CAAC;IAKhD;;;;;;;;OAQG;IAEI,wBAAwB,CAC7B,SAAS,EAAE,SAAS,GACnB,WAAW,CAAC,WAAW,CAAC;IAW3B;;;;;;;OAOG;IAEI,mBAAmB,IAAI,SAAS,QAAQ,EAAE;IAKjD;;;;;;;OAOG;IAEI,iBAAiB,IAAI,WAAW,CAAC,QAAQ,CAAC;IAKjD;;;;;;;OAOG;IAEI,0BAA0B,IAAI,SAAS,eAAe,EAAE;IAK/D;;;;;;;OAOG;IAEI,wBAAwB,IAAI,WAAW,CAAC,eAAe,CAAC;IAK/D;;;;;;;OAOG;IAEI,sBAAsB,IAAI,SAAS,WAAW,EAAE;IAKvD;;;;;;;OAOG;IAEI,oBAAoB,IAAI,WAAW,CAAC,WAAW,CAAC;CAIxD"}
@@ -51,6 +51,7 @@ local ____trinkets = require("src.functions.trinkets")
51
51
  local getVanillaTrinketTypeRange = ____trinkets.getVanillaTrinketTypeRange
52
52
  local trinketHasCacheFlag = ____trinkets.trinketHasCacheFlag
53
53
  local ____utils = require("src.functions.utils")
54
+ local assertDefined = ____utils.assertDefined
54
55
  local ____repeat = ____utils["repeat"]
55
56
  local ____itemConfigCardTypesForCardsSet = require("src.sets.itemConfigCardTypesForCardsSet")
56
57
  local ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET = ____itemConfigCardTypesForCardsSet.ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET
@@ -344,9 +345,11 @@ function ModdedElementSets.prototype.lazyInitCardTypes(self)
344
345
  local itemConfigCardType = getItemConfigCardType(nil, cardType)
345
346
  if itemConfigCardType ~= nil then
346
347
  local cardTypeSet = self.itemConfigCardTypeToCardTypeMap:get(itemConfigCardType)
347
- if cardTypeSet == nil then
348
- error("Failed to get the card set for item config card type: " .. tostring(itemConfigCardType))
349
- end
348
+ assertDefined(
349
+ nil,
350
+ cardTypeSet,
351
+ "Failed to get the card set for item config card type: " .. tostring(itemConfigCardType)
352
+ )
350
353
  cardTypeSet:add(cardType)
351
354
  if ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET:has(itemConfigCardType) then
352
355
  self.cardSet:add(cardType)
@@ -372,9 +375,11 @@ function ModdedElementSets.prototype.getCardTypesOfType(self, ...)
372
375
  local matchingCardTypes = __TS__New(Set)
373
376
  for ____, itemConfigCardType in ipairs(itemConfigCardTypes) do
374
377
  local cardTypeSet = self.itemConfigCardTypeToCardTypeMap:get(itemConfigCardType)
375
- if cardTypeSet == nil then
376
- error("Failed to get the card type set for item config type: " .. tostring(itemConfigCardType))
377
- end
378
+ assertDefined(
379
+ nil,
380
+ cardTypeSet,
381
+ "Failed to get the card type set for item config type: " .. tostring(itemConfigCardType)
382
+ )
378
383
  for ____, cardType in __TS__Iterator(cardTypeSet) do
379
384
  matchingCardTypes:add(cardType)
380
385
  end
@@ -394,9 +399,11 @@ end
394
399
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getCollectibleSet", true)
395
400
  function ModdedElementSets.prototype.getCollectiblesForTransformation(self, playerForm)
396
401
  local itemConfigTag = TRANSFORMATION_TO_TAG_MAP:get(playerForm)
397
- if itemConfigTag == nil then
398
- error(("Failed to get the collectible types for the transformation of " .. tostring(playerForm)) .. " because that transformation is not based on collectibles.")
399
- end
402
+ assertDefined(
403
+ nil,
404
+ itemConfigTag,
405
+ ("Failed to get the collectible types for the transformation of " .. tostring(playerForm)) .. " because that transformation is not based on collectibles."
406
+ )
400
407
  return self:getCollectiblesWithTag(itemConfigTag)
401
408
  end
402
409
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getCollectiblesForTransformation", true)
@@ -412,9 +419,11 @@ __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getCollectiblesWi
412
419
  function ModdedElementSets.prototype.getCollectiblesWithTag(self, itemConfigTag)
413
420
  self:lazyInitTagToCollectibleTypesMap()
414
421
  local collectibleTypes = self.tagToCollectibleTypesMap:get(itemConfigTag)
415
- if collectibleTypes == nil then
416
- error(("The item config tag of " .. tostring(itemConfigTag)) .. " is not a valid value of the \"ItemConfigTag\" enum.")
417
- end
422
+ assertDefined(
423
+ nil,
424
+ collectibleTypes,
425
+ ("The item config tag of " .. tostring(itemConfigTag)) .. " is not a valid value of the \"ItemConfigTag\" enum."
426
+ )
418
427
  return collectibleTypes
419
428
  end
420
429
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getCollectiblesWithTag", true)
@@ -1 +1 @@
1
- {"version":3,"file":"Pause.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/Pause.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAoBhD,qBAAa,KAAM,SAAQ,OAAO;IAIhC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAsB9C,OAAO,CAAC,QAAQ,CAAC,UAAU,CASzB;IAEF,OAAO,CAAC,iCAAiC;IA0BzC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAiBxC;IAGK,QAAQ,IAAI,OAAO;IAI1B;;;;;;;;;;OAUG;IAEI,KAAK,IAAI,IAAI;IAwDpB;;;;OAIG;IAEI,OAAO,IAAI,IAAI;CA4BvB"}
1
+ {"version":3,"file":"Pause.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/Pause.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAoBhD,qBAAa,KAAM,SAAQ,OAAO;IAIhC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAsB9C,OAAO,CAAC,QAAQ,CAAC,UAAU,CASzB;IAEF,OAAO,CAAC,iCAAiC;IA0BzC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAiBxC;IAGK,QAAQ,IAAI,OAAO;IAI1B;;;;;;;;;;OAUG;IAEI,KAAK,IAAI,IAAI;IAyDpB;;;;OAIG;IAEI,OAAO,IAAI,IAAI;CA6BvB"}
@@ -32,6 +32,8 @@ local ____players = require("src.functions.players")
32
32
  local useActiveItemTemp = ____players.useActiveItemTemp
33
33
  local ____tstlClass = require("src.functions.tstlClass")
34
34
  local getTSTLClassName = ____tstlClass.getTSTLClassName
35
+ local ____utils = require("src.functions.utils")
36
+ local assertDefined = ____utils.assertDefined
35
37
  local ____ReadonlySet = require("src.types.ReadonlySet")
36
38
  local ReadonlySet = ____ReadonlySet.ReadonlySet
37
39
  local ____Feature = require("src.classes.private.Feature")
@@ -129,9 +131,7 @@ function Pause.prototype.pause(self)
129
131
  local firstPlayer = Isaac.GetPlayer()
130
132
  useActiveItemTemp(nil, firstPlayer, CollectibleType.PAUSE)
131
133
  local tstlClassName = getTSTLClassName(nil, self)
132
- if tstlClassName == nil then
133
- error("Failed to get the class name for the pause feature.")
134
- end
134
+ assertDefined(nil, tstlClassName, "Failed to get the class name for the pause feature.")
135
135
  local whitelist = __TS__New(ReadonlySet, {ButtonAction.MENU_CONFIRM, ButtonAction.CONSOLE})
136
136
  self.disableInputs:disableAllInputsExceptFor(tstlClassName, whitelist)
137
137
  for ____, player in ipairs(getAllPlayers(nil)) do
@@ -149,9 +149,7 @@ function Pause.prototype.unpause(self)
149
149
  v.run.isPseudoPaused = false
150
150
  v.run.shouldUnpause = true
151
151
  local tstlClassName = getTSTLClassName(nil, self)
152
- if tstlClassName == nil then
153
- error("Failed to find get the class name for the pause feature.")
154
- end
152
+ assertDefined(nil, tstlClassName, "Failed to find get the class name for the pause feature.")
155
153
  self.disableInputs:enableAllInputs(tstlClassName)
156
154
  for ____, player in ipairs(getAllPlayers(nil)) do
157
155
  player.ControlsEnabled = true
@@ -1 +1 @@
1
- {"version":3,"file":"SaveDataManager.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/SaveDataManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAOzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAsBhD,qBAAa,eAAgB,SAAQ,OAAO;IAC1C;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;IAE1B;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAkC;IAE9D;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAkC;IAEtE;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAGvC;IAEJ;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAkC;IAE9E;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAkC;IAGpE,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,qCAAqC,CAAS;IAmCtD,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAU1C;IAGF,OAAO,CAAC,QAAQ,CAAC,cAAc,CA0B7B;IAGF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAa1B;IAGF,OAAO,CAAC,QAAQ,CAAC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ACX,eAAe,EAAE,KAAK,GACrB,IAAI;IA4DP;;OAEG;IACH,OAAO,CAAC,gCAAgC;IAgBxC;;;;;;;;;OASG;IAEI,mBAAmB,IAAI,IAAI;IAIlC;;;;;;OAMG;IAEI,mBAAmB,IAAI,IAAI;IAIlC;;;;;;;OAOG;IAEI,wBAAwB,IAAI,IAAI;IAIvC;;;;;;;;;;;OAWG;IAEI,4BAA4B,CAAC,GAAG,WAAW,EAAE,QAAQ,EAAE,GAAG,IAAI;IAarE;;;;;OAKG;IAEI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAoB/C;;;;;;;;;;;;;;;;;;;;;OAqBG;IAEI,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,GAAG,IAAI;IAqB3E;;;;;;;;;;;;OAYG;IAEI,qBAAqB,IAAI,OAAO;IAKhC,6BAA6B,IAAI,IAAI;CAQ7C"}
@@ -32,6 +32,8 @@ local isTSTLClass = ____tstlClass.isTSTLClass
32
32
  local ____types = require("src.functions.types")
33
33
  local isString = ____types.isString
34
34
  local isTable = ____types.isTable
35
+ local ____utils = require("src.functions.utils")
36
+ local assertDefined = ____utils.assertDefined
35
37
  local ____ReadonlySet = require("src.types.ReadonlySet")
36
38
  local ReadonlySet = ____ReadonlySet.ReadonlySet
37
39
  local ____Feature = require("src.classes.private.Feature")
@@ -110,9 +112,7 @@ end
110
112
  function SaveDataManager.prototype.saveDataManager(self, key, v, conditionalFunc)
111
113
  if isTSTLClass(nil, key) then
112
114
  local className = getTSTLClassName(nil, key)
113
- if className == nil then
114
- error("Failed to get the class name for the submitted class (as part of the \"key\" parameter) when registering new data with the save data manager.")
115
- end
115
+ assertDefined(nil, className, "Failed to get the class name for the submitted class (as part of the \"key\" parameter) when registering new data with the save data manager.")
116
116
  key = className
117
117
  end
118
118
  if not isString(nil, key) then
@@ -164,9 +164,7 @@ function SaveDataManager.prototype.saveDataManagerRegisterClass(self, ...)
164
164
  local tstlClasses = {...}
165
165
  for ____, tstlClass in ipairs(tstlClasses) do
166
166
  local name = tstlClass.name
167
- if name == nil then
168
- error("Failed to register a class with the save data manager due to not being able to derive the name of the class.")
169
- end
167
+ assertDefined(nil, name, "Failed to register a class with the save data manager due to not being able to derive the name of the class.")
170
168
  self.classConstructors[name] = tstlClass
171
169
  end
172
170
  end
@@ -189,9 +187,7 @@ function SaveDataManager.prototype.saveDataManagerReset(self, key, childObjectKe
189
187
  error("The save data manager requires that keys are strings. You tried to use a key of type: " .. __TS__TypeOf(key))
190
188
  end
191
189
  local saveData = self.saveDataMap[key]
192
- if saveData == nil then
193
- error("The save data manager is not managing save data for a key of: " .. key)
194
- end
190
+ assertDefined(nil, saveData, "The save data manager is not managing save data for a key of: " .. key)
195
191
  restoreDefaultForFeatureKey(
196
192
  nil,
197
193
  self.saveDataDefaultsMap,