isaacscript-common 1.2.257 → 1.2.260
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/callbacks/postPlayerReordered.lua +9 -6
- package/dist/callbacks/subscriptions/postBombInitLate.lua +2 -3
- package/dist/callbacks/subscriptions/postBoneSwing.lua +2 -3
- package/dist/callbacks/subscriptions/postCollectibleInitFirst.lua +2 -3
- package/dist/callbacks/subscriptions/postCursedTeleport.lua +2 -3
- package/dist/callbacks/subscriptions/postCustomDoorEnter.lua +2 -3
- package/dist/callbacks/subscriptions/postCustomRevive.lua +2 -3
- package/dist/callbacks/subscriptions/postEffectInitLate.lua +2 -3
- package/dist/callbacks/subscriptions/postEsauJr.lua +2 -3
- package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +2 -3
- package/dist/callbacks/subscriptions/postFirstEsauJr.lua +2 -3
- package/dist/callbacks/subscriptions/postFirstFlip.lua +2 -3
- package/dist/callbacks/subscriptions/postFlip.lua +2 -3
- package/dist/callbacks/subscriptions/postGameStartedReordered.lua +2 -3
- package/dist/callbacks/subscriptions/postGridEntityBroken.lua +2 -3
- package/dist/callbacks/subscriptions/postGridEntityCollision.lua +2 -3
- package/dist/callbacks/subscriptions/postGridEntityInit.lua +2 -3
- package/dist/callbacks/subscriptions/postGridEntityRemove.lua +2 -3
- package/dist/callbacks/subscriptions/postGridEntityStateChange.lua +2 -3
- package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +2 -3
- package/dist/callbacks/subscriptions/postItemPickup.lua +2 -3
- package/dist/callbacks/subscriptions/postKnifeInitLate.lua +2 -3
- package/dist/callbacks/subscriptions/postLaserInitLate.lua +2 -3
- package/dist/callbacks/subscriptions/postNPCInitLate.lua +2 -3
- package/dist/callbacks/subscriptions/postNewLevelReordered.lua +2 -3
- package/dist/callbacks/subscriptions/postNewRoomEarly.lua +2 -3
- package/dist/callbacks/subscriptions/postNewRoomReordered.lua +2 -3
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.lua +2 -3
- package/dist/callbacks/subscriptions/postPickupCollect.lua +2 -3
- package/dist/callbacks/subscriptions/postPickupInitLate.lua +2 -3
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +2 -3
- package/dist/callbacks/subscriptions/postPlayerChangeType.lua +2 -3
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +2 -3
- package/dist/callbacks/subscriptions/postPlayerInitLate.lua +2 -3
- package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +2 -3
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +2 -3
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +2 -3
- package/dist/callbacks/subscriptions/postProjectileInitLate.lua +2 -3
- package/dist/callbacks/subscriptions/postPurchase.lua +2 -3
- package/dist/callbacks/subscriptions/postSacrifice.lua +2 -3
- package/dist/callbacks/subscriptions/postSlotAnimationChanged.lua +2 -3
- package/dist/callbacks/subscriptions/postSlotDestroyed.lua +2 -3
- package/dist/callbacks/subscriptions/postSlotInit.lua +2 -3
- package/dist/callbacks/subscriptions/postSlotRender.lua +2 -3
- package/dist/callbacks/subscriptions/postSlotUpdate.lua +2 -3
- package/dist/callbacks/subscriptions/postTearInitLate.lua +2 -3
- package/dist/callbacks/subscriptions/postTearInitVeryLate.lua +2 -3
- package/dist/callbacks/subscriptions/postTransformation.lua +2 -3
- package/dist/callbacks/subscriptions/postTrinketBreak.lua +2 -3
- package/dist/callbacks/subscriptions/preBerserkDeath.lua +2 -3
- package/dist/callbacks/subscriptions/preCustomRevive.lua +2 -3
- package/dist/callbacks/subscriptions/preItemPickup.lua +2 -3
- package/dist/callbacks/subscriptions/preNewLevel.lua +2 -3
- package/dist/callbacks/subscriptions/roomClearChange.lua +2 -3
- package/dist/features/deployJSONRoom.lua +2 -3
- package/dist/features/playerInventory.lua +3 -4
- package/dist/features/runInNFrames.lua +6 -5
- package/dist/features/sirenHelpers.lua +2 -2
- package/dist/features/taintedLazarusPlayers.lua +6 -6
- package/dist/functions/array.lua +5 -6
- package/dist/functions/benchmark.lua +1 -2
- package/dist/functions/collectibleCacheFlag.lua +1 -2
- package/dist/functions/deepCopy.lua +4 -5
- package/dist/functions/doors.lua +1 -2
- package/dist/functions/entity.d.ts +8 -8
- package/dist/functions/entity.lua +9 -13
- package/dist/functions/entitySpecific.d.ts +46 -46
- package/dist/functions/entitySpecific.lua +122 -123
- package/dist/functions/globals.lua +1 -2
- package/dist/functions/gridEntity.lua +2 -3
- package/dist/functions/log.lua +1 -1
- package/dist/functions/math.lua +3 -4
- package/dist/functions/player.lua +1 -2
- package/dist/functions/playerHealth.lua +3 -4
- package/dist/functions/playerIndex.lua +1 -2
- package/dist/functions/pocketItems.lua +6 -7
- package/dist/functions/rooms.lua +2 -3
- package/dist/functions/table.lua +5 -6
- package/dist/functions/utils.lua +2 -3
- package/dist/lualib_bundle.lua +358 -388
- package/package.json +4 -4
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postProjectileInitLateHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postProjectileInitLateRegister(self, callback, projectileVariant)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, projectileVariant}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postProjectileInitLateFire(self, projectile)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postPurchaseHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postPurchaseRegister(self, callback, pickupVariant, pickupSubType)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, pickupVariant, pickupSubType}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postPurchaseFire(self, player, pickup)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postSacrificeHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postSacrificeRegister(self, callback)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postSacrificeFire(self, player, numSacrifices)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postSlotAnimationChangedHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postSlotAnimationChangedRegister(self, callback, slotVariant)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, slotVariant}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postSlotAnimationChangedFire(self, slot, previousAnimation, currentAnimation)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postSlotDestroyedHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postSlotDestroyedRegister(self, callback, slotVariant)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, slotVariant}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postSlotDestroyedFire(self, slot)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postSlotInitHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postSlotInitRegister(self, callback, slotVariant)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, slotVariant}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postSlotInitFire(self, slot)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postSlotRenderHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postSlotRenderRegister(self, callback, slotVariant)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, slotVariant}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postSlotRenderFire(self, slot)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postSlotUpdateHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postSlotUpdateRegister(self, callback, slotVariant)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, slotVariant}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postSlotUpdateFire(self, slot)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postTearInitLateHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postTearInitLateRegister(self, callback, tearVariant)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, tearVariant}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postTearInitLateFire(self, tear)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postTearInitVeryLateHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postTearInitVeryLateRegister(self, callback, tearVariant)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, tearVariant}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postTearInitVeryLateFire(self, tear)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postTransformationHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postTransformationRegister(self, callback, playerForm)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, playerForm}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postTransformationFire(self, player, playerForm, hasForm)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.postTrinketBreakHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.postTrinketBreakRegister(self, callback, trinketType)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, trinketType}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.postTrinketBreakFire(self, player, trinketType)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.preBerserkDeathHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.preBerserkDeathRegister(self, callback, playerVariant)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, playerVariant}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.preBerserkDeathFire(self, player)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.preCustomReviveHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.preCustomReviveRegister(self, callback)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.preCustomReviveFire(self, player)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.preItemPickupHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.preItemPickupRegister(self, callback, itemType, itemID)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, itemType, itemID}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.preItemPickupFire(self, player, pickingUpItem)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.preNewLevelHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.preNewLevelRegister(self, callback)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.preNewLevelFire(self, player)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local subscriptions = {}
|
|
5
4
|
function ____exports.roomClearChangedHasSubscriptions(self)
|
|
6
5
|
return #subscriptions > 0
|
|
7
6
|
end
|
|
8
7
|
function ____exports.roomClearChangedRegister(self, callback)
|
|
9
|
-
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback}
|
|
10
9
|
end
|
|
11
10
|
function ____exports.roomClearChangedFire(self, roomClear)
|
|
12
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local Set = ____lualib.Set
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
5
4
|
local Map = ____lualib.Map
|
|
6
5
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
7
6
|
local ____exports = {}
|
|
@@ -136,7 +135,7 @@ function fillRoomWithDecorations(self)
|
|
|
136
135
|
if decoration ~= nil then
|
|
137
136
|
setGridEntityInvisible(nil, decoration)
|
|
138
137
|
end
|
|
139
|
-
|
|
138
|
+
decorationGridIndexes[#decorationGridIndexes + 1] = gridIndex
|
|
140
139
|
end
|
|
141
140
|
::__continue31::
|
|
142
141
|
end
|
|
@@ -276,7 +275,7 @@ function storePersistentEntity(self, entity)
|
|
|
276
275
|
local roomListIndex = getRoomListIndex(nil)
|
|
277
276
|
local persistentEntity = {gridIndex = gridIndex, type = entity.Type, variant = entity.Variant, subType = entity.SubType}
|
|
278
277
|
local persistentEntities = v.level.roomToPersistentEntitiesMap:getAndSetDefault(roomListIndex)
|
|
279
|
-
|
|
278
|
+
persistentEntities[#persistentEntities + 1] = persistentEntity
|
|
280
279
|
end
|
|
281
280
|
function fixPitGraphics(self)
|
|
282
281
|
local room = game:GetRoom()
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local Set = ____lualib.Set
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
5
4
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
6
5
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
7
6
|
local ____exports = {}
|
|
@@ -35,7 +34,7 @@ function newPlayerInventory(self, player)
|
|
|
35
34
|
nil,
|
|
36
35
|
numCollectibles,
|
|
37
36
|
function()
|
|
38
|
-
|
|
37
|
+
inventory[#inventory + 1] = collectibleType
|
|
39
38
|
end
|
|
40
39
|
)
|
|
41
40
|
end
|
|
@@ -64,12 +63,12 @@ end
|
|
|
64
63
|
function addCollectibleToInventory(self, player, collectibleType)
|
|
65
64
|
local playerIndex = getPlayerIndex(nil, player)
|
|
66
65
|
local inventory = v.run.playersInventory:getAndSetDefault(playerIndex, player)
|
|
67
|
-
|
|
66
|
+
inventory[#inventory + 1] = collectibleType
|
|
68
67
|
if not isActiveCollectible(nil, collectibleType) then
|
|
69
68
|
return
|
|
70
69
|
end
|
|
71
70
|
local activeCollectibleTypes = v.run.playersActiveCollectibleTypes:getAndSetDefault(playerIndex)
|
|
72
|
-
|
|
71
|
+
activeCollectibleTypes[#activeCollectibleTypes + 1] = collectibleType
|
|
73
72
|
local droppedActiveCollectibleTypes = __TS__ArrayFilter(
|
|
74
73
|
activeCollectibleTypes,
|
|
75
74
|
function(____, activeCollectibleType) return not player:HasCollectible(activeCollectibleType) end
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
3
2
|
local __TS__ArrayForEach = ____lualib.__TS__ArrayForEach
|
|
4
3
|
local __TS__ArraySplice = ____lualib.__TS__ArraySplice
|
|
5
4
|
local ____exports = {}
|
|
@@ -26,8 +25,8 @@ function checkExecuteQueuedFunctions(self, frameCount, functionTuples)
|
|
|
26
25
|
function(____, functionTuple, i)
|
|
27
26
|
local frame, func = table.unpack(functionTuple)
|
|
28
27
|
if frameCount >= frame then
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
functionsToFire[#functionsToFire + 1] = func
|
|
29
|
+
indexesToRemove[#indexesToRemove + 1] = i
|
|
31
30
|
end
|
|
32
31
|
end
|
|
33
32
|
)
|
|
@@ -55,14 +54,16 @@ function ____exports.runInNGameFrames(self, func, gameFrames)
|
|
|
55
54
|
local gameFrameCount = game:GetFrameCount()
|
|
56
55
|
local functionFireFrame = gameFrameCount + gameFrames
|
|
57
56
|
local tuple = {functionFireFrame, func}
|
|
58
|
-
|
|
57
|
+
local ____v_run_queuedGameFunctionTuples_0 = v.run.queuedGameFunctionTuples
|
|
58
|
+
____v_run_queuedGameFunctionTuples_0[#____v_run_queuedGameFunctionTuples_0 + 1] = tuple
|
|
59
59
|
end
|
|
60
60
|
function ____exports.runInNRenderFrames(self, func, renderFrames)
|
|
61
61
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
62
62
|
local renderFrameCount = Isaac.GetFrameCount()
|
|
63
63
|
local functionFireFrame = renderFrameCount + renderFrames
|
|
64
64
|
local tuple = {functionFireFrame, func}
|
|
65
|
-
|
|
65
|
+
local ____v_run_queuedRenderFunctionTuples_1 = v.run.queuedRenderFunctionTuples
|
|
66
|
+
____v_run_queuedRenderFunctionTuples_1[#____v_run_queuedRenderFunctionTuples_1 + 1] = tuple
|
|
66
67
|
end
|
|
67
68
|
function ____exports.runNextGameFrame(self, func)
|
|
68
69
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
3
2
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
4
3
|
local ____exports = {}
|
|
5
4
|
local postNPCInitSirenHelper, checkReturnFamiliarToPlayer, blacklistEntryExists, getSirenHelper, v
|
|
@@ -57,7 +56,8 @@ function ____exports.setFamiliarNoSirenSteal(self, familiarVariant, familiarSubT
|
|
|
57
56
|
if blacklistEntryExists(nil, familiarVariant, familiarSubType) then
|
|
58
57
|
return
|
|
59
58
|
end
|
|
60
|
-
|
|
59
|
+
local ____v_run_familiarBlacklist_0 = v.run.familiarBlacklist
|
|
60
|
+
____v_run_familiarBlacklist_0[#____v_run_familiarBlacklist_0 + 1] = {familiarVariant, familiarSubType}
|
|
61
61
|
end
|
|
62
62
|
function ____exports.hasSirenStolenFamiliar(self, familiar)
|
|
63
63
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local Map = ____lualib.Map
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
5
|
-
local __TS__ArrayShift = ____lualib.__TS__ArrayShift
|
|
6
4
|
local ____exports = {}
|
|
7
5
|
local postPlayerInit, checkDequeue, v
|
|
8
6
|
local ____featuresInitialized = require("featuresInitialized")
|
|
@@ -13,9 +11,11 @@ function postPlayerInit(self, player)
|
|
|
13
11
|
local entityPtr = EntityPtr(player)
|
|
14
12
|
local character = player:GetPlayerType()
|
|
15
13
|
if character == PlayerType.PLAYER_LAZARUS_B then
|
|
16
|
-
|
|
14
|
+
local ____v_run_queuedTaintedLazarus_0 = v.run.queuedTaintedLazarus
|
|
15
|
+
____v_run_queuedTaintedLazarus_0[#____v_run_queuedTaintedLazarus_0 + 1] = entityPtr
|
|
17
16
|
elseif character == PlayerType.PLAYER_LAZARUS2_B then
|
|
18
|
-
|
|
17
|
+
local ____v_run_queuedDeadTaintedLazarus_1 = v.run.queuedDeadTaintedLazarus
|
|
18
|
+
____v_run_queuedDeadTaintedLazarus_1[#____v_run_queuedDeadTaintedLazarus_1 + 1] = entityPtr
|
|
19
19
|
else
|
|
20
20
|
return
|
|
21
21
|
end
|
|
@@ -25,8 +25,8 @@ function checkDequeue(self)
|
|
|
25
25
|
if #v.run.queuedTaintedLazarus == 0 or #v.run.queuedDeadTaintedLazarus == 0 then
|
|
26
26
|
return
|
|
27
27
|
end
|
|
28
|
-
local taintedLazarusPtr =
|
|
29
|
-
local deadTaintedLazarusPtr =
|
|
28
|
+
local taintedLazarusPtr = table.remove(v.run.queuedTaintedLazarus, 1)
|
|
29
|
+
local deadTaintedLazarusPtr = table.remove(v.run.queuedDeadTaintedLazarus, 1)
|
|
30
30
|
if taintedLazarusPtr == nil or deadTaintedLazarusPtr == nil then
|
|
31
31
|
return
|
|
32
32
|
end
|
package/dist/functions/array.lua
CHANGED
|
@@ -2,7 +2,6 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
|
|
3
3
|
local Set = ____lualib.Set
|
|
4
4
|
local __TS__New = ____lualib.__TS__New
|
|
5
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
6
5
|
local __TS__ArrayIndexOf = ____lualib.__TS__ArrayIndexOf
|
|
7
6
|
local __TS__ArraySplice = ____lualib.__TS__ArraySplice
|
|
8
7
|
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
@@ -56,7 +55,7 @@ function ____exports.arrayRemove(self, originalArray, ...)
|
|
|
56
55
|
local array = {}
|
|
57
56
|
for ____, element in ipairs(originalArray) do
|
|
58
57
|
if not elementsToRemoveSet:has(element) then
|
|
59
|
-
|
|
58
|
+
array[#array + 1] = element
|
|
60
59
|
end
|
|
61
60
|
end
|
|
62
61
|
return array
|
|
@@ -81,7 +80,7 @@ function ____exports.arrayToString(self, array)
|
|
|
81
80
|
array,
|
|
82
81
|
function(____, element) return tostring(element) end
|
|
83
82
|
)
|
|
84
|
-
local commaSeparatedStrings = table.concat(strings, ", "
|
|
83
|
+
local commaSeparatedStrings = table.concat(strings, ", ")
|
|
85
84
|
return ("[" .. commaSeparatedStrings) .. "]"
|
|
86
85
|
end
|
|
87
86
|
function ____exports.combineArrays(self, ...)
|
|
@@ -89,7 +88,7 @@ function ____exports.combineArrays(self, ...)
|
|
|
89
88
|
local elements = {}
|
|
90
89
|
for ____, array in ipairs(arrays) do
|
|
91
90
|
for ____, element in ipairs(array) do
|
|
92
|
-
|
|
91
|
+
elements[#elements + 1] = element
|
|
93
92
|
end
|
|
94
93
|
end
|
|
95
94
|
return elements
|
|
@@ -103,7 +102,7 @@ function ____exports.copyArray(self, oldArray, numElements)
|
|
|
103
102
|
local i = 0
|
|
104
103
|
while i < numElements do
|
|
105
104
|
local oldElement = oldArray[i + 1]
|
|
106
|
-
|
|
105
|
+
newArray[#newArray + 1] = oldElement
|
|
107
106
|
i = i + 1
|
|
108
107
|
end
|
|
109
108
|
end
|
|
@@ -150,7 +149,7 @@ function ____exports.initArray(self, defaultValue, size)
|
|
|
150
149
|
nil,
|
|
151
150
|
size,
|
|
152
151
|
function()
|
|
153
|
-
|
|
152
|
+
array[#array + 1] = defaultValue
|
|
154
153
|
end
|
|
155
154
|
)
|
|
156
155
|
return array
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
3
2
|
local __TS__ArrayForEach = ____lualib.__TS__ArrayForEach
|
|
4
3
|
local ____exports = {}
|
|
5
4
|
local ____log = require("functions.log")
|
|
@@ -25,7 +24,7 @@ function ____exports.benchmark(self, numTrials, ...)
|
|
|
25
24
|
end
|
|
26
25
|
local averageTimeMilliseconds = totalTimeMilliseconds / numTrials
|
|
27
26
|
log(((("The average time of the function at index " .. tostring(i)) .. " is: ") .. tostring(averageTimeMilliseconds)) .. " milliseconds")
|
|
28
|
-
|
|
27
|
+
averages[#averages + 1] = averageTimeMilliseconds
|
|
29
28
|
end
|
|
30
29
|
)
|
|
31
30
|
return averages
|
|
@@ -2,7 +2,6 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local Map = ____lualib.Map
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local Set = ____lualib.Set
|
|
5
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
6
5
|
local ____exports = {}
|
|
7
6
|
local ____collectibles = require("functions.collectibles")
|
|
8
7
|
local collectibleHasCacheFlag = ____collectibles.collectibleHasCacheFlag
|
|
@@ -47,7 +46,7 @@ function ____exports.getPlayerCollectiblesForCacheFlag(self, player, cacheFlag)
|
|
|
47
46
|
nil,
|
|
48
47
|
numCollectibles,
|
|
49
48
|
function()
|
|
50
|
-
|
|
49
|
+
playerCollectibles[#playerCollectibles + 1] = collectibleType
|
|
51
50
|
end
|
|
52
51
|
)
|
|
53
52
|
end
|
|
@@ -5,7 +5,6 @@ local __TS__InstanceOf = ____lualib.__TS__InstanceOf
|
|
|
5
5
|
local Map = ____lualib.Map
|
|
6
6
|
local WeakMap = ____lualib.WeakMap
|
|
7
7
|
local WeakSet = ____lualib.WeakSet
|
|
8
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
9
8
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
10
9
|
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
11
10
|
local ____exports = {}
|
|
@@ -273,7 +272,7 @@ function deepCopyArray(self, array, serializationType, traversalDescription)
|
|
|
273
272
|
local newArray = {}
|
|
274
273
|
for ____, value in ipairs(array) do
|
|
275
274
|
local newValue = ____exports.deepCopy(nil, value, serializationType, traversalDescription)
|
|
276
|
-
|
|
275
|
+
newArray[#newArray + 1] = newValue
|
|
277
276
|
end
|
|
278
277
|
return newArray
|
|
279
278
|
end
|
|
@@ -298,11 +297,11 @@ function getCopiedEntries(self, object, serializationType, traversalDescription)
|
|
|
298
297
|
for ____, ____value in __TS__Iterator(object:entries()) do
|
|
299
298
|
local key = ____value[1]
|
|
300
299
|
local value = ____value[2]
|
|
301
|
-
|
|
300
|
+
entries[#entries + 1] = {key, value}
|
|
302
301
|
end
|
|
303
302
|
else
|
|
304
303
|
for key, value in pairs(object) do
|
|
305
|
-
|
|
304
|
+
entries[#entries + 1] = {key, value}
|
|
306
305
|
end
|
|
307
306
|
end
|
|
308
307
|
local hasNumberKeys = __TS__ArraySome(
|
|
@@ -325,7 +324,7 @@ function getCopiedEntries(self, object, serializationType, traversalDescription)
|
|
|
325
324
|
traversalDescription = getTraversalDescription(nil, key, traversalDescription)
|
|
326
325
|
local newValue = ____exports.deepCopy(nil, value, serializationType, traversalDescription)
|
|
327
326
|
local keyToUse = convertNumberKeysToStrings and tostring(key) or key
|
|
328
|
-
|
|
327
|
+
copiedEntries[#copiedEntries + 1] = {keyToUse, newValue}
|
|
329
328
|
end
|
|
330
329
|
::__continue78::
|
|
331
330
|
end
|
package/dist/functions/doors.lua
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local Set = ____lualib.Set
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
5
4
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
6
5
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
7
6
|
local ____exports = {}
|
|
@@ -27,7 +26,7 @@ function ____exports.getDoors(self, ...)
|
|
|
27
26
|
goto __continue12
|
|
28
27
|
end
|
|
29
28
|
if #roomTypes == 0 or roomTypesSet:has(door.TargetRoomType) then
|
|
30
|
-
|
|
29
|
+
doors[#doors + 1] = door
|
|
31
30
|
end
|
|
32
31
|
end
|
|
33
32
|
::__continue12::
|
|
@@ -22,7 +22,7 @@ export declare function countEntities(entityType?: EntityType | int, variant?: n
|
|
|
22
22
|
* const closestGaper = getClosestEntityTo(player, gapers);
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
export declare function getClosestEntityTo<T extends AnyEntity>(referenceEntity: Entity, entities: T[]): T;
|
|
25
|
+
export declare function getClosestEntityTo<T extends AnyEntity>(referenceEntity: Entity, entities: T[]): T | undefined;
|
|
26
26
|
/**
|
|
27
27
|
* Helper function to get all of the entities in the room or all of the entities that match a
|
|
28
28
|
* specific entity type / variant / sub-type.
|
|
@@ -39,14 +39,14 @@ export declare function getClosestEntityTo<T extends AnyEntity>(referenceEntity:
|
|
|
39
39
|
* }
|
|
40
40
|
* ```
|
|
41
41
|
*
|
|
42
|
-
* @param
|
|
42
|
+
* @param entityType Optional. If specified, will only return NPCs that match this entity
|
|
43
43
|
* type.
|
|
44
|
-
* @param
|
|
45
|
-
* @param
|
|
44
|
+
* @param variant Optional. If specified, will only return NPCs that match this variant.
|
|
45
|
+
* @param subType Optional. If specified, will only return NPCs that match this sub-type.
|
|
46
46
|
* @param ignoreFriendly Optional. If set to true, it will exclude friendly NPCs from being
|
|
47
47
|
* returned. Default is false. Will only be taken into account if `matchingEntityType` is specified.
|
|
48
48
|
*/
|
|
49
|
-
export declare function getEntities(
|
|
49
|
+
export declare function getEntities(entityType?: EntityType | int, variant?: number, subType?: number, ignoreFriendly?: boolean): Entity[];
|
|
50
50
|
/** Helper function to return a string containing an entity's type, variant, and sub-type. */
|
|
51
51
|
export declare function getEntityID(entity: Entity): string;
|
|
52
52
|
/**
|
|
@@ -62,9 +62,9 @@ export declare function getFilteredNewEntities<T extends AnyEntity>(oldEntities:
|
|
|
62
62
|
*/
|
|
63
63
|
export declare function isEntityMoving(entity: Entity, threshold?: number): boolean;
|
|
64
64
|
/**
|
|
65
|
-
* Helper function to determine if the
|
|
66
|
-
* Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only
|
|
67
|
-
* to non-story bosses, like Vanishing Twin. Also see the `STORY_BOSSES` constant.
|
|
65
|
+
* Helper function to determine if the specified entity type is an end-game story boss, like Isaac,
|
|
66
|
+
* Blue Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only
|
|
67
|
+
* apply to non-story bosses, like Vanishing Twin. Also see the `STORY_BOSSES` constant.
|
|
68
68
|
*/
|
|
69
69
|
export declare function isStoryBoss(entityType: EntityType | int): boolean;
|
|
70
70
|
/**
|