isaacscript-common 7.4.3 → 7.5.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 (118) hide show
  1. package/dist/callbacks/postGridEntity.d.ts.map +1 -1
  2. package/dist/callbacks/postGridEntity.lua +53 -6
  3. package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -1
  4. package/dist/callbacks/postPlayerChangeStat.lua +9 -2
  5. package/dist/callbacks/subscriptions/postGridEntityCustomBroken.d.ts +1 -0
  6. package/dist/callbacks/subscriptions/postGridEntityCustomBroken.d.ts.map +1 -1
  7. package/dist/callbacks/subscriptions/postGridEntityCustomBroken.lua +5 -2
  8. package/dist/callbacks/subscriptions/postGridEntityCustomInit.d.ts +9 -0
  9. package/dist/callbacks/subscriptions/postGridEntityCustomInit.d.ts.map +1 -0
  10. package/dist/callbacks/subscriptions/postGridEntityCustomInit.lua +23 -0
  11. package/dist/callbacks/subscriptions/postGridEntityCustomRemove.d.ts +9 -0
  12. package/dist/callbacks/subscriptions/postGridEntityCustomRemove.d.ts.map +1 -0
  13. package/dist/callbacks/subscriptions/postGridEntityCustomRemove.lua +23 -0
  14. package/dist/callbacks/subscriptions/postGridEntityCustomStateChanged.d.ts +9 -0
  15. package/dist/callbacks/subscriptions/postGridEntityCustomStateChanged.d.ts.map +1 -0
  16. package/dist/callbacks/subscriptions/postGridEntityCustomStateChanged.lua +29 -0
  17. package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts +3 -2
  18. package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts.map +1 -1
  19. package/dist/enums/ModCallbackCustom.d.ts +131 -81
  20. package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
  21. package/dist/enums/ModCallbackCustom.lua +67 -61
  22. package/dist/enums/StatType.d.ts +3 -1
  23. package/dist/enums/StatType.d.ts.map +1 -1
  24. package/dist/enums/StatType.lua +2 -0
  25. package/dist/features/customGridEntity.d.ts +30 -13
  26. package/dist/features/customGridEntity.d.ts.map +1 -1
  27. package/dist/features/customGridEntity.lua +67 -48
  28. package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
  29. package/dist/features/customStage/customStageGridEntities.lua +37 -31
  30. package/dist/functions/dev.d.ts +20 -0
  31. package/dist/functions/dev.d.ts.map +1 -0
  32. package/dist/functions/dev.lua +34 -0
  33. package/dist/functions/playerStats.d.ts.map +1 -1
  34. package/dist/functions/playerStats.lua +2 -1
  35. package/dist/functions/rooms.d.ts +5 -0
  36. package/dist/functions/rooms.d.ts.map +1 -1
  37. package/dist/functions/rooms.lua +12 -2
  38. package/dist/index.d.ts +204 -96
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.lua +1134 -8
  41. package/dist/interfaces/StatTypeType.d.ts +1 -0
  42. package/dist/interfaces/StatTypeType.d.ts.map +1 -1
  43. package/dist/interfaces/private/AddCallbackParameterCustom.d.ts +6 -0
  44. package/dist/interfaces/private/AddCallbackParameterCustom.d.ts.map +1 -1
  45. package/dist/objects/callbackRegisterFunctions.d.ts.map +1 -1
  46. package/dist/objects/callbackRegisterFunctions.lua +9 -0
  47. package/dist/types/PossibleStatType.d.ts +7 -0
  48. package/dist/types/PossibleStatType.d.ts.map +1 -0
  49. package/dist/{interfaces/index.lua → types/PossibleStatType.lua} +0 -0
  50. package/package.json +1 -1
  51. package/src/callbacks/postGridEntity.ts +75 -10
  52. package/src/callbacks/postPlayerChangeStat.ts +8 -4
  53. package/src/callbacks/subscriptions/postGridEntityCustomBroken.ts +4 -0
  54. package/src/callbacks/subscriptions/postGridEntityCustomInit.ts +38 -0
  55. package/src/callbacks/subscriptions/postGridEntityCustomRemove.ts +35 -0
  56. package/src/callbacks/subscriptions/postGridEntityCustomStateChanged.ts +42 -0
  57. package/src/callbacks/subscriptions/postPlayerChangeStat.ts +4 -7
  58. package/src/enums/ModCallbackCustom.ts +73 -20
  59. package/src/enums/StatType.ts +3 -3
  60. package/src/features/customGridEntity.ts +87 -61
  61. package/src/features/customStage/customStageGridEntities.ts +16 -7
  62. package/src/functions/dev.ts +31 -0
  63. package/src/functions/playerStats.ts +1 -0
  64. package/src/functions/rooms.ts +18 -0
  65. package/src/index.ts +208 -9
  66. package/src/interfaces/StatTypeType.ts +1 -0
  67. package/src/interfaces/private/AddCallbackParameterCustom.ts +6 -0
  68. package/src/objects/callbackRegisterFunctions.ts +9 -0
  69. package/src/types/PossibleStatType.ts +12 -0
  70. package/dist/classes/index.d.ts +0 -3
  71. package/dist/classes/index.d.ts.map +0 -1
  72. package/dist/classes/index.lua +0 -18
  73. package/dist/core/index.d.ts +0 -5
  74. package/dist/core/index.d.ts.map +0 -1
  75. package/dist/core/index.lua +0 -34
  76. package/dist/enums/DecorationVariant.d.ts +0 -10
  77. package/dist/enums/DecorationVariant.d.ts.map +0 -1
  78. package/dist/enums/DecorationVariant.lua +0 -7
  79. package/dist/enums/index.d.ts +0 -11
  80. package/dist/enums/index.d.ts.map +0 -1
  81. package/dist/enums/index.lua +0 -82
  82. package/dist/features/index.d.ts +0 -30
  83. package/dist/features/index.d.ts.map +0 -1
  84. package/dist/features/index.lua +0 -216
  85. package/dist/functions/index.d.ts +0 -100
  86. package/dist/functions/index.d.ts.map +0 -1
  87. package/dist/functions/index.lua +0 -794
  88. package/dist/interfaces/index.d.ts +0 -12
  89. package/dist/interfaces/index.d.ts.map +0 -1
  90. package/dist/maps/index.d.ts +0 -5
  91. package/dist/maps/index.d.ts.map +0 -1
  92. package/dist/maps/index.lua +0 -34
  93. package/dist/objects/index.d.ts +0 -2
  94. package/dist/objects/index.d.ts.map +0 -1
  95. package/dist/objects/index.lua +0 -10
  96. package/dist/types/index.d.ts +0 -11
  97. package/dist/types/index.d.ts.map +0 -1
  98. package/dist/types/index.lua +0 -10
  99. package/src/classes/index.ts +0 -2
  100. package/src/classes/indexTypeDoc.ts +0 -2
  101. package/src/core/index.ts +0 -4
  102. package/src/core/indexTypeDoc.ts +0 -4
  103. package/src/enums/DecorationVariant.ts +0 -10
  104. package/src/enums/index.ts +0 -10
  105. package/src/enums/indexTypeDoc.ts +0 -10
  106. package/src/features/index.ts +0 -59
  107. package/src/features/indexTypeDoc.ts +0 -30
  108. package/src/functions/index.ts +0 -101
  109. package/src/functions/indexTypeDoc.ts +0 -101
  110. package/src/indexTypeDoc.ts +0 -13
  111. package/src/interfaces/index.ts +0 -11
  112. package/src/interfaces/indexTypeDoc.ts +0 -11
  113. package/src/maps/index.ts +0 -4
  114. package/src/maps/indexTypeDoc.ts +0 -4
  115. package/src/objects/index.ts +0 -1
  116. package/src/objects/indexTypeDoc.ts +0 -1
  117. package/src/types/index.ts +0 -10
  118. package/src/types/indexTypeDoc.ts +0 -10
@@ -7,8 +7,6 @@ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
7
7
  local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
8
8
  local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
9
9
  local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
10
- local ____DecorationVariant = require("enums.DecorationVariant")
11
- local DecorationVariant = ____DecorationVariant.DecorationVariant
12
10
  local ____entities = require("functions.entities")
13
11
  local removeEntities = ____entities.removeEntities
14
12
  local ____entitiesSpecific = require("functions.entitiesSpecific")
@@ -21,10 +19,10 @@ local getCollectibles = ____pickupsSpecific.getCollectibles
21
19
  local getTrinkets = ____pickupsSpecific.getTrinkets
22
20
  local ____stage = require("functions.stage")
23
21
  local calculateStageType = ____stage.calculateStageType
24
- local ____types = require("functions.types")
25
- local asNumber = ____types.asNumber
26
22
  local ____vector = require("functions.vector")
27
23
  local vectorEquals = ____vector.vectorEquals
24
+ local ____customGridEntity = require("features.customGridEntity")
25
+ local isCustomGridEntity = ____customGridEntity.isCustomGridEntity
28
26
  local ____exports = require("features.customTrapdoor.exports")
29
27
  local spawnCustomTrapdoor = ____exports.spawnCustomTrapdoor
30
28
  local ____exports = require("features.customStage.exports")
@@ -33,9 +31,9 @@ local ____v = require("features.customStage.v")
33
31
  local v = ____v.default
34
32
  function getNewDoorPNGPath(self, customStage, fileName)
35
33
  repeat
36
- local ____switch21 = fileName
37
- local ____cond21 = ____switch21 == "gfx/grid/door_01_normaldoor.anm2"
38
- if ____cond21 then
34
+ local ____switch24 = fileName
35
+ local ____cond24 = ____switch24 == "gfx/grid/door_01_normaldoor.anm2"
36
+ if ____cond24 then
39
37
  do
40
38
  local ____customStage_doorPNGPaths_normal_0 = customStage.doorPNGPaths
41
39
  if ____customStage_doorPNGPaths_normal_0 ~= nil then
@@ -44,8 +42,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
44
42
  return ____customStage_doorPNGPaths_normal_0
45
43
  end
46
44
  end
47
- ____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_02_treasureroomdoor.anm2"
48
- if ____cond21 then
45
+ ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_02_treasureroomdoor.anm2"
46
+ if ____cond24 then
49
47
  do
50
48
  local ____customStage_doorPNGPaths_treasureRoom_2 = customStage.doorPNGPaths
51
49
  if ____customStage_doorPNGPaths_treasureRoom_2 ~= nil then
@@ -54,8 +52,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
54
52
  return ____customStage_doorPNGPaths_treasureRoom_2
55
53
  end
56
54
  end
57
- ____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_03_ambushroomdoor.anm2"
58
- if ____cond21 then
55
+ ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_03_ambushroomdoor.anm2"
56
+ if ____cond24 then
59
57
  do
60
58
  local ____customStage_doorPNGPaths_normalChallengeRoom_4 = customStage.doorPNGPaths
61
59
  if ____customStage_doorPNGPaths_normalChallengeRoom_4 ~= nil then
@@ -64,8 +62,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
64
62
  return ____customStage_doorPNGPaths_normalChallengeRoom_4
65
63
  end
66
64
  end
67
- ____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_04_selfsacrificeroomdoor.anm2"
68
- if ____cond21 then
65
+ ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_04_selfsacrificeroomdoor.anm2"
66
+ if ____cond24 then
69
67
  do
70
68
  local ____customStage_doorPNGPaths_curseRoom_6 = customStage.doorPNGPaths
71
69
  if ____customStage_doorPNGPaths_curseRoom_6 ~= nil then
@@ -74,8 +72,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
74
72
  return ____customStage_doorPNGPaths_curseRoom_6
75
73
  end
76
74
  end
77
- ____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_05_arcaderoomdoor.anm2"
78
- if ____cond21 then
75
+ ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_05_arcaderoomdoor.anm2"
76
+ if ____cond24 then
79
77
  do
80
78
  local ____customStage_doorPNGPaths_arcade_8 = customStage.doorPNGPaths
81
79
  if ____customStage_doorPNGPaths_arcade_8 ~= nil then
@@ -84,8 +82,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
84
82
  return ____customStage_doorPNGPaths_arcade_8
85
83
  end
86
84
  end
87
- ____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_07_devilroomdoor.anm2"
88
- if ____cond21 then
85
+ ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_07_devilroomdoor.anm2"
86
+ if ____cond24 then
89
87
  do
90
88
  local ____customStage_doorPNGPaths_devilRoom_10 = customStage.doorPNGPaths
91
89
  if ____customStage_doorPNGPaths_devilRoom_10 ~= nil then
@@ -94,8 +92,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
94
92
  return ____customStage_doorPNGPaths_devilRoom_10
95
93
  end
96
94
  end
97
- ____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_07_holyroomdoor.anm2"
98
- if ____cond21 then
95
+ ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_07_holyroomdoor.anm2"
96
+ if ____cond24 then
99
97
  do
100
98
  local ____customStage_doorPNGPaths_angelRoom_12 = customStage.doorPNGPaths
101
99
  if ____customStage_doorPNGPaths_angelRoom_12 ~= nil then
@@ -104,8 +102,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
104
102
  return ____customStage_doorPNGPaths_angelRoom_12
105
103
  end
106
104
  end
107
- ____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_08_holeinwall.anm2"
108
- if ____cond21 then
105
+ ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_08_holeinwall.anm2"
106
+ if ____cond24 then
109
107
  do
110
108
  local ____customStage_doorPNGPaths_secretRoom_14 = customStage.doorPNGPaths
111
109
  if ____customStage_doorPNGPaths_secretRoom_14 ~= nil then
@@ -114,8 +112,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
114
112
  return ____customStage_doorPNGPaths_secretRoom_14
115
113
  end
116
114
  end
117
- ____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_09_bossambushroomdoor.anm2"
118
- if ____cond21 then
115
+ ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_09_bossambushroomdoor.anm2"
116
+ if ____cond24 then
119
117
  do
120
118
  local ____customStage_doorPNGPaths_bossChallengeRoom_16 = customStage.doorPNGPaths
121
119
  if ____customStage_doorPNGPaths_bossChallengeRoom_16 ~= nil then
@@ -124,8 +122,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
124
122
  return ____customStage_doorPNGPaths_bossChallengeRoom_16
125
123
  end
126
124
  end
127
- ____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_10_bossroomdoor.anm2"
128
- if ____cond21 then
125
+ ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_10_bossroomdoor.anm2"
126
+ if ____cond24 then
129
127
  do
130
128
  local ____customStage_doorPNGPaths_bossRoom_18 = customStage.doorPNGPaths
131
129
  if ____customStage_doorPNGPaths_bossRoom_18 ~= nil then
@@ -134,8 +132,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
134
132
  return ____customStage_doorPNGPaths_bossRoom_18
135
133
  end
136
134
  end
137
- ____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_15_bossrushdoor.anm2"
138
- if ____cond21 then
135
+ ____cond24 = ____cond24 or ____switch24 == "gfx/grid/door_15_bossrushdoor.anm2"
136
+ if ____cond24 then
139
137
  do
140
138
  local ____customStage_doorPNGPaths_bossRush_20 = customStage.doorPNGPaths
141
139
  if ____customStage_doorPNGPaths_bossRush_20 ~= nil then
@@ -159,12 +157,11 @@ function ____exports.setCustomDecorationGraphics(self, customStage, gridEntity)
159
157
  if customStage.decorationsPNGPath == nil then
160
158
  return
161
159
  end
162
- local gridEntityType = gridEntity:GetType()
163
- if gridEntityType ~= GridEntityType.DECORATION then
160
+ if isCustomGridEntity(nil, gridEntity) then
164
161
  return
165
162
  end
166
- local variant = gridEntity:GetVariant()
167
- if variant ~= asNumber(nil, DecorationVariant.VANILLA_DECORATION) then
163
+ local gridEntityType = gridEntity:GetType()
164
+ if gridEntityType ~= GridEntityType.DECORATION then
168
165
  return
169
166
  end
170
167
  local sprite = gridEntity:GetSprite()
@@ -179,6 +176,9 @@ function ____exports.setCustomRockGraphics(self, customStage, gridEntity)
179
176
  if customStage.rocksPNGPath == nil then
180
177
  return
181
178
  end
179
+ if isCustomGridEntity(nil, gridEntity) then
180
+ return
181
+ end
182
182
  local gridEntityRock = gridEntity:ToRock()
183
183
  if gridEntityRock == nil then
184
184
  return
@@ -198,6 +198,9 @@ function ____exports.setCustomPitGraphics(self, customStage, gridEntity)
198
198
  if customStage.pitsPNGPath == nil then
199
199
  return
200
200
  end
201
+ if isCustomGridEntity(nil, gridEntity) then
202
+ return
203
+ end
201
204
  local gridEntityPit = gridEntity:ToPit()
202
205
  if gridEntityPit == nil then
203
206
  return
@@ -214,6 +217,9 @@ function ____exports.setCustomDoorGraphics(self, customStage, gridEntity)
214
217
  if customStage.doorPNGPaths == nil then
215
218
  return
216
219
  end
220
+ if isCustomGridEntity(nil, gridEntity) then
221
+ return
222
+ end
217
223
  local gridEntityDoor = gridEntity:ToDoor()
218
224
  if gridEntityDoor == nil then
219
225
  return
@@ -0,0 +1,20 @@
1
+ import { ModUpgraded } from "../classes/ModUpgraded";
2
+ /**
3
+ * Helper function to enable some IsaacScript features that are useful when developing a mod. They
4
+ * shouldn't be enabled when your mod goes to production (i.e. it is uploaded to the Steam
5
+ * Workshop).
6
+ *
7
+ * The list of development features that are enabled are as follows:
8
+ *
9
+ * - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
10
+ * global variables so you can access them from the in-game console.
11
+ * - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
12
+ * from the in-game console.
13
+ * - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
14
+ * around easier (like e.g. `angel` to warp to the Angel Room).
15
+ * - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
16
+ * - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
17
+ * can immediately start playing or testing.
18
+ */
19
+ export declare function enableDevFeatures(mod: ModUpgraded): void;
20
+ //# sourceMappingURL=dev.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/functions/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAOrD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAMxD"}
@@ -0,0 +1,34 @@
1
+ local ____exports = {}
2
+ local ____exports = require("features.extraConsoleCommands.exports")
3
+ local enableExtraConsoleCommands = ____exports.enableExtraConsoleCommands
4
+ local ____fadeInRemover = require("features.fadeInRemover")
5
+ local removeFadeIn = ____fadeInRemover.removeFadeIn
6
+ local ____fastReset = require("features.fastReset")
7
+ local enableFastReset = ____fastReset.enableFastReset
8
+ local ____exports = require("features.saveDataManager.exports")
9
+ local saveDataManagerSetGlobal = ____exports.saveDataManagerSetGlobal
10
+ local ____log = require("functions.log")
11
+ local setLogFunctionsGlobal = ____log.setLogFunctionsGlobal
12
+ --- Helper function to enable some IsaacScript features that are useful when developing a mod. They
13
+ -- shouldn't be enabled when your mod goes to production (i.e. it is uploaded to the Steam
14
+ -- Workshop).
15
+ --
16
+ -- The list of development features that are enabled are as follows:
17
+ --
18
+ -- - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
19
+ -- global variables so you can access them from the in-game console.
20
+ -- - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
21
+ -- from the in-game console.
22
+ -- - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
23
+ -- around easier (like e.g. `angel` to warp to the Angel Room).
24
+ -- - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
25
+ -- - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
26
+ -- can immediately start playing or testing.
27
+ function ____exports.enableDevFeatures(self, mod)
28
+ saveDataManagerSetGlobal(nil)
29
+ setLogFunctionsGlobal(nil)
30
+ enableExtraConsoleCommands(nil, mod)
31
+ enableFastReset(nil)
32
+ removeFadeIn(nil)
33
+ end
34
+ return ____exports
@@ -1 +1 @@
1
- {"version":3,"file":"playerStats.d.ts","sourceRoot":"","sources":["../../src/functions/playerStats.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,CAAC,SAAS,QAAQ,EAC9C,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,GACV,YAAY,CAAC,CAAC,CAAC,CAiBjB"}
1
+ {"version":3,"file":"playerStats.d.ts","sourceRoot":"","sources":["../../src/functions/playerStats.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,CAAC,SAAS,QAAQ,EAC9C,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,GACV,YAAY,CAAC,CAAC,CAAC,CAkBjB"}
@@ -15,7 +15,8 @@ function ____exports.getPlayerStat(self, player, statType)
15
15
  [StatType.TEAR_FLAG] = player.TearFlags,
16
16
  [StatType.TEAR_COLOR] = player.TearColor,
17
17
  [StatType.FLYING] = player.CanFly,
18
- [StatType.LUCK] = player.Luck
18
+ [StatType.LUCK] = player.Luck,
19
+ [StatType.SIZE] = player.SpriteScale
19
20
  })[statType]
20
21
  end
21
22
  return ____exports
@@ -138,6 +138,11 @@ export declare function inMineShaft(): boolean;
138
138
  * will only work for mini-bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
139
139
  */
140
140
  export declare function inMinibossRoomOf(minibossID: MinibossID): boolean;
141
+ /**
142
+ * Helper function to check if the current room is a "mirror room" in Downpour or Dross. (These
143
+ * rooms are marked with a specific sub-type.)
144
+ */
145
+ export declare function inMirrorRoom(): boolean;
141
146
  /**
142
147
  * Helper function for checking if the room is a secret shop (from the Member Card collectible).
143
148
  *
@@ -1 +1 @@
1
- {"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,MAAM,EACN,SAAS,EAKT,YAAY,EACZ,UAAU,EAGV,QAAQ,EAGT,MAAM,8BAA8B,CAAC;AAkCtC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAenD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAGjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAiBlE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,GAAG,EAChB,oBAAoB,UAAO,GAC1B,QAAQ,CAAC,UAAU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AI,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
@@ -15,6 +15,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
15
15
  local AngelRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.AngelRoomSubType
16
16
  local Dimension = ____isaac_2Dtypescript_2Ddefinitions.Dimension
17
17
  local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
18
+ local DownpourRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.DownpourRoomSubType
18
19
  local DungeonSubType = ____isaac_2Dtypescript_2Ddefinitions.DungeonSubType
19
20
  local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
20
21
  local HomeRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.HomeRoomSubType
@@ -324,6 +325,15 @@ function ____exports.inMinibossRoomOf(self, minibossID)
324
325
  local roomSubType = getRoomSubType(nil)
325
326
  return roomType == RoomType.MINI_BOSS and roomStageID == StageID.SPECIAL_ROOMS and roomSubType == asNumber(nil, minibossID)
326
327
  end
328
+ --- Helper function to check if the current room is a "mirror room" in Downpour or Dross. (These
329
+ -- rooms are marked with a specific sub-type.)
330
+ function ____exports.inMirrorRoom(self)
331
+ local room = game:GetRoom()
332
+ local roomType = room:GetType()
333
+ local roomStageID = getRoomStageID(nil)
334
+ local roomSubType = getRoomSubType(nil)
335
+ return roomType == RoomType.DEFAULT and (roomStageID == StageID.DOWNPOUR or roomStageID == StageID.DROSS) and roomSubType == asNumber(nil, DownpourRoomSubType.MIRROR)
336
+ end
327
337
  --- Helper function for checking if the room is a secret shop (from the Member Card collectible).
328
338
  --
329
339
  -- Secret shops are simply copies of normal shops, but with the backdrop of a secret room. In other
@@ -398,12 +408,12 @@ function ____exports.setRoomCleared(self)
398
408
  for ____, door in ipairs(getDoors(nil)) do
399
409
  do
400
410
  if isHiddenSecretRoomDoor(nil, door) then
401
- goto __continue48
411
+ goto __continue49
402
412
  end
403
413
  openDoorFast(nil, door)
404
414
  door.ExtraVisible = false
405
415
  end
406
- ::__continue48::
416
+ ::__continue49::
407
417
  end
408
418
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
409
419
  game:ShakeScreen(0)