isaacscript-common 13.0.0 → 13.1.1
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/index.d.ts +96 -26
- package/dist/isaacscript-common.lua +613 -168
- package/dist/src/features/customStage/backdrop.lua +4 -4
- package/dist/src/features/customStage/versusScreen.lua +2 -2
- package/dist/src/features/deployJSONRoom.d.ts +0 -11
- package/dist/src/features/deployJSONRoom.d.ts.map +1 -1
- package/dist/src/features/deployJSONRoom.lua +10 -74
- package/dist/src/features/extraConsoleCommands/listCommands.lua +2 -2
- package/dist/src/features/firstLast.lua +8 -8
- package/dist/src/features/setHotkey.d.ts +27 -8
- package/dist/src/features/setHotkey.d.ts.map +1 -1
- package/dist/src/features/setHotkey.lua +41 -30
- package/dist/src/functions/array.lua +2 -2
- package/dist/src/functions/cards.lua +2 -2
- package/dist/src/functions/collectibles.lua +2 -2
- package/dist/src/functions/dimensions.lua +2 -2
- package/dist/src/functions/emptyRoom.d.ts +8 -0
- package/dist/src/functions/emptyRoom.d.ts.map +1 -0
- package/dist/src/functions/emptyRoom.lua +79 -0
- package/dist/src/functions/enums.d.ts.map +1 -1
- package/dist/src/functions/enums.lua +3 -3
- package/dist/src/functions/gridEntities.lua +2 -2
- package/dist/src/functions/gridIndex.d.ts +10 -0
- package/dist/src/functions/gridIndex.d.ts.map +1 -0
- package/dist/src/functions/gridIndex.lua +32 -0
- package/dist/src/functions/log.d.ts.map +1 -1
- package/dist/src/functions/log.lua +9 -8
- package/dist/src/functions/logEntities.d.ts.map +1 -1
- package/dist/src/functions/logEntities.lua +17 -9
- package/dist/src/functions/pills.lua +4 -4
- package/dist/src/functions/roomShape.d.ts +6 -1
- package/dist/src/functions/roomShape.d.ts.map +1 -1
- package/dist/src/functions/roomShape.lua +3 -0
- package/dist/src/functions/roomShapeWalls.d.ts +11 -0
- package/dist/src/functions/roomShapeWalls.d.ts.map +1 -0
- package/dist/src/functions/roomShapeWalls.lua +273 -0
- package/dist/src/functions/rooms.d.ts +7 -0
- package/dist/src/functions/rooms.d.ts.map +1 -1
- package/dist/src/functions/rooms.lua +16 -5
- package/dist/src/functions/set.d.ts +7 -0
- package/dist/src/functions/set.d.ts.map +1 -1
- package/dist/src/functions/set.lua +10 -0
- package/dist/src/functions/sprites.lua +2 -2
- package/dist/src/functions/trinkets.lua +2 -2
- package/dist/src/functions/utils.d.ts +18 -12
- package/dist/src/functions/utils.d.ts.map +1 -1
- package/dist/src/functions/utils.lua +26 -14
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +24 -0
- package/dist/src/interfaces/Corner.d.ts +8 -0
- package/dist/src/interfaces/Corner.d.ts.map +1 -1
- package/dist/src/objects/roomShapeCorners.d.ts +6 -1
- package/dist/src/objects/roomShapeCorners.d.ts.map +1 -1
- package/dist/src/objects/roomShapeCorners.lua +71 -14
- package/package.json +2 -2
- package/src/features/customStage/backdrop.ts +3 -3
- package/src/features/customStage/versusScreen.ts +2 -2
- package/src/features/deployJSONRoom.ts +8 -98
- package/src/features/extraConsoleCommands/listCommands.ts +2 -2
- package/src/features/firstLast.ts +8 -8
- package/src/features/setHotkey.ts +60 -40
- package/src/functions/array.ts +2 -2
- package/src/functions/cards.ts +2 -2
- package/src/functions/collectibles.ts +2 -2
- package/src/functions/dimensions.ts +2 -2
- package/src/functions/emptyRoom.ts +92 -0
- package/src/functions/enums.ts +4 -3
- package/src/functions/gridEntities.ts +2 -2
- package/src/functions/gridIndex.ts +40 -0
- package/src/functions/log.ts +9 -10
- package/src/functions/logEntities.ts +25 -9
- package/src/functions/pills.ts +4 -4
- package/src/functions/roomShape.ts +6 -1
- package/src/functions/roomShapeWalls.ts +342 -0
- package/src/functions/rooms.ts +22 -3
- package/src/functions/set.ts +12 -0
- package/src/functions/sprites.ts +2 -2
- package/src/functions/trinkets.ts +2 -2
- package/src/functions/utils.ts +20 -14
- package/src/index.ts +3 -0
- package/src/interfaces/Corner.ts +9 -0
- package/src/objects/roomShapeCorners.ts +74 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 13.
|
|
3
|
+
isaacscript-common 13.1.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -18509,7 +18509,10 @@ local ____cachedClasses = require("src.core.cachedClasses")
|
|
|
18509
18509
|
local game = ____cachedClasses.game
|
|
18510
18510
|
local ____consoleCommandsSet = require("src.sets.consoleCommandsSet")
|
|
18511
18511
|
local CONSOLE_COMMANDS_SET = ____consoleCommandsSet.CONSOLE_COMMANDS_SET
|
|
18512
|
-
function ____exports.
|
|
18512
|
+
function ____exports.eRange(self, start, ____end, increment)
|
|
18513
|
+
if increment == nil then
|
|
18514
|
+
increment = 1
|
|
18515
|
+
end
|
|
18513
18516
|
if ____end == nil then
|
|
18514
18517
|
____end = start
|
|
18515
18518
|
start = 0
|
|
@@ -18519,7 +18522,7 @@ function ____exports.erange(self, start, ____end)
|
|
|
18519
18522
|
local i = start
|
|
18520
18523
|
while i < ____end do
|
|
18521
18524
|
array[#array + 1] = i
|
|
18522
|
-
i = i +
|
|
18525
|
+
i = i + increment
|
|
18523
18526
|
end
|
|
18524
18527
|
end
|
|
18525
18528
|
return array
|
|
@@ -18531,7 +18534,10 @@ function ____exports.getTraversalDescription(self, key, traversalDescription)
|
|
|
18531
18534
|
traversalDescription = traversalDescription .. tostring(key)
|
|
18532
18535
|
return traversalDescription
|
|
18533
18536
|
end
|
|
18534
|
-
function ____exports.
|
|
18537
|
+
function ____exports.iRange(self, start, ____end, increment)
|
|
18538
|
+
if increment == nil then
|
|
18539
|
+
increment = 1
|
|
18540
|
+
end
|
|
18535
18541
|
if ____end == nil then
|
|
18536
18542
|
____end = start
|
|
18537
18543
|
start = 0
|
|
@@ -18541,7 +18547,7 @@ function ____exports.irange(self, start, ____end)
|
|
|
18541
18547
|
local i = start
|
|
18542
18548
|
while i <= ____end do
|
|
18543
18549
|
array[#array + 1] = i
|
|
18544
|
-
i = i +
|
|
18550
|
+
i = i + increment
|
|
18545
18551
|
end
|
|
18546
18552
|
end
|
|
18547
18553
|
return array
|
|
@@ -18616,7 +18622,7 @@ local ____types = require("src.functions.types")
|
|
|
18616
18622
|
local isNumber = ____types.isNumber
|
|
18617
18623
|
local isTable = ____types.isTable
|
|
18618
18624
|
local ____utils = require("src.functions.utils")
|
|
18619
|
-
local
|
|
18625
|
+
local eRange = ____utils.eRange
|
|
18620
18626
|
function ____exports.arrayRemoveAllInPlace(self, array, ...)
|
|
18621
18627
|
local elementsToRemove = {...}
|
|
18622
18628
|
local removedOneOrMoreElements = false
|
|
@@ -18831,7 +18837,7 @@ function ____exports.getArrayCombinations(self, array, includeEmptyArray, min, m
|
|
|
18831
18837
|
return all
|
|
18832
18838
|
end
|
|
18833
18839
|
function ____exports.getArrayIndexes(self, array)
|
|
18834
|
-
return
|
|
18840
|
+
return eRange(nil, #array)
|
|
18835
18841
|
end
|
|
18836
18842
|
function ____exports.getLastElement(self, array)
|
|
18837
18843
|
return array[#array]
|
|
@@ -18949,7 +18955,7 @@ local getRandomSeed = ____rng.getRandomSeed
|
|
|
18949
18955
|
local ____types = require("src.functions.types")
|
|
18950
18956
|
local isString = ____types.isString
|
|
18951
18957
|
local ____utils = require("src.functions.utils")
|
|
18952
|
-
local
|
|
18958
|
+
local iRange = ____utils.iRange
|
|
18953
18959
|
function ____exports.getEnumEntries(self, transpiledEnum)
|
|
18954
18960
|
local enumEntries = {}
|
|
18955
18961
|
for key, value in pairs(transpiledEnum) do
|
|
@@ -19028,7 +19034,6 @@ function ____exports.validateCustomEnum(self, transpiledEnumName, transpiledEnum
|
|
|
19028
19034
|
end
|
|
19029
19035
|
function ____exports.validateEnumContiguous(self, transpiledEnumName, transpiledEnum)
|
|
19030
19036
|
local values = ____exports.getEnumValues(nil, transpiledEnum)
|
|
19031
|
-
local valuesSet = __TS__New(Set, values)
|
|
19032
19037
|
local lastValue = values[#values]
|
|
19033
19038
|
if lastValue == nil then
|
|
19034
19039
|
error("Failed to validate that an enum was contiguous, since the last value was undefined.")
|
|
@@ -19036,7 +19041,8 @@ function ____exports.validateEnumContiguous(self, transpiledEnumName, transpiled
|
|
|
19036
19041
|
if type(lastValue) ~= "number" then
|
|
19037
19042
|
error("Failed to validate that an enum was contiguous, since the last value was not a number.")
|
|
19038
19043
|
end
|
|
19039
|
-
|
|
19044
|
+
local valuesSet = __TS__New(Set, values)
|
|
19045
|
+
for ____, value in ipairs(iRange(nil, lastValue)) do
|
|
19040
19046
|
if not valuesSet:has(value) then
|
|
19041
19047
|
error((("Failed to find a custom enum value of " .. tostring(value)) .. " for: ") .. transpiledEnumName)
|
|
19042
19048
|
end
|
|
@@ -21560,9 +21566,9 @@ local NUM_DIMENSIONS = ____constants.NUM_DIMENSIONS
|
|
|
21560
21566
|
local ____roomData = require("src.functions.roomData")
|
|
21561
21567
|
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
21562
21568
|
local ____utils = require("src.functions.utils")
|
|
21563
|
-
local
|
|
21569
|
+
local eRange = ____utils.eRange
|
|
21564
21570
|
function ____exports.getAllDimensions(self)
|
|
21565
|
-
return
|
|
21571
|
+
return eRange(nil, NUM_DIMENSIONS)
|
|
21566
21572
|
end
|
|
21567
21573
|
function ____exports.getDimension(self)
|
|
21568
21574
|
local level = game:GetLevel()
|
|
@@ -23608,7 +23614,7 @@ local VectorZero = ____constants.VectorZero
|
|
|
23608
23614
|
local ____kColor = require("src.functions.kColor")
|
|
23609
23615
|
local kColorEquals = ____kColor.kColorEquals
|
|
23610
23616
|
local ____utils = require("src.functions.utils")
|
|
23611
|
-
local
|
|
23617
|
+
local eRange = ____utils.eRange
|
|
23612
23618
|
function ____exports.texelEquals(self, sprite1, sprite2, position, layerID)
|
|
23613
23619
|
local kColor1 = sprite1:GetTexel(position, VectorZero, 1, layerID)
|
|
23614
23620
|
local kColor2 = sprite2:GetTexel(position, VectorZero, 1, layerID)
|
|
@@ -23618,7 +23624,7 @@ function ____exports.clearSprite(self, sprite, ...)
|
|
|
23618
23624
|
local layerIDs = {...}
|
|
23619
23625
|
if #layerIDs == 0 then
|
|
23620
23626
|
local numLayers = sprite:GetLayerCount()
|
|
23621
|
-
layerIDs =
|
|
23627
|
+
layerIDs = eRange(nil, numLayers)
|
|
23622
23628
|
end
|
|
23623
23629
|
for ____, layerID in ipairs(layerIDs) do
|
|
23624
23630
|
sprite:ReplaceSpritesheet(layerID, EMPTY_PNG_PATH)
|
|
@@ -23707,7 +23713,7 @@ local ____sprites = require("src.functions.sprites")
|
|
|
23707
23713
|
local clearSprite = ____sprites.clearSprite
|
|
23708
23714
|
local spriteEquals = ____sprites.spriteEquals
|
|
23709
23715
|
local ____utils = require("src.functions.utils")
|
|
23710
|
-
local
|
|
23716
|
+
local iRange = ____utils.iRange
|
|
23711
23717
|
function initQuestionMarkSprite(self)
|
|
23712
23718
|
local sprite = Sprite()
|
|
23713
23719
|
sprite:Load("gfx/005.100_collectible.anm2", false)
|
|
@@ -23904,7 +23910,7 @@ function ____exports.getCollectibleTags(self, collectibleType)
|
|
|
23904
23910
|
return itemConfigItem == nil and ItemConfigTagZero or itemConfigItem.Tags
|
|
23905
23911
|
end
|
|
23906
23912
|
function ____exports.getVanillaCollectibleTypeRange(self)
|
|
23907
|
-
return
|
|
23913
|
+
return iRange(nil, FIRST_COLLECTIBLE_TYPE, LAST_VANILLA_COLLECTIBLE_TYPE)
|
|
23908
23914
|
end
|
|
23909
23915
|
function ____exports.isActiveCollectible(self, collectibleType)
|
|
23910
23916
|
local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
|
|
@@ -24024,7 +24030,7 @@ local asNumber = ____types.asNumber
|
|
|
24024
24030
|
local asPillEffect = ____types.asPillEffect
|
|
24025
24031
|
local asTrinketType = ____types.asTrinketType
|
|
24026
24032
|
local ____utils = require("src.functions.utils")
|
|
24027
|
-
local
|
|
24033
|
+
local iRange = ____utils.iRange
|
|
24028
24034
|
function postNewRoomEarly(self)
|
|
24029
24035
|
atLeastOneCallbackFired = true
|
|
24030
24036
|
end
|
|
@@ -24100,7 +24106,7 @@ function ____exports.getModdedCollectibleTypes(self)
|
|
|
24100
24106
|
return {}
|
|
24101
24107
|
end
|
|
24102
24108
|
local lastCollectibleType = ____exports.getLastCollectibleType(nil)
|
|
24103
|
-
return
|
|
24109
|
+
return iRange(nil, firstModdedCollectibleType, lastCollectibleType)
|
|
24104
24110
|
end
|
|
24105
24111
|
function ____exports.getNumCollectibleTypes(self)
|
|
24106
24112
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
@@ -24136,7 +24142,7 @@ function ____exports.getModdedTrinketTypes(self)
|
|
|
24136
24142
|
return {}
|
|
24137
24143
|
end
|
|
24138
24144
|
local lastTrinketType = ____exports.getLastTrinketType(nil)
|
|
24139
|
-
return
|
|
24145
|
+
return iRange(nil, firstModdedTrinketType, lastTrinketType)
|
|
24140
24146
|
end
|
|
24141
24147
|
function ____exports.getNumModdedTrinketTypes(self)
|
|
24142
24148
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
@@ -24146,11 +24152,11 @@ function ____exports.getNumModdedTrinketTypes(self)
|
|
|
24146
24152
|
end
|
|
24147
24153
|
function ____exports.getTrinketTypes(self)
|
|
24148
24154
|
local lastTrinketType = ____exports.getLastTrinketType(nil)
|
|
24149
|
-
return
|
|
24155
|
+
return iRange(nil, FIRST_TRINKET_TYPE, lastTrinketType)
|
|
24150
24156
|
end
|
|
24151
24157
|
function ____exports.getAllCardTypes(self)
|
|
24152
24158
|
local lastCardType = ____exports.getLastCardType(nil)
|
|
24153
|
-
return
|
|
24159
|
+
return iRange(nil, FIRST_CARD_TYPE, lastCardType)
|
|
24154
24160
|
end
|
|
24155
24161
|
function ____exports.getFirstModdedCardType(self)
|
|
24156
24162
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
@@ -24174,7 +24180,7 @@ function ____exports.getModdedCardTypes(self)
|
|
|
24174
24180
|
return {}
|
|
24175
24181
|
end
|
|
24176
24182
|
local lastCardType = ____exports.getLastCardType(nil)
|
|
24177
|
-
return
|
|
24183
|
+
return iRange(nil, firstModdedCardType, lastCardType)
|
|
24178
24184
|
end
|
|
24179
24185
|
function ____exports.getNumModdedCardTypes(self)
|
|
24180
24186
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
@@ -24184,7 +24190,7 @@ function ____exports.getNumModdedCardTypes(self)
|
|
|
24184
24190
|
end
|
|
24185
24191
|
function ____exports.getAllPillEffects(self)
|
|
24186
24192
|
local lastPillEffect = ____exports.getLastPillEffect(nil)
|
|
24187
|
-
return
|
|
24193
|
+
return iRange(nil, FIRST_PILL_EFFECT, lastPillEffect)
|
|
24188
24194
|
end
|
|
24189
24195
|
function ____exports.getFirstModdedPillEffect(self)
|
|
24190
24196
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
@@ -24208,7 +24214,7 @@ function ____exports.getModdedPillEffects(self)
|
|
|
24208
24214
|
return {}
|
|
24209
24215
|
end
|
|
24210
24216
|
local lastPillEffect = ____exports.getLastPillEffect(nil)
|
|
24211
|
-
return
|
|
24217
|
+
return iRange(nil, firstModdedPillEffect, lastPillEffect)
|
|
24212
24218
|
end
|
|
24213
24219
|
function ____exports.getNumModdedPillEffects(self)
|
|
24214
24220
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
@@ -25069,255 +25075,309 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
25069
25075
|
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
25070
25076
|
local ____CornerType = require("src.enums.CornerType")
|
|
25071
25077
|
local CornerType = ____CornerType.CornerType
|
|
25072
|
-
local TWO_BY_TWO_CENTER_X = 580
|
|
25073
|
-
local TWO_BY_TWO_CENTER_Y = 420
|
|
25074
25078
|
____exports.ROOM_SHAPE_CORNERS = {
|
|
25075
25079
|
[RoomShape.SHAPE_1x1] = {
|
|
25076
25080
|
{
|
|
25077
25081
|
type = CornerType.TOP_LEFT,
|
|
25082
|
+
gridIndex = 0,
|
|
25078
25083
|
position = Vector(60, 140)
|
|
25079
25084
|
},
|
|
25080
25085
|
{
|
|
25081
25086
|
type = CornerType.TOP_RIGHT,
|
|
25087
|
+
gridIndex = 14,
|
|
25082
25088
|
position = Vector(580, 140)
|
|
25083
25089
|
},
|
|
25084
25090
|
{
|
|
25085
25091
|
type = CornerType.BOTTOM_LEFT,
|
|
25092
|
+
gridIndex = 120,
|
|
25086
25093
|
position = Vector(60, 420)
|
|
25087
25094
|
},
|
|
25088
25095
|
{
|
|
25089
25096
|
type = CornerType.BOTTOM_RIGHT,
|
|
25097
|
+
gridIndex = 134,
|
|
25090
25098
|
position = Vector(580, 420)
|
|
25091
25099
|
}
|
|
25092
25100
|
},
|
|
25093
25101
|
[RoomShape.IH] = {
|
|
25094
25102
|
{
|
|
25095
25103
|
type = CornerType.TOP_LEFT,
|
|
25104
|
+
gridIndex = 30,
|
|
25096
25105
|
position = Vector(60, 220)
|
|
25097
25106
|
},
|
|
25098
25107
|
{
|
|
25099
25108
|
type = CornerType.TOP_RIGHT,
|
|
25109
|
+
gridIndex = 44,
|
|
25100
25110
|
position = Vector(580, 220)
|
|
25101
25111
|
},
|
|
25102
25112
|
{
|
|
25103
25113
|
type = CornerType.BOTTOM_LEFT,
|
|
25114
|
+
gridIndex = 90,
|
|
25104
25115
|
position = Vector(60, 340)
|
|
25105
25116
|
},
|
|
25106
25117
|
{
|
|
25107
25118
|
type = CornerType.BOTTOM_RIGHT,
|
|
25119
|
+
gridIndex = 104,
|
|
25108
25120
|
position = Vector(580, 340)
|
|
25109
25121
|
}
|
|
25110
25122
|
},
|
|
25111
25123
|
[RoomShape.IV] = {
|
|
25112
25124
|
{
|
|
25113
25125
|
type = CornerType.TOP_LEFT,
|
|
25126
|
+
gridIndex = 4,
|
|
25114
25127
|
position = Vector(220, 140)
|
|
25115
25128
|
},
|
|
25116
25129
|
{
|
|
25117
25130
|
type = CornerType.TOP_RIGHT,
|
|
25131
|
+
gridIndex = 10,
|
|
25118
25132
|
position = Vector(420, 140)
|
|
25119
25133
|
},
|
|
25120
25134
|
{
|
|
25121
25135
|
type = CornerType.BOTTOM_LEFT,
|
|
25136
|
+
gridIndex = 124,
|
|
25122
25137
|
position = Vector(220, 420)
|
|
25123
25138
|
},
|
|
25124
25139
|
{
|
|
25125
25140
|
type = CornerType.BOTTOM_RIGHT,
|
|
25141
|
+
gridIndex = 130,
|
|
25126
25142
|
position = Vector(420, 420)
|
|
25127
25143
|
}
|
|
25128
25144
|
},
|
|
25129
25145
|
[RoomShape.SHAPE_1x2] = {
|
|
25130
25146
|
{
|
|
25131
25147
|
type = CornerType.TOP_LEFT,
|
|
25148
|
+
gridIndex = 0,
|
|
25132
25149
|
position = Vector(60, 140)
|
|
25133
25150
|
},
|
|
25134
25151
|
{
|
|
25135
25152
|
type = CornerType.TOP_RIGHT,
|
|
25153
|
+
gridIndex = 14,
|
|
25136
25154
|
position = Vector(580, 140)
|
|
25137
25155
|
},
|
|
25138
25156
|
{
|
|
25139
25157
|
type = CornerType.BOTTOM_LEFT,
|
|
25158
|
+
gridIndex = 225,
|
|
25140
25159
|
position = Vector(60, 700)
|
|
25141
25160
|
},
|
|
25142
25161
|
{
|
|
25143
25162
|
type = CornerType.BOTTOM_RIGHT,
|
|
25163
|
+
gridIndex = 239,
|
|
25144
25164
|
position = Vector(580, 700)
|
|
25145
25165
|
}
|
|
25146
25166
|
},
|
|
25147
25167
|
[RoomShape.IIV] = {
|
|
25148
25168
|
{
|
|
25149
25169
|
type = CornerType.TOP_LEFT,
|
|
25170
|
+
gridIndex = 4,
|
|
25150
25171
|
position = Vector(220, 140)
|
|
25151
25172
|
},
|
|
25152
25173
|
{
|
|
25153
25174
|
type = CornerType.TOP_RIGHT,
|
|
25175
|
+
gridIndex = 10,
|
|
25154
25176
|
position = Vector(420, 140)
|
|
25155
25177
|
},
|
|
25156
25178
|
{
|
|
25157
25179
|
type = CornerType.BOTTOM_LEFT,
|
|
25180
|
+
gridIndex = 229,
|
|
25158
25181
|
position = Vector(220, 700)
|
|
25159
25182
|
},
|
|
25160
25183
|
{
|
|
25161
25184
|
type = CornerType.BOTTOM_RIGHT,
|
|
25185
|
+
gridIndex = 235,
|
|
25162
25186
|
position = Vector(420, 700)
|
|
25163
25187
|
}
|
|
25164
25188
|
},
|
|
25165
25189
|
[RoomShape.SHAPE_2x1] = {
|
|
25166
25190
|
{
|
|
25167
25191
|
type = CornerType.TOP_LEFT,
|
|
25192
|
+
gridIndex = 0,
|
|
25168
25193
|
position = Vector(60, 140)
|
|
25169
25194
|
},
|
|
25170
25195
|
{
|
|
25171
25196
|
type = CornerType.TOP_RIGHT,
|
|
25197
|
+
gridIndex = 27,
|
|
25172
25198
|
position = Vector(1100, 140)
|
|
25173
25199
|
},
|
|
25174
25200
|
{
|
|
25175
25201
|
type = CornerType.BOTTOM_LEFT,
|
|
25202
|
+
gridIndex = 224,
|
|
25176
25203
|
position = Vector(60, 420)
|
|
25177
25204
|
},
|
|
25178
25205
|
{
|
|
25179
25206
|
type = CornerType.BOTTOM_RIGHT,
|
|
25207
|
+
gridIndex = 251,
|
|
25180
25208
|
position = Vector(1100, 420)
|
|
25181
25209
|
}
|
|
25182
25210
|
},
|
|
25183
25211
|
[RoomShape.IIH] = {
|
|
25184
25212
|
{
|
|
25185
25213
|
type = CornerType.TOP_LEFT,
|
|
25214
|
+
gridIndex = 56,
|
|
25186
25215
|
position = Vector(60, 220)
|
|
25187
25216
|
},
|
|
25188
25217
|
{
|
|
25189
25218
|
type = CornerType.TOP_RIGHT,
|
|
25219
|
+
gridIndex = 83,
|
|
25190
25220
|
position = Vector(1100, 220)
|
|
25191
25221
|
},
|
|
25192
25222
|
{
|
|
25193
25223
|
type = CornerType.BOTTOM_LEFT,
|
|
25224
|
+
gridIndex = 168,
|
|
25194
25225
|
position = Vector(60, 340)
|
|
25195
25226
|
},
|
|
25196
25227
|
{
|
|
25197
25228
|
type = CornerType.BOTTOM_RIGHT,
|
|
25229
|
+
gridIndex = 195,
|
|
25198
25230
|
position = Vector(1100, 340)
|
|
25199
25231
|
}
|
|
25200
25232
|
},
|
|
25201
25233
|
[RoomShape.SHAPE_2x2] = {
|
|
25202
25234
|
{
|
|
25203
25235
|
type = CornerType.TOP_LEFT,
|
|
25236
|
+
gridIndex = 0,
|
|
25204
25237
|
position = Vector(60, 140)
|
|
25205
25238
|
},
|
|
25206
25239
|
{
|
|
25207
25240
|
type = CornerType.TOP_RIGHT,
|
|
25241
|
+
gridIndex = 27,
|
|
25208
25242
|
position = Vector(1100, 140)
|
|
25209
25243
|
},
|
|
25210
25244
|
{
|
|
25211
25245
|
type = CornerType.BOTTOM_LEFT,
|
|
25246
|
+
gridIndex = 420,
|
|
25212
25247
|
position = Vector(60, 700)
|
|
25213
25248
|
},
|
|
25214
25249
|
{
|
|
25215
25250
|
type = CornerType.BOTTOM_RIGHT,
|
|
25251
|
+
gridIndex = 447,
|
|
25216
25252
|
position = Vector(1100, 700)
|
|
25217
25253
|
}
|
|
25218
25254
|
},
|
|
25219
25255
|
[RoomShape.LTL] = {
|
|
25220
25256
|
{
|
|
25221
25257
|
type = CornerType.TOP_LEFT,
|
|
25222
|
-
|
|
25258
|
+
gridIndex = 13,
|
|
25259
|
+
position = Vector(580, 140)
|
|
25223
25260
|
},
|
|
25224
25261
|
{
|
|
25225
25262
|
type = CornerType.TOP_RIGHT,
|
|
25263
|
+
gridIndex = 27,
|
|
25226
25264
|
position = Vector(1100, 140)
|
|
25227
25265
|
},
|
|
25228
25266
|
{
|
|
25229
25267
|
type = CornerType.TOP_LEFT,
|
|
25230
|
-
|
|
25268
|
+
gridIndex = 196,
|
|
25269
|
+
position = Vector(60, 420)
|
|
25231
25270
|
},
|
|
25232
25271
|
{
|
|
25233
25272
|
type = CornerType.BOTTOM_RIGHT,
|
|
25234
|
-
|
|
25273
|
+
gridIndex = 209,
|
|
25274
|
+
position = Vector(580, 420)
|
|
25235
25275
|
},
|
|
25236
25276
|
{
|
|
25237
25277
|
type = CornerType.BOTTOM_LEFT,
|
|
25278
|
+
gridIndex = 420,
|
|
25238
25279
|
position = Vector(60, 700)
|
|
25239
25280
|
},
|
|
25240
25281
|
{
|
|
25241
25282
|
type = CornerType.BOTTOM_RIGHT,
|
|
25283
|
+
gridIndex = 447,
|
|
25242
25284
|
position = Vector(1100, 700)
|
|
25243
25285
|
}
|
|
25244
25286
|
},
|
|
25245
25287
|
[RoomShape.LTR] = {
|
|
25246
25288
|
{
|
|
25247
25289
|
type = CornerType.TOP_LEFT,
|
|
25290
|
+
gridIndex = 0,
|
|
25248
25291
|
position = Vector(60, 140)
|
|
25249
25292
|
},
|
|
25250
25293
|
{
|
|
25251
25294
|
type = CornerType.TOP_RIGHT,
|
|
25252
|
-
|
|
25295
|
+
gridIndex = 14,
|
|
25296
|
+
position = Vector(580, 140)
|
|
25253
25297
|
},
|
|
25254
25298
|
{
|
|
25255
25299
|
type = CornerType.BOTTOM_LEFT,
|
|
25256
|
-
|
|
25300
|
+
gridIndex = 210,
|
|
25301
|
+
position = Vector(580, 420)
|
|
25257
25302
|
},
|
|
25258
25303
|
{
|
|
25259
25304
|
type = CornerType.TOP_RIGHT,
|
|
25260
|
-
|
|
25305
|
+
gridIndex = 223,
|
|
25306
|
+
position = Vector(1100, 420)
|
|
25261
25307
|
},
|
|
25262
25308
|
{
|
|
25263
25309
|
type = CornerType.BOTTOM_LEFT,
|
|
25310
|
+
gridIndex = 420,
|
|
25264
25311
|
position = Vector(60, 700)
|
|
25265
25312
|
},
|
|
25266
25313
|
{
|
|
25267
25314
|
type = CornerType.BOTTOM_RIGHT,
|
|
25315
|
+
gridIndex = 447,
|
|
25268
25316
|
position = Vector(1100, 700)
|
|
25269
25317
|
}
|
|
25270
25318
|
},
|
|
25271
25319
|
[RoomShape.LBL] = {
|
|
25272
25320
|
{
|
|
25273
25321
|
type = CornerType.TOP_LEFT,
|
|
25322
|
+
gridIndex = 0,
|
|
25274
25323
|
position = Vector(60, 140)
|
|
25275
25324
|
},
|
|
25276
25325
|
{
|
|
25277
25326
|
type = CornerType.TOP_RIGHT,
|
|
25327
|
+
gridIndex = 27,
|
|
25278
25328
|
position = Vector(1100, 140)
|
|
25279
25329
|
},
|
|
25280
25330
|
{
|
|
25281
25331
|
type = CornerType.BOTTOM_LEFT,
|
|
25282
|
-
|
|
25332
|
+
gridIndex = 224,
|
|
25333
|
+
position = Vector(580, 140)
|
|
25283
25334
|
},
|
|
25284
25335
|
{
|
|
25285
25336
|
type = CornerType.TOP_RIGHT,
|
|
25286
|
-
|
|
25337
|
+
gridIndex = 237,
|
|
25338
|
+
position = Vector(580, 420)
|
|
25287
25339
|
},
|
|
25288
25340
|
{
|
|
25289
25341
|
type = CornerType.BOTTOM_LEFT,
|
|
25290
|
-
|
|
25342
|
+
gridIndex = 433,
|
|
25343
|
+
position = Vector(580, 700)
|
|
25291
25344
|
},
|
|
25292
25345
|
{
|
|
25293
25346
|
type = CornerType.BOTTOM_RIGHT,
|
|
25347
|
+
gridIndex = 447,
|
|
25294
25348
|
position = Vector(1100, 700)
|
|
25295
25349
|
}
|
|
25296
25350
|
},
|
|
25297
25351
|
[RoomShape.LBR] = {
|
|
25298
25352
|
{
|
|
25299
25353
|
type = CornerType.TOP_LEFT,
|
|
25354
|
+
gridIndex = 0,
|
|
25300
25355
|
position = Vector(60, 140)
|
|
25301
25356
|
},
|
|
25302
25357
|
{
|
|
25303
25358
|
type = CornerType.TOP_RIGHT,
|
|
25359
|
+
gridIndex = 27,
|
|
25304
25360
|
position = Vector(1100, 140)
|
|
25305
25361
|
},
|
|
25306
25362
|
{
|
|
25307
25363
|
type = CornerType.TOP_LEFT,
|
|
25308
|
-
|
|
25364
|
+
gridIndex = 238,
|
|
25365
|
+
position = Vector(580, 420)
|
|
25309
25366
|
},
|
|
25310
25367
|
{
|
|
25311
25368
|
type = CornerType.BOTTOM_RIGHT,
|
|
25312
|
-
|
|
25369
|
+
gridIndex = 251,
|
|
25370
|
+
position = Vector(1100, 420)
|
|
25313
25371
|
},
|
|
25314
25372
|
{
|
|
25315
25373
|
type = CornerType.BOTTOM_LEFT,
|
|
25374
|
+
gridIndex = 420,
|
|
25316
25375
|
position = Vector(60, 700)
|
|
25317
25376
|
},
|
|
25318
25377
|
{
|
|
25319
25378
|
type = CornerType.BOTTOM_RIGHT,
|
|
25320
|
-
|
|
25379
|
+
gridIndex = 434,
|
|
25380
|
+
position = Vector(580, 700)
|
|
25321
25381
|
}
|
|
25322
25382
|
}
|
|
25323
25383
|
}
|
|
@@ -26317,6 +26377,12 @@ function ____exports.getSetCombinations(self, set, includeEmptyArray)
|
|
|
26317
26377
|
function(____, array) return __TS__New(Set, array) end
|
|
26318
26378
|
)
|
|
26319
26379
|
end
|
|
26380
|
+
function ____exports.setAdd(self, set, ...)
|
|
26381
|
+
local elements = {...}
|
|
26382
|
+
for ____, element in ipairs(elements) do
|
|
26383
|
+
set:add(element)
|
|
26384
|
+
end
|
|
26385
|
+
end
|
|
26320
26386
|
function ____exports.sumSet(self, set)
|
|
26321
26387
|
local values = {__TS__Spread(set:values())}
|
|
26322
26388
|
return sumArray(nil, values)
|
|
@@ -26749,7 +26815,7 @@ local clearSprite = ____sprites.clearSprite
|
|
|
26749
26815
|
local ____types = require("src.functions.types")
|
|
26750
26816
|
local asNumber = ____types.asNumber
|
|
26751
26817
|
local ____utils = require("src.functions.utils")
|
|
26752
|
-
local
|
|
26818
|
+
local iRange = ____utils.iRange
|
|
26753
26819
|
function ____exports.isVanillaTrinketType(self, trinketType)
|
|
26754
26820
|
return trinketType <= LAST_VANILLA_TRINKET_TYPE
|
|
26755
26821
|
end
|
|
@@ -26804,7 +26870,7 @@ function ____exports.getTrinketName(self, trinketType)
|
|
|
26804
26870
|
return DEFAULT_TRINKET_NAME
|
|
26805
26871
|
end
|
|
26806
26872
|
function ____exports.getVanillaTrinketTypes(self)
|
|
26807
|
-
return
|
|
26873
|
+
return iRange(nil, FIRST_TRINKET_TYPE, LAST_VANILLA_TRINKET_TYPE)
|
|
26808
26874
|
end
|
|
26809
26875
|
function ____exports.hasOpenTrinketSlot(self, player)
|
|
26810
26876
|
if isCharacter(nil, player, PlayerType.THE_SOUL_B) then
|
|
@@ -27140,38 +27206,39 @@ function ____exports.logRoom(self)
|
|
|
27140
27206
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
27141
27207
|
local roomListIndex = getRoomListIndex(nil)
|
|
27142
27208
|
local roomData = getRoomData(nil)
|
|
27209
|
+
____exports.log(nil, "Current room information:")
|
|
27143
27210
|
if roomData == nil then
|
|
27144
|
-
____exports.log(nil, "
|
|
27211
|
+
____exports.log(nil, "- Room data is undefined.")
|
|
27145
27212
|
else
|
|
27146
27213
|
____exports.log(
|
|
27147
27214
|
nil,
|
|
27148
|
-
"
|
|
27215
|
+
"- Room stage ID: " .. tostring(roomData.StageID)
|
|
27149
27216
|
)
|
|
27150
27217
|
____exports.log(
|
|
27151
27218
|
nil,
|
|
27152
|
-
(((("
|
|
27219
|
+
(((("- Type/variant/sub-type: " .. tostring(roomData.Type)) .. ".") .. tostring(roomData.Variant)) .. ".") .. tostring(roomData.Subtype)
|
|
27153
27220
|
)
|
|
27154
|
-
____exports.log(nil, "
|
|
27221
|
+
____exports.log(nil, "- Name: " .. roomData.Name)
|
|
27155
27222
|
end
|
|
27156
27223
|
local roomGridIndexName = GridRoom[roomGridIndex]
|
|
27157
27224
|
if roomGridIndexName == nil then
|
|
27158
27225
|
____exports.log(
|
|
27159
27226
|
nil,
|
|
27160
|
-
"
|
|
27227
|
+
"- Grid index: " .. tostring(roomGridIndex)
|
|
27161
27228
|
)
|
|
27162
27229
|
else
|
|
27163
27230
|
____exports.log(
|
|
27164
27231
|
nil,
|
|
27165
|
-
((("
|
|
27232
|
+
((("- Grid index: GridRoom." .. roomGridIndexName) .. " (") .. tostring(roomGridIndex)) .. ")"
|
|
27166
27233
|
)
|
|
27167
27234
|
end
|
|
27168
27235
|
____exports.log(
|
|
27169
27236
|
nil,
|
|
27170
|
-
"
|
|
27237
|
+
"- List index: " .. tostring(roomListIndex)
|
|
27171
27238
|
)
|
|
27172
27239
|
____exports.log(
|
|
27173
27240
|
nil,
|
|
27174
|
-
"
|
|
27241
|
+
"- Boss ID: " .. tostring(bossID)
|
|
27175
27242
|
)
|
|
27176
27243
|
end
|
|
27177
27244
|
function ____exports.logSeedEffects(self)
|
|
@@ -29609,6 +29676,7 @@ local DownpourRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.DownpourRoomSub
|
|
|
29609
29676
|
local DungeonSubType = ____isaac_2Dtypescript_2Ddefinitions.DungeonSubType
|
|
29610
29677
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
29611
29678
|
local HomeRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.HomeRoomSubType
|
|
29679
|
+
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
29612
29680
|
local RoomDescriptorFlag = ____isaac_2Dtypescript_2Ddefinitions.RoomDescriptorFlag
|
|
29613
29681
|
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
29614
29682
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
@@ -29655,7 +29723,7 @@ local getGotoCommand = ____stage.getGotoCommand
|
|
|
29655
29723
|
local ____types = require("src.functions.types")
|
|
29656
29724
|
local asNumber = ____types.asNumber
|
|
29657
29725
|
local ____utils = require("src.functions.utils")
|
|
29658
|
-
local
|
|
29726
|
+
local iRange = ____utils.iRange
|
|
29659
29727
|
function ____exports.getReadOnlyRooms(self)
|
|
29660
29728
|
local level = game:GetLevel()
|
|
29661
29729
|
local roomList = level:GetRooms()
|
|
@@ -29680,7 +29748,7 @@ function ____exports.getRoomsInsideGrid(self, includeExtraDimensionalRooms)
|
|
|
29680
29748
|
local dimensions = includeExtraDimensionalRooms and getAllDimensions(nil) or ({Dimension.CURRENT})
|
|
29681
29749
|
local roomDescriptorMap = __TS__New(Map)
|
|
29682
29750
|
for ____, dimension in ipairs(dimensions) do
|
|
29683
|
-
for ____, roomGridIndex in ipairs(
|
|
29751
|
+
for ____, roomGridIndex in ipairs(iRange(nil, MAX_LEVEL_GRID_INDEX)) do
|
|
29684
29752
|
local roomDescriptor = level:GetRoomByIdx(roomGridIndex, dimension)
|
|
29685
29753
|
if roomDescriptor.Data ~= nil then
|
|
29686
29754
|
local ptrHash = GetPtrHash(roomDescriptor)
|
|
@@ -29752,7 +29820,7 @@ end
|
|
|
29752
29820
|
function ____exports.getRoomsOfDimension(self, dimension)
|
|
29753
29821
|
local level = game:GetLevel()
|
|
29754
29822
|
local roomsMap = __TS__New(Map)
|
|
29755
|
-
for ____, roomGridIndex in ipairs(
|
|
29823
|
+
for ____, roomGridIndex in ipairs(iRange(nil, MAX_LEVEL_GRID_INDEX)) do
|
|
29756
29824
|
local roomDescriptor = level:GetRoomByIdx(roomGridIndex, dimension)
|
|
29757
29825
|
if roomDescriptor.Data ~= nil then
|
|
29758
29826
|
local ptrHash = GetPtrHash(roomDescriptor)
|
|
@@ -29810,6 +29878,12 @@ function ____exports.inGenesisRoom(self)
|
|
|
29810
29878
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
29811
29879
|
return roomGridIndex == asNumber(nil, GridRoom.GENESIS)
|
|
29812
29880
|
end
|
|
29881
|
+
function ____exports.inHomeCloset(self)
|
|
29882
|
+
local level = game:GetLevel()
|
|
29883
|
+
local stage = level:GetStage()
|
|
29884
|
+
local roomSubType = getRoomSubType(nil)
|
|
29885
|
+
return stage == LevelStage.HOME and (roomSubType == asNumber(nil, HomeRoomSubType.CLOSET_LEFT) or roomSubType == asNumber(nil, HomeRoomSubType.CLOSET_RIGHT))
|
|
29886
|
+
end
|
|
29813
29887
|
function ____exports.inLRoom(self)
|
|
29814
29888
|
local room = game:GetRoom()
|
|
29815
29889
|
local roomShape = room:GetRoomShape()
|
|
@@ -29892,12 +29966,12 @@ function ____exports.setRoomCleared(self)
|
|
|
29892
29966
|
for ____, door in ipairs(getDoors(nil)) do
|
|
29893
29967
|
do
|
|
29894
29968
|
if isHiddenSecretRoomDoor(nil, door) then
|
|
29895
|
-
goto
|
|
29969
|
+
goto __continue53
|
|
29896
29970
|
end
|
|
29897
29971
|
openDoorFast(nil, door)
|
|
29898
29972
|
door.ExtraVisible = false
|
|
29899
29973
|
end
|
|
29900
|
-
::
|
|
29974
|
+
::__continue53::
|
|
29901
29975
|
end
|
|
29902
29976
|
sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
|
|
29903
29977
|
game:ShakeScreen(0)
|
|
@@ -29949,14 +30023,14 @@ local ____types = require("src.functions.types")
|
|
|
29949
30023
|
local asNumber = ____types.asNumber
|
|
29950
30024
|
local isNumber = ____types.isNumber
|
|
29951
30025
|
local ____utils = require("src.functions.utils")
|
|
29952
|
-
local
|
|
30026
|
+
local eRange = ____utils.eRange
|
|
29953
30027
|
local ____vector = require("src.functions.vector")
|
|
29954
30028
|
local isVector = ____vector.isVector
|
|
29955
30029
|
local vectorEquals = ____vector.vectorEquals
|
|
29956
30030
|
function ____exports.getAllGridIndexes(self)
|
|
29957
30031
|
local room = game:GetRoom()
|
|
29958
30032
|
local gridSize = room:GetGridSize()
|
|
29959
|
-
return
|
|
30033
|
+
return eRange(nil, gridSize)
|
|
29960
30034
|
end
|
|
29961
30035
|
function getAllGridEntities(self)
|
|
29962
30036
|
local room = game:GetRoom()
|
|
@@ -36234,8 +36308,8 @@ local ____string = require("src.functions.string")
|
|
|
36234
36308
|
local removeCharactersBefore = ____string.removeCharactersBefore
|
|
36235
36309
|
local trimPrefix = ____string.trimPrefix
|
|
36236
36310
|
local ____utils = require("src.functions.utils")
|
|
36237
|
-
local
|
|
36238
|
-
local
|
|
36311
|
+
local eRange = ____utils.eRange
|
|
36312
|
+
local iRange = ____utils.iRange
|
|
36239
36313
|
local ____constants = require("src.features.customStage.constants")
|
|
36240
36314
|
local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____constants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
|
|
36241
36315
|
function getBackdropPNGPath(self, customStage, backdropKind, rng)
|
|
@@ -36267,7 +36341,7 @@ function spawnWallEntity(self, customStage, rng, isExtraWall)
|
|
|
36267
36341
|
local cornerPNGPath = getBackdropPNGPath(nil, customStage, BackdropKind.CORNER, rng)
|
|
36268
36342
|
sprite:ReplaceSpritesheet(0, cornerPNGPath)
|
|
36269
36343
|
end
|
|
36270
|
-
for ____, layerID in ipairs(
|
|
36344
|
+
for ____, layerID in ipairs(iRange(nil, 1, numWallLayers)) do
|
|
36271
36345
|
local wallPNGPath = getBackdropPNGPath(nil, customStage, BackdropKind.WALL, rng)
|
|
36272
36346
|
sprite:ReplaceSpritesheet(layerID, wallPNGPath)
|
|
36273
36347
|
end
|
|
@@ -36306,7 +36380,7 @@ function spawnFloorEntity(self, customStage, rng)
|
|
|
36306
36380
|
sprite:Load(ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH .. "/floor-backdrop.anm2", false)
|
|
36307
36381
|
local numFloorLayers = getNumFloorLayers(nil, roomShape)
|
|
36308
36382
|
if numFloorLayers ~= nil then
|
|
36309
|
-
for ____, layerID in ipairs(
|
|
36383
|
+
for ____, layerID in ipairs(eRange(nil, 0, numFloorLayers)) do
|
|
36310
36384
|
local wallPNGPath = getBackdropPNGPath(nil, customStage, BackdropKind.WALL, rng)
|
|
36311
36385
|
sprite:ReplaceSpritesheet(layerID, wallPNGPath)
|
|
36312
36386
|
end
|
|
@@ -39732,7 +39806,7 @@ local getRoomSubType = ____roomData.getRoomSubType
|
|
|
39732
39806
|
local ____string = require("src.functions.string")
|
|
39733
39807
|
local removeCharactersBefore = ____string.removeCharactersBefore
|
|
39734
39808
|
local ____utils = require("src.functions.utils")
|
|
39735
|
-
local
|
|
39809
|
+
local eRange = ____utils.eRange
|
|
39736
39810
|
local ____bossNamePNGFileNames = require("src.objects.bossNamePNGFileNames")
|
|
39737
39811
|
local BOSS_NAME_PNG_FILE_NAMES = ____bossNamePNGFileNames.BOSS_NAME_PNG_FILE_NAMES
|
|
39738
39812
|
local ____bossPortraitPNGFileNames = require("src.objects.bossPortraitPNGFileNames")
|
|
@@ -39834,7 +39908,7 @@ local OVERLAY_ANM2_LAYER = 11
|
|
|
39834
39908
|
local PLAYER_PORTRAIT_ALT_ANM2_LAYER = 12
|
|
39835
39909
|
local OTHER_ANM2_LAYERS = arrayRemove(
|
|
39836
39910
|
nil,
|
|
39837
|
-
|
|
39911
|
+
eRange(nil, NUM_VERSUS_SCREEN_ANM2_LAYERS),
|
|
39838
39912
|
BACKGROUND_ANM2_LAYER,
|
|
39839
39913
|
BOSS_DIRT_SPOT_ANM2_LAYER,
|
|
39840
39914
|
PLAYER_DIRT_SPOT_ANM2_LAYER,
|
|
@@ -40800,6 +40874,379 @@ function ____exports.customTrapdoorInit(self, mod)
|
|
|
40800
40874
|
mod:AddCallback(ModCallback.POST_PEFFECT_UPDATE, postPEffectUpdate)
|
|
40801
40875
|
mod:AddCallbackCustom(ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_UPDATE, postGridEntityCustomUpdateTrapdoor, GridEntityTypeCustom.TRAPDOOR_CUSTOM)
|
|
40802
40876
|
end
|
|
40877
|
+
return ____exports
|
|
40878
|
+
end,
|
|
40879
|
+
["src.functions.gridIndex"] = function(...)
|
|
40880
|
+
local ____exports = {}
|
|
40881
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
40882
|
+
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
40883
|
+
local ____roomShape = require("src.functions.roomShape")
|
|
40884
|
+
local getRoomShapeWidth = ____roomShape.getRoomShapeWidth
|
|
40885
|
+
local ____utils = require("src.functions.utils")
|
|
40886
|
+
local iRange = ____utils.iRange
|
|
40887
|
+
function ____exports.getGridIndexesBetween(self, gridIndex1, gridIndex2, roomShape)
|
|
40888
|
+
if gridIndex1 > gridIndex2 then
|
|
40889
|
+
local oldGridIndex1 = gridIndex1
|
|
40890
|
+
local oldGridIndex2 = gridIndex2
|
|
40891
|
+
gridIndex1 = oldGridIndex2
|
|
40892
|
+
gridIndex2 = oldGridIndex1
|
|
40893
|
+
end
|
|
40894
|
+
local delta = gridIndex2 - gridIndex1
|
|
40895
|
+
local gridWidth = getRoomShapeWidth(nil, roomShape)
|
|
40896
|
+
local isOnHorizontalLine = delta <= gridWidth
|
|
40897
|
+
if isOnHorizontalLine then
|
|
40898
|
+
return iRange(nil, gridIndex1, gridIndex2)
|
|
40899
|
+
end
|
|
40900
|
+
local isOnVerticalLine = delta % gridWidth == 0
|
|
40901
|
+
if isOnVerticalLine then
|
|
40902
|
+
return iRange(nil, gridIndex1, gridIndex2, gridWidth)
|
|
40903
|
+
end
|
|
40904
|
+
error(((((((("Failed to get the grid indexes between " .. tostring(gridIndex1)) .. " and ") .. tostring(gridIndex2)) .. " for RoomShape.") .. tostring(RoomShape[roomShape])) .. " (") .. tostring(roomShape)) .. ") since they are not on the same horizontal or vertical line.")
|
|
40905
|
+
end
|
|
40906
|
+
return ____exports
|
|
40907
|
+
end,
|
|
40908
|
+
["src.functions.roomShapeWalls"] = function(...)
|
|
40909
|
+
local ____lualib = require("lualib_bundle")
|
|
40910
|
+
local Map = ____lualib.Map
|
|
40911
|
+
local __TS__New = ____lualib.__TS__New
|
|
40912
|
+
local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
|
|
40913
|
+
local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
|
|
40914
|
+
local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
|
|
40915
|
+
local Set = ____lualib.Set
|
|
40916
|
+
local ____exports = {}
|
|
40917
|
+
local getRoomShapeToWallGridIndexSet, getVanillaWallGridIndexSetForRoomShape, getWallGridIndexSetForRectangleRoomShape
|
|
40918
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
40919
|
+
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
40920
|
+
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
40921
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
40922
|
+
local game = ____cachedClasses.game
|
|
40923
|
+
local ____CornerType = require("src.enums.CornerType")
|
|
40924
|
+
local CornerType = ____CornerType.CornerType
|
|
40925
|
+
local ____enums = require("src.functions.enums")
|
|
40926
|
+
local getEnumValues = ____enums.getEnumValues
|
|
40927
|
+
local ____gridIndex = require("src.functions.gridIndex")
|
|
40928
|
+
local getGridIndexesBetween = ____gridIndex.getGridIndexesBetween
|
|
40929
|
+
local ____rooms = require("src.functions.rooms")
|
|
40930
|
+
local inBossRoomOf = ____rooms.inBossRoomOf
|
|
40931
|
+
local inHomeCloset = ____rooms.inHomeCloset
|
|
40932
|
+
local ____roomShape = require("src.functions.roomShape")
|
|
40933
|
+
local getRoomShapeCorners = ____roomShape.getRoomShapeCorners
|
|
40934
|
+
local isLRoom = ____roomShape.isLRoom
|
|
40935
|
+
function getRoomShapeToWallGridIndexSet(self)
|
|
40936
|
+
local roomShapeToWallGridIndexSet = __TS__New(Map)
|
|
40937
|
+
for ____, roomShape in ipairs(getEnumValues(nil, RoomShape)) do
|
|
40938
|
+
local gridIndexSet = getVanillaWallGridIndexSetForRoomShape(nil, roomShape)
|
|
40939
|
+
roomShapeToWallGridIndexSet:set(roomShape, gridIndexSet)
|
|
40940
|
+
end
|
|
40941
|
+
return roomShapeToWallGridIndexSet
|
|
40942
|
+
end
|
|
40943
|
+
function getVanillaWallGridIndexSetForRoomShape(self, roomShape)
|
|
40944
|
+
local corners = getRoomShapeCorners(nil, roomShape)
|
|
40945
|
+
local lRoom = isLRoom(nil, roomShape)
|
|
40946
|
+
if lRoom and #corners ~= 6 then
|
|
40947
|
+
error(((("Failed to get the correct amount of corners for: RoomShape." .. tostring(RoomShape[roomShape])) .. " (") .. tostring(roomShape)) .. ")")
|
|
40948
|
+
end
|
|
40949
|
+
repeat
|
|
40950
|
+
local ____switch7 = roomShape
|
|
40951
|
+
local ____cond7 = ____switch7 == RoomShape.LTL
|
|
40952
|
+
if ____cond7 then
|
|
40953
|
+
do
|
|
40954
|
+
local topMiddle, topRight, middleLeft, middle, bottomLeft, bottomRight = table.unpack(corners)
|
|
40955
|
+
local ____Set_1 = Set
|
|
40956
|
+
local ____array_0 = __TS__SparseArrayNew(table.unpack(getGridIndexesBetween(nil, topMiddle.gridIndex, topRight.gridIndex, roomShape)))
|
|
40957
|
+
__TS__SparseArrayPush(
|
|
40958
|
+
____array_0,
|
|
40959
|
+
table.unpack(getGridIndexesBetween(nil, middleLeft.gridIndex, middle.gridIndex, roomShape))
|
|
40960
|
+
)
|
|
40961
|
+
__TS__SparseArrayPush(
|
|
40962
|
+
____array_0,
|
|
40963
|
+
table.unpack(getGridIndexesBetween(nil, bottomLeft.gridIndex, bottomRight.gridIndex, roomShape))
|
|
40964
|
+
)
|
|
40965
|
+
__TS__SparseArrayPush(
|
|
40966
|
+
____array_0,
|
|
40967
|
+
table.unpack(getGridIndexesBetween(nil, middleLeft.gridIndex, bottomLeft.gridIndex, roomShape))
|
|
40968
|
+
)
|
|
40969
|
+
__TS__SparseArrayPush(
|
|
40970
|
+
____array_0,
|
|
40971
|
+
table.unpack(getGridIndexesBetween(nil, topMiddle.gridIndex, middle.gridIndex, roomShape))
|
|
40972
|
+
)
|
|
40973
|
+
__TS__SparseArrayPush(
|
|
40974
|
+
____array_0,
|
|
40975
|
+
table.unpack(getGridIndexesBetween(nil, topRight.gridIndex, bottomRight.gridIndex, roomShape))
|
|
40976
|
+
)
|
|
40977
|
+
return __TS__New(
|
|
40978
|
+
____Set_1,
|
|
40979
|
+
{__TS__SparseArraySpread(____array_0)}
|
|
40980
|
+
)
|
|
40981
|
+
end
|
|
40982
|
+
end
|
|
40983
|
+
____cond7 = ____cond7 or ____switch7 == RoomShape.LTR
|
|
40984
|
+
if ____cond7 then
|
|
40985
|
+
do
|
|
40986
|
+
local topLeft, topMiddle, middle, middleRight, bottomLeft, bottomRight = table.unpack(corners)
|
|
40987
|
+
local ____Set_3 = Set
|
|
40988
|
+
local ____array_2 = __TS__SparseArrayNew(table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, topMiddle.gridIndex, roomShape)))
|
|
40989
|
+
__TS__SparseArrayPush(
|
|
40990
|
+
____array_2,
|
|
40991
|
+
table.unpack(getGridIndexesBetween(nil, middle.gridIndex, middleRight.gridIndex, roomShape))
|
|
40992
|
+
)
|
|
40993
|
+
__TS__SparseArrayPush(
|
|
40994
|
+
____array_2,
|
|
40995
|
+
table.unpack(getGridIndexesBetween(nil, bottomLeft.gridIndex, bottomRight.gridIndex, roomShape))
|
|
40996
|
+
)
|
|
40997
|
+
__TS__SparseArrayPush(
|
|
40998
|
+
____array_2,
|
|
40999
|
+
table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, bottomLeft.gridIndex, roomShape))
|
|
41000
|
+
)
|
|
41001
|
+
__TS__SparseArrayPush(
|
|
41002
|
+
____array_2,
|
|
41003
|
+
table.unpack(getGridIndexesBetween(nil, topMiddle.gridIndex, middle.gridIndex, roomShape))
|
|
41004
|
+
)
|
|
41005
|
+
__TS__SparseArrayPush(
|
|
41006
|
+
____array_2,
|
|
41007
|
+
table.unpack(getGridIndexesBetween(nil, middleRight.gridIndex, bottomRight.gridIndex, roomShape))
|
|
41008
|
+
)
|
|
41009
|
+
return __TS__New(
|
|
41010
|
+
____Set_3,
|
|
41011
|
+
{__TS__SparseArraySpread(____array_2)}
|
|
41012
|
+
)
|
|
41013
|
+
end
|
|
41014
|
+
end
|
|
41015
|
+
____cond7 = ____cond7 or ____switch7 == RoomShape.LBL
|
|
41016
|
+
if ____cond7 then
|
|
41017
|
+
do
|
|
41018
|
+
local topLeft, topRight, middleLeft, middle, bottomMiddle, bottomRight = table.unpack(corners)
|
|
41019
|
+
local ____Set_5 = Set
|
|
41020
|
+
local ____array_4 = __TS__SparseArrayNew(table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, topRight.gridIndex, roomShape)))
|
|
41021
|
+
__TS__SparseArrayPush(
|
|
41022
|
+
____array_4,
|
|
41023
|
+
table.unpack(getGridIndexesBetween(nil, middleLeft.gridIndex, middle.gridIndex, roomShape))
|
|
41024
|
+
)
|
|
41025
|
+
__TS__SparseArrayPush(
|
|
41026
|
+
____array_4,
|
|
41027
|
+
table.unpack(getGridIndexesBetween(nil, bottomMiddle.gridIndex, bottomRight.gridIndex, roomShape))
|
|
41028
|
+
)
|
|
41029
|
+
__TS__SparseArrayPush(
|
|
41030
|
+
____array_4,
|
|
41031
|
+
table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, middleLeft.gridIndex, roomShape))
|
|
41032
|
+
)
|
|
41033
|
+
__TS__SparseArrayPush(
|
|
41034
|
+
____array_4,
|
|
41035
|
+
table.unpack(getGridIndexesBetween(nil, middle.gridIndex, bottomMiddle.gridIndex, roomShape))
|
|
41036
|
+
)
|
|
41037
|
+
__TS__SparseArrayPush(
|
|
41038
|
+
____array_4,
|
|
41039
|
+
table.unpack(getGridIndexesBetween(nil, topRight.gridIndex, bottomRight.gridIndex, roomShape))
|
|
41040
|
+
)
|
|
41041
|
+
return __TS__New(
|
|
41042
|
+
____Set_5,
|
|
41043
|
+
{__TS__SparseArraySpread(____array_4)}
|
|
41044
|
+
)
|
|
41045
|
+
end
|
|
41046
|
+
end
|
|
41047
|
+
____cond7 = ____cond7 or ____switch7 == RoomShape.LBR
|
|
41048
|
+
if ____cond7 then
|
|
41049
|
+
do
|
|
41050
|
+
local topLeft, topRight, middle, middleRight, bottomLeft, bottomMiddle = table.unpack(corners)
|
|
41051
|
+
local ____Set_7 = Set
|
|
41052
|
+
local ____array_6 = __TS__SparseArrayNew(table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, topRight.gridIndex, roomShape)))
|
|
41053
|
+
__TS__SparseArrayPush(
|
|
41054
|
+
____array_6,
|
|
41055
|
+
table.unpack(getGridIndexesBetween(nil, middle.gridIndex, middleRight.gridIndex, roomShape))
|
|
41056
|
+
)
|
|
41057
|
+
__TS__SparseArrayPush(
|
|
41058
|
+
____array_6,
|
|
41059
|
+
table.unpack(getGridIndexesBetween(nil, bottomLeft.gridIndex, bottomMiddle.gridIndex, roomShape))
|
|
41060
|
+
)
|
|
41061
|
+
__TS__SparseArrayPush(
|
|
41062
|
+
____array_6,
|
|
41063
|
+
table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, bottomLeft.gridIndex, roomShape))
|
|
41064
|
+
)
|
|
41065
|
+
__TS__SparseArrayPush(
|
|
41066
|
+
____array_6,
|
|
41067
|
+
table.unpack(getGridIndexesBetween(nil, middle.gridIndex, bottomMiddle.gridIndex, roomShape))
|
|
41068
|
+
)
|
|
41069
|
+
__TS__SparseArrayPush(
|
|
41070
|
+
____array_6,
|
|
41071
|
+
table.unpack(getGridIndexesBetween(nil, topRight.gridIndex, middleRight.gridIndex, roomShape))
|
|
41072
|
+
)
|
|
41073
|
+
return __TS__New(
|
|
41074
|
+
____Set_7,
|
|
41075
|
+
{__TS__SparseArraySpread(____array_6)}
|
|
41076
|
+
)
|
|
41077
|
+
end
|
|
41078
|
+
end
|
|
41079
|
+
do
|
|
41080
|
+
do
|
|
41081
|
+
return getWallGridIndexSetForRectangleRoomShape(nil, roomShape, corners)
|
|
41082
|
+
end
|
|
41083
|
+
end
|
|
41084
|
+
until true
|
|
41085
|
+
end
|
|
41086
|
+
function getWallGridIndexSetForRectangleRoomShape(self, roomShape, corners)
|
|
41087
|
+
if #corners ~= 4 then
|
|
41088
|
+
error("Failed to get the correct amount of corners for rectangular room shape.")
|
|
41089
|
+
end
|
|
41090
|
+
local topLeft, topRight, bottomLeft, bottomRight = table.unpack(corners)
|
|
41091
|
+
local ____Set_9 = Set
|
|
41092
|
+
local ____array_8 = __TS__SparseArrayNew(table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, topRight.gridIndex, roomShape)))
|
|
41093
|
+
__TS__SparseArrayPush(
|
|
41094
|
+
____array_8,
|
|
41095
|
+
table.unpack(getGridIndexesBetween(nil, bottomLeft.gridIndex, bottomRight.gridIndex, roomShape))
|
|
41096
|
+
)
|
|
41097
|
+
__TS__SparseArrayPush(
|
|
41098
|
+
____array_8,
|
|
41099
|
+
table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, bottomLeft.gridIndex, roomShape))
|
|
41100
|
+
)
|
|
41101
|
+
__TS__SparseArrayPush(
|
|
41102
|
+
____array_8,
|
|
41103
|
+
table.unpack(getGridIndexesBetween(nil, topRight.gridIndex, bottomRight.gridIndex, roomShape))
|
|
41104
|
+
)
|
|
41105
|
+
return __TS__New(
|
|
41106
|
+
____Set_9,
|
|
41107
|
+
{__TS__SparseArraySpread(____array_8)}
|
|
41108
|
+
)
|
|
41109
|
+
end
|
|
41110
|
+
local ROOM_SHAPE_TO_WALL_GRID_INDEX_SET = getRoomShapeToWallGridIndexSet(nil)
|
|
41111
|
+
local HOME_CLOSET_CORNERS = {
|
|
41112
|
+
{
|
|
41113
|
+
type = CornerType.TOP_LEFT,
|
|
41114
|
+
gridIndex = 30,
|
|
41115
|
+
position = Vector(60, 220)
|
|
41116
|
+
},
|
|
41117
|
+
{
|
|
41118
|
+
type = CornerType.TOP_RIGHT,
|
|
41119
|
+
gridIndex = 38,
|
|
41120
|
+
position = Vector(340, 220)
|
|
41121
|
+
},
|
|
41122
|
+
{
|
|
41123
|
+
type = CornerType.BOTTOM_LEFT,
|
|
41124
|
+
gridIndex = 90,
|
|
41125
|
+
position = Vector(60, 340)
|
|
41126
|
+
},
|
|
41127
|
+
{
|
|
41128
|
+
type = CornerType.BOTTOM_RIGHT,
|
|
41129
|
+
gridIndex = 98,
|
|
41130
|
+
position = Vector(340, 340)
|
|
41131
|
+
}
|
|
41132
|
+
}
|
|
41133
|
+
local HOME_CLOSET_CORNERS_SET = getWallGridIndexSetForRectangleRoomShape(nil, RoomShape.IH, HOME_CLOSET_CORNERS)
|
|
41134
|
+
local MOTHER_ROOM_CORNERS = {
|
|
41135
|
+
{
|
|
41136
|
+
type = CornerType.TOP_LEFT,
|
|
41137
|
+
gridIndex = 0,
|
|
41138
|
+
position = Vector(60, 140)
|
|
41139
|
+
},
|
|
41140
|
+
{
|
|
41141
|
+
type = CornerType.TOP_RIGHT,
|
|
41142
|
+
gridIndex = 14,
|
|
41143
|
+
position = Vector(580, 140)
|
|
41144
|
+
},
|
|
41145
|
+
{
|
|
41146
|
+
type = CornerType.BOTTOM_LEFT,
|
|
41147
|
+
gridIndex = 150,
|
|
41148
|
+
position = Vector(60, 500)
|
|
41149
|
+
},
|
|
41150
|
+
{
|
|
41151
|
+
type = CornerType.BOTTOM_RIGHT,
|
|
41152
|
+
gridIndex = 164,
|
|
41153
|
+
position = Vector(580, 500)
|
|
41154
|
+
}
|
|
41155
|
+
}
|
|
41156
|
+
local MOTHER_ROOM_CORNERS_SET = getWallGridIndexSetForRectangleRoomShape(nil, RoomShape.SHAPE_1x2, MOTHER_ROOM_CORNERS)
|
|
41157
|
+
function ____exports.isVanillaWallGridIndex(self, gridIndex)
|
|
41158
|
+
local room = game:GetRoom()
|
|
41159
|
+
local roomShape = room:GetRoomShape()
|
|
41160
|
+
local wallGridIndexSet
|
|
41161
|
+
if inHomeCloset(nil) then
|
|
41162
|
+
wallGridIndexSet = HOME_CLOSET_CORNERS_SET
|
|
41163
|
+
elseif inBossRoomOf(nil, BossID.MOTHER) then
|
|
41164
|
+
wallGridIndexSet = MOTHER_ROOM_CORNERS_SET
|
|
41165
|
+
else
|
|
41166
|
+
wallGridIndexSet = ROOM_SHAPE_TO_WALL_GRID_INDEX_SET:get(roomShape)
|
|
41167
|
+
end
|
|
41168
|
+
if wallGridIndexSet == nil then
|
|
41169
|
+
error(((("Failed to find the wall grid index set for: RoomShape." .. tostring(RoomShape[roomShape])) .. " (") .. tostring(roomShape)) .. ")")
|
|
41170
|
+
end
|
|
41171
|
+
return wallGridIndexSet:has(gridIndex)
|
|
41172
|
+
end
|
|
41173
|
+
return ____exports
|
|
41174
|
+
end,
|
|
41175
|
+
["src.functions.emptyRoom"] = function(...)
|
|
41176
|
+
local ____lualib = require("lualib_bundle")
|
|
41177
|
+
local Set = ____lualib.Set
|
|
41178
|
+
local __TS__New = ____lualib.__TS__New
|
|
41179
|
+
local ____exports = {}
|
|
41180
|
+
local emptyRoomEntities, emptyRoomGridEntities, EMPTY_ROOM_BLACKLIST_ENTITY_SET
|
|
41181
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
41182
|
+
local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
|
|
41183
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
41184
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
41185
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
41186
|
+
local game = ____cachedClasses.game
|
|
41187
|
+
local ____entities = require("src.functions.entities")
|
|
41188
|
+
local getEntities = ____entities.getEntities
|
|
41189
|
+
local ____gridEntities = require("src.functions.gridEntities")
|
|
41190
|
+
local getGridEntities = ____gridEntities.getGridEntities
|
|
41191
|
+
local removeGridEntity = ____gridEntities.removeGridEntity
|
|
41192
|
+
local ____rooms = require("src.functions.rooms")
|
|
41193
|
+
local roomUpdateSafe = ____rooms.roomUpdateSafe
|
|
41194
|
+
local ____roomShapeWalls = require("src.functions.roomShapeWalls")
|
|
41195
|
+
local isVanillaWallGridIndex = ____roomShapeWalls.isVanillaWallGridIndex
|
|
41196
|
+
function emptyRoomEntities(self)
|
|
41197
|
+
local room = game:GetRoom()
|
|
41198
|
+
for ____, entity in ipairs(getEntities(nil)) do
|
|
41199
|
+
do
|
|
41200
|
+
if EMPTY_ROOM_BLACKLIST_ENTITY_SET:has(entity.Type) then
|
|
41201
|
+
goto __continue4
|
|
41202
|
+
end
|
|
41203
|
+
if entity:HasEntityFlags(EntityFlag.CHARM) or entity:HasEntityFlags(EntityFlag.FRIENDLY) or entity:HasEntityFlags(EntityFlag.PERSISTENT) then
|
|
41204
|
+
goto __continue4
|
|
41205
|
+
end
|
|
41206
|
+
entity:ClearEntityFlags(EntityFlag.APPEAR)
|
|
41207
|
+
entity:Remove()
|
|
41208
|
+
if entity.Type == EntityType.FIREPLACE then
|
|
41209
|
+
local gridIndex = room:GetGridIndex(entity.Position)
|
|
41210
|
+
room:SetGridPath(gridIndex, 0)
|
|
41211
|
+
end
|
|
41212
|
+
end
|
|
41213
|
+
::__continue4::
|
|
41214
|
+
end
|
|
41215
|
+
end
|
|
41216
|
+
function emptyRoomGridEntities(self)
|
|
41217
|
+
local removedOneOrMoreGridEntities = false
|
|
41218
|
+
for ____, gridEntity in ipairs(getGridEntities(nil)) do
|
|
41219
|
+
do
|
|
41220
|
+
local gridEntityType = gridEntity:GetType()
|
|
41221
|
+
local gridIndex = gridEntity:GetGridIndex()
|
|
41222
|
+
if gridEntityType == GridEntityType.WALL and isVanillaWallGridIndex(nil, gridIndex) then
|
|
41223
|
+
goto __continue10
|
|
41224
|
+
end
|
|
41225
|
+
if gridEntityType == GridEntityType.DOOR then
|
|
41226
|
+
goto __continue10
|
|
41227
|
+
end
|
|
41228
|
+
removeGridEntity(nil, gridEntity, false)
|
|
41229
|
+
removedOneOrMoreGridEntities = true
|
|
41230
|
+
end
|
|
41231
|
+
::__continue10::
|
|
41232
|
+
end
|
|
41233
|
+
if removedOneOrMoreGridEntities then
|
|
41234
|
+
roomUpdateSafe(nil)
|
|
41235
|
+
end
|
|
41236
|
+
end
|
|
41237
|
+
EMPTY_ROOM_BLACKLIST_ENTITY_SET = __TS__New(Set, {
|
|
41238
|
+
EntityType.PLAYER,
|
|
41239
|
+
EntityType.TEAR,
|
|
41240
|
+
EntityType.FAMILIAR,
|
|
41241
|
+
EntityType.LASER,
|
|
41242
|
+
EntityType.KNIFE,
|
|
41243
|
+
EntityType.PROJECTILE,
|
|
41244
|
+
EntityType.DARK_ESAU
|
|
41245
|
+
})
|
|
41246
|
+
function ____exports.emptyRoom(self)
|
|
41247
|
+
emptyRoomEntities(nil)
|
|
41248
|
+
emptyRoomGridEntities(nil)
|
|
41249
|
+
end
|
|
40803
41250
|
return ____exports
|
|
40804
41251
|
end,
|
|
40805
41252
|
["src.interfaces.JSONRoomsFile"] = function(...)
|
|
@@ -41287,11 +41734,10 @@ local __TS__New = ____lualib.__TS__New
|
|
|
41287
41734
|
local Map = ____lualib.Map
|
|
41288
41735
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
41289
41736
|
local ____exports = {}
|
|
41290
|
-
local preUseItemWeNeedToGoDeeper, postNewRoomReordered, setDecorationsInvisible, respawnPersistentEntities,
|
|
41737
|
+
local preUseItemWeNeedToGoDeeper, postNewRoomReordered, setDecorationsInvisible, respawnPersistentEntities, fillRoomWithDecorations, spawnAllEntities, spawnGridEntityForJSONRoom, spawnNormalEntityForJSONRoom, storePersistentEntity, fixPitGraphics, getPitMap, getPitFrame, PERSISTENT_ENTITY_TYPES, GRID_ENTITY_XML_TYPE_SET, v
|
|
41291
41738
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
41292
41739
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
41293
41740
|
local EntityCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.EntityCollisionClass
|
|
41294
|
-
local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
|
|
41295
41741
|
local EntityGridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.EntityGridCollisionClass
|
|
41296
41742
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
41297
41743
|
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
@@ -41310,8 +41756,9 @@ local ____featuresInitialized = require("src.featuresInitialized")
|
|
|
41310
41756
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
41311
41757
|
local ____array = require("src.functions.array")
|
|
41312
41758
|
local emptyArray = ____array.emptyArray
|
|
41759
|
+
local ____emptyRoom = require("src.functions.emptyRoom")
|
|
41760
|
+
local emptyRoom = ____emptyRoom.emptyRoom
|
|
41313
41761
|
local ____entities = require("src.functions.entities")
|
|
41314
|
-
local getEntities = ____entities.getEntities
|
|
41315
41762
|
local getEntityIDFromConstituents = ____entities.getEntityIDFromConstituents
|
|
41316
41763
|
local spawn = ____entities.spawn
|
|
41317
41764
|
local spawnWithSeed = ____entities.spawnWithSeed
|
|
@@ -41338,7 +41785,6 @@ local getRoomListIndex = ____roomData.getRoomListIndex
|
|
|
41338
41785
|
local ____roomGrid = require("src.functions.roomGrid")
|
|
41339
41786
|
local gridCoordinatesToWorldPosition = ____roomGrid.gridCoordinatesToWorldPosition
|
|
41340
41787
|
local ____rooms = require("src.functions.rooms")
|
|
41341
|
-
local roomUpdateSafe = ____rooms.roomUpdateSafe
|
|
41342
41788
|
local setRoomCleared = ____rooms.setRoomCleared
|
|
41343
41789
|
local setRoomUncleared = ____rooms.setRoomUncleared
|
|
41344
41790
|
local ____spawnCollectible = require("src.functions.spawnCollectible")
|
|
@@ -41421,54 +41867,6 @@ function respawnPersistentEntities(self)
|
|
|
41421
41867
|
)
|
|
41422
41868
|
end
|
|
41423
41869
|
end
|
|
41424
|
-
function ____exports.emptyRoom(self, fillWithDecorations)
|
|
41425
|
-
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
41426
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
41427
|
-
v.level.deployedRoomListIndexes:add(roomListIndex)
|
|
41428
|
-
emptyRoomEntities(nil)
|
|
41429
|
-
emptyRoomGridEntities(nil)
|
|
41430
|
-
setRoomCleared(nil)
|
|
41431
|
-
if fillWithDecorations then
|
|
41432
|
-
fillRoomWithDecorations(nil)
|
|
41433
|
-
end
|
|
41434
|
-
end
|
|
41435
|
-
function emptyRoomEntities(self)
|
|
41436
|
-
local room = game:GetRoom()
|
|
41437
|
-
for ____, entity in ipairs(getEntities(nil)) do
|
|
41438
|
-
do
|
|
41439
|
-
if EMPTY_ROOM_BLACKLIST_ENTITY_SET:has(entity.Type) then
|
|
41440
|
-
goto __continue33
|
|
41441
|
-
end
|
|
41442
|
-
if entity:HasEntityFlags(EntityFlag.CHARM) or entity:HasEntityFlags(EntityFlag.FRIENDLY) or entity:HasEntityFlags(EntityFlag.PERSISTENT) then
|
|
41443
|
-
goto __continue33
|
|
41444
|
-
end
|
|
41445
|
-
entity:ClearEntityFlags(EntityFlag.APPEAR)
|
|
41446
|
-
entity:Remove()
|
|
41447
|
-
if entity.Type == EntityType.FIREPLACE then
|
|
41448
|
-
local gridIndex = room:GetGridIndex(entity.Position)
|
|
41449
|
-
room:SetGridPath(gridIndex, 0)
|
|
41450
|
-
end
|
|
41451
|
-
end
|
|
41452
|
-
::__continue33::
|
|
41453
|
-
end
|
|
41454
|
-
end
|
|
41455
|
-
function emptyRoomGridEntities(self)
|
|
41456
|
-
local removedOneOrMoreGridEntities = false
|
|
41457
|
-
for ____, gridEntity in ipairs(getGridEntities(nil)) do
|
|
41458
|
-
do
|
|
41459
|
-
local gridEntityType = gridEntity:GetType()
|
|
41460
|
-
if EMPTY_ROOM_BLACKLIST_GRID_ENTITY_SET:has(gridEntityType) then
|
|
41461
|
-
goto __continue39
|
|
41462
|
-
end
|
|
41463
|
-
removeGridEntity(nil, gridEntity, false)
|
|
41464
|
-
removedOneOrMoreGridEntities = true
|
|
41465
|
-
end
|
|
41466
|
-
::__continue39::
|
|
41467
|
-
end
|
|
41468
|
-
if removedOneOrMoreGridEntities then
|
|
41469
|
-
roomUpdateSafe(nil)
|
|
41470
|
-
end
|
|
41471
|
-
end
|
|
41472
41870
|
function fillRoomWithDecorations(self)
|
|
41473
41871
|
local room = game:GetRoom()
|
|
41474
41872
|
local roomListIndex = getRoomListIndex(nil)
|
|
@@ -41477,7 +41875,7 @@ function fillRoomWithDecorations(self)
|
|
|
41477
41875
|
do
|
|
41478
41876
|
local existingGridEntity = room:GetGridEntity(gridIndex)
|
|
41479
41877
|
if existingGridEntity ~= nil then
|
|
41480
|
-
goto
|
|
41878
|
+
goto __continue31
|
|
41481
41879
|
end
|
|
41482
41880
|
local position = room:GetGridPosition(gridIndex)
|
|
41483
41881
|
local decoration = Isaac.GridSpawn(GridEntityType.DECORATION, 0, position)
|
|
@@ -41486,7 +41884,7 @@ function fillRoomWithDecorations(self)
|
|
|
41486
41884
|
end
|
|
41487
41885
|
decorationGridIndexes[#decorationGridIndexes + 1] = gridIndex
|
|
41488
41886
|
end
|
|
41489
|
-
::
|
|
41887
|
+
::__continue31::
|
|
41490
41888
|
end
|
|
41491
41889
|
end
|
|
41492
41890
|
function spawnAllEntities(self, jsonRoom, rng, verbose)
|
|
@@ -41743,20 +42141,10 @@ function getPitFrame(self, L, R, U, D, UL, UR, DL, DR)
|
|
|
41743
42141
|
end
|
|
41744
42142
|
return F
|
|
41745
42143
|
end
|
|
41746
|
-
FEATURE_NAME = "deployJSONRoom"
|
|
42144
|
+
local FEATURE_NAME = "deployJSONRoom"
|
|
41747
42145
|
PERSISTENT_ENTITY_TYPES = __TS__New(Set, {EntityType.WALL_HUGGER})
|
|
41748
42146
|
local gridEntityXMLTypes = getEnumValues(nil, GridEntityXMLType)
|
|
41749
42147
|
GRID_ENTITY_XML_TYPE_SET = __TS__New(Set, gridEntityXMLTypes)
|
|
41750
|
-
EMPTY_ROOM_BLACKLIST_ENTITY_SET = __TS__New(Set, {
|
|
41751
|
-
EntityType.PLAYER,
|
|
41752
|
-
EntityType.TEAR,
|
|
41753
|
-
EntityType.FAMILIAR,
|
|
41754
|
-
EntityType.LASER,
|
|
41755
|
-
EntityType.KNIFE,
|
|
41756
|
-
EntityType.PROJECTILE,
|
|
41757
|
-
EntityType.DARK_ESAU
|
|
41758
|
-
})
|
|
41759
|
-
EMPTY_ROOM_BLACKLIST_GRID_ENTITY_SET = __TS__New(Set, {GridEntityType.WALL, GridEntityType.DOOR})
|
|
41760
42148
|
v = {
|
|
41761
42149
|
level = {
|
|
41762
42150
|
deployedRoomListIndexes = __TS__New(Set),
|
|
@@ -41785,13 +42173,16 @@ function ____exports.deployJSONRoom(self, jsonRoom, seedOrRNG, verbose)
|
|
|
41785
42173
|
end
|
|
41786
42174
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
41787
42175
|
local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
|
|
42176
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
42177
|
+
v.level.deployedRoomListIndexes:add(roomListIndex)
|
|
41788
42178
|
if verbose then
|
|
41789
42179
|
log(nil, "Starting to empty the room of entities and grid entities.")
|
|
41790
42180
|
end
|
|
41791
|
-
|
|
42181
|
+
emptyRoom(nil)
|
|
41792
42182
|
if verbose then
|
|
41793
42183
|
log(nil, "Finished emptying the room of entities and grid entities.")
|
|
41794
42184
|
end
|
|
42185
|
+
setRoomCleared(nil)
|
|
41795
42186
|
if verbose then
|
|
41796
42187
|
log(nil, "Starting to spawn all of the new entities and grid entities.")
|
|
41797
42188
|
end
|
|
@@ -42538,8 +42929,6 @@ local ____featuresInitialized = require("src.featuresInitialized")
|
|
|
42538
42929
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
42539
42930
|
local ____input = require("src.functions.input")
|
|
42540
42931
|
local isKeyboardPressed = ____input.isKeyboardPressed
|
|
42541
|
-
local ____types = require("src.functions.types")
|
|
42542
|
-
local isFunction = ____types.isFunction
|
|
42543
42932
|
function postRender(self)
|
|
42544
42933
|
for ____, ____value in __TS__Iterator(staticHotkeyFunctionMap:entries()) do
|
|
42545
42934
|
local keyboard = ____value[1]
|
|
@@ -42570,33 +42959,33 @@ keyPressedMap = __TS__New(DefaultMap, false)
|
|
|
42570
42959
|
function ____exports.setHotkeyInit(self, mod)
|
|
42571
42960
|
mod:AddCallback(ModCallback.POST_RENDER, postRender)
|
|
42572
42961
|
end
|
|
42573
|
-
function ____exports.
|
|
42962
|
+
function ____exports.setConditionalHotkey(self, getKeyFunc, triggerFunc)
|
|
42574
42963
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
42575
|
-
if
|
|
42576
|
-
|
|
42577
|
-
error("Failed to register a hotkey due to a custom hotkey already being defined for the submitted function.")
|
|
42578
|
-
end
|
|
42579
|
-
dynamicHotkeyFunctionMap:set(keyboardOrFunc, triggerFunc)
|
|
42580
|
-
else
|
|
42581
|
-
if staticHotkeyFunctionMap:has(keyboardOrFunc) then
|
|
42582
|
-
error(((("Failed to register a hotkey due to a hotkey already being defined for key: Keyboard." .. tostring(Keyboard[keyboardOrFunc])) .. " (") .. tostring(keyboardOrFunc)) .. ")")
|
|
42583
|
-
end
|
|
42584
|
-
staticHotkeyFunctionMap:set(keyboardOrFunc, triggerFunc)
|
|
42964
|
+
if dynamicHotkeyFunctionMap:has(getKeyFunc) then
|
|
42965
|
+
error("Failed to register a hotkey due to a custom hotkey already being defined for the submitted function.")
|
|
42585
42966
|
end
|
|
42967
|
+
dynamicHotkeyFunctionMap:set(getKeyFunc, triggerFunc)
|
|
42586
42968
|
end
|
|
42587
|
-
function ____exports.
|
|
42969
|
+
function ____exports.setHotkey(self, keyboard, triggerFunc)
|
|
42588
42970
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
42589
|
-
if
|
|
42590
|
-
|
|
42591
|
-
|
|
42592
|
-
|
|
42593
|
-
|
|
42594
|
-
|
|
42595
|
-
|
|
42596
|
-
|
|
42597
|
-
|
|
42598
|
-
staticHotkeyFunctionMap:delete(keyboardOrFunc)
|
|
42971
|
+
if staticHotkeyFunctionMap:has(keyboard) then
|
|
42972
|
+
error(((("Failed to register a hotkey due to a hotkey already being defined for: Keyboard." .. tostring(Keyboard[keyboard])) .. " (") .. tostring(keyboard)) .. ")")
|
|
42973
|
+
end
|
|
42974
|
+
staticHotkeyFunctionMap:set(keyboard, triggerFunc)
|
|
42975
|
+
end
|
|
42976
|
+
function ____exports.unsetConditionalHotkey(self, getKeyFunc)
|
|
42977
|
+
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
42978
|
+
if not dynamicHotkeyFunctionMap:has(getKeyFunc) then
|
|
42979
|
+
error("Failed to unregister a hotkey since there is no existing hotkey defined for the submitted function.")
|
|
42599
42980
|
end
|
|
42981
|
+
dynamicHotkeyFunctionMap:delete(getKeyFunc)
|
|
42982
|
+
end
|
|
42983
|
+
function ____exports.unsetHotkey(self, keyboard)
|
|
42984
|
+
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
42985
|
+
if not staticHotkeyFunctionMap:has(keyboard) then
|
|
42986
|
+
error(((("Failed to unregister a hotkey since there is no existing hotkey defined for: Keyboard." .. tostring(Keyboard[keyboard])) .. " (") .. tostring(keyboard)) .. ")")
|
|
42987
|
+
end
|
|
42988
|
+
staticHotkeyFunctionMap:delete(keyboard)
|
|
42600
42989
|
end
|
|
42601
42990
|
return ____exports
|
|
42602
42991
|
end,
|
|
@@ -43786,7 +44175,7 @@ local ____set = require("src.functions.set")
|
|
|
43786
44175
|
local addSetsToSet = ____set.addSetsToSet
|
|
43787
44176
|
local getRandomSetElement = ____set.getRandomSetElement
|
|
43788
44177
|
local ____utils = require("src.functions.utils")
|
|
43789
|
-
local
|
|
44178
|
+
local iRange = ____utils.iRange
|
|
43790
44179
|
function lazyInitCardMapsSets(self)
|
|
43791
44180
|
for ____, cardType in ipairs(getEnumValues(nil, ItemConfigCardType)) do
|
|
43792
44181
|
ITEM_CONFIG_CARD_TYPE_TO_CARD_TYPE_MAP:set(
|
|
@@ -43833,7 +44222,7 @@ function ____exports.getItemConfigCardType(self, cardType)
|
|
|
43833
44222
|
return itemConfigCardType == nil and DEFAULT_CARD_TYPE or itemConfigCardType
|
|
43834
44223
|
end
|
|
43835
44224
|
function ____exports.getVanillaCardTypes(self)
|
|
43836
|
-
return
|
|
44225
|
+
return iRange(nil, FIRST_CARD_TYPE, LAST_VANILLA_CARD_TYPE)
|
|
43837
44226
|
end
|
|
43838
44227
|
function ____exports.isVanillaCardType(self, cardType)
|
|
43839
44228
|
return cardType <= LAST_VANILLA_CARD_TYPE
|
|
@@ -45111,7 +45500,7 @@ local ____types = require("src.functions.types")
|
|
|
45111
45500
|
local asNumber = ____types.asNumber
|
|
45112
45501
|
local asPillColor = ____types.asPillColor
|
|
45113
45502
|
local ____utils = require("src.functions.utils")
|
|
45114
|
-
local
|
|
45503
|
+
local iRange = ____utils.iRange
|
|
45115
45504
|
function ____exports.isVanillaPillEffect(self, pillEffect)
|
|
45116
45505
|
return pillEffect <= LAST_VANILLA_PILL_EFFECT
|
|
45117
45506
|
end
|
|
@@ -45129,7 +45518,7 @@ function ____exports.getHorsePillColor(self, pillColor)
|
|
|
45129
45518
|
return asNumber(nil, pillColor) + HORSE_PILL_ADJUSTMENT
|
|
45130
45519
|
end
|
|
45131
45520
|
function ____exports.getHorsePillColors(self)
|
|
45132
|
-
return
|
|
45521
|
+
return iRange(nil, FIRST_HORSE_PILL_COLOR, LAST_HORSE_PILL_COLOR)
|
|
45133
45522
|
end
|
|
45134
45523
|
function ____exports.getNormalPillColorFromHorse(self, pillColor)
|
|
45135
45524
|
local normalPillColor = asPillColor(
|
|
@@ -45139,7 +45528,7 @@ function ____exports.getNormalPillColorFromHorse(self, pillColor)
|
|
|
45139
45528
|
return normalPillColor > PillColor.NULL and normalPillColor or pillColor
|
|
45140
45529
|
end
|
|
45141
45530
|
function ____exports.getNormalPillColors(self)
|
|
45142
|
-
return
|
|
45531
|
+
return iRange(nil, FIRST_PILL_COLOR, LAST_NORMAL_PILL_COLOR)
|
|
45143
45532
|
end
|
|
45144
45533
|
function ____exports.getPHDPillEffect(self, pillEffect)
|
|
45145
45534
|
local convertedPillEffect = PHD_PILL_CONVERSIONS:get(pillEffect)
|
|
@@ -45165,7 +45554,7 @@ function ____exports.getPillEffectType(self, pillEffect)
|
|
|
45165
45554
|
return pillEffectClass == nil and DEFAULT_PILL_EFFECT_TYPE or pillEffectClass
|
|
45166
45555
|
end
|
|
45167
45556
|
function ____exports.getVanillaPillEffects(self)
|
|
45168
|
-
return
|
|
45557
|
+
return iRange(nil, FIRST_PILL_EFFECT, LAST_VANILLA_PILL_EFFECT)
|
|
45169
45558
|
end
|
|
45170
45559
|
function ____exports.isHorsePill(self, pillColor)
|
|
45171
45560
|
return asNumber(nil, pillColor) > HORSE_PILL_ADJUSTMENT
|
|
@@ -45821,8 +46210,16 @@ local __TS__ArrayForEach = ____lualib.__TS__ArrayForEach
|
|
|
45821
46210
|
local ____exports = {}
|
|
45822
46211
|
local getEntityLogLine, getGridEntityLogLine
|
|
45823
46212
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
46213
|
+
local BombVariant = ____isaac_2Dtypescript_2Ddefinitions.BombVariant
|
|
45824
46214
|
local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
46215
|
+
local FamiliarVariant = ____isaac_2Dtypescript_2Ddefinitions.FamiliarVariant
|
|
45825
46216
|
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
46217
|
+
local KnifeVariant = ____isaac_2Dtypescript_2Ddefinitions.KnifeVariant
|
|
46218
|
+
local LaserVariant = ____isaac_2Dtypescript_2Ddefinitions.LaserVariant
|
|
46219
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
46220
|
+
local PlayerVariant = ____isaac_2Dtypescript_2Ddefinitions.PlayerVariant
|
|
46221
|
+
local ProjectileVariant = ____isaac_2Dtypescript_2Ddefinitions.ProjectileVariant
|
|
46222
|
+
local TearVariant = ____isaac_2Dtypescript_2Ddefinitions.TearVariant
|
|
45826
46223
|
local ____entities = require("src.functions.entities")
|
|
45827
46224
|
local getEntities = ____entities.getEntities
|
|
45828
46225
|
local getEntityFromPtrHash = ____entities.getEntityFromPtrHash
|
|
@@ -45841,23 +46238,23 @@ function getEntityLogLine(self, entity, num)
|
|
|
45841
46238
|
msg = msg .. getEntityID(nil, entity)
|
|
45842
46239
|
local bomb = entity:ToBomb()
|
|
45843
46240
|
if bomb ~= nil then
|
|
45844
|
-
msg = msg .. " (bomb)"
|
|
46241
|
+
msg = msg .. (" (bomb - BombVariant." .. tostring(BombVariant[bomb.Variant])) .. ")"
|
|
45845
46242
|
end
|
|
45846
46243
|
local effect = entity:ToEffect()
|
|
45847
46244
|
if effect ~= nil then
|
|
45848
|
-
msg = msg .. (" (effect) (State: " .. tostring(effect.State)) .. ")"
|
|
46245
|
+
msg = msg .. (((" (effect - EffectVariant." .. tostring(EffectVariant[effect.Variant])) .. ") (State: ") .. tostring(effect.State)) .. ")"
|
|
45849
46246
|
end
|
|
45850
46247
|
local familiar = entity:ToFamiliar()
|
|
45851
46248
|
if familiar ~= nil then
|
|
45852
|
-
msg = msg .. (" (familiar) (State: " .. tostring(familiar.State)) .. ")"
|
|
46249
|
+
msg = msg .. (((" (familiar - FamiliarVariant." .. tostring(FamiliarVariant[familiar.Variant])) .. ") (State: ") .. tostring(familiar.State)) .. ")"
|
|
45853
46250
|
end
|
|
45854
46251
|
local knife = entity:ToKnife()
|
|
45855
46252
|
if knife ~= nil then
|
|
45856
|
-
msg = msg .. " (knife)"
|
|
46253
|
+
msg = msg .. (" (knife - KnifeVariant." .. tostring(KnifeVariant[knife.Variant])) .. ")"
|
|
45857
46254
|
end
|
|
45858
46255
|
local laser = entity:ToLaser()
|
|
45859
46256
|
if laser ~= nil then
|
|
45860
|
-
msg = msg .. " (laser)"
|
|
46257
|
+
msg = msg .. (" (laser - LaserVariant." .. tostring(LaserVariant[laser.Variant])) .. ")"
|
|
45861
46258
|
end
|
|
45862
46259
|
local npc = entity:ToNPC()
|
|
45863
46260
|
if npc ~= nil then
|
|
@@ -45865,19 +46262,19 @@ function getEntityLogLine(self, entity, num)
|
|
|
45865
46262
|
end
|
|
45866
46263
|
local pickup = entity:ToPickup()
|
|
45867
46264
|
if pickup ~= nil then
|
|
45868
|
-
msg = msg .. (" (pickup) (State: " .. tostring(pickup.State)) .. ")"
|
|
46265
|
+
msg = msg .. (((" (pickup - PickupVariant." .. tostring(PickupVariant[pickup.Variant])) .. ") (State: ") .. tostring(pickup.State)) .. ")"
|
|
45869
46266
|
end
|
|
45870
46267
|
local player = entity:ToPlayer()
|
|
45871
46268
|
if player ~= nil then
|
|
45872
|
-
msg = msg .. " (player)"
|
|
46269
|
+
msg = msg .. (" (player - PlayerVariant." .. tostring(PlayerVariant[player.Variant])) .. ")"
|
|
45873
46270
|
end
|
|
45874
46271
|
local projectile = entity:ToProjectile()
|
|
45875
46272
|
if projectile ~= nil then
|
|
45876
|
-
msg = msg .. " (projectile)"
|
|
46273
|
+
msg = msg .. (" (projectile - ProjectileVariant." .. tostring(ProjectileVariant[projectile.Variant])) .. "))"
|
|
45877
46274
|
end
|
|
45878
46275
|
local tear = entity:ToTear()
|
|
45879
46276
|
if tear ~= nil then
|
|
45880
|
-
msg = msg .. " (tear)"
|
|
46277
|
+
msg = msg .. (" (tear - TearVariant." .. tostring(TearVariant[tear.Variant])) .. "))"
|
|
45881
46278
|
end
|
|
45882
46279
|
msg = msg .. "\n"
|
|
45883
46280
|
msg = msg .. (" - Index: " .. tostring(entity.Index)) .. "\n"
|
|
@@ -46345,7 +46742,7 @@ local asCardType = ____types.asCardType
|
|
|
46345
46742
|
local asCollectibleType = ____types.asCollectibleType
|
|
46346
46743
|
local asTrinketType = ____types.asTrinketType
|
|
46347
46744
|
local ____utils = require("src.functions.utils")
|
|
46348
|
-
local
|
|
46745
|
+
local iRange = ____utils.iRange
|
|
46349
46746
|
local printConsole = ____utils.printConsole
|
|
46350
46747
|
local printEnabled = ____utils.printEnabled
|
|
46351
46748
|
local ____cardNameToTypeMap = require("src.maps.cardNameToTypeMap")
|
|
@@ -46981,7 +47378,7 @@ end
|
|
|
46981
47378
|
function ____exports.map(self)
|
|
46982
47379
|
local level = game:GetLevel()
|
|
46983
47380
|
local displayFlags = addFlag(nil, DisplayFlag.VISIBLE, DisplayFlag.SHADOW, DisplayFlag.SHOW_ICON)
|
|
46984
|
-
for ____, roomGridIndex in ipairs(
|
|
47381
|
+
for ____, roomGridIndex in ipairs(iRange(nil, MAX_LEVEL_GRID_INDEX)) do
|
|
46985
47382
|
local roomDesc = level:GetRoomByIdx(roomGridIndex)
|
|
46986
47383
|
roomDesc.DisplayFlags = displayFlags
|
|
46987
47384
|
end
|
|
@@ -50408,6 +50805,14 @@ do
|
|
|
50408
50805
|
end
|
|
50409
50806
|
end
|
|
50410
50807
|
end
|
|
50808
|
+
do
|
|
50809
|
+
local ____export = require("src.functions.emptyRoom")
|
|
50810
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
50811
|
+
if ____exportKey ~= "default" then
|
|
50812
|
+
____exports[____exportKey] = ____exportValue
|
|
50813
|
+
end
|
|
50814
|
+
end
|
|
50815
|
+
end
|
|
50411
50816
|
do
|
|
50412
50817
|
local ____export = require("src.functions.entities")
|
|
50413
50818
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -50488,6 +50893,14 @@ do
|
|
|
50488
50893
|
end
|
|
50489
50894
|
end
|
|
50490
50895
|
end
|
|
50896
|
+
do
|
|
50897
|
+
local ____export = require("src.functions.gridIndex")
|
|
50898
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
50899
|
+
if ____exportKey ~= "default" then
|
|
50900
|
+
____exports[____exportKey] = ____exportValue
|
|
50901
|
+
end
|
|
50902
|
+
end
|
|
50903
|
+
end
|
|
50491
50904
|
do
|
|
50492
50905
|
local ____export = require("src.functions.hex")
|
|
50493
50906
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -50824,6 +51237,14 @@ do
|
|
|
50824
51237
|
end
|
|
50825
51238
|
end
|
|
50826
51239
|
end
|
|
51240
|
+
do
|
|
51241
|
+
local ____export = require("src.functions.roomShapeWalls")
|
|
51242
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
51243
|
+
if ____exportKey ~= "default" then
|
|
51244
|
+
____exports[____exportKey] = ____exportValue
|
|
51245
|
+
end
|
|
51246
|
+
end
|
|
51247
|
+
end
|
|
50827
51248
|
do
|
|
50828
51249
|
local ____export = require("src.functions.roomTransition")
|
|
50829
51250
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -51684,6 +52105,14 @@ do
|
|
|
51684
52105
|
end
|
|
51685
52106
|
end
|
|
51686
52107
|
end
|
|
52108
|
+
do
|
|
52109
|
+
local ____export = require("src.functions.emptyRoom")
|
|
52110
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
52111
|
+
if ____exportKey ~= "default" then
|
|
52112
|
+
____exports[____exportKey] = ____exportValue
|
|
52113
|
+
end
|
|
52114
|
+
end
|
|
52115
|
+
end
|
|
51687
52116
|
do
|
|
51688
52117
|
local ____export = require("src.functions.entities")
|
|
51689
52118
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -51764,6 +52193,14 @@ do
|
|
|
51764
52193
|
end
|
|
51765
52194
|
end
|
|
51766
52195
|
end
|
|
52196
|
+
do
|
|
52197
|
+
local ____export = require("src.functions.gridIndex")
|
|
52198
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
52199
|
+
if ____exportKey ~= "default" then
|
|
52200
|
+
____exports[____exportKey] = ____exportValue
|
|
52201
|
+
end
|
|
52202
|
+
end
|
|
52203
|
+
end
|
|
51767
52204
|
do
|
|
51768
52205
|
local ____export = require("src.functions.hex")
|
|
51769
52206
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -52100,6 +52537,14 @@ do
|
|
|
52100
52537
|
end
|
|
52101
52538
|
end
|
|
52102
52539
|
end
|
|
52540
|
+
do
|
|
52541
|
+
local ____export = require("src.functions.roomShapeWalls")
|
|
52542
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
52543
|
+
if ____exportKey ~= "default" then
|
|
52544
|
+
____exports[____exportKey] = ____exportValue
|
|
52545
|
+
end
|
|
52546
|
+
end
|
|
52547
|
+
end
|
|
52103
52548
|
do
|
|
52104
52549
|
local ____export = require("src.functions.roomTransition")
|
|
52105
52550
|
for ____exportKey, ____exportValue in pairs(____export) do
|