isaacscript-common 87.7.0 → 87.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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 +179 -155
- 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
|
@@ -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
|