isaacscript-common 87.7.0 → 87.8.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/classes/ModUpgraded.lua +4 -4
- package/dist/classes/callbacks/InputActionFilter.lua +2 -2
- package/dist/classes/callbacks/InputActionPlayer.lua +2 -2
- package/dist/classes/callbacks/PostCollectibleEmpty.lua +2 -2
- package/dist/classes/callbacks/PostCursedTeleport.lua +2 -2
- package/dist/classes/callbacks/PostCustomRevive.lua +2 -2
- package/dist/classes/callbacks/PostDiceRoomActivated.lua +2 -2
- package/dist/classes/callbacks/PostGridEntityCollision.lua +2 -2
- package/dist/classes/callbacks/PostGridEntityCustomCollision.lua +2 -2
- package/dist/classes/callbacks/PostGridEntityCustomRemove.lua +2 -2
- package/dist/classes/callbacks/PostGridEntityRemove.lua +2 -2
- package/dist/classes/callbacks/PostItemDischarge.lua +2 -2
- package/dist/classes/callbacks/PostKeyboardChanged.lua +2 -2
- package/dist/classes/callbacks/PostPickupSelectionFilter.lua +2 -2
- package/dist/classes/callbacks/PostPurchase.lua +2 -2
- package/dist/classes/callbacks/PostRoomClearChanged.lua +2 -2
- package/dist/classes/callbacks/PostTransformation.lua +2 -2
- package/dist/classes/callbacks/PreEntitySpawnFilter.lua +2 -2
- package/dist/classes/callbacks/PreRoomEntitySpawnFilter.lua +2 -2
- package/dist/classes/features/callbackLogic/GridEntityUpdateDetection.lua +2 -2
- package/dist/classes/features/other/DeployJSONRoom.lua +1 -1
- package/dist/classes/features/other/ExtraConsoleCommands.lua +1 -1
- package/dist/classes/features/other/NoSirenSteal.lua +1 -1
- package/dist/classes/features/other/PersistentEntities.lua +1 -1
- package/dist/classes/features/other/extraConsoleCommands/commands.lua +5 -5
- package/dist/functions/array.js +1 -1
- package/dist/functions/array.lua +2 -2
- package/dist/functions/bitSet128.lua +10 -6
- package/dist/functions/bosses.d.ts.map +1 -1
- package/dist/functions/bosses.js +4 -0
- package/dist/functions/bosses.lua +10 -7
- package/dist/functions/color.lua +10 -6
- package/dist/functions/doors.lua +1 -1
- package/dist/functions/entities.lua +8 -4
- package/dist/functions/globals.lua +1 -1
- package/dist/functions/gridEntities.lua +1 -1
- package/dist/functions/input.lua +1 -1
- package/dist/functions/kColor.lua +10 -6
- package/dist/functions/rng.lua +10 -6
- package/dist/functions/roomShapeWalls.lua +5 -5
- package/dist/functions/vector.lua +10 -6
- package/dist/functions/weighted.lua +1 -1
- package/dist/isaacscript-common.lua +189 -162
- package/dist/maps/entityTypeVariantToBossIDMap.lua +1 -1
- package/dist/shouldFire.lua +56 -56
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +7 -10
- package/src/functions/array.ts +1 -1
- package/src/functions/bosses.ts +5 -0
package/dist/functions/rng.lua
CHANGED
|
@@ -69,12 +69,16 @@ function ____exports.deserializeRNG(self, rng)
|
|
|
69
69
|
if not isTable(nil, rng) then
|
|
70
70
|
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
71
71
|
end
|
|
72
|
-
local seed = table.unpack(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
local seed = table.unpack(
|
|
73
|
+
getNumbersFromTable(
|
|
74
|
+
nil,
|
|
75
|
+
rng,
|
|
76
|
+
OBJECT_NAME,
|
|
77
|
+
table.unpack(KEYS)
|
|
78
|
+
),
|
|
79
|
+
1,
|
|
80
|
+
1
|
|
81
|
+
)
|
|
78
82
|
assertDefined(nil, seed, ("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: seed")
|
|
79
83
|
return ____exports.newRNG(nil, seed)
|
|
80
84
|
end
|
|
@@ -45,7 +45,7 @@ function ____exports.getVanillaWallGridIndexSetForRoomShape(self, roomShape)
|
|
|
45
45
|
local ____cond5 = ____switch5 == RoomShape.LTL
|
|
46
46
|
if ____cond5 then
|
|
47
47
|
do
|
|
48
|
-
local topMiddle, topRight, middleLeft, middle, bottomLeft, bottomRight = table.unpack(corners)
|
|
48
|
+
local topMiddle, topRight, middleLeft, middle, bottomLeft, bottomRight = table.unpack(corners, 1, 6)
|
|
49
49
|
local ____ReadonlySet_1 = ReadonlySet
|
|
50
50
|
local ____array_0 = __TS__SparseArrayNew(table.unpack(getGridIndexesBetween(nil, topMiddle.gridIndex, topRight.gridIndex, roomShape)))
|
|
51
51
|
__TS__SparseArrayPush(
|
|
@@ -77,7 +77,7 @@ function ____exports.getVanillaWallGridIndexSetForRoomShape(self, roomShape)
|
|
|
77
77
|
____cond5 = ____cond5 or ____switch5 == RoomShape.LTR
|
|
78
78
|
if ____cond5 then
|
|
79
79
|
do
|
|
80
|
-
local topLeft, topMiddle, middle, middleRight, bottomLeft, bottomRight = table.unpack(corners)
|
|
80
|
+
local topLeft, topMiddle, middle, middleRight, bottomLeft, bottomRight = table.unpack(corners, 1, 6)
|
|
81
81
|
local ____ReadonlySet_3 = ReadonlySet
|
|
82
82
|
local ____array_2 = __TS__SparseArrayNew(table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, topMiddle.gridIndex, roomShape)))
|
|
83
83
|
__TS__SparseArrayPush(
|
|
@@ -109,7 +109,7 @@ function ____exports.getVanillaWallGridIndexSetForRoomShape(self, roomShape)
|
|
|
109
109
|
____cond5 = ____cond5 or ____switch5 == RoomShape.LBL
|
|
110
110
|
if ____cond5 then
|
|
111
111
|
do
|
|
112
|
-
local topLeft, topRight, middleLeft, middle, bottomMiddle, bottomRight = table.unpack(corners)
|
|
112
|
+
local topLeft, topRight, middleLeft, middle, bottomMiddle, bottomRight = table.unpack(corners, 1, 6)
|
|
113
113
|
local ____ReadonlySet_5 = ReadonlySet
|
|
114
114
|
local ____array_4 = __TS__SparseArrayNew(table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, topRight.gridIndex, roomShape)))
|
|
115
115
|
__TS__SparseArrayPush(
|
|
@@ -141,7 +141,7 @@ function ____exports.getVanillaWallGridIndexSetForRoomShape(self, roomShape)
|
|
|
141
141
|
____cond5 = ____cond5 or ____switch5 == RoomShape.LBR
|
|
142
142
|
if ____cond5 then
|
|
143
143
|
do
|
|
144
|
-
local topLeft, topRight, middle, middleRight, bottomLeft, bottomMiddle = table.unpack(corners)
|
|
144
|
+
local topLeft, topRight, middle, middleRight, bottomLeft, bottomMiddle = table.unpack(corners, 1, 6)
|
|
145
145
|
local ____ReadonlySet_7 = ReadonlySet
|
|
146
146
|
local ____array_6 = __TS__SparseArrayNew(table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, topRight.gridIndex, roomShape)))
|
|
147
147
|
__TS__SparseArrayPush(
|
|
@@ -181,7 +181,7 @@ function getVanillaWallGridIndexSetForRectangleRoomShape(self, roomShape, corner
|
|
|
181
181
|
if #corners ~= 4 then
|
|
182
182
|
error("Failed to get the correct amount of corners for rectangular room shape.")
|
|
183
183
|
end
|
|
184
|
-
local topLeft, topRight, bottomLeft, bottomRight = table.unpack(corners)
|
|
184
|
+
local topLeft, topRight, bottomLeft, bottomRight = table.unpack(corners, 1, 4)
|
|
185
185
|
local ____ReadonlySet_9 = ReadonlySet
|
|
186
186
|
local ____array_8 = __TS__SparseArrayNew(table.unpack(getGridIndexesBetween(nil, topLeft.gridIndex, topRight.gridIndex, roomShape)))
|
|
187
187
|
__TS__SparseArrayPush(
|
|
@@ -39,12 +39,16 @@ function ____exports.deserializeVector(self, vector)
|
|
|
39
39
|
if not isTable(nil, vector) then
|
|
40
40
|
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
41
41
|
end
|
|
42
|
-
local x, y = table.unpack(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
local x, y = table.unpack(
|
|
43
|
+
getNumbersFromTable(
|
|
44
|
+
nil,
|
|
45
|
+
vector,
|
|
46
|
+
OBJECT_NAME,
|
|
47
|
+
table.unpack(KEYS)
|
|
48
|
+
),
|
|
49
|
+
1,
|
|
50
|
+
2
|
|
51
|
+
)
|
|
48
52
|
assertDefined(nil, x, ("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: X")
|
|
49
53
|
assertDefined(nil, y, ("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Y")
|
|
50
54
|
return Vector(x, y)
|
|
@@ -34,7 +34,7 @@ function ____exports.getRandomIndexFromWeightedArray(self, weightedArray, seedOr
|
|
|
34
34
|
for ____, ____value in __TS__Iterator(__TS__ArrayEntries(weightedArray)) do
|
|
35
35
|
local i = ____value[1]
|
|
36
36
|
local tuple = ____value[2]
|
|
37
|
-
local _element, weight = table.unpack(tuple)
|
|
37
|
+
local _element, weight = table.unpack(tuple, 1, 2)
|
|
38
38
|
weightAccumulator = weightAccumulator + weight
|
|
39
39
|
if weightAccumulator >= randomWeight then
|
|
40
40
|
return i
|