isaacscript-common 1.0.573 → 1.0.577

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 (136) hide show
  1. package/dist/callbacks/itemPickup.lua +2 -6
  2. package/dist/callbacks/postBombInitLate.lua +1 -5
  3. package/dist/callbacks/postCursedTeleport.lua +8 -10
  4. package/dist/callbacks/postEffectInitLate.lua +1 -5
  5. package/dist/callbacks/postEsauJr.lua +2 -4
  6. package/dist/callbacks/postFamiliarInitLate.lua +1 -5
  7. package/dist/callbacks/postFlip.lua +2 -4
  8. package/dist/callbacks/postGridEntity.lua +8 -20
  9. package/dist/callbacks/postKnifeInitLate.lua +1 -5
  10. package/dist/callbacks/postLaserInitLate.lua +1 -5
  11. package/dist/callbacks/postNPCInitLate.lua +1 -5
  12. package/dist/callbacks/postPickupCollect.lua +1 -5
  13. package/dist/callbacks/postPickupInitLate.lua +1 -5
  14. package/dist/callbacks/postPlayerChangeHealth.lua +19 -23
  15. package/dist/callbacks/postPlayerChangeType.lua +1 -5
  16. package/dist/callbacks/postPlayerFatalDamage.lua +5 -9
  17. package/dist/callbacks/postPlayerInitLate.lua +1 -5
  18. package/dist/callbacks/postPlayerReordered.lua +8 -2
  19. package/dist/callbacks/postProjectileInitLate.lua +1 -5
  20. package/dist/callbacks/postPurchase.lua +19 -19
  21. package/dist/callbacks/postSacrifice.lua +3 -3
  22. package/dist/callbacks/postSlotInitUpdate.lua +3 -11
  23. package/dist/callbacks/postSlotRenderBroken.lua +2 -8
  24. package/dist/callbacks/postTearInitLate.lua +1 -5
  25. package/dist/callbacks/postTearInitVeryLate.lua +1 -5
  26. package/dist/callbacks/postTransformation.lua +1 -5
  27. package/dist/callbacks/postTrinketBreak.lua +5 -9
  28. package/dist/callbacks/preNewLevel.lua +1 -1
  29. package/dist/callbacks/reorderedCallbacks.lua +4 -4
  30. package/dist/callbacks/subscriptions/PreNewLevel.lua +1 -2
  31. package/dist/callbacks/subscriptions/postBombInitLate.lua +3 -5
  32. package/dist/callbacks/subscriptions/postCursedTeleport.lua +1 -2
  33. package/dist/callbacks/subscriptions/postCustomRevive.lua +3 -5
  34. package/dist/callbacks/subscriptions/postEffectInitLate.lua +3 -5
  35. package/dist/callbacks/subscriptions/postEsauJr.lua +1 -2
  36. package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +3 -5
  37. package/dist/callbacks/subscriptions/postFirstEsauJr.lua +1 -2
  38. package/dist/callbacks/subscriptions/postFirstFlip.lua +1 -2
  39. package/dist/callbacks/subscriptions/postFlip.lua +1 -2
  40. package/dist/callbacks/subscriptions/postGameStartedReordered.lua +1 -2
  41. package/dist/callbacks/subscriptions/postGridEntityInit.lua +3 -5
  42. package/dist/callbacks/subscriptions/postGridEntityRemove.lua +3 -5
  43. package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +3 -5
  44. package/dist/callbacks/subscriptions/postItemPickup.lua +5 -8
  45. package/dist/callbacks/subscriptions/postKnifeInitLate.lua +3 -5
  46. package/dist/callbacks/subscriptions/postLaserInitLate.lua +3 -5
  47. package/dist/callbacks/subscriptions/postNPCInitLate.lua +3 -5
  48. package/dist/callbacks/subscriptions/postNewLevelReordered.lua +1 -2
  49. package/dist/callbacks/subscriptions/postNewRoomEarly.lua +1 -2
  50. package/dist/callbacks/subscriptions/postNewRoomReordered.lua +1 -2
  51. package/dist/callbacks/subscriptions/postPEffectUpdateReordered.lua +3 -5
  52. package/dist/callbacks/subscriptions/postPickupCollect.lua +3 -5
  53. package/dist/callbacks/subscriptions/postPickupInitLate.lua +3 -5
  54. package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +3 -5
  55. package/dist/callbacks/subscriptions/postPlayerChangeType.lua +1 -2
  56. package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +3 -5
  57. package/dist/callbacks/subscriptions/postPlayerInitLate.lua +3 -5
  58. package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +3 -5
  59. package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +3 -5
  60. package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +3 -5
  61. package/dist/callbacks/subscriptions/postProjectileInitLate.lua +3 -5
  62. package/dist/callbacks/subscriptions/postPurchase.lua +8 -3
  63. package/dist/callbacks/subscriptions/postSacrifice.lua +1 -2
  64. package/dist/callbacks/subscriptions/postSlotDestroyed.lua +3 -5
  65. package/dist/callbacks/subscriptions/postSlotInit.lua +3 -5
  66. package/dist/callbacks/subscriptions/postSlotRender.lua +3 -5
  67. package/dist/callbacks/subscriptions/postSlotUpdate.lua +3 -5
  68. package/dist/callbacks/subscriptions/postTearInitLate.lua +3 -5
  69. package/dist/callbacks/subscriptions/postTearInitVeryLate.lua +3 -5
  70. package/dist/callbacks/subscriptions/postTransformation.lua +3 -5
  71. package/dist/callbacks/subscriptions/postTrinketBreak.lua +3 -5
  72. package/dist/callbacks/subscriptions/preCustomRevive.lua +1 -2
  73. package/dist/callbacks/subscriptions/preItemPickup.lua +5 -8
  74. package/dist/constants.lua +57 -6
  75. package/dist/features/deployJSONRoom.lua +95 -68
  76. package/dist/features/disableInputs.lua +9 -3
  77. package/dist/features/forgottenSwitch.lua +1 -1
  78. package/dist/features/getCollectibleItemPoolType.lua +4 -10
  79. package/dist/features/preventCollectibleRotate.lua +3 -9
  80. package/dist/features/saveDataManager/load.lua +2 -6
  81. package/dist/features/saveDataManager/main.lua +1 -1
  82. package/dist/features/saveDataManager/merge.lua +2 -4
  83. package/dist/features/sirenHelpers.lua +5 -7
  84. package/dist/functions/array.lua +6 -10
  85. package/dist/functions/bitwise.lua +1 -1
  86. package/dist/functions/challenges.lua +1 -1
  87. package/dist/functions/charge.lua +10 -12
  88. package/dist/functions/collectibles.lua +18 -23
  89. package/dist/functions/color.lua +9 -1
  90. package/dist/functions/deepCopy.lua +46 -28
  91. package/dist/functions/deepCopyTests.lua +12 -20
  92. package/dist/functions/doors.d.ts +10 -0
  93. package/dist/functions/doors.lua +19 -21
  94. package/dist/functions/entity.lua +8 -2
  95. package/dist/functions/flag.lua +1 -1
  96. package/dist/functions/gridEntity.lua +14 -9
  97. package/dist/functions/input.lua +17 -27
  98. package/dist/functions/jsonRoom.lua +3 -9
  99. package/dist/functions/language.lua +9 -1
  100. package/dist/functions/log.lua +33 -85
  101. package/dist/functions/math.lua +15 -17
  102. package/dist/functions/npc.lua +15 -17
  103. package/dist/functions/pickups.lua +14 -1
  104. package/dist/functions/player.lua +38 -60
  105. package/dist/functions/playerHealth.lua +19 -9
  106. package/dist/functions/pocketItems.lua +4 -4
  107. package/dist/functions/random.lua +2 -2
  108. package/dist/functions/revive.lua +4 -4
  109. package/dist/functions/rooms.d.ts +1 -1
  110. package/dist/functions/rooms.lua +42 -41
  111. package/dist/functions/spawnCollectible.lua +10 -2
  112. package/dist/functions/sprite.lua +2 -2
  113. package/dist/functions/stage.lua +11 -11
  114. package/dist/functions/tears.lua +1 -1
  115. package/dist/functions/transformations.lua +4 -10
  116. package/dist/functions/trinketGive.lua +3 -3
  117. package/dist/functions/trinkets.lua +10 -6
  118. package/dist/functions/ui.lua +3 -3
  119. package/dist/functions/util.lua +6 -14
  120. package/dist/functions/vector.lua +8 -8
  121. package/dist/lualib_bundle.lua +795 -735
  122. package/dist/maps/cardDescriptionMap.lua +99 -1
  123. package/dist/maps/cardNameMap.lua +99 -1
  124. package/dist/maps/challengeNameMap.lua +47 -1
  125. package/dist/maps/collectibleDescriptionMap.lua +722 -1
  126. package/dist/maps/collectibleNameMap.lua +722 -1
  127. package/dist/maps/gridEntityXMLMap.lua +36 -1
  128. package/dist/maps/pillEffectNameMap.lua +52 -1
  129. package/dist/maps/roomShapeToTopLeftWallGridIndexMap.lua +7 -1
  130. package/dist/maps/transformationMaps.lua +21 -16
  131. package/dist/maps/transformationNameMap.lua +17 -1
  132. package/dist/maps/trinketDescriptionMap.lua +190 -1
  133. package/dist/maps/trinketNameMap.lua +190 -1
  134. package/dist/sets/cards.lua +98 -2
  135. package/dist/types/ModUpgraded.lua +95 -105
  136. package/package.json +5 -5
@@ -22,14 +22,22 @@ function ____exports.spawnCollectible(self, collectibleType, position, seed, opt
22
22
  error("Failed to spawn a collectible since the provided seed was 0, which is not allowed. (It will cause the game to crash.)")
23
23
  end
24
24
  local game = Game()
25
- local collectible = game:Spawn(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_COLLECTIBLE, position, Vector.Zero, nil, collectibleType, seed):ToPickup()
25
+ local collectible = game:Spawn(
26
+ EntityType.ENTITY_PICKUP,
27
+ PickupVariant.PICKUP_COLLECTIBLE,
28
+ position,
29
+ Vector.Zero,
30
+ nil,
31
+ collectibleType,
32
+ seed
33
+ ):ToPickup()
26
34
  if collectible == nil then
27
35
  error("Failed to spawn a collectible.")
28
36
  end
29
37
  if options then
30
38
  collectible.OptionsPickupIndex = 1
31
39
  end
32
- if (anyPlayerIs(nil, PlayerType.PLAYER_KEEPER_B) and (not isQuestCollectible(nil, collectibleType))) and (not forceFreeItem) then
40
+ if anyPlayerIs(nil, PlayerType.PLAYER_KEEPER_B) and not isQuestCollectible(nil, collectibleType) and not forceFreeItem then
33
41
  collectible.ShopItemId = -1
34
42
  collectible.Price = 15
35
43
  end
@@ -24,12 +24,12 @@ end
24
24
  function ____exports.getFinalFrameOfAnimation(self, sprite, animation)
25
25
  local currentAnimation = sprite:GetAnimation()
26
26
  local currentFrame = sprite:GetFrame()
27
- if (animation ~= nil) and (animation ~= currentAnimation) then
27
+ if animation ~= nil and animation ~= currentAnimation then
28
28
  sprite:SetAnimation(animation)
29
29
  end
30
30
  sprite:SetLastFrame()
31
31
  local finalFrame = sprite:GetFrame()
32
- if (animation ~= nil) and (animation ~= currentAnimation) then
32
+ if animation ~= nil and animation ~= currentAnimation then
33
33
  sprite:Play(currentAnimation, true)
34
34
  end
35
35
  sprite:SetFrame(currentFrame)
@@ -6,7 +6,7 @@ function ____exports.onRepentanceStage(self)
6
6
  local game = Game()
7
7
  local level = game:GetLevel()
8
8
  local stageType = level:GetStageType()
9
- return (stageType == StageType.STAGETYPE_REPENTANCE) or (stageType == StageType.STAGETYPE_REPENTANCE_B)
9
+ return stageType == StageType.STAGETYPE_REPENTANCE or stageType == StageType.STAGETYPE_REPENTANCE_B
10
10
  end
11
11
  function ____exports.stageTypeToLetter(self, stageType)
12
12
  repeat
@@ -17,31 +17,31 @@ function ____exports.stageTypeToLetter(self, stageType)
17
17
  return ""
18
18
  end
19
19
  end
20
- ____cond14 = ____cond14 or (____switch14 == StageType.STAGETYPE_WOTL)
20
+ ____cond14 = ____cond14 or ____switch14 == StageType.STAGETYPE_WOTL
21
21
  if ____cond14 then
22
22
  do
23
23
  return "a"
24
24
  end
25
25
  end
26
- ____cond14 = ____cond14 or (____switch14 == StageType.STAGETYPE_AFTERBIRTH)
26
+ ____cond14 = ____cond14 or ____switch14 == StageType.STAGETYPE_AFTERBIRTH
27
27
  if ____cond14 then
28
28
  do
29
29
  return "b"
30
30
  end
31
31
  end
32
- ____cond14 = ____cond14 or (____switch14 == StageType.STAGETYPE_GREEDMODE)
32
+ ____cond14 = ____cond14 or ____switch14 == StageType.STAGETYPE_GREEDMODE
33
33
  if ____cond14 then
34
34
  do
35
35
  return ""
36
36
  end
37
37
  end
38
- ____cond14 = ____cond14 or (____switch14 == StageType.STAGETYPE_REPENTANCE)
38
+ ____cond14 = ____cond14 or ____switch14 == StageType.STAGETYPE_REPENTANCE
39
39
  if ____cond14 then
40
40
  do
41
41
  return "c"
42
42
  end
43
43
  end
44
- ____cond14 = ____cond14 or (____switch14 == StageType.STAGETYPE_REPENTANCE_B)
44
+ ____cond14 = ____cond14 or ____switch14 == StageType.STAGETYPE_REPENTANCE_B
45
45
  if ____cond14 then
46
46
  do
47
47
  return "d"
@@ -84,33 +84,33 @@ function ____exports.onCathedral(self)
84
84
  local level = game:GetLevel()
85
85
  local stage = level:GetStage()
86
86
  local stageType = level:GetStageType()
87
- return (stage == 10) and (stageType == 1)
87
+ return stage == 10 and stageType == 1
88
88
  end
89
89
  function ____exports.onChest(self)
90
90
  local game = Game()
91
91
  local level = game:GetLevel()
92
92
  local stage = level:GetStage()
93
93
  local stageType = level:GetStageType()
94
- return (stage == 11) and (stageType == 1)
94
+ return stage == 11 and stageType == 1
95
95
  end
96
96
  function ____exports.onDarkRoom(self)
97
97
  local game = Game()
98
98
  local level = game:GetLevel()
99
99
  local stage = level:GetStage()
100
100
  local stageType = level:GetStageType()
101
- return (stage == 11) and (stageType == 0)
101
+ return stage == 11 and stageType == 0
102
102
  end
103
103
  function ____exports.onFinalFloor(self)
104
104
  local game = Game()
105
105
  local level = game:GetLevel()
106
106
  local stage = level:GetStage()
107
- return (((stage == 11) or (stage == 12)) or (stage == 13)) or ((stage == 8) and ____exports.onRepentanceStage(nil))
107
+ return stage == 11 or stage == 12 or stage == 13 or stage == 8 and ____exports.onRepentanceStage(nil)
108
108
  end
109
109
  function ____exports.onSheol(self)
110
110
  local game = Game()
111
111
  local level = game:GetLevel()
112
112
  local stage = level:GetStage()
113
113
  local stageType = level:GetStageType()
114
- return (stage == 10) and (stageType == 0)
114
+ return stage == 10 and stageType == 0
115
115
  end
116
116
  return ____exports
@@ -1,7 +1,7 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____exports = {}
3
3
  function ____exports.getFireDelay(self, tearsStat)
4
- return math.max((30 / tearsStat) - 1, -0.9999)
4
+ return math.max(30 / tearsStat - 1, -0.9999)
5
5
  end
6
6
  function ____exports.getTearsStat(self, fireDelay)
7
7
  return 30 / (fireDelay + 1)
@@ -8,15 +8,11 @@ local ____transformationNameMap = require("maps.transformationNameMap")
8
8
  local TRANSFORMATION_NAME_MAP = ____transformationNameMap.TRANSFORMATION_NAME_MAP
9
9
  function ____exports.getPlayerNumTransformationCollectibles(self, player, playerForm)
10
10
  if TRANSFORMATIONS_NOT_BASED_ON_ITEMS:has(playerForm) then
11
- error(
12
- ("The transformation of " .. tostring(playerForm)) .. " cannot be tracked by this function."
13
- )
11
+ error(("The transformation of " .. tostring(playerForm)) .. " cannot be tracked by this function.")
14
12
  end
15
13
  local itemsForTransformation = TRANSFORMATION_TO_ITEMS_MAP:get(playerForm)
16
14
  if itemsForTransformation == nil then
17
- error(
18
- ("The transformation of " .. tostring(playerForm)) .. " is not a valid value of the PlayerForm enum."
19
- )
15
+ error(("The transformation of " .. tostring(playerForm)) .. " is not a valid value of the PlayerForm enum.")
20
16
  end
21
17
  local numCollectibles = 0
22
18
  for ____, collectibleType in ipairs(itemsForTransformation) do
@@ -26,13 +22,11 @@ function ____exports.getPlayerNumTransformationCollectibles(self, player, player
26
22
  end
27
23
  function ____exports.getTransformationsForItem(self, collectibleType)
28
24
  local transformations = ITEM_TO_TRANSFORMATION_MAP:get(collectibleType)
29
- return ((transformations == nil) and ({})) or ({
30
- table.unpack(transformations)
31
- })
25
+ return transformations == nil and ({}) or ({table.unpack(transformations)})
32
26
  end
33
27
  function ____exports.getTransformationName(self, transformation)
34
28
  local defaultName = "Unknown"
35
29
  local transformationName = TRANSFORMATION_NAME_MAP:get(transformation)
36
- return ((transformationName == nil) and defaultName) or transformationName
30
+ return transformationName == nil and defaultName or transformationName
37
31
  end
38
32
  return ____exports
@@ -14,11 +14,11 @@ function ____exports.temporarilyRemoveTrinket(self, player, trinketType)
14
14
  numTrinkets = numTrinkets + 1
15
15
  end
16
16
  local numSmeltedTrinkets = numTrinkets
17
- local trinketWasInSlot1 = (trinket1 == trinketType) or ((trinket1 + GOLDEN_TRINKET_SHIFT) == trinketType)
17
+ local trinketWasInSlot1 = trinket1 == trinketType or trinket1 + GOLDEN_TRINKET_SHIFT == trinketType
18
18
  if trinketWasInSlot1 then
19
19
  numSmeltedTrinkets = numSmeltedTrinkets - 1
20
20
  end
21
- local trinketWasInSlot2 = (trinket2 == trinketType) or ((trinket2 + GOLDEN_TRINKET_SHIFT) == trinketType)
21
+ local trinketWasInSlot2 = trinket2 == trinketType or trinket2 + GOLDEN_TRINKET_SHIFT == trinketType
22
22
  if trinketWasInSlot2 then
23
23
  numSmeltedTrinkets = numSmeltedTrinkets - 1
24
24
  end
@@ -27,7 +27,7 @@ end
27
27
  function ____exports.temporarilyRemoveTrinkets(self, player)
28
28
  local trinket1 = player:GetTrinket(0)
29
29
  local trinket2 = player:GetTrinket(1)
30
- if (trinket1 == TrinketType.TRINKET_NULL) and (trinket2 == TrinketType.TRINKET_NULL) then
30
+ if trinket1 == TrinketType.TRINKET_NULL and trinket2 == TrinketType.TRINKET_NULL then
31
31
  return nil
32
32
  end
33
33
  if trinket1 ~= TrinketType.TRINKET_NULL then
@@ -19,17 +19,15 @@ function ____exports.getOpenTrinketSlot(self, player)
19
19
  local trinket0 = player:GetTrinket(0)
20
20
  local trinket1 = player:GetTrinket(1)
21
21
  if maxTrinkets == 1 then
22
- return ((trinket0 == TrinketType.TRINKET_NULL) and 0) or nil
22
+ return trinket0 == TrinketType.TRINKET_NULL and 0 or nil
23
23
  end
24
24
  if maxTrinkets == 2 then
25
25
  if trinket0 == TrinketType.TRINKET_NULL then
26
26
  return 0
27
27
  end
28
- return ((trinket1 == TrinketType.TRINKET_NULL) and 1) or nil
28
+ return trinket1 == TrinketType.TRINKET_NULL and 1 or nil
29
29
  end
30
- error(
31
- "The player has an unknown number of trinket slots: " .. tostring(maxTrinkets)
32
- )
30
+ error("The player has an unknown number of trinket slots: " .. tostring(maxTrinkets))
33
31
  return nil
34
32
  end
35
33
  function ____exports.getTrinkets(self, matchingSubType)
@@ -98,7 +96,13 @@ function ____exports.smeltTrinket(self, player, trinketType, numTrinkets)
98
96
  local i = 0
99
97
  while i < numTrinkets do
100
98
  player:AddTrinket(trinketType)
101
- player:UseActiveItem(CollectibleType.COLLECTIBLE_SMELTER, false, false, true, false)
99
+ player:UseActiveItem(
100
+ CollectibleType.COLLECTIBLE_SMELTER,
101
+ false,
102
+ false,
103
+ true,
104
+ false
105
+ )
102
106
  i = i + 1
103
107
  end
104
108
  end
@@ -16,14 +16,14 @@ function ____exports.getHeartsUIWidth(self)
16
16
  local soulHearts = player:GetSoulHearts()
17
17
  local boneHearts = player:GetBoneHearts()
18
18
  local extraLives = player:GetExtraLives()
19
- local combinedHearts = (maxHearts + soulHearts) + (boneHearts * 2)
19
+ local combinedHearts = maxHearts + soulHearts + boneHearts * 2
20
20
  if combinedHearts > 12 then
21
21
  combinedHearts = 12
22
22
  end
23
23
  if curses == LevelCurse.CURSE_OF_THE_UNKNOWN then
24
24
  combinedHearts = 2
25
25
  end
26
- local width = (combinedHearts / 2) * UI_HEART_WIDTH
26
+ local width = combinedHearts / 2 * UI_HEART_WIDTH
27
27
  if extraLives > 9 then
28
28
  width = width + 20
29
29
  if player:HasCollectible(CollectibleType.COLLECTIBLE_GUPPYS_COLLAR) then
@@ -40,7 +40,7 @@ end
40
40
  function ____exports.getHUDOffsetVector(self)
41
41
  local defaultVector = Vector.Zero
42
42
  local hudOffset = math.floor(Options.HUDOffset * 10)
43
- if (hudOffset < 1) or (hudOffset > 10) then
43
+ if hudOffset < 1 or hudOffset > 10 then
44
44
  return defaultVector
45
45
  end
46
46
  local x = hudOffset * 2
@@ -4,22 +4,16 @@ local ____exports = {}
4
4
  local HEX_STRING_LENGTH = 6
5
5
  function ____exports.copyMap(self, oldMap)
6
6
  local newMap = __TS__New(Map)
7
- for ____, ____value in __TS__Iterator(
8
- oldMap:entries()
9
- ) do
10
- local key
11
- key = ____value[1]
12
- local value
13
- value = ____value[2]
7
+ for ____, ____value in __TS__Iterator(oldMap:entries()) do
8
+ local key = ____value[1]
9
+ local value = ____value[2]
14
10
  newMap:set(key, value)
15
11
  end
16
12
  return newMap
17
13
  end
18
14
  function ____exports.copySet(self, oldSet)
19
15
  local newSet = __TS__New(Set)
20
- for ____, value in __TS__Iterator(
21
- oldSet:values()
22
- ) do
16
+ for ____, value in __TS__Iterator(oldSet:values()) do
23
17
  newSet:add(value)
24
18
  end
25
19
  return newSet
@@ -38,9 +32,7 @@ end
38
32
  function ____exports.hexToKColor(self, hexString, alpha)
39
33
  hexString = __TS__StringReplace(hexString, "#", "")
40
34
  if #hexString ~= HEX_STRING_LENGTH then
41
- error(
42
- ("Hex strings must be of length " .. tostring(HEX_STRING_LENGTH)) .. "."
43
- )
35
+ error(("Hex strings must be of length " .. tostring(HEX_STRING_LENGTH)) .. ".")
44
36
  end
45
37
  local rString = __TS__StringSubstr(hexString, 0, 2)
46
38
  local R = tonumber("0x" .. rString)
@@ -68,7 +60,7 @@ function ____exports.onSetSeed(self)
68
60
  local seeds = game:GetSeeds()
69
61
  local customRun = seeds:IsCustomRun()
70
62
  local challenge = Isaac.GetChallenge()
71
- return (challenge == Challenge.CHALLENGE_NULL) and customRun
63
+ return challenge == Challenge.CHALLENGE_NULL and customRun
72
64
  end
73
65
  function ____exports.printConsole(self, msg)
74
66
  Isaac.ConsoleOutput(msg .. "\n")
@@ -14,25 +14,25 @@ function ____exports.directionToVector(self, direction)
14
14
  return Vector(0, 1)
15
15
  end
16
16
  end
17
- ____cond4 = ____cond4 or (____switch4 == Direction.LEFT)
17
+ ____cond4 = ____cond4 or ____switch4 == Direction.LEFT
18
18
  if ____cond4 then
19
19
  do
20
20
  return Vector(-1, 0)
21
21
  end
22
22
  end
23
- ____cond4 = ____cond4 or (____switch4 == Direction.RIGHT)
23
+ ____cond4 = ____cond4 or ____switch4 == Direction.RIGHT
24
24
  if ____cond4 then
25
25
  do
26
26
  return Vector(1, 0)
27
27
  end
28
28
  end
29
- ____cond4 = ____cond4 or (____switch4 == Direction.UP)
29
+ ____cond4 = ____cond4 or ____switch4 == Direction.UP
30
30
  if ____cond4 then
31
31
  do
32
32
  return Vector(0, -1)
33
33
  end
34
34
  end
35
- ____cond4 = ____cond4 or (____switch4 == Direction.NO_DIRECTION)
35
+ ____cond4 = ____cond4 or ____switch4 == Direction.NO_DIRECTION
36
36
  if ____cond4 then
37
37
  do
38
38
  return Vector.Zero
@@ -66,16 +66,16 @@ function ____exports.isVector(self, object)
66
66
  end
67
67
  function ____exports.vectorToDirection(self, vector)
68
68
  local degrees = vector:GetAngleDegrees()
69
- if (degrees > -45) and (degrees < 45) then
69
+ if degrees > -45 and degrees < 45 then
70
70
  return Direction.RIGHT
71
71
  end
72
- if (degrees >= 45) and (degrees <= 135) then
72
+ if degrees >= 45 and degrees <= 135 then
73
73
  return Direction.DOWN
74
74
  end
75
- if (degrees <= -45) and (degrees >= -135) then
75
+ if degrees <= -45 and degrees >= -135 then
76
76
  return Direction.UP
77
77
  end
78
- if (degrees > 135) or (degrees < -135) then
78
+ if degrees > 135 or degrees < -135 then
79
79
  return Direction.LEFT
80
80
  end
81
81
  return Direction.NO_DIRECTION