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
|
@@ -199,7 +199,7 @@ function ModUpgraded.prototype.initFeature(self, feature)
|
|
|
199
199
|
end
|
|
200
200
|
if feature.callbacksUsed ~= nil then
|
|
201
201
|
for ____, callbackTuple in ipairs(feature.callbacksUsed) do
|
|
202
|
-
local modCallback, callbackFunc, optionalArgs = table.unpack(callbackTuple)
|
|
202
|
+
local modCallback, callbackFunc, optionalArgs = table.unpack(callbackTuple, 1, 3)
|
|
203
203
|
self:AddPriorityCallback(
|
|
204
204
|
modCallback,
|
|
205
205
|
CallbackPriority.IMPORTANT,
|
|
@@ -210,7 +210,7 @@ function ModUpgraded.prototype.initFeature(self, feature)
|
|
|
210
210
|
end
|
|
211
211
|
if feature.customCallbacksUsed ~= nil then
|
|
212
212
|
for ____, callbackTuple in ipairs(feature.customCallbacksUsed) do
|
|
213
|
-
local modCallback, callbackFunc, optionalArgs = table.unpack(callbackTuple)
|
|
213
|
+
local modCallback, callbackFunc, optionalArgs = table.unpack(callbackTuple, 1, 3)
|
|
214
214
|
self:AddPriorityCallbackCustom(
|
|
215
215
|
modCallback,
|
|
216
216
|
CallbackPriority.IMPORTANT,
|
|
@@ -248,13 +248,13 @@ function ModUpgraded.prototype.uninitFeature(self, feature)
|
|
|
248
248
|
end
|
|
249
249
|
if feature.callbacksUsed ~= nil then
|
|
250
250
|
for ____, callbackTuple in ipairs(feature.callbacksUsed) do
|
|
251
|
-
local modCallback, callbackFunc = table.unpack(callbackTuple)
|
|
251
|
+
local modCallback, callbackFunc = table.unpack(callbackTuple, 1, 2)
|
|
252
252
|
self:RemoveCallback(modCallback, callbackFunc)
|
|
253
253
|
end
|
|
254
254
|
end
|
|
255
255
|
if feature.customCallbacksUsed ~= nil then
|
|
256
256
|
for ____, callbackTuple in ipairs(feature.customCallbacksUsed) do
|
|
257
|
-
local modCallback, callbackFunc = table.unpack(callbackTuple)
|
|
257
|
+
local modCallback, callbackFunc = table.unpack(callbackTuple, 1, 2)
|
|
258
258
|
self:RemoveCallbackCustom(modCallback, callbackFunc)
|
|
259
259
|
end
|
|
260
260
|
end
|
|
@@ -13,8 +13,8 @@ __TS__ClassExtends(InputActionFilter, CustomCallback)
|
|
|
13
13
|
function InputActionFilter.prototype.____constructor(self)
|
|
14
14
|
CustomCallback.prototype.____constructor(self)
|
|
15
15
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
-
local _entity, inputHook, buttonAction = table.unpack(fireArgs)
|
|
17
|
-
local callbackInputHook, callbackButtonAction = table.unpack(optionalArgs)
|
|
16
|
+
local _entity, inputHook, buttonAction = table.unpack(fireArgs, 1, 3)
|
|
17
|
+
local callbackInputHook, callbackButtonAction = table.unpack(optionalArgs, 1, 2)
|
|
18
18
|
return (callbackInputHook == nil or callbackInputHook == inputHook) and (callbackButtonAction == nil or callbackButtonAction == buttonAction)
|
|
19
19
|
end
|
|
20
20
|
self.inputAction = function(____, entity, inputHook, buttonAction) return self:fire(entity, inputHook, buttonAction) end
|
|
@@ -13,8 +13,8 @@ __TS__ClassExtends(InputActionPlayer, CustomCallback)
|
|
|
13
13
|
function InputActionPlayer.prototype.____constructor(self)
|
|
14
14
|
CustomCallback.prototype.____constructor(self)
|
|
15
15
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
-
local player, inputHook, buttonAction = table.unpack(fireArgs)
|
|
17
|
-
local callbackPlayerVariant, callbackCharacter, callbackInputHook, callbackButtonAction = table.unpack(optionalArgs)
|
|
16
|
+
local player, inputHook, buttonAction = table.unpack(fireArgs, 1, 3)
|
|
17
|
+
local callbackPlayerVariant, callbackCharacter, callbackInputHook, callbackButtonAction = table.unpack(optionalArgs, 1, 4)
|
|
18
18
|
local character = player:GetPlayerType()
|
|
19
19
|
return (callbackPlayerVariant == nil or callbackPlayerVariant == player.Variant) and (callbackCharacter == nil or callbackCharacter == character) and (callbackInputHook == nil or callbackInputHook == inputHook) and (callbackButtonAction == nil or callbackButtonAction == buttonAction)
|
|
20
20
|
end
|
|
@@ -19,8 +19,8 @@ function PostCollectibleEmpty.prototype.____constructor(self)
|
|
|
19
19
|
CustomCallback.prototype.____constructor(self)
|
|
20
20
|
self.v = v
|
|
21
21
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
22
|
-
local _collectible, oldCollectibleType = table.unpack(fireArgs)
|
|
23
|
-
local callbackCollectibleType = table.unpack(optionalArgs)
|
|
22
|
+
local _collectible, oldCollectibleType = table.unpack(fireArgs, 1, 2)
|
|
23
|
+
local callbackCollectibleType = table.unpack(optionalArgs, 1, 1)
|
|
24
24
|
return callbackCollectibleType == nil or callbackCollectibleType == oldCollectibleType
|
|
25
25
|
end
|
|
26
26
|
self.postPickupUpdateCollectible = function(____, pickup)
|
|
@@ -49,7 +49,7 @@ function PostCursedTeleport.prototype.____constructor(self)
|
|
|
49
49
|
if trackingArray == nil then
|
|
50
50
|
return
|
|
51
51
|
end
|
|
52
|
-
local lastDamageFrame, callbackActivatedOnThisFrame = table.unpack(trackingArray)
|
|
52
|
+
local lastDamageFrame, callbackActivatedOnThisFrame = table.unpack(trackingArray, 1, 2)
|
|
53
53
|
if not self:playerIsTeleportingFromCursedTeleport(player, lastDamageFrame) then
|
|
54
54
|
return
|
|
55
55
|
end
|
|
@@ -76,7 +76,7 @@ function PostCursedTeleport.prototype.setDamageFrame(self, player, damageFlags)
|
|
|
76
76
|
local gameFrameCount = game:GetFrameCount()
|
|
77
77
|
local trackingArray = mapGetPlayer(nil, v.run.playersDamageFrameMap, player)
|
|
78
78
|
if trackingArray ~= nil then
|
|
79
|
-
local lastDamageFrame, callbackFiredOnThisFrame = table.unpack(trackingArray)
|
|
79
|
+
local lastDamageFrame, callbackFiredOnThisFrame = table.unpack(trackingArray, 1, 2)
|
|
80
80
|
if lastDamageFrame == gameFrameCount and callbackFiredOnThisFrame then
|
|
81
81
|
return
|
|
82
82
|
end
|
|
@@ -13,8 +13,8 @@ __TS__ClassExtends(PostCustomRevive, CustomCallback)
|
|
|
13
13
|
function PostCustomRevive.prototype.____constructor(self)
|
|
14
14
|
CustomCallback.prototype.____constructor(self)
|
|
15
15
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
-
local _player, revivalType = table.unpack(fireArgs)
|
|
17
|
-
local callbackRevivalType = table.unpack(optionalArgs)
|
|
16
|
+
local _player, revivalType = table.unpack(fireArgs, 1, 2)
|
|
17
|
+
local callbackRevivalType = table.unpack(optionalArgs, 1, 1)
|
|
18
18
|
return callbackRevivalType == nil or revivalType == callbackRevivalType
|
|
19
19
|
end
|
|
20
20
|
self.featuresUsed = {ISCFeature.CUSTOM_REVIVE}
|
|
@@ -20,8 +20,8 @@ function PostDiceRoomActivated.prototype.____constructor(self)
|
|
|
20
20
|
CustomCallback.prototype.____constructor(self)
|
|
21
21
|
self.v = v
|
|
22
22
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
23
|
-
local _player, diceFloorSubType = table.unpack(fireArgs)
|
|
24
|
-
local callbackDiceFloorSubType = table.unpack(optionalArgs)
|
|
23
|
+
local _player, diceFloorSubType = table.unpack(fireArgs, 1, 2)
|
|
24
|
+
local callbackDiceFloorSubType = table.unpack(optionalArgs, 1, 1)
|
|
25
25
|
return callbackDiceFloorSubType == nil or diceFloorSubType == callbackDiceFloorSubType
|
|
26
26
|
end
|
|
27
27
|
self.postEffectUpdateDiceFloor = function(____, effect)
|
|
@@ -13,8 +13,8 @@ __TS__ClassExtends(PostGridEntityCollision, CustomCallback)
|
|
|
13
13
|
function PostGridEntityCollision.prototype.____constructor(self)
|
|
14
14
|
CustomCallback.prototype.____constructor(self)
|
|
15
15
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
-
local gridEntity, entity = table.unpack(fireArgs)
|
|
17
|
-
local callbackGridEntityType, callbackGridEntityVariant, callbackEntityType, callbackEntityVariant, callbackEntitySubType = table.unpack(optionalArgs)
|
|
16
|
+
local gridEntity, entity = table.unpack(fireArgs, 1, 2)
|
|
17
|
+
local callbackGridEntityType, callbackGridEntityVariant, callbackEntityType, callbackEntityVariant, callbackEntitySubType = table.unpack(optionalArgs, 1, 5)
|
|
18
18
|
local gridEntityType = gridEntity:GetType()
|
|
19
19
|
local gridEntityVariant = gridEntity:GetVariant()
|
|
20
20
|
return (callbackGridEntityType == nil or callbackGridEntityType == gridEntityType) and (callbackGridEntityVariant == nil or callbackGridEntityVariant == gridEntityVariant) and (callbackEntityType == nil or callbackEntityType == entity.Type) and (callbackEntityVariant == nil or callbackEntityVariant == entity.Variant) and (callbackEntitySubType == nil or callbackEntitySubType == entity.SubType)
|
|
@@ -13,8 +13,8 @@ __TS__ClassExtends(PostGridEntityCustomCollision, CustomCallback)
|
|
|
13
13
|
function PostGridEntityCustomCollision.prototype.____constructor(self)
|
|
14
14
|
CustomCallback.prototype.____constructor(self)
|
|
15
15
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
-
local _gridEntity, gridEntityTypeCustom, entity = table.unpack(fireArgs)
|
|
17
|
-
local callbackGridEntityTypeCustom, callbackEntityType, callbackEntityVariant, callbackEntitySubType = table.unpack(optionalArgs)
|
|
16
|
+
local _gridEntity, gridEntityTypeCustom, entity = table.unpack(fireArgs, 1, 3)
|
|
17
|
+
local callbackGridEntityTypeCustom, callbackEntityType, callbackEntityVariant, callbackEntitySubType = table.unpack(optionalArgs, 1, 4)
|
|
18
18
|
return (callbackGridEntityTypeCustom == nil or callbackGridEntityTypeCustom == gridEntityTypeCustom) and (callbackEntityType == nil or callbackEntityType == entity.Type) and (callbackEntityVariant == nil or callbackEntityVariant == entity.Variant) and (callbackEntitySubType == nil or callbackEntitySubType == entity.SubType)
|
|
19
19
|
end
|
|
20
20
|
self.featuresUsed = {ISCFeature.GRID_ENTITY_COLLISION_DETECTION}
|
|
@@ -13,8 +13,8 @@ __TS__ClassExtends(PostGridEntityCustomRemove, CustomCallback)
|
|
|
13
13
|
function PostGridEntityCustomRemove.prototype.____constructor(self)
|
|
14
14
|
CustomCallback.prototype.____constructor(self)
|
|
15
15
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
-
local _gridIndex, gridEntityTypeCustom = table.unpack(fireArgs)
|
|
17
|
-
local callbackGridEntityTypeCustom = table.unpack(optionalArgs)
|
|
16
|
+
local _gridIndex, gridEntityTypeCustom = table.unpack(fireArgs, 1, 2)
|
|
17
|
+
local callbackGridEntityTypeCustom = table.unpack(optionalArgs, 1, 1)
|
|
18
18
|
return callbackGridEntityTypeCustom == nil or callbackGridEntityTypeCustom == gridEntityTypeCustom
|
|
19
19
|
end
|
|
20
20
|
self.featuresUsed = {ISCFeature.GRID_ENTITY_UPDATE_DETECTION}
|
|
@@ -13,8 +13,8 @@ __TS__ClassExtends(PostGridEntityRemove, CustomCallback)
|
|
|
13
13
|
function PostGridEntityRemove.prototype.____constructor(self)
|
|
14
14
|
CustomCallback.prototype.____constructor(self)
|
|
15
15
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
-
local _gridIndex, gridEntityType, variant = table.unpack(fireArgs)
|
|
17
|
-
local callbackGridEntityType, callbackVariant = table.unpack(optionalArgs)
|
|
16
|
+
local _gridIndex, gridEntityType, variant = table.unpack(fireArgs, 1, 3)
|
|
17
|
+
local callbackGridEntityType, callbackVariant = table.unpack(optionalArgs, 1, 2)
|
|
18
18
|
return (callbackGridEntityType == nil or callbackGridEntityType == gridEntityType) and (callbackVariant == nil or callbackVariant == variant)
|
|
19
19
|
end
|
|
20
20
|
self.featuresUsed = {ISCFeature.GRID_ENTITY_UPDATE_DETECTION}
|
|
@@ -45,8 +45,8 @@ function PostItemDischarge.prototype.____constructor(self)
|
|
|
45
45
|
CustomCallback.prototype.____constructor(self)
|
|
46
46
|
self.v = v
|
|
47
47
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
48
|
-
local _player, collectibleType = table.unpack(fireArgs)
|
|
49
|
-
local callbackCollectibleType = table.unpack(optionalArgs)
|
|
48
|
+
local _player, collectibleType = table.unpack(fireArgs, 1, 2)
|
|
49
|
+
local callbackCollectibleType = table.unpack(optionalArgs, 1, 1)
|
|
50
50
|
return callbackCollectibleType == nil or callbackCollectibleType == collectibleType
|
|
51
51
|
end
|
|
52
52
|
self.preNPCCollisionSucker = function(____, npc, collider)
|
|
@@ -22,8 +22,8 @@ function PostKeyboardChanged.prototype.____constructor(self)
|
|
|
22
22
|
CustomCallback.prototype.____constructor(self)
|
|
23
23
|
self.v = v
|
|
24
24
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
25
|
-
local keyboard, pressed = table.unpack(fireArgs)
|
|
26
|
-
local callbackKeyboard, callbackPressed = table.unpack(optionalArgs)
|
|
25
|
+
local keyboard, pressed = table.unpack(fireArgs, 1, 2)
|
|
26
|
+
local callbackKeyboard, callbackPressed = table.unpack(optionalArgs, 1, 2)
|
|
27
27
|
return (callbackKeyboard == nil or callbackKeyboard == keyboard) and (callbackPressed == nil or callbackPressed == pressed)
|
|
28
28
|
end
|
|
29
29
|
self.postRender = function()
|
|
@@ -13,8 +13,8 @@ __TS__ClassExtends(PostPickupSelectionFilter, CustomCallback)
|
|
|
13
13
|
function PostPickupSelectionFilter.prototype.____constructor(self)
|
|
14
14
|
CustomCallback.prototype.____constructor(self)
|
|
15
15
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
-
local _pickup, pickupVariant, subType = table.unpack(fireArgs)
|
|
17
|
-
local callbackPickupVariant, callbackPickupSubType = table.unpack(optionalArgs)
|
|
16
|
+
local _pickup, pickupVariant, subType = table.unpack(fireArgs, 1, 3)
|
|
17
|
+
local callbackPickupVariant, callbackPickupSubType = table.unpack(optionalArgs, 1, 2)
|
|
18
18
|
return (callbackPickupVariant == nil or callbackPickupVariant == pickupVariant) and (callbackPickupSubType == nil or callbackPickupSubType == subType)
|
|
19
19
|
end
|
|
20
20
|
self.postPickupSelection = function(____, pickup, variant, subType) return self:fire(pickup, variant, subType) end
|
|
@@ -36,8 +36,8 @@ function PostPurchase.prototype.____constructor(self)
|
|
|
36
36
|
CustomCallback.prototype.____constructor(self)
|
|
37
37
|
self.v = v
|
|
38
38
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
39
|
-
local _player, pickup = table.unpack(fireArgs)
|
|
40
|
-
local callbackPickupVariant, callbackPickupSubType = table.unpack(optionalArgs)
|
|
39
|
+
local _player, pickup = table.unpack(fireArgs, 1, 2)
|
|
40
|
+
local callbackPickupVariant, callbackPickupSubType = table.unpack(optionalArgs, 1, 2)
|
|
41
41
|
return (callbackPickupVariant == nil or callbackPickupVariant == pickup.Variant) and (callbackPickupSubType == nil or callbackPickupSubType == pickup.SubType)
|
|
42
42
|
end
|
|
43
43
|
self.postUseItem = function(____, _collectibleType, _rng, player)
|
|
@@ -19,8 +19,8 @@ function PostRoomClearChanged.prototype.____constructor(self)
|
|
|
19
19
|
CustomCallback.prototype.____constructor(self)
|
|
20
20
|
self.v = v
|
|
21
21
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
22
|
-
local roomClear = table.unpack(fireArgs)
|
|
23
|
-
local callbackRoomClear = table.unpack(optionalArgs)
|
|
22
|
+
local roomClear = table.unpack(fireArgs, 1, 1)
|
|
23
|
+
local callbackRoomClear = table.unpack(optionalArgs, 1, 1)
|
|
24
24
|
return callbackRoomClear == nil or callbackRoomClear == roomClear
|
|
25
25
|
end
|
|
26
26
|
self.postUpdate = function()
|
|
@@ -26,8 +26,8 @@ function PostTransformation.prototype.____constructor(self)
|
|
|
26
26
|
CustomCallback.prototype.____constructor(self)
|
|
27
27
|
self.v = v
|
|
28
28
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
29
|
-
local _player, playerForm = table.unpack(fireArgs)
|
|
30
|
-
local callbackPlayerForm = table.unpack(optionalArgs)
|
|
29
|
+
local _player, playerForm = table.unpack(fireArgs, 1, 2)
|
|
30
|
+
local callbackPlayerForm = table.unpack(optionalArgs, 1, 1)
|
|
31
31
|
return callbackPlayerForm == nil or callbackPlayerForm == playerForm
|
|
32
32
|
end
|
|
33
33
|
self.postPEffectUpdateReordered = function(____, player)
|
|
@@ -13,8 +13,8 @@ __TS__ClassExtends(PreEntitySpawnFilter, CustomCallback)
|
|
|
13
13
|
function PreEntitySpawnFilter.prototype.____constructor(self)
|
|
14
14
|
CustomCallback.prototype.____constructor(self)
|
|
15
15
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
-
local entityType, variant, subType = table.unpack(fireArgs)
|
|
17
|
-
local callbackEntityType, callbackVariant, callbackSubType = table.unpack(optionalArgs)
|
|
16
|
+
local entityType, variant, subType = table.unpack(fireArgs, 1, 3)
|
|
17
|
+
local callbackEntityType, callbackVariant, callbackSubType = table.unpack(optionalArgs, 1, 3)
|
|
18
18
|
return (callbackEntityType == nil or callbackEntityType == entityType) and (callbackVariant == nil or callbackVariant == variant) and (callbackSubType == nil or callbackSubType == subType)
|
|
19
19
|
end
|
|
20
20
|
self.preEntitySpawn = function(____, entityType, variant, subType, position, velocity, spawner, initSeed) return self:fire(
|
|
@@ -13,8 +13,8 @@ __TS__ClassExtends(PreRoomEntitySpawnFilter, CustomCallback)
|
|
|
13
13
|
function PreRoomEntitySpawnFilter.prototype.____constructor(self)
|
|
14
14
|
CustomCallback.prototype.____constructor(self)
|
|
15
15
|
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
-
local entityTypeOrGridEntityXMLType, variant, subType = table.unpack(fireArgs)
|
|
17
|
-
local callbackEntityTypeOrGridEntityXMLType, callbackVariant, callbackSubType = table.unpack(optionalArgs)
|
|
16
|
+
local entityTypeOrGridEntityXMLType, variant, subType = table.unpack(fireArgs, 1, 3)
|
|
17
|
+
local callbackEntityTypeOrGridEntityXMLType, callbackVariant, callbackSubType = table.unpack(optionalArgs, 1, 3)
|
|
18
18
|
return (callbackEntityTypeOrGridEntityXMLType == nil or callbackEntityTypeOrGridEntityXMLType == entityTypeOrGridEntityXMLType) and (callbackVariant == nil or callbackVariant == variant) and (callbackSubType == nil or callbackSubType == subType)
|
|
19
19
|
end
|
|
20
20
|
self.preRoomEntitySpawn = function(____, entityTypeOrGridEntityXMLType, variant, subType, gridIndex, initSeed) return self:fire(
|
|
@@ -67,7 +67,7 @@ function GridEntityUpdateDetection.prototype.checkGridEntitiesRemoved(self, grid
|
|
|
67
67
|
for ____, ____value in __TS__Iterator(v.room.initializedGridEntities) do
|
|
68
68
|
local gridIndex = ____value[1]
|
|
69
69
|
local gridEntityTuple = ____value[2]
|
|
70
|
-
local storedGridEntityType, storedGridEntityVariant = table.unpack(gridEntityTuple)
|
|
70
|
+
local storedGridEntityType, storedGridEntityVariant = table.unpack(gridEntityTuple, 1, 2)
|
|
71
71
|
local gridEntity = gridEntitiesMap:get(gridIndex)
|
|
72
72
|
if gridEntity == nil or gridEntity:GetType() ~= storedGridEntityType then
|
|
73
73
|
v.room.initializedGridEntities:delete(gridIndex)
|
|
@@ -85,7 +85,7 @@ function GridEntityUpdateDetection.prototype.checkGridEntityStateChanged(self, g
|
|
|
85
85
|
if gridEntityTuple == nil then
|
|
86
86
|
return
|
|
87
87
|
end
|
|
88
|
-
local _gridEntityType, _gridEntityVariant, oldState = table.unpack(gridEntityTuple)
|
|
88
|
+
local _gridEntityType, _gridEntityVariant, oldState = table.unpack(gridEntityTuple, 1, 3)
|
|
89
89
|
local newState = gridEntity.State
|
|
90
90
|
if oldState ~= newState then
|
|
91
91
|
self:updateTupleInMap(gridEntity)
|
|
@@ -61,7 +61,7 @@ function spawnGridEntityForJSONRoom(self, gridEntityXMLType, gridEntityXMLVarian
|
|
|
61
61
|
if gridEntityTuple == nil then
|
|
62
62
|
return nil
|
|
63
63
|
end
|
|
64
|
-
local gridEntityType, variant = table.unpack(gridEntityTuple)
|
|
64
|
+
local gridEntityType, variant = table.unpack(gridEntityTuple, 1, 2)
|
|
65
65
|
local position = gridCoordinatesToWorldPosition(nil, x, y)
|
|
66
66
|
local gridIndex = room:GetGridIndex(position)
|
|
67
67
|
local gridEntity = spawnGridEntityWithVariant(nil, gridEntityType, variant, gridIndex)
|
|
@@ -118,7 +118,7 @@ function ExtraConsoleCommands.prototype.____constructor(self)
|
|
|
118
118
|
if resultTuple == nil then
|
|
119
119
|
return
|
|
120
120
|
end
|
|
121
|
-
local commandName, commandFunction = table.unpack(resultTuple)
|
|
121
|
+
local commandName, commandFunction = table.unpack(resultTuple, 1, 2)
|
|
122
122
|
print("Command: " .. commandName)
|
|
123
123
|
commandFunction(nil, params)
|
|
124
124
|
end
|
|
@@ -38,7 +38,7 @@ function NoSirenSteal.prototype.checkReturnFamiliarToPlayer(self, npc)
|
|
|
38
38
|
end
|
|
39
39
|
function NoSirenSteal.prototype.blacklistEntryExists(self, incomingFamiliarVariant, incomingFamiliarSubType)
|
|
40
40
|
for ____, familiarTuple in ipairs(v.run.familiarBlacklist) do
|
|
41
|
-
local familiarVariant, familiarSubType = table.unpack(familiarTuple)
|
|
41
|
+
local familiarVariant, familiarSubType = table.unpack(familiarTuple, 1, 2)
|
|
42
42
|
if familiarVariant == incomingFamiliarVariant and familiarSubType == incomingFamiliarSubType then
|
|
43
43
|
return true
|
|
44
44
|
end
|
|
@@ -125,7 +125,7 @@ function PersistentEntities.prototype.removePersistentEntity(self, persistentEnt
|
|
|
125
125
|
local ptrHash = ____value[1]
|
|
126
126
|
local tuple = ____value[2]
|
|
127
127
|
do
|
|
128
|
-
local index, entityPtr = table.unpack(tuple)
|
|
128
|
+
local index, entityPtr = table.unpack(tuple, 1, 2)
|
|
129
129
|
if index ~= persistentEntityIndex then
|
|
130
130
|
goto __continue16
|
|
131
131
|
end
|
|
@@ -382,7 +382,7 @@ function ____exports.spawnTrinketAt(self, params, golden)
|
|
|
382
382
|
print("You must specify the number corresponding to the trinket type and the number corresponding to the grid tile location.")
|
|
383
383
|
return
|
|
384
384
|
end
|
|
385
|
-
local trinketTypeString, gridIndexString = table.unpack(args)
|
|
385
|
+
local trinketTypeString, gridIndexString = table.unpack(args, 1, 2)
|
|
386
386
|
if trinketTypeString == nil or gridIndexString == nil then
|
|
387
387
|
return
|
|
388
388
|
end
|
|
@@ -419,7 +419,7 @@ function ____exports.addCharges(self, params)
|
|
|
419
419
|
print("Invalid amount of arguments: " .. tostring(#args))
|
|
420
420
|
return
|
|
421
421
|
end
|
|
422
|
-
local activeSlotString, numChargeString = table.unpack(args)
|
|
422
|
+
local activeSlotString, numChargeString = table.unpack(args, 1, 2)
|
|
423
423
|
if activeSlotString == nil then
|
|
424
424
|
return
|
|
425
425
|
end
|
|
@@ -1210,7 +1210,7 @@ function ____exports.setCharges(self, params)
|
|
|
1210
1210
|
print("Invalid amount of arguments: " .. tostring(#args))
|
|
1211
1211
|
return
|
|
1212
1212
|
end
|
|
1213
|
-
local activeSlotString, chargeString = table.unpack(args)
|
|
1213
|
+
local activeSlotString, chargeString = table.unpack(args, 1, 2)
|
|
1214
1214
|
if activeSlotString == nil or chargeString == nil then
|
|
1215
1215
|
return
|
|
1216
1216
|
end
|
|
@@ -1245,7 +1245,7 @@ function ____exports.setPosition(self, params)
|
|
|
1245
1245
|
print("You must specify a position. (e.g. \"setPosition 100 50\")")
|
|
1246
1246
|
return
|
|
1247
1247
|
end
|
|
1248
|
-
local xString, yString = table.unpack(args)
|
|
1248
|
+
local xString, yString = table.unpack(args, 1, 2)
|
|
1249
1249
|
if xString == nil or yString == nil then
|
|
1250
1250
|
return
|
|
1251
1251
|
end
|
|
@@ -1324,7 +1324,7 @@ function ____exports.spawnCollectibleAt(self, params)
|
|
|
1324
1324
|
print("You must specify the number corresponding to the collectible type and the number corresponding to the grid tile location.")
|
|
1325
1325
|
return
|
|
1326
1326
|
end
|
|
1327
|
-
local collectibleTypeString, gridIndexString = table.unpack(args)
|
|
1327
|
+
local collectibleTypeString, gridIndexString = table.unpack(args, 1, 2)
|
|
1328
1328
|
if collectibleTypeString == nil or gridIndexString == nil then
|
|
1329
1329
|
return
|
|
1330
1330
|
end
|
package/dist/functions/array.js
CHANGED
|
@@ -314,7 +314,7 @@ function getArrayDuplicateElements(array) {
|
|
|
314
314
|
set.add(element);
|
|
315
315
|
}
|
|
316
316
|
const values = [...duplicateElements];
|
|
317
|
-
return values.
|
|
317
|
+
return values.toSorted(sort_1.sortNormal);
|
|
318
318
|
}
|
|
319
319
|
/**
|
|
320
320
|
* Helper function to get an array containing the indexes of an array.
|
package/dist/functions/array.lua
CHANGED
|
@@ -15,7 +15,7 @@ local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
|
|
|
15
15
|
local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
|
|
16
16
|
local Set = ____lualib.Set
|
|
17
17
|
local __TS__Spread = ____lualib.__TS__Spread
|
|
18
|
-
local
|
|
18
|
+
local __TS__ArrayToSorted = ____lualib.__TS__ArrayToSorted
|
|
19
19
|
local __TS__ArrayIncludes = ____lualib.__TS__ArrayIncludes
|
|
20
20
|
local __TS__ObjectKeys = ____lualib.__TS__ObjectKeys
|
|
21
21
|
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
@@ -373,7 +373,7 @@ function ____exports.getArrayDuplicateElements(self, array)
|
|
|
373
373
|
set:add(element)
|
|
374
374
|
end
|
|
375
375
|
local values = {__TS__Spread(duplicateElements)}
|
|
376
|
-
return
|
|
376
|
+
return __TS__ArrayToSorted(values, sortNormal)
|
|
377
377
|
end
|
|
378
378
|
--- Helper function to get an array containing the indexes of an array.
|
|
379
379
|
--
|
|
@@ -33,12 +33,16 @@ function ____exports.deserializeBitSet128(self, bitSet128)
|
|
|
33
33
|
if not isTable(nil, bitSet128) then
|
|
34
34
|
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
35
35
|
end
|
|
36
|
-
local l, h = table.unpack(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
local l, h = table.unpack(
|
|
37
|
+
getNumbersFromTable(
|
|
38
|
+
nil,
|
|
39
|
+
bitSet128,
|
|
40
|
+
OBJECT_NAME,
|
|
41
|
+
table.unpack(KEYS)
|
|
42
|
+
),
|
|
43
|
+
1,
|
|
44
|
+
2
|
|
45
|
+
)
|
|
42
46
|
assertDefined(nil, l, ("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: l")
|
|
43
47
|
assertDefined(nil, h, ("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: h")
|
|
44
48
|
return BitSet128(l, h)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,MAAM,EACN,UAAU,EAGX,MAAM,8BAA8B,CAAC;AAiCtC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,UAAU,GAAE,UAAU,GAAG,CAAC,CAAM,EAChC,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,SAAS,SAAS,EAAE,CAGtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,IAAI,SAAS,MAAM,EAAE,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAExD;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,MAAM,GAAG,SAAS,CA0B9C;AAED,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,GACX,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,MAAM,EACN,UAAU,EAGX,MAAM,8BAA8B,CAAC;AAiCtC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,UAAU,GAAE,UAAU,GAAG,CAAC,CAAM,EAChC,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,SAAS,SAAS,EAAE,CAGtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,IAAI,SAAS,MAAM,EAAE,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAExD;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,MAAM,GAAG,SAAS,CA0B9C;AAED,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,GACX,MAAM,GAAG,SAAS,CAQpB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,GAChB,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAEjC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,GACf,SAAS,MAAM,EAAE,GAAG,SAAS,CAE/B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED,+FAA+F;AAC/F,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAEpE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CACvB,UAAU,CAAC,EAAE,UAAU,EACvB,OAAO,CAAC,EAAE,GAAG,EACb,OAAO,CAAC,EAAE,GAAG,EACb,cAAc,UAAQ,GACrB,SAAS,SAAS,EAAE,CAGtB;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,GACb,SAAS,CAAC,UAAU,EAAE,GAAG,CAAC,CAE5B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,6FAA6F;AAC7F,wBAAgB,KAAK,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAE7C;AAoCD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CACvB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,MAAM,GAAG,GAAG,EACjC,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,EACvC,SAAS,GAAE,IAAI,GAAG,GAAG,GAAG,SAAqB,EAC7C,WAAW,CAAC,EAAE,GAAG,GAChB,SAAS,CAiCX;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,MAAM,GAAG,GAAG,EACjC,SAAS,EAAE,IAAI,GAAG,GAAG,EACrB,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,EACvC,WAAW,CAAC,EAAE,GAAG,GAChB,SAAS,CAYX"}
|
package/dist/functions/bosses.js
CHANGED
|
@@ -113,6 +113,10 @@ function getBossID() {
|
|
|
113
113
|
return bossID;
|
|
114
114
|
}
|
|
115
115
|
function getBossIDFromEntityTypeVariant(entityType, variant) {
|
|
116
|
+
// First, handle some special cases.
|
|
117
|
+
if (entityType === isaac_typescript_definitions_1.EntityType.HORSEMAN_HEAD) {
|
|
118
|
+
return isaac_typescript_definitions_1.BossID.HEADLESS_HORSEMAN;
|
|
119
|
+
}
|
|
116
120
|
const entityTypeVariant = `${entityType}.${variant}`;
|
|
117
121
|
return entityTypeVariantToBossIDMap_1.ENTITY_TYPE_VARIANT_TO_BOSS_ID_MAP.get(entityTypeVariant);
|
|
118
122
|
}
|
|
@@ -136,6 +136,9 @@ function ____exports.getBossID(self)
|
|
|
136
136
|
return bossID
|
|
137
137
|
end
|
|
138
138
|
function ____exports.getBossIDFromEntityTypeVariant(self, entityType, variant)
|
|
139
|
+
if entityType == EntityType.HORSEMAN_HEAD then
|
|
140
|
+
return BossID.HEADLESS_HORSEMAN
|
|
141
|
+
end
|
|
139
142
|
local entityTypeVariant = (tostring(entityType) .. ".") .. tostring(variant)
|
|
140
143
|
return ENTITY_TYPE_VARIANT_TO_BOSS_ID_MAP:get(entityTypeVariant)
|
|
141
144
|
end
|
|
@@ -208,21 +211,21 @@ local function getNumBossSegments(self, entityType, variant, numSegments)
|
|
|
208
211
|
return numSegments
|
|
209
212
|
end
|
|
210
213
|
repeat
|
|
211
|
-
local
|
|
212
|
-
local
|
|
213
|
-
if
|
|
214
|
+
local ____switch24 = entityType
|
|
215
|
+
local ____cond24 = ____switch24 == EntityType.CHUB
|
|
216
|
+
if ____cond24 then
|
|
214
217
|
do
|
|
215
218
|
return 3
|
|
216
219
|
end
|
|
217
220
|
end
|
|
218
|
-
|
|
219
|
-
if
|
|
221
|
+
____cond24 = ____cond24 or ____switch24 == EntityType.LOKI
|
|
222
|
+
if ____cond24 then
|
|
220
223
|
do
|
|
221
224
|
return variant == LokiVariant.LOKII and 2 or 1
|
|
222
225
|
end
|
|
223
226
|
end
|
|
224
|
-
|
|
225
|
-
if
|
|
227
|
+
____cond24 = ____cond24 or ____switch24 == EntityType.GURGLING
|
|
228
|
+
if ____cond24 then
|
|
226
229
|
do
|
|
227
230
|
return 2
|
|
228
231
|
end
|
package/dist/functions/color.lua
CHANGED
|
@@ -56,12 +56,16 @@ function ____exports.deserializeColor(self, color)
|
|
|
56
56
|
if not isTable(nil, color) then
|
|
57
57
|
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
58
58
|
end
|
|
59
|
-
local r, g, b, a, ro, go, bo = table.unpack(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
local r, g, b, a, ro, go, bo = table.unpack(
|
|
60
|
+
getNumbersFromTable(
|
|
61
|
+
nil,
|
|
62
|
+
color,
|
|
63
|
+
OBJECT_NAME,
|
|
64
|
+
table.unpack(KEYS)
|
|
65
|
+
),
|
|
66
|
+
1,
|
|
67
|
+
7
|
|
68
|
+
)
|
|
65
69
|
assertDefined(nil, r, ("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: R")
|
|
66
70
|
assertDefined(nil, g, ("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: G")
|
|
67
71
|
assertDefined(nil, b, ("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: B")
|
package/dist/functions/doors.lua
CHANGED
|
@@ -314,7 +314,7 @@ function ____exports.getRoomShapeDoorSlot(self, roomShape, x, y)
|
|
|
314
314
|
if doorSlot == nil or not isEnumValue(nil, doorSlot, DoorSlot) then
|
|
315
315
|
goto __continue40
|
|
316
316
|
end
|
|
317
|
-
local doorX, doorY = table.unpack(coordinates)
|
|
317
|
+
local doorX, doorY = table.unpack(coordinates, 1, 2)
|
|
318
318
|
if x == doorX and y == doorY then
|
|
319
319
|
return doorSlot
|
|
320
320
|
end
|
|
@@ -219,7 +219,7 @@ function ____exports.getConstituentsFromEntityID(self, entityID)
|
|
|
219
219
|
if #parts ~= 3 then
|
|
220
220
|
error("Failed to get the constituents from entity ID: " .. entityID)
|
|
221
221
|
end
|
|
222
|
-
local entityTypeString, variantString, subTypeString = table.unpack(parts)
|
|
222
|
+
local entityTypeString, variantString, subTypeString = table.unpack(parts, 1, 3)
|
|
223
223
|
assertDefined(nil, entityTypeString, "Failed to get the first constituent from an entity ID: " .. entityID)
|
|
224
224
|
assertDefined(nil, variantString, "Failed to get the second constituent from an entity ID: " .. entityID)
|
|
225
225
|
assertDefined(nil, subTypeString, "Failed to get the third constituent from an entity ID: " .. entityID)
|
|
@@ -436,7 +436,7 @@ function ____exports.parseEntityID(self, entityID)
|
|
|
436
436
|
if #entityIDArray ~= 3 then
|
|
437
437
|
return nil
|
|
438
438
|
end
|
|
439
|
-
local entityTypeString, variantString, subTypeString = table.unpack(entityIDArray)
|
|
439
|
+
local entityTypeString, variantString, subTypeString = table.unpack(entityIDArray, 1, 3)
|
|
440
440
|
if entityTypeString == nil or variantString == nil or subTypeString == nil then
|
|
441
441
|
return nil
|
|
442
442
|
end
|
|
@@ -459,7 +459,7 @@ function ____exports.parseEntityTypeVariantString(self, entityTypeVariantString)
|
|
|
459
459
|
if #entityTypeVariantArray ~= 2 then
|
|
460
460
|
return nil
|
|
461
461
|
end
|
|
462
|
-
local entityTypeString, variantString = table.unpack(entityTypeVariantArray)
|
|
462
|
+
local entityTypeString, variantString = table.unpack(entityTypeVariantArray, 1, 2)
|
|
463
463
|
if entityTypeString == nil or variantString == nil then
|
|
464
464
|
return nil
|
|
465
465
|
end
|
|
@@ -588,7 +588,11 @@ function ____exports.spawnEntityID(self, entityID, positionOrGridIndex, velocity
|
|
|
588
588
|
if velocity == nil then
|
|
589
589
|
velocity = VectorZero
|
|
590
590
|
end
|
|
591
|
-
local entityType, variant, subType = table.unpack(
|
|
591
|
+
local entityType, variant, subType = table.unpack(
|
|
592
|
+
____exports.getConstituentsFromEntityID(nil, entityID),
|
|
593
|
+
1,
|
|
594
|
+
3
|
|
595
|
+
)
|
|
592
596
|
return ____exports.spawn(
|
|
593
597
|
nil,
|
|
594
598
|
entityType,
|
|
@@ -237,7 +237,7 @@ function ____exports.logNewGlobals(self)
|
|
|
237
237
|
for ____, ____value in __TS__Iterator(__TS__ArrayEntries(newGlobals)) do
|
|
238
238
|
local i = ____value[1]
|
|
239
239
|
local tuple = ____value[2]
|
|
240
|
-
local key, value = table.unpack(tuple)
|
|
240
|
+
local key, value = table.unpack(tuple, 1, 2)
|
|
241
241
|
log((((tostring(i + 1) .. ") ") .. tostring(key)) .. " - ") .. tostring(value))
|
|
242
242
|
end
|
|
243
243
|
end
|
|
@@ -559,7 +559,7 @@ function ____exports.getConstituentsFromGridEntityID(self, gridEntityID)
|
|
|
559
559
|
if #parts ~= 2 then
|
|
560
560
|
error("Failed to get the constituents from a grid entity ID: " .. gridEntityID)
|
|
561
561
|
end
|
|
562
|
-
local gridEntityTypeString, variantString = table.unpack(parts)
|
|
562
|
+
local gridEntityTypeString, variantString = table.unpack(parts, 1, 2)
|
|
563
563
|
assertDefined(nil, gridEntityTypeString, "Failed to get the first constituent from a grid entity ID: " .. gridEntityID)
|
|
564
564
|
assertDefined(nil, variantString, "Failed to get the second constituent from a grid entity ID: " .. gridEntityID)
|
|
565
565
|
local gridEntityType = parseIntSafe(nil, gridEntityTypeString)
|
package/dist/functions/input.lua
CHANGED
|
@@ -204,7 +204,7 @@ function ____exports.keyboardToString(self, keyboard, uppercase)
|
|
|
204
204
|
if tuple == nil then
|
|
205
205
|
return nil
|
|
206
206
|
end
|
|
207
|
-
local lowercaseCharacter, uppercaseCharacter = table.unpack(tuple)
|
|
207
|
+
local lowercaseCharacter, uppercaseCharacter = table.unpack(tuple, 1, 2)
|
|
208
208
|
return uppercase and uppercaseCharacter or lowercaseCharacter
|
|
209
209
|
end
|
|
210
210
|
return ____exports
|
|
@@ -37,12 +37,16 @@ function ____exports.deserializeKColor(self, kColor)
|
|
|
37
37
|
if not isTable(nil, kColor) then
|
|
38
38
|
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
39
39
|
end
|
|
40
|
-
local r, g, b, a = table.unpack(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
local r, g, b, a = table.unpack(
|
|
41
|
+
getNumbersFromTable(
|
|
42
|
+
nil,
|
|
43
|
+
kColor,
|
|
44
|
+
OBJECT_NAME,
|
|
45
|
+
table.unpack(KEYS)
|
|
46
|
+
),
|
|
47
|
+
1,
|
|
48
|
+
4
|
|
49
|
+
)
|
|
46
50
|
assertDefined(nil, r, ("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Red")
|
|
47
51
|
assertDefined(nil, g, ("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Green")
|
|
48
52
|
assertDefined(nil, b, ("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Blue")
|