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
package/dist/functions/math.lua
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
3
2
|
local ____exports = {}
|
|
4
3
|
local ____directionToDegrees = require("objects.directionToDegrees")
|
|
5
4
|
local DIRECTION_TO_DEGREES = ____directionToDegrees.DIRECTION_TO_DEGREES
|
|
@@ -32,7 +31,7 @@ function ____exports.getCircleDiscretizedPoints(self, centerPos, radius, numPoin
|
|
|
32
31
|
rotatedPosition.X = rotatedPosition.X * xMultiplier
|
|
33
32
|
rotatedPosition.Y = rotatedPosition.Y * yMultiplier
|
|
34
33
|
local positionFromCenter = centerPos + rotatedPosition
|
|
35
|
-
|
|
34
|
+
positions[#positions + 1] = positionFromCenter
|
|
36
35
|
i = i + 1
|
|
37
36
|
end
|
|
38
37
|
end
|
|
@@ -75,7 +74,7 @@ function ____exports.range(self, start, ____end)
|
|
|
75
74
|
do
|
|
76
75
|
local i = start
|
|
77
76
|
while i <= ____end do
|
|
78
|
-
|
|
77
|
+
array[#array + 1] = i
|
|
79
78
|
i = i + 1
|
|
80
79
|
end
|
|
81
80
|
end
|
|
@@ -4,7 +4,6 @@ local __TS__New = ____lualib.__TS__New
|
|
|
4
4
|
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
5
5
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
6
6
|
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
7
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
8
7
|
local Map = ____lualib.Map
|
|
9
8
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
10
9
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
@@ -233,7 +232,7 @@ function ____exports.getEffectsList(self, player)
|
|
|
233
232
|
while i < effectsList.Size do
|
|
234
233
|
local effect = effectsList:Get(i)
|
|
235
234
|
if effect ~= nil then
|
|
236
|
-
|
|
235
|
+
effectArray[#effectArray + 1] = effect
|
|
237
236
|
end
|
|
238
237
|
i = i + 1
|
|
239
238
|
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 ____exports = {}
|
|
5
4
|
local ____constants = require("constants")
|
|
@@ -119,16 +118,16 @@ function ____exports.getPlayerHealth(self, player)
|
|
|
119
118
|
isBoneHeart = subPlayer:IsBoneHeart(i)
|
|
120
119
|
end
|
|
121
120
|
if isBoneHeart then
|
|
122
|
-
|
|
121
|
+
soulHeartTypes[#soulHeartTypes + 1] = HeartSubType.HEART_BONE
|
|
123
122
|
else
|
|
124
123
|
local isBlackHeart = player:IsBlackHeart(currentSoulHeart + 1)
|
|
125
124
|
if character == PlayerType.PLAYER_THEFORGOTTEN and subPlayer ~= nil then
|
|
126
125
|
isBlackHeart = subPlayer:IsBlackHeart(currentSoulHeart + 1)
|
|
127
126
|
end
|
|
128
127
|
if isBlackHeart then
|
|
129
|
-
|
|
128
|
+
soulHeartTypes[#soulHeartTypes + 1] = HeartSubType.HEART_BLACK
|
|
130
129
|
else
|
|
131
|
-
|
|
130
|
+
soulHeartTypes[#soulHeartTypes + 1] = HeartSubType.HEART_SOUL
|
|
132
131
|
end
|
|
133
132
|
currentSoulHeart = currentSoulHeart + 2
|
|
134
133
|
end
|
|
@@ -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__ArrayFind = ____lualib.__TS__ArrayFind
|
|
6
5
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
7
6
|
local ____exports = {}
|
|
@@ -15,7 +14,7 @@ function ____exports.getAllPlayers(self)
|
|
|
15
14
|
local i = 0
|
|
16
15
|
while i < numPlayers do
|
|
17
16
|
local player = Isaac.GetPlayer(i)
|
|
18
|
-
|
|
17
|
+
players[#players + 1] = player
|
|
19
18
|
i = i + 1
|
|
20
19
|
end
|
|
21
20
|
end
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
3
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
4
3
|
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
5
4
|
local ____exports = {}
|
|
6
5
|
local ____constants = require("constants")
|
|
@@ -24,19 +23,19 @@ function ____exports.getPocketItems(self, player)
|
|
|
24
23
|
local card = player:GetCard(slot)
|
|
25
24
|
local pillColor = player:GetPill(slot)
|
|
26
25
|
if card ~= Card.CARD_NULL then
|
|
27
|
-
|
|
26
|
+
pocketItems[#pocketItems + 1] = {slot = slot, type = PocketItemType.CARD, subType = card}
|
|
28
27
|
elseif pillColor ~= PillColor.PILL_NULL then
|
|
29
|
-
|
|
28
|
+
pocketItems[#pocketItems + 1] = {slot = slot, type = PocketItemType.PILL, subType = pillColor}
|
|
30
29
|
elseif hasPocketItem and not hasPocketItem2 and not pocketItemIdentified then
|
|
31
30
|
pocketItemIdentified = true
|
|
32
|
-
|
|
31
|
+
pocketItems[#pocketItems + 1] = {slot = slot, type = PocketItemType.ACTIVE_ITEM, subType = pocketItem}
|
|
33
32
|
elseif not hasPocketItem and hasPocketItem2 and not pocketItem2Identified then
|
|
34
33
|
pocketItem2Identified = true
|
|
35
|
-
|
|
34
|
+
pocketItems[#pocketItems + 1] = {slot = slot, type = PocketItemType.DICE_BAG_DICE, subType = pocketItem2}
|
|
36
35
|
elseif hasPocketItem and hasPocketItem2 then
|
|
37
|
-
|
|
36
|
+
pocketItems[#pocketItems + 1] = {slot = slot, type = PocketItemType.UNDETERMINABLE, subType = 0}
|
|
38
37
|
else
|
|
39
|
-
|
|
38
|
+
pocketItems[#pocketItems + 1] = {slot = slot, type = PocketItemType.EMPTY, subType = 0}
|
|
40
39
|
end
|
|
41
40
|
if slot + 1 == maxPocketItems then
|
|
42
41
|
break
|
package/dist/functions/rooms.lua
CHANGED
|
@@ -3,7 +3,6 @@ local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
|
3
3
|
local Set = ____lualib.Set
|
|
4
4
|
local __TS__New = ____lualib.__TS__New
|
|
5
5
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
6
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
7
6
|
local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
|
|
8
7
|
local Map = ____lualib.Map
|
|
9
8
|
local ____exports = {}
|
|
@@ -53,7 +52,7 @@ function ____exports.getRooms(self, includeExtraDimensionalRooms)
|
|
|
53
52
|
while i < roomList.Size do
|
|
54
53
|
local roomDescriptor = roomList:Get(i)
|
|
55
54
|
if roomDescriptor ~= nil then
|
|
56
|
-
|
|
55
|
+
rooms[#rooms + 1] = roomDescriptor
|
|
57
56
|
end
|
|
58
57
|
i = i + 1
|
|
59
58
|
end
|
|
@@ -64,7 +63,7 @@ function ____exports.getRooms(self, includeExtraDimensionalRooms)
|
|
|
64
63
|
while i <= MAX_ROOM_INDEX do
|
|
65
64
|
local roomDescriptor = level:GetRoomByIdx(i)
|
|
66
65
|
if roomDescriptor ~= nil then
|
|
67
|
-
|
|
66
|
+
rooms[#rooms + 1] = roomDescriptor
|
|
68
67
|
end
|
|
69
68
|
i = i + 1
|
|
70
69
|
end
|
package/dist/functions/table.lua
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
3
2
|
local __TS__TypeOf = ____lualib.__TS__TypeOf
|
|
4
3
|
local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
|
|
5
4
|
local ____exports = {}
|
|
@@ -24,7 +23,7 @@ function ____exports.getBooleansFromTable(self, ____table, objectName, ...)
|
|
|
24
23
|
error(((("Failed to find a value for \"" .. key) .. "\" in a table representing a \"") .. objectName) .. "\" object.")
|
|
25
24
|
end
|
|
26
25
|
if type(value) == "boolean" then
|
|
27
|
-
|
|
26
|
+
booleans[#booleans + 1] = value
|
|
28
27
|
else
|
|
29
28
|
error((((("Failed to get the boolean for the \"" .. key) .. "\" value of a table representing a \"") .. objectName) .. "\" object because the type was: ") .. __TS__TypeOf(value))
|
|
30
29
|
end
|
|
@@ -40,13 +39,13 @@ function ____exports.getNumbersFromTable(self, ____table, objectName, ...)
|
|
|
40
39
|
error(((("Failed to find a value for \"" .. key) .. "\" in a table representing a \"") .. objectName) .. "\" object.")
|
|
41
40
|
end
|
|
42
41
|
if type(value) == "number" then
|
|
43
|
-
|
|
42
|
+
numbers[#numbers + 1] = value
|
|
44
43
|
elseif type(value) == "string" then
|
|
45
44
|
local number = tonumber(value)
|
|
46
45
|
if number == nil then
|
|
47
46
|
error((((("Failed to convert the \"" .. key) .. "\" value of a table representing a \"") .. objectName) .. "\" object to a number: ") .. value)
|
|
48
47
|
end
|
|
49
|
-
|
|
48
|
+
numbers[#numbers + 1] = number
|
|
50
49
|
else
|
|
51
50
|
error((((("Failed to get the number for the \"" .. key) .. "\" value of a table representing a \"") .. objectName) .. "\" object because the type was: ") .. __TS__TypeOf(value))
|
|
52
51
|
end
|
|
@@ -62,10 +61,10 @@ function ____exports.getStringsFromTable(self, ____table, objectName, ...)
|
|
|
62
61
|
error(((("Failed to find a value for \"" .. key) .. "\" in a table representing a \"") .. objectName) .. "\" object.")
|
|
63
62
|
end
|
|
64
63
|
if type(value) == "string" then
|
|
65
|
-
|
|
64
|
+
strings[#strings + 1] = value
|
|
66
65
|
else
|
|
67
66
|
local ____string = tostring(value)
|
|
68
|
-
|
|
67
|
+
strings[#strings + 1] = ____string
|
|
69
68
|
end
|
|
70
69
|
end
|
|
71
70
|
return strings
|
package/dist/functions/utils.lua
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
3
2
|
local __TS__ArraySort = ____lualib.__TS__ArraySort
|
|
4
3
|
local __TS__StringReplace = ____lualib.__TS__StringReplace
|
|
5
4
|
local __TS__StringSubstr = ____lualib.__TS__StringSubstr
|
|
@@ -19,7 +18,7 @@ function ____exports.getEnumKeys(self, transpiledEnum)
|
|
|
19
18
|
local enumKeys = {}
|
|
20
19
|
for key in pairs(transpiledEnum) do
|
|
21
20
|
if type(key) == "string" then
|
|
22
|
-
|
|
21
|
+
enumKeys[#enumKeys + 1] = key
|
|
23
22
|
end
|
|
24
23
|
end
|
|
25
24
|
__TS__ArraySort(enumKeys)
|
|
@@ -29,7 +28,7 @@ function ____exports.getEnumValues(self, transpiledEnum)
|
|
|
29
28
|
local enumValues = {}
|
|
30
29
|
for key, value in pairs(transpiledEnum) do
|
|
31
30
|
if type(key) == "string" then
|
|
32
|
-
|
|
31
|
+
enumValues[#enumValues + 1] = value
|
|
33
32
|
end
|
|
34
33
|
end
|
|
35
34
|
__TS__ArraySort(enumValues)
|