isaacscript-common 1.0.573 → 1.0.577
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/callbacks/itemPickup.lua +2 -6
- package/dist/callbacks/postBombInitLate.lua +1 -5
- package/dist/callbacks/postCursedTeleport.lua +8 -10
- package/dist/callbacks/postEffectInitLate.lua +1 -5
- package/dist/callbacks/postEsauJr.lua +2 -4
- package/dist/callbacks/postFamiliarInitLate.lua +1 -5
- package/dist/callbacks/postFlip.lua +2 -4
- package/dist/callbacks/postGridEntity.lua +8 -20
- package/dist/callbacks/postKnifeInitLate.lua +1 -5
- package/dist/callbacks/postLaserInitLate.lua +1 -5
- package/dist/callbacks/postNPCInitLate.lua +1 -5
- package/dist/callbacks/postPickupCollect.lua +1 -5
- package/dist/callbacks/postPickupInitLate.lua +1 -5
- package/dist/callbacks/postPlayerChangeHealth.lua +19 -23
- package/dist/callbacks/postPlayerChangeType.lua +1 -5
- package/dist/callbacks/postPlayerFatalDamage.lua +5 -9
- package/dist/callbacks/postPlayerInitLate.lua +1 -5
- package/dist/callbacks/postPlayerReordered.lua +8 -2
- package/dist/callbacks/postProjectileInitLate.lua +1 -5
- package/dist/callbacks/postPurchase.lua +19 -19
- package/dist/callbacks/postSacrifice.lua +3 -3
- package/dist/callbacks/postSlotInitUpdate.lua +3 -11
- package/dist/callbacks/postSlotRenderBroken.lua +2 -8
- package/dist/callbacks/postTearInitLate.lua +1 -5
- package/dist/callbacks/postTearInitVeryLate.lua +1 -5
- package/dist/callbacks/postTransformation.lua +1 -5
- package/dist/callbacks/postTrinketBreak.lua +5 -9
- package/dist/callbacks/preNewLevel.lua +1 -1
- package/dist/callbacks/reorderedCallbacks.lua +4 -4
- package/dist/callbacks/subscriptions/PreNewLevel.lua +1 -2
- package/dist/callbacks/subscriptions/postBombInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postCursedTeleport.lua +1 -2
- package/dist/callbacks/subscriptions/postCustomRevive.lua +3 -5
- package/dist/callbacks/subscriptions/postEffectInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postEsauJr.lua +1 -2
- package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postFirstEsauJr.lua +1 -2
- package/dist/callbacks/subscriptions/postFirstFlip.lua +1 -2
- package/dist/callbacks/subscriptions/postFlip.lua +1 -2
- package/dist/callbacks/subscriptions/postGameStartedReordered.lua +1 -2
- package/dist/callbacks/subscriptions/postGridEntityInit.lua +3 -5
- package/dist/callbacks/subscriptions/postGridEntityRemove.lua +3 -5
- package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +3 -5
- package/dist/callbacks/subscriptions/postItemPickup.lua +5 -8
- package/dist/callbacks/subscriptions/postKnifeInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postLaserInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postNPCInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postNewLevelReordered.lua +1 -2
- package/dist/callbacks/subscriptions/postNewRoomEarly.lua +1 -2
- package/dist/callbacks/subscriptions/postNewRoomReordered.lua +1 -2
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.lua +3 -5
- package/dist/callbacks/subscriptions/postPickupCollect.lua +3 -5
- package/dist/callbacks/subscriptions/postPickupInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerChangeType.lua +1 -2
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +3 -5
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +3 -5
- package/dist/callbacks/subscriptions/postProjectileInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postPurchase.lua +8 -3
- package/dist/callbacks/subscriptions/postSacrifice.lua +1 -2
- package/dist/callbacks/subscriptions/postSlotDestroyed.lua +3 -5
- package/dist/callbacks/subscriptions/postSlotInit.lua +3 -5
- package/dist/callbacks/subscriptions/postSlotRender.lua +3 -5
- package/dist/callbacks/subscriptions/postSlotUpdate.lua +3 -5
- package/dist/callbacks/subscriptions/postTearInitLate.lua +3 -5
- package/dist/callbacks/subscriptions/postTearInitVeryLate.lua +3 -5
- package/dist/callbacks/subscriptions/postTransformation.lua +3 -5
- package/dist/callbacks/subscriptions/postTrinketBreak.lua +3 -5
- package/dist/callbacks/subscriptions/preCustomRevive.lua +1 -2
- package/dist/callbacks/subscriptions/preItemPickup.lua +5 -8
- package/dist/constants.lua +57 -6
- package/dist/features/deployJSONRoom.lua +95 -68
- package/dist/features/disableInputs.lua +9 -3
- package/dist/features/forgottenSwitch.lua +1 -1
- package/dist/features/getCollectibleItemPoolType.lua +4 -10
- package/dist/features/preventCollectibleRotate.lua +3 -9
- package/dist/features/saveDataManager/load.lua +2 -6
- package/dist/features/saveDataManager/main.lua +1 -1
- package/dist/features/saveDataManager/merge.lua +2 -4
- package/dist/features/sirenHelpers.lua +5 -7
- package/dist/functions/array.lua +6 -10
- package/dist/functions/bitwise.lua +1 -1
- package/dist/functions/challenges.lua +1 -1
- package/dist/functions/charge.lua +10 -12
- package/dist/functions/collectibles.lua +18 -23
- package/dist/functions/color.lua +9 -1
- package/dist/functions/deepCopy.lua +46 -28
- package/dist/functions/deepCopyTests.lua +12 -20
- package/dist/functions/doors.d.ts +10 -0
- package/dist/functions/doors.lua +19 -21
- package/dist/functions/entity.lua +8 -2
- package/dist/functions/flag.lua +1 -1
- package/dist/functions/gridEntity.lua +14 -9
- package/dist/functions/input.lua +17 -27
- package/dist/functions/jsonRoom.lua +3 -9
- package/dist/functions/language.lua +9 -1
- package/dist/functions/log.lua +33 -85
- package/dist/functions/math.lua +15 -17
- package/dist/functions/npc.lua +15 -17
- package/dist/functions/pickups.lua +14 -1
- package/dist/functions/player.lua +38 -60
- package/dist/functions/playerHealth.lua +19 -9
- package/dist/functions/pocketItems.lua +4 -4
- package/dist/functions/random.lua +2 -2
- package/dist/functions/revive.lua +4 -4
- package/dist/functions/rooms.d.ts +1 -1
- package/dist/functions/rooms.lua +42 -41
- package/dist/functions/spawnCollectible.lua +10 -2
- package/dist/functions/sprite.lua +2 -2
- package/dist/functions/stage.lua +11 -11
- package/dist/functions/tears.lua +1 -1
- package/dist/functions/transformations.lua +4 -10
- package/dist/functions/trinketGive.lua +3 -3
- package/dist/functions/trinkets.lua +10 -6
- package/dist/functions/ui.lua +3 -3
- package/dist/functions/util.lua +6 -14
- package/dist/functions/vector.lua +8 -8
- package/dist/lualib_bundle.lua +795 -735
- package/dist/maps/cardDescriptionMap.lua +99 -1
- package/dist/maps/cardNameMap.lua +99 -1
- package/dist/maps/challengeNameMap.lua +47 -1
- package/dist/maps/collectibleDescriptionMap.lua +722 -1
- package/dist/maps/collectibleNameMap.lua +722 -1
- package/dist/maps/gridEntityXMLMap.lua +36 -1
- package/dist/maps/pillEffectNameMap.lua +52 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.lua +7 -1
- package/dist/maps/transformationMaps.lua +21 -16
- package/dist/maps/transformationNameMap.lua +17 -1
- package/dist/maps/trinketDescriptionMap.lua +190 -1
- package/dist/maps/trinketNameMap.lua +190 -1
- package/dist/sets/cards.lua +98 -2
- package/dist/types/ModUpgraded.lua +95 -105
- package/package.json +5 -5
|
@@ -30,7 +30,7 @@ function ____exports.getCharacterMaxHeartContainers(self, character)
|
|
|
30
30
|
end
|
|
31
31
|
function ____exports.getPlayerIndex(self, player)
|
|
32
32
|
local character = player:GetPlayerType()
|
|
33
|
-
local collectibleToUse =
|
|
33
|
+
local collectibleToUse = character == PlayerType.PLAYER_LAZARUS2_B and CollectibleType.COLLECTIBLE_INNER_EYE or CollectibleType.COLLECTIBLE_SAD_ONION
|
|
34
34
|
local collectibleRNG = player:GetCollectibleRNG(collectibleToUse)
|
|
35
35
|
local seed = collectibleRNG:GetSeed()
|
|
36
36
|
return seed
|
|
@@ -38,7 +38,7 @@ end
|
|
|
38
38
|
function ____exports.getPlayerMaxHeartContainers(self, player)
|
|
39
39
|
local character = player:GetPlayerType()
|
|
40
40
|
local maxHeartContainers = ____exports.getCharacterMaxHeartContainers(nil, character)
|
|
41
|
-
if
|
|
41
|
+
if character == PlayerType.PLAYER_MAGDALENE and player:HasCollectible(CollectibleType.COLLECTIBLE_BIRTHRIGHT) then
|
|
42
42
|
maxHeartContainers = maxHeartContainers + 6
|
|
43
43
|
end
|
|
44
44
|
local numMothersKisses = player:GetTrinketMultiplier(TrinketType.TRINKET_MOTHERS_KISS)
|
|
@@ -60,18 +60,18 @@ function ____exports.getPlayers(self, performExclusions)
|
|
|
60
60
|
do
|
|
61
61
|
local player = Isaac.GetPlayer(i)
|
|
62
62
|
if player == nil then
|
|
63
|
-
goto
|
|
63
|
+
goto __continue76
|
|
64
64
|
end
|
|
65
65
|
if ____exports.isChildPlayer(nil, player) then
|
|
66
|
-
goto
|
|
66
|
+
goto __continue76
|
|
67
67
|
end
|
|
68
68
|
local character = player:GetPlayerType()
|
|
69
69
|
if performExclusions and EXCLUDED_CHARACTERS:has(character) then
|
|
70
|
-
goto
|
|
70
|
+
goto __continue76
|
|
71
71
|
end
|
|
72
72
|
__TS__ArrayPush(players, player)
|
|
73
73
|
end
|
|
74
|
-
::
|
|
74
|
+
::__continue76::
|
|
75
75
|
i = i + 1
|
|
76
76
|
end
|
|
77
77
|
end
|
|
@@ -98,9 +98,7 @@ function ____exports.addTrinketCostume(self, player, trinketType)
|
|
|
98
98
|
player:AddCostume(itemConfigTrinket, false)
|
|
99
99
|
end
|
|
100
100
|
function ____exports.anyPlayerCloserThan(self, position, distance)
|
|
101
|
-
for ____, player in ipairs(
|
|
102
|
-
____exports.getPlayers(nil)
|
|
103
|
-
) do
|
|
101
|
+
for ____, player in ipairs(____exports.getPlayers(nil)) do
|
|
104
102
|
if player.Position:Distance(position) <= distance then
|
|
105
103
|
return true
|
|
106
104
|
end
|
|
@@ -108,9 +106,7 @@ function ____exports.anyPlayerCloserThan(self, position, distance)
|
|
|
108
106
|
return false
|
|
109
107
|
end
|
|
110
108
|
function ____exports.anyPlayerHasCollectible(self, collectibleType)
|
|
111
|
-
for ____, player in ipairs(
|
|
112
|
-
____exports.getPlayers(nil)
|
|
113
|
-
) do
|
|
109
|
+
for ____, player in ipairs(____exports.getPlayers(nil)) do
|
|
114
110
|
if player:HasCollectible(collectibleType) then
|
|
115
111
|
return true
|
|
116
112
|
end
|
|
@@ -118,9 +114,7 @@ function ____exports.anyPlayerHasCollectible(self, collectibleType)
|
|
|
118
114
|
return false
|
|
119
115
|
end
|
|
120
116
|
function ____exports.anyPlayerHasTrinket(self, trinketType)
|
|
121
|
-
for ____, player in ipairs(
|
|
122
|
-
____exports.getPlayers(nil)
|
|
123
|
-
) do
|
|
117
|
+
for ____, player in ipairs(____exports.getPlayers(nil)) do
|
|
124
118
|
if player:HasTrinket(trinketType) then
|
|
125
119
|
return true
|
|
126
120
|
end
|
|
@@ -130,9 +124,7 @@ end
|
|
|
130
124
|
function ____exports.anyPlayerIs(self, ...)
|
|
131
125
|
local characters = {...}
|
|
132
126
|
local characterSet = __TS__New(Set, characters)
|
|
133
|
-
for ____, player in ipairs(
|
|
134
|
-
____exports.getPlayers(nil)
|
|
135
|
-
) do
|
|
127
|
+
for ____, player in ipairs(____exports.getPlayers(nil)) do
|
|
136
128
|
local character = player:GetPlayerType()
|
|
137
129
|
if characterSet:has(character) then
|
|
138
130
|
return true
|
|
@@ -155,14 +147,12 @@ function ____exports.getAzazelBrimstoneDistance(self, playerOrTearHeight)
|
|
|
155
147
|
local player = playerOrTearHeight
|
|
156
148
|
tearHeight = player.TearHeight
|
|
157
149
|
end
|
|
158
|
-
return 32 -
|
|
150
|
+
return 32 - 2.5 * tearHeight
|
|
159
151
|
end
|
|
160
152
|
function ____exports.getClosestPlayer(self, position)
|
|
161
153
|
local closestPlayer = nil
|
|
162
154
|
local closestDistance = math.huge
|
|
163
|
-
for ____, player in ipairs(
|
|
164
|
-
____exports.getPlayers(nil)
|
|
165
|
-
) do
|
|
155
|
+
for ____, player in ipairs(____exports.getPlayers(nil)) do
|
|
166
156
|
local distance = position:Distance(player.Position)
|
|
167
157
|
if distance < closestDistance then
|
|
168
158
|
closestPlayer = player
|
|
@@ -197,10 +187,10 @@ function ____exports.getLastHeart(self, player)
|
|
|
197
187
|
local boneHearts = player:GetBoneHearts()
|
|
198
188
|
local rottenHearts = player:GetRottenHearts()
|
|
199
189
|
local soulHeartSlots = soulHearts / 2
|
|
200
|
-
local lastHeartIndex =
|
|
190
|
+
local lastHeartIndex = boneHearts + soulHeartSlots - 1
|
|
201
191
|
local isLastHeartBone = player:IsBoneHeart(lastHeartIndex)
|
|
202
192
|
if isLastHeartBone then
|
|
203
|
-
local isLastContainerEmpty = hearts <=
|
|
193
|
+
local isLastContainerEmpty = hearts <= effectiveMaxHearts - 2
|
|
204
194
|
if isLastContainerEmpty then
|
|
205
195
|
return HealthType.BONE
|
|
206
196
|
end
|
|
@@ -232,9 +222,7 @@ end
|
|
|
232
222
|
function ____exports.getNewestPlayer(self)
|
|
233
223
|
local newestPlayer = nil
|
|
234
224
|
local lowestFrame = math.huge
|
|
235
|
-
for ____, player in ipairs(
|
|
236
|
-
____exports.getPlayers(nil)
|
|
237
|
-
) do
|
|
225
|
+
for ____, player in ipairs(____exports.getPlayers(nil)) do
|
|
238
226
|
if player.FrameCount < lowestFrame then
|
|
239
227
|
newestPlayer = player
|
|
240
228
|
lowestFrame = player.FrameCount
|
|
@@ -257,9 +245,7 @@ function ____exports.getPlayerAvailableHeartSlots(self, player)
|
|
|
257
245
|
return maxHeartContainers - totalOccupiedHeartSlots
|
|
258
246
|
end
|
|
259
247
|
function ____exports.getPlayerCloserThan(self, position, distance)
|
|
260
|
-
for ____, player in ipairs(
|
|
261
|
-
____exports.getPlayers(nil)
|
|
262
|
-
) do
|
|
248
|
+
for ____, player in ipairs(____exports.getPlayers(nil)) do
|
|
263
249
|
if player.Position:Distance(position) <= distance then
|
|
264
250
|
return player
|
|
265
251
|
end
|
|
@@ -269,9 +255,7 @@ end
|
|
|
269
255
|
function ____exports.getPlayerCollectibleMap(self, player)
|
|
270
256
|
local collectibleSet = getCollectibleSet(nil)
|
|
271
257
|
local collectibleMap = __TS__New(Map)
|
|
272
|
-
for ____, collectibleType in __TS__Iterator(
|
|
273
|
-
collectibleSet:values()
|
|
274
|
-
) do
|
|
258
|
+
for ____, collectibleType in __TS__Iterator(collectibleSet:values()) do
|
|
275
259
|
local collectibleNum = player:GetCollectibleNum(collectibleType, true)
|
|
276
260
|
if collectibleNum > 0 then
|
|
277
261
|
collectibleMap:set(collectibleType, collectibleNum)
|
|
@@ -280,9 +264,7 @@ function ____exports.getPlayerCollectibleMap(self, player)
|
|
|
280
264
|
return collectibleMap
|
|
281
265
|
end
|
|
282
266
|
function ____exports.getPlayerFromIndex(self, playerIndex)
|
|
283
|
-
for ____, player in ipairs(
|
|
284
|
-
____exports.getPlayers(nil)
|
|
285
|
-
) do
|
|
267
|
+
for ____, player in ipairs(____exports.getPlayers(nil)) do
|
|
286
268
|
local existingPlayerIndex = ____exports.getPlayerIndex(nil, player)
|
|
287
269
|
if existingPlayerIndex == playerIndex then
|
|
288
270
|
return player
|
|
@@ -299,14 +281,14 @@ function ____exports.getPlayerIndexVanilla(self, playerToFind)
|
|
|
299
281
|
do
|
|
300
282
|
local player = Isaac.GetPlayer(i)
|
|
301
283
|
if player == nil then
|
|
302
|
-
goto
|
|
284
|
+
goto __continue68
|
|
303
285
|
end
|
|
304
286
|
local playerHash = GetPtrHash(player)
|
|
305
287
|
if playerHash == playerToFindHash then
|
|
306
288
|
return i
|
|
307
289
|
end
|
|
308
290
|
end
|
|
309
|
-
::
|
|
291
|
+
::__continue68::
|
|
310
292
|
i = i + 1
|
|
311
293
|
end
|
|
312
294
|
end
|
|
@@ -318,13 +300,11 @@ function ____exports.getPlayerNumAllHearts(self, player)
|
|
|
318
300
|
local boneHearts = player:GetBoneHearts()
|
|
319
301
|
local eternalHearts = player:GetEternalHearts()
|
|
320
302
|
local rottenHearts = player:GetRottenHearts()
|
|
321
|
-
return
|
|
303
|
+
return hearts + soulHearts + boneHearts + eternalHearts - rottenHearts
|
|
322
304
|
end
|
|
323
305
|
function ____exports.getPlayersOfType(self, playerType)
|
|
324
306
|
local players = {}
|
|
325
|
-
for ____, player in ipairs(
|
|
326
|
-
____exports.getPlayers(nil)
|
|
327
|
-
) do
|
|
307
|
+
for ____, player in ipairs(____exports.getPlayers(nil)) do
|
|
328
308
|
local character = player:GetPlayerType()
|
|
329
309
|
if character == playerType then
|
|
330
310
|
__TS__ArrayPush(players, player)
|
|
@@ -339,9 +319,7 @@ function ____exports.getTotalCharge(self, player, activeSlot)
|
|
|
339
319
|
end
|
|
340
320
|
function ____exports.getTotalPlayerCollectibles(self, collectibleType)
|
|
341
321
|
local numCollectibles = 0
|
|
342
|
-
for ____, player in ipairs(
|
|
343
|
-
____exports.getPlayers(nil)
|
|
344
|
-
) do
|
|
322
|
+
for ____, player in ipairs(____exports.getPlayers(nil)) do
|
|
345
323
|
numCollectibles = numCollectibles + player:GetCollectibleNum(collectibleType)
|
|
346
324
|
end
|
|
347
325
|
return numCollectibles
|
|
@@ -359,32 +337,32 @@ function ____exports.hasOpenActiveItemSlot(self, player)
|
|
|
359
337
|
local activeItemSecondary = player:GetActiveItem(ActiveSlot.SLOT_SECONDARY)
|
|
360
338
|
local hasSchoolbag = player:HasCollectible(CollectibleType.COLLECTIBLE_SCHOOLBAG)
|
|
361
339
|
if hasSchoolbag then
|
|
362
|
-
return
|
|
340
|
+
return activeItemPrimary == CollectibleType.COLLECTIBLE_NULL or activeItemSecondary == CollectibleType.COLLECTIBLE_NULL
|
|
363
341
|
end
|
|
364
342
|
return activeItemPrimary == CollectibleType.COLLECTIBLE_NULL
|
|
365
343
|
end
|
|
366
344
|
function ____exports.isBethany(self, player)
|
|
367
345
|
local character = player:GetPlayerType()
|
|
368
|
-
return
|
|
346
|
+
return character == PlayerType.PLAYER_BETHANY or character == PlayerType.PLAYER_BETHANY_B
|
|
369
347
|
end
|
|
370
348
|
function ____exports.isFirstPlayer(self, player)
|
|
371
349
|
return ____exports.getPlayerIndexVanilla(nil, player) == 0
|
|
372
350
|
end
|
|
373
351
|
function ____exports.isJacobOrEsau(self, player)
|
|
374
352
|
local character = player:GetPlayerType()
|
|
375
|
-
return
|
|
353
|
+
return character == PlayerType.PLAYER_JACOB or character == PlayerType.PLAYER_ESAU
|
|
376
354
|
end
|
|
377
355
|
function ____exports.isKeeper(self, player)
|
|
378
356
|
local character = player:GetPlayerType()
|
|
379
|
-
return
|
|
357
|
+
return character == PlayerType.PLAYER_KEEPER or character == PlayerType.PLAYER_KEEPER_B
|
|
380
358
|
end
|
|
381
359
|
function ____exports.isLost(self, player)
|
|
382
360
|
local character = player:GetPlayerType()
|
|
383
|
-
return
|
|
361
|
+
return character == PlayerType.PLAYER_THELOST or character == PlayerType.PLAYER_THELOST_B
|
|
384
362
|
end
|
|
385
363
|
function ____exports.isTaintedLazarus(self, player)
|
|
386
364
|
local character = player:GetPlayerType()
|
|
387
|
-
return
|
|
365
|
+
return character == PlayerType.PLAYER_LAZARUS_B or character == PlayerType.PLAYER_LAZARUS2_B
|
|
388
366
|
end
|
|
389
367
|
function ____exports.removeCollectibleCostume(self, player, collectibleType)
|
|
390
368
|
local itemConfig = Isaac.GetItemConfig()
|
|
@@ -427,9 +405,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
427
405
|
itemPool:RemoveCollectible(collectibleType)
|
|
428
406
|
end
|
|
429
407
|
repeat
|
|
430
|
-
local
|
|
431
|
-
local
|
|
432
|
-
if
|
|
408
|
+
local ____switch108 = activeSlot
|
|
409
|
+
local ____cond108 = ____switch108 == ActiveSlot.SLOT_PRIMARY
|
|
410
|
+
if ____cond108 then
|
|
433
411
|
do
|
|
434
412
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
435
413
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -438,8 +416,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
438
416
|
break
|
|
439
417
|
end
|
|
440
418
|
end
|
|
441
|
-
|
|
442
|
-
if
|
|
419
|
+
____cond108 = ____cond108 or ____switch108 == ActiveSlot.SLOT_SECONDARY
|
|
420
|
+
if ____cond108 then
|
|
443
421
|
do
|
|
444
422
|
if primaryCollectibleType ~= CollectibleType.COLLECTIBLE_NULL then
|
|
445
423
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -454,16 +432,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
454
432
|
break
|
|
455
433
|
end
|
|
456
434
|
end
|
|
457
|
-
|
|
458
|
-
if
|
|
435
|
+
____cond108 = ____cond108 or ____switch108 == ActiveSlot.SLOT_POCKET
|
|
436
|
+
if ____cond108 then
|
|
459
437
|
do
|
|
460
438
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
461
439
|
player:SetActiveCharge(charge, activeSlot)
|
|
462
440
|
break
|
|
463
441
|
end
|
|
464
442
|
end
|
|
465
|
-
|
|
466
|
-
if
|
|
443
|
+
____cond108 = ____cond108 or ____switch108 == ActiveSlot.SLOT_POCKET2
|
|
444
|
+
if ____cond108 then
|
|
467
445
|
do
|
|
468
446
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
469
447
|
break
|
|
@@ -27,29 +27,29 @@ function ____exports.getPlayerHealth(self, player)
|
|
|
27
27
|
local rottenHearts = player:GetRottenHearts()
|
|
28
28
|
local brokenHearts = player:GetBrokenHearts()
|
|
29
29
|
local subPlayer = player:GetSubPlayer()
|
|
30
|
-
if
|
|
30
|
+
if character == PlayerType.PLAYER_THEFORGOTTEN and subPlayer ~= nil then
|
|
31
31
|
maxHearts = boneHearts * 2
|
|
32
32
|
boneHearts = 0
|
|
33
33
|
soulHearts = subPlayer:GetSoulHearts()
|
|
34
|
-
elseif
|
|
34
|
+
elseif character == PlayerType.PLAYER_THESOUL and subPlayer ~= nil then
|
|
35
35
|
maxHearts = subPlayer:GetBoneHearts() * 2
|
|
36
36
|
hearts = subPlayer:GetHearts()
|
|
37
37
|
end
|
|
38
|
-
hearts = hearts -
|
|
38
|
+
hearts = hearts - rottenHearts * 2
|
|
39
39
|
local extraHearts = math.ceil(soulHearts / 2) + boneHearts
|
|
40
40
|
local currentSoulHeart = 0
|
|
41
41
|
do
|
|
42
42
|
local i = 0
|
|
43
43
|
while i < extraHearts do
|
|
44
44
|
local isBoneHeart = player:IsBoneHeart(i)
|
|
45
|
-
if
|
|
45
|
+
if character == PlayerType.PLAYER_THEFORGOTTEN and subPlayer ~= nil then
|
|
46
46
|
isBoneHeart = subPlayer:IsBoneHeart(i)
|
|
47
47
|
end
|
|
48
48
|
if isBoneHeart then
|
|
49
49
|
__TS__ArrayPush(soulHeartTypes, HeartSubType.HEART_BONE)
|
|
50
50
|
else
|
|
51
51
|
local isBlackHeart = player:IsBlackHeart(currentSoulHeart + 1)
|
|
52
|
-
if
|
|
52
|
+
if character == PlayerType.PLAYER_THEFORGOTTEN and subPlayer ~= nil then
|
|
53
53
|
isBlackHeart = subPlayer:IsBlackHeart(currentSoulHeart + 1)
|
|
54
54
|
end
|
|
55
55
|
if isBlackHeart then
|
|
@@ -62,13 +62,23 @@ function ____exports.getPlayerHealth(self, player)
|
|
|
62
62
|
i = i + 1
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
|
-
return {
|
|
65
|
+
return {
|
|
66
|
+
soulHeartTypes = soulHeartTypes,
|
|
67
|
+
maxHearts = maxHearts,
|
|
68
|
+
hearts = hearts,
|
|
69
|
+
eternalHearts = eternalHearts,
|
|
70
|
+
soulHearts = soulHearts,
|
|
71
|
+
boneHearts = boneHearts,
|
|
72
|
+
goldenHearts = goldenHearts,
|
|
73
|
+
rottenHearts = rottenHearts,
|
|
74
|
+
brokenHearts = brokenHearts
|
|
75
|
+
}
|
|
66
76
|
end
|
|
67
77
|
function ____exports.setPlayerHealth(self, player, playerHealth)
|
|
68
78
|
local character = player:GetPlayerType()
|
|
69
79
|
local subPlayer = player:GetSubPlayer()
|
|
70
80
|
____exports.removeAllPlayerHealth(nil, player)
|
|
71
|
-
if
|
|
81
|
+
if character == PlayerType.PLAYER_THESOUL and subPlayer ~= nil then
|
|
72
82
|
subPlayer:AddMaxHearts(playerHealth.maxHearts, false)
|
|
73
83
|
else
|
|
74
84
|
player:AddMaxHearts(playerHealth.maxHearts, false)
|
|
@@ -79,9 +89,9 @@ function ____exports.setPlayerHealth(self, player, playerHealth)
|
|
|
79
89
|
local i = 0
|
|
80
90
|
while i < #playerHealth.soulHeartTypes do
|
|
81
91
|
local heartType = playerHealth.soulHeartTypes[i + 1]
|
|
82
|
-
local isHalf =
|
|
92
|
+
local isHalf = playerHealth.soulHearts + playerHealth.boneHearts * 2 < (i + 1) * 2
|
|
83
93
|
local addAmount = 2
|
|
84
|
-
if
|
|
94
|
+
if isHalf or heartType == HeartSubType.HEART_BONE or soulHeartsRemaining < 2 then
|
|
85
95
|
addAmount = 1
|
|
86
96
|
end
|
|
87
97
|
if heartType == HeartSubType.HEART_SOUL then
|
|
@@ -23,10 +23,10 @@ function ____exports.getPocketItems(self, player)
|
|
|
23
23
|
__TS__ArrayPush(pocketItems, {type = PocketItemType.CARD, id = card, slot = slot})
|
|
24
24
|
elseif pill ~= PillColor.PILL_NULL then
|
|
25
25
|
__TS__ArrayPush(pocketItems, {type = PocketItemType.PILL, id = pill, slot = slot})
|
|
26
|
-
elseif
|
|
26
|
+
elseif hasPocketItem and not hasPocketItem2 and not pocketItemIdentified then
|
|
27
27
|
pocketItemIdentified = true
|
|
28
28
|
__TS__ArrayPush(pocketItems, {type = PocketItemType.ACTIVE_ITEM, id = pocketItem, slot = slot})
|
|
29
|
-
elseif
|
|
29
|
+
elseif not hasPocketItem and hasPocketItem2 and not pocketItem2Identified then
|
|
30
30
|
pocketItem2Identified = true
|
|
31
31
|
__TS__ArrayPush(pocketItems, {type = PocketItemType.DICE_BAG_DICE, id = pocketItem2, slot = slot})
|
|
32
32
|
elseif hasPocketItem and hasPocketItem2 then
|
|
@@ -34,7 +34,7 @@ function ____exports.getPocketItems(self, player)
|
|
|
34
34
|
else
|
|
35
35
|
__TS__ArrayPush(pocketItems, {type = PocketItemType.EMPTY, id = 0, slot = slot})
|
|
36
36
|
end
|
|
37
|
-
if
|
|
37
|
+
if slot + 1 == maxPocketItems then
|
|
38
38
|
break
|
|
39
39
|
end
|
|
40
40
|
slot = slot + 1
|
|
@@ -45,7 +45,7 @@ end
|
|
|
45
45
|
function ____exports.getFirstCardOrPill(self, player)
|
|
46
46
|
local pocketItems = ____exports.getPocketItems(nil, player)
|
|
47
47
|
for ____, pocketItem in ipairs(pocketItems) do
|
|
48
|
-
if
|
|
48
|
+
if pocketItem.type == PocketItemType.CARD or pocketItem.type == PocketItemType.PILL then
|
|
49
49
|
return pocketItem
|
|
50
50
|
end
|
|
51
51
|
end
|
|
@@ -24,14 +24,14 @@ function ____exports.getRandomFloat(self, min, max, seed)
|
|
|
24
24
|
if seed == nil then
|
|
25
25
|
seed = Random()
|
|
26
26
|
end
|
|
27
|
-
return min +
|
|
27
|
+
return min + ____exports.getRandom(nil, seed) * (max - min)
|
|
28
28
|
end
|
|
29
29
|
function ____exports.getRandomInt(self, min, max, seed)
|
|
30
30
|
if seed == nil then
|
|
31
31
|
seed = Random()
|
|
32
32
|
end
|
|
33
33
|
local rng = ____exports.initRNG(nil, seed)
|
|
34
|
-
return rng:RandomInt(
|
|
34
|
+
return rng:RandomInt(max - min + 1) + min
|
|
35
35
|
end
|
|
36
36
|
function ____exports.nextSeed(self, seed)
|
|
37
37
|
local rng = ____exports.initRNG(nil, seed)
|
|
@@ -13,12 +13,12 @@ function ____exports.willMysteriousPaperRevive(self, player)
|
|
|
13
13
|
local sprite = player:GetSprite()
|
|
14
14
|
local animation = getDeathAnimationName(nil, player)
|
|
15
15
|
local deathAnimationFrames = getFinalFrameOfAnimation(nil, sprite, animation)
|
|
16
|
-
local frameOfDeath =
|
|
17
|
-
return
|
|
16
|
+
local frameOfDeath = gameFrameCount + deathAnimationFrames + 1
|
|
17
|
+
return frameOfDeath % 4 == 3
|
|
18
18
|
end
|
|
19
19
|
function ____exports.willPlayerRevive(self, player)
|
|
20
20
|
local trinketSituation = temporarilyRemoveTrinket(nil, player, TrinketType.TRINKET_MYSTERIOUS_PAPER)
|
|
21
|
-
local willRevive = player:WillPlayerRevive() or
|
|
21
|
+
local willRevive = player:WillPlayerRevive() or trinketSituation ~= nil and ____exports.willMysteriousPaperRevive(nil, player)
|
|
22
22
|
giveTrinketsBack(nil, player, trinketSituation)
|
|
23
23
|
return willRevive
|
|
24
24
|
end
|
|
@@ -29,6 +29,6 @@ function ____exports.willReviveFromSpiritShackles(self, player)
|
|
|
29
29
|
local effects = player:GetEffects()
|
|
30
30
|
local spiritShacklesEnabled = not effects:HasNullEffect(NullItemID.ID_SPIRIT_SHACKLES_DISABLED)
|
|
31
31
|
local playerInSoulForm = effects:HasNullEffect(NullItemID.ID_SPIRIT_SHACKLES_SOUL)
|
|
32
|
-
return spiritShacklesEnabled and
|
|
32
|
+
return spiritShacklesEnabled and not playerInSoulForm
|
|
33
33
|
end
|
|
34
34
|
return ____exports
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Helper function for quickly switching to a new room without playing a particular animation.
|
|
4
4
|
* Always use this helper function over invoking `Game().ChangeRoom()` directly to ensure that you
|
|
5
|
-
* do not forget to set the LeaveDoor property.
|
|
5
|
+
* do not forget to set the LeaveDoor property and to prevent crashing on invalid room grid indexes.
|
|
6
6
|
*/
|
|
7
7
|
export declare function changeRoom(roomGridIndex: int): void;
|
|
8
8
|
export declare function getAllRoomGridIndexes(): int[];
|
package/dist/functions/rooms.lua
CHANGED
|
@@ -9,6 +9,7 @@ local ____doors = require("functions.doors")
|
|
|
9
9
|
local closeAllDoors = ____doors.closeAllDoors
|
|
10
10
|
local getDoors = ____doors.getDoors
|
|
11
11
|
local isHiddenSecretRoomDoor = ____doors.isHiddenSecretRoomDoor
|
|
12
|
+
local openDoorFast = ____doors.openDoorFast
|
|
12
13
|
local ____entity = require("functions.entity")
|
|
13
14
|
local getEntities = ____entity.getEntities
|
|
14
15
|
local getEntityPositions = ____entity.getEntityPositions
|
|
@@ -37,11 +38,11 @@ function ____exports.getRoomDescriptor(self, roomGridIndex)
|
|
|
37
38
|
end
|
|
38
39
|
function ____exports.getRoomStageID(self, roomGridIndex)
|
|
39
40
|
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
40
|
-
return
|
|
41
|
+
return roomData == nil and -1 or roomData.StageID
|
|
41
42
|
end
|
|
42
43
|
function ____exports.getRoomSubType(self, roomGridIndex)
|
|
43
44
|
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
44
|
-
return
|
|
45
|
+
return roomData == nil and -1 or roomData.Subtype
|
|
45
46
|
end
|
|
46
47
|
function ____exports.getRooms(self, includeExtraDimensionalRooms)
|
|
47
48
|
if includeExtraDimensionalRooms == nil then
|
|
@@ -79,19 +80,21 @@ end
|
|
|
79
80
|
function ____exports.inDeathCertificateArea(self)
|
|
80
81
|
local roomStageID = ____exports.getRoomStageID(nil)
|
|
81
82
|
local roomSubType = ____exports.getRoomSubType(nil)
|
|
82
|
-
return
|
|
83
|
+
return roomStageID == 35 and (roomSubType == 33 or roomSubType == 33)
|
|
83
84
|
end
|
|
84
85
|
function ____exports.changeRoom(self, roomGridIndex)
|
|
85
86
|
local game = Game()
|
|
86
87
|
local level = game:GetLevel()
|
|
88
|
+
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
89
|
+
if roomData == nil then
|
|
90
|
+
error(("Failed to change the room to to grid index " .. tostring(roomGridIndex)) .. " because that room does not exist.")
|
|
91
|
+
end
|
|
87
92
|
level.LeaveDoor = -1
|
|
88
93
|
game:ChangeRoom(roomGridIndex)
|
|
89
94
|
end
|
|
90
95
|
function ____exports.getAllRoomGridIndexes(self)
|
|
91
96
|
local allRoomGridIndexes = {}
|
|
92
|
-
for ____, roomDescriptor in ipairs(
|
|
93
|
-
____exports.getRooms(nil)
|
|
94
|
-
) do
|
|
97
|
+
for ____, roomDescriptor in ipairs(____exports.getRooms(nil)) do
|
|
95
98
|
__TS__ArrayPush(allRoomGridIndexes, roomDescriptor.SafeGridIndex)
|
|
96
99
|
end
|
|
97
100
|
return allRoomGridIndexes
|
|
@@ -116,21 +119,17 @@ function ____exports.getCurrentDimension(self)
|
|
|
116
119
|
dimension = dimension + 1
|
|
117
120
|
end
|
|
118
121
|
end
|
|
119
|
-
error(
|
|
120
|
-
"Failed to get the current dimension using the starting room index of: " .. tostring(startingRoomGridIndex)
|
|
121
|
-
)
|
|
122
|
+
error("Failed to get the current dimension using the starting room index of: " .. tostring(startingRoomGridIndex))
|
|
122
123
|
return 0
|
|
123
124
|
end
|
|
124
125
|
function ____exports.getRoomDataType(self, roomGridIndex)
|
|
125
126
|
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
126
|
-
return
|
|
127
|
+
return roomData == nil and -1 or roomData.Type
|
|
127
128
|
end
|
|
128
129
|
function ____exports.getRoomGridIndexesForType(self, roomType)
|
|
129
130
|
local roomGridIndexes = {}
|
|
130
|
-
for ____, roomDescriptor in ipairs(
|
|
131
|
-
|
|
132
|
-
) do
|
|
133
|
-
if (roomDescriptor.Data ~= nil) and (roomDescriptor.Data.Type == roomType) then
|
|
131
|
+
for ____, roomDescriptor in ipairs(____exports.getRooms(nil)) do
|
|
132
|
+
if roomDescriptor.Data ~= nil and roomDescriptor.Data.Type == roomType then
|
|
134
133
|
__TS__ArrayPush(roomGridIndexes, roomDescriptor.SafeGridIndex)
|
|
135
134
|
end
|
|
136
135
|
end
|
|
@@ -150,15 +149,15 @@ function ____exports.getRoomListIndex(self, roomGridIndex)
|
|
|
150
149
|
end
|
|
151
150
|
function ____exports.getRoomName(self, roomGridIndex)
|
|
152
151
|
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
153
|
-
return
|
|
152
|
+
return roomData == nil and "Unknown" or roomData.Name
|
|
154
153
|
end
|
|
155
154
|
function ____exports.getRoomSafeGridIndex(self, roomGridIndex)
|
|
156
|
-
local roomDescriptor =
|
|
155
|
+
local roomDescriptor = roomGridIndex == nil and ____exports.getCurrentRoomDescriptorReadOnly(nil) or ____exports.getRoomDescriptor(nil, roomGridIndex)
|
|
157
156
|
return roomDescriptor.SafeGridIndex
|
|
158
157
|
end
|
|
159
158
|
function ____exports.getRoomVariant(self, roomGridIndex)
|
|
160
159
|
local roomData = ____exports.getRoomData(nil, roomGridIndex)
|
|
161
|
-
return
|
|
160
|
+
return roomData == nil and -1 or roomData.Variant
|
|
162
161
|
end
|
|
163
162
|
function ____exports.getRoomVisitedCount(self, roomGridIndex)
|
|
164
163
|
local roomDescriptor = ____exports.getRoomDescriptor(nil, roomGridIndex)
|
|
@@ -169,26 +168,26 @@ function ____exports.gridToPos(self, x, y)
|
|
|
169
168
|
local room = game:GetRoom()
|
|
170
169
|
x = x + 1
|
|
171
170
|
y = y + 1
|
|
172
|
-
local gridIndex =
|
|
171
|
+
local gridIndex = y * room:GetGridWidth() + x
|
|
173
172
|
return room:GetGridPosition(gridIndex)
|
|
174
173
|
end
|
|
175
174
|
function ____exports.in2x1Room(self)
|
|
176
175
|
local game = Game()
|
|
177
176
|
local room = game:GetRoom()
|
|
178
177
|
local roomShape = room:GetRoomShape()
|
|
179
|
-
return
|
|
178
|
+
return roomShape == RoomShape.ROOMSHAPE_1x2 or roomShape == RoomShape.ROOMSHAPE_2x1
|
|
180
179
|
end
|
|
181
180
|
function ____exports.inAngelShop(self)
|
|
182
181
|
local game = Game()
|
|
183
182
|
local room = game:GetRoom()
|
|
184
183
|
local roomType = room:GetType()
|
|
185
184
|
local roomSubType = ____exports.getRoomSubType(nil)
|
|
186
|
-
return
|
|
185
|
+
return roomType == RoomType.ROOM_ANGEL and roomSubType == 1
|
|
187
186
|
end
|
|
188
187
|
function ____exports.inBeastRoom(self)
|
|
189
188
|
local roomSafeGridIndex = ____exports.getRoomSafeGridIndex(nil)
|
|
190
189
|
local roomSubType = ____exports.getRoomSubType(nil)
|
|
191
|
-
return
|
|
190
|
+
return roomSafeGridIndex == GridRooms.ROOM_DUNGEON_IDX and roomSubType == 4
|
|
192
191
|
end
|
|
193
192
|
function ____exports.inBossRoomOf(self, bossID)
|
|
194
193
|
local game = Game()
|
|
@@ -196,12 +195,12 @@ function ____exports.inBossRoomOf(self, bossID)
|
|
|
196
195
|
local roomType = room:GetType()
|
|
197
196
|
local roomStageID = ____exports.getRoomStageID(nil)
|
|
198
197
|
local roomSubType = ____exports.getRoomSubType(nil)
|
|
199
|
-
return
|
|
198
|
+
return roomType == RoomType.ROOM_BOSS and roomStageID == 0 and roomSubType == bossID
|
|
200
199
|
end
|
|
201
200
|
function ____exports.inCrawlspace(self)
|
|
202
201
|
local roomSafeGridIndex = ____exports.getRoomSafeGridIndex(nil)
|
|
203
202
|
local roomSubType = ____exports.getRoomSubType(nil)
|
|
204
|
-
return
|
|
203
|
+
return roomSafeGridIndex == GridRooms.ROOM_DUNGEON_IDX and roomSubType ~= 4
|
|
205
204
|
end
|
|
206
205
|
function ____exports.inDevilsCrownTreasureRoom(self)
|
|
207
206
|
local roomDescriptor = ____exports.getCurrentRoomDescriptorReadOnly(nil)
|
|
@@ -214,7 +213,7 @@ function ____exports.inLRoom(self)
|
|
|
214
213
|
local game = Game()
|
|
215
214
|
local room = game:GetRoom()
|
|
216
215
|
local roomShape = room:GetRoomShape()
|
|
217
|
-
return
|
|
216
|
+
return roomShape == RoomShape.ROOMSHAPE_LTL or roomShape == RoomShape.ROOMSHAPE_LTR or roomShape == RoomShape.ROOMSHAPE_LBL or roomShape == RoomShape.ROOMSHAPE_LBR
|
|
218
217
|
end
|
|
219
218
|
function ____exports.inGenesisRoom(self)
|
|
220
219
|
local game = Game()
|
|
@@ -222,7 +221,7 @@ function ____exports.inGenesisRoom(self)
|
|
|
222
221
|
local roomType = room:GetType()
|
|
223
222
|
local roomVariant = ____exports.getRoomVariant(nil)
|
|
224
223
|
local roomSubType = ____exports.getRoomSubType(nil)
|
|
225
|
-
return
|
|
224
|
+
return roomType == RoomType.ROOM_ISAACS and roomVariant == GENESIS_ROOM_VARIANT and roomSubType == GENESIS_ROOM_SUBTYPE
|
|
226
225
|
end
|
|
227
226
|
function ____exports.inMinibossRoomOf(self, minibossID)
|
|
228
227
|
local game = Game()
|
|
@@ -230,34 +229,38 @@ function ____exports.inMinibossRoomOf(self, minibossID)
|
|
|
230
229
|
local roomType = room:GetType()
|
|
231
230
|
local roomStageID = ____exports.getRoomStageID(nil)
|
|
232
231
|
local roomSubType = ____exports.getRoomSubType(nil)
|
|
233
|
-
return
|
|
232
|
+
return roomType == RoomType.ROOM_MINIBOSS and roomStageID == 0 and roomSubType == minibossID
|
|
234
233
|
end
|
|
235
234
|
function ____exports.inStartingRoom(self)
|
|
236
235
|
local game = Game()
|
|
237
236
|
local level = game:GetLevel()
|
|
238
237
|
local startingRoomGridIndex = level:GetStartingRoomIndex()
|
|
239
238
|
local roomSafeGridIndex = ____exports.getRoomSafeGridIndex(nil)
|
|
240
|
-
return
|
|
239
|
+
return roomSafeGridIndex == startingRoomGridIndex and ____exports.inDimension(nil, 0)
|
|
241
240
|
end
|
|
242
241
|
function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes)
|
|
243
|
-
local
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
242
|
+
local ____temp_0
|
|
243
|
+
if onlyCheckRoomTypes == nil then
|
|
244
|
+
____temp_0 = nil
|
|
245
|
+
else
|
|
246
|
+
____temp_0 = __TS__New(Set, onlyCheckRoomTypes)
|
|
247
|
+
end
|
|
248
|
+
local roomTypeWhitelist = ____temp_0
|
|
249
|
+
for ____, roomDescriptor in ipairs(____exports.getRooms(nil)) do
|
|
247
250
|
do
|
|
248
251
|
local roomData = roomDescriptor.Data
|
|
249
252
|
if roomData == nil then
|
|
250
|
-
goto
|
|
253
|
+
goto __continue49
|
|
251
254
|
end
|
|
252
255
|
local roomType = roomData.Type
|
|
253
|
-
if
|
|
254
|
-
goto
|
|
256
|
+
if roomTypeWhitelist ~= nil and not roomTypeWhitelist:has(roomType) then
|
|
257
|
+
goto __continue49
|
|
255
258
|
end
|
|
256
259
|
if not roomDescriptor.Clear then
|
|
257
260
|
return false
|
|
258
261
|
end
|
|
259
262
|
end
|
|
260
|
-
::
|
|
263
|
+
::__continue49::
|
|
261
264
|
end
|
|
262
265
|
return true
|
|
263
266
|
end
|
|
@@ -290,17 +293,15 @@ function ____exports.setRoomCleared(self)
|
|
|
290
293
|
return
|
|
291
294
|
end
|
|
292
295
|
room:SetClear(true)
|
|
293
|
-
for ____, door in ipairs(
|
|
294
|
-
getDoors(nil)
|
|
295
|
-
) do
|
|
296
|
+
for ____, door in ipairs(getDoors(nil)) do
|
|
296
297
|
do
|
|
297
298
|
if isHiddenSecretRoomDoor(nil, door) then
|
|
298
|
-
goto
|
|
299
|
+
goto __continue60
|
|
299
300
|
end
|
|
300
|
-
door
|
|
301
|
+
openDoorFast(nil, door)
|
|
301
302
|
door.ExtraVisible = false
|
|
302
303
|
end
|
|
303
|
-
::
|
|
304
|
+
::__continue60::
|
|
304
305
|
end
|
|
305
306
|
sfx:Stop(SoundEffect.SOUND_DOOR_HEAVY_OPEN)
|
|
306
307
|
game:ShakeScreen(0)
|