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.
Files changed (81) hide show
  1. package/dist/callbacks/postPlayerReordered.lua +9 -6
  2. package/dist/callbacks/subscriptions/postBombInitLate.lua +2 -3
  3. package/dist/callbacks/subscriptions/postBoneSwing.lua +2 -3
  4. package/dist/callbacks/subscriptions/postCollectibleInitFirst.lua +2 -3
  5. package/dist/callbacks/subscriptions/postCursedTeleport.lua +2 -3
  6. package/dist/callbacks/subscriptions/postCustomDoorEnter.lua +2 -3
  7. package/dist/callbacks/subscriptions/postCustomRevive.lua +2 -3
  8. package/dist/callbacks/subscriptions/postEffectInitLate.lua +2 -3
  9. package/dist/callbacks/subscriptions/postEsauJr.lua +2 -3
  10. package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +2 -3
  11. package/dist/callbacks/subscriptions/postFirstEsauJr.lua +2 -3
  12. package/dist/callbacks/subscriptions/postFirstFlip.lua +2 -3
  13. package/dist/callbacks/subscriptions/postFlip.lua +2 -3
  14. package/dist/callbacks/subscriptions/postGameStartedReordered.lua +2 -3
  15. package/dist/callbacks/subscriptions/postGridEntityBroken.lua +2 -3
  16. package/dist/callbacks/subscriptions/postGridEntityCollision.lua +2 -3
  17. package/dist/callbacks/subscriptions/postGridEntityInit.lua +2 -3
  18. package/dist/callbacks/subscriptions/postGridEntityRemove.lua +2 -3
  19. package/dist/callbacks/subscriptions/postGridEntityStateChange.lua +2 -3
  20. package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +2 -3
  21. package/dist/callbacks/subscriptions/postItemPickup.lua +2 -3
  22. package/dist/callbacks/subscriptions/postKnifeInitLate.lua +2 -3
  23. package/dist/callbacks/subscriptions/postLaserInitLate.lua +2 -3
  24. package/dist/callbacks/subscriptions/postNPCInitLate.lua +2 -3
  25. package/dist/callbacks/subscriptions/postNewLevelReordered.lua +2 -3
  26. package/dist/callbacks/subscriptions/postNewRoomEarly.lua +2 -3
  27. package/dist/callbacks/subscriptions/postNewRoomReordered.lua +2 -3
  28. package/dist/callbacks/subscriptions/postPEffectUpdateReordered.lua +2 -3
  29. package/dist/callbacks/subscriptions/postPickupCollect.lua +2 -3
  30. package/dist/callbacks/subscriptions/postPickupInitLate.lua +2 -3
  31. package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +2 -3
  32. package/dist/callbacks/subscriptions/postPlayerChangeType.lua +2 -3
  33. package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +2 -3
  34. package/dist/callbacks/subscriptions/postPlayerInitLate.lua +2 -3
  35. package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +2 -3
  36. package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +2 -3
  37. package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +2 -3
  38. package/dist/callbacks/subscriptions/postProjectileInitLate.lua +2 -3
  39. package/dist/callbacks/subscriptions/postPurchase.lua +2 -3
  40. package/dist/callbacks/subscriptions/postSacrifice.lua +2 -3
  41. package/dist/callbacks/subscriptions/postSlotAnimationChanged.lua +2 -3
  42. package/dist/callbacks/subscriptions/postSlotDestroyed.lua +2 -3
  43. package/dist/callbacks/subscriptions/postSlotInit.lua +2 -3
  44. package/dist/callbacks/subscriptions/postSlotRender.lua +2 -3
  45. package/dist/callbacks/subscriptions/postSlotUpdate.lua +2 -3
  46. package/dist/callbacks/subscriptions/postTearInitLate.lua +2 -3
  47. package/dist/callbacks/subscriptions/postTearInitVeryLate.lua +2 -3
  48. package/dist/callbacks/subscriptions/postTransformation.lua +2 -3
  49. package/dist/callbacks/subscriptions/postTrinketBreak.lua +2 -3
  50. package/dist/callbacks/subscriptions/preBerserkDeath.lua +2 -3
  51. package/dist/callbacks/subscriptions/preCustomRevive.lua +2 -3
  52. package/dist/callbacks/subscriptions/preItemPickup.lua +2 -3
  53. package/dist/callbacks/subscriptions/preNewLevel.lua +2 -3
  54. package/dist/callbacks/subscriptions/roomClearChange.lua +2 -3
  55. package/dist/features/deployJSONRoom.lua +2 -3
  56. package/dist/features/playerInventory.lua +3 -4
  57. package/dist/features/runInNFrames.lua +6 -5
  58. package/dist/features/sirenHelpers.lua +2 -2
  59. package/dist/features/taintedLazarusPlayers.lua +6 -6
  60. package/dist/functions/array.lua +5 -6
  61. package/dist/functions/benchmark.lua +1 -2
  62. package/dist/functions/collectibleCacheFlag.lua +1 -2
  63. package/dist/functions/deepCopy.lua +4 -5
  64. package/dist/functions/doors.lua +1 -2
  65. package/dist/functions/entity.d.ts +8 -8
  66. package/dist/functions/entity.lua +9 -13
  67. package/dist/functions/entitySpecific.d.ts +46 -46
  68. package/dist/functions/entitySpecific.lua +122 -123
  69. package/dist/functions/globals.lua +1 -2
  70. package/dist/functions/gridEntity.lua +2 -3
  71. package/dist/functions/log.lua +1 -1
  72. package/dist/functions/math.lua +3 -4
  73. package/dist/functions/player.lua +1 -2
  74. package/dist/functions/playerHealth.lua +3 -4
  75. package/dist/functions/playerIndex.lua +1 -2
  76. package/dist/functions/pocketItems.lua +6 -7
  77. package/dist/functions/rooms.lua +2 -3
  78. package/dist/functions/table.lua +5 -6
  79. package/dist/functions/utils.lua +2 -3
  80. package/dist/lualib_bundle.lua +358 -388
  81. package/package.json +4 -4
@@ -1,5 +1,4 @@
1
- local ____lualib = require("lualib_bundle")
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
- __TS__ArrayPush(positions, positionFromCenter)
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
- __TS__ArrayPush(array, i)
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
- __TS__ArrayPush(effectArray, effect)
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
- __TS__ArrayPush(soulHeartTypes, HeartSubType.HEART_BONE)
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
- __TS__ArrayPush(soulHeartTypes, HeartSubType.HEART_BLACK)
128
+ soulHeartTypes[#soulHeartTypes + 1] = HeartSubType.HEART_BLACK
130
129
  else
131
- __TS__ArrayPush(soulHeartTypes, HeartSubType.HEART_SOUL)
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
- __TS__ArrayPush(players, player)
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
- __TS__ArrayPush(pocketItems, {slot = slot, type = PocketItemType.CARD, subType = card})
26
+ pocketItems[#pocketItems + 1] = {slot = slot, type = PocketItemType.CARD, subType = card}
28
27
  elseif pillColor ~= PillColor.PILL_NULL then
29
- __TS__ArrayPush(pocketItems, {slot = slot, type = PocketItemType.PILL, subType = pillColor})
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
- __TS__ArrayPush(pocketItems, {slot = slot, type = PocketItemType.ACTIVE_ITEM, subType = pocketItem})
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
- __TS__ArrayPush(pocketItems, {slot = slot, type = PocketItemType.DICE_BAG_DICE, subType = pocketItem2})
34
+ pocketItems[#pocketItems + 1] = {slot = slot, type = PocketItemType.DICE_BAG_DICE, subType = pocketItem2}
36
35
  elseif hasPocketItem and hasPocketItem2 then
37
- __TS__ArrayPush(pocketItems, {slot = slot, type = PocketItemType.UNDETERMINABLE, subType = 0})
36
+ pocketItems[#pocketItems + 1] = {slot = slot, type = PocketItemType.UNDETERMINABLE, subType = 0}
38
37
  else
39
- __TS__ArrayPush(pocketItems, {slot = slot, type = PocketItemType.EMPTY, subType = 0})
38
+ pocketItems[#pocketItems + 1] = {slot = slot, type = PocketItemType.EMPTY, subType = 0}
40
39
  end
41
40
  if slot + 1 == maxPocketItems then
42
41
  break
@@ -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
- __TS__ArrayPush(rooms, roomDescriptor)
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
- __TS__ArrayPush(rooms, roomDescriptor)
66
+ rooms[#rooms + 1] = roomDescriptor
68
67
  end
69
68
  i = i + 1
70
69
  end
@@ -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
- __TS__ArrayPush(booleans, value)
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
- __TS__ArrayPush(numbers, value)
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
- __TS__ArrayPush(numbers, number)
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
- __TS__ArrayPush(strings, value)
64
+ strings[#strings + 1] = value
66
65
  else
67
66
  local ____string = tostring(value)
68
- __TS__ArrayPush(strings, ____string)
67
+ strings[#strings + 1] = ____string
69
68
  end
70
69
  end
71
70
  return strings
@@ -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
- __TS__ArrayPush(enumKeys, key)
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
- __TS__ArrayPush(enumValues, value)
31
+ enumValues[#enumValues + 1] = value
33
32
  end
34
33
  end
35
34
  __TS__ArraySort(enumValues)