isaacscript-common 1.2.127 → 1.2.130

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 (46) hide show
  1. package/dist/cachedClasses.d.ts +37 -0
  2. package/dist/cachedClasses.lua +7 -0
  3. package/dist/callbacks/customRevive.lua +3 -2
  4. package/dist/callbacks/postCursedTeleport.lua +2 -5
  5. package/dist/callbacks/postEsauJr.lua +2 -2
  6. package/dist/callbacks/postNewRoomEarly.lua +2 -1
  7. package/dist/callbacks/postPlayerFatalDamage.lua +6 -6
  8. package/dist/callbacks/postSacrifice.lua +2 -1
  9. package/dist/callbacks/reorderedCallbacks.lua +2 -3
  10. package/dist/features/deployJSONRoom.lua +2 -8
  11. package/dist/features/disableSound.lua +2 -2
  12. package/dist/features/getCollectibleItemPoolType.lua +2 -1
  13. package/dist/features/runInNFrames.lua +2 -2
  14. package/dist/features/saveDataManager/main.lua +2 -1
  15. package/dist/functions/cards.d.ts +6 -0
  16. package/dist/functions/cards.lua +2 -3
  17. package/dist/functions/charge.lua +5 -5
  18. package/dist/functions/collectibleSet.lua +2 -1
  19. package/dist/functions/collectibles.d.ts +6 -0
  20. package/dist/functions/collectibles.lua +2 -11
  21. package/dist/functions/doors.lua +2 -3
  22. package/dist/functions/entity.lua +2 -1
  23. package/dist/functions/familiars.lua +2 -1
  24. package/dist/functions/gridEntity.lua +2 -8
  25. package/dist/functions/log.lua +2 -2
  26. package/dist/functions/pills.d.ts +4 -0
  27. package/dist/functions/pills.lua +2 -2
  28. package/dist/functions/player.lua +5 -9
  29. package/dist/functions/positionVelocity.lua +2 -1
  30. package/dist/functions/random.d.ts +4 -3
  31. package/dist/functions/revive.d.ts +1 -1
  32. package/dist/functions/revive.lua +2 -2
  33. package/dist/functions/rooms.d.ts +3 -2
  34. package/dist/functions/rooms.lua +4 -23
  35. package/dist/functions/seeds.lua +2 -1
  36. package/dist/functions/sound.lua +2 -1
  37. package/dist/functions/spawnCollectible.lua +2 -1
  38. package/dist/functions/stage.lua +2 -9
  39. package/dist/functions/trinketSet.lua +2 -1
  40. package/dist/functions/trinkets.d.ts +4 -0
  41. package/dist/functions/trinkets.lua +2 -4
  42. package/dist/functions/ui.lua +2 -1
  43. package/dist/functions/utils.lua +2 -1
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.lua +8 -0
  46. package/package.json +1 -1
@@ -1,5 +1,7 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____exports = {}
3
+ local ____cachedClasses = require("cachedClasses")
4
+ local game = ____cachedClasses.game
3
5
  local ____constants = require("constants")
4
6
  local UI_HEART_WIDTH = ____constants.UI_HEART_WIDTH
5
7
  function ____exports.getHeartRowLength(self, player)
@@ -16,7 +18,6 @@ function ____exports.getScreenBottomRightPos(self)
16
18
  return Vector(screenWidth, screenHeight)
17
19
  end
18
20
  function ____exports.getHeartsUIWidth(self)
19
- local game = Game()
20
21
  local level = game:GetLevel()
21
22
  local curses = level:GetCurses()
22
23
  local player = Isaac.GetPlayer()
@@ -5,6 +5,8 @@ local __TS__ArraySort = ____lualib.__TS__ArraySort
5
5
  local __TS__StringReplace = ____lualib.__TS__StringReplace
6
6
  local __TS__StringSubstr = ____lualib.__TS__StringSubstr
7
7
  local ____exports = {}
8
+ local ____cachedClasses = require("cachedClasses")
9
+ local game = ____cachedClasses.game
8
10
  local HEX_STRING_LENGTH = 6
9
11
  ____exports.ensureAllCases = function(____, obj) return obj end
10
12
  function ____exports.getEnumValues(self, transpiledEnum)
@@ -44,7 +46,6 @@ function ____exports.isLuaDebugEnabled(self)
44
46
  return package ~= nil
45
47
  end
46
48
  function ____exports.onSetSeed(self)
47
- local game = Game()
48
49
  local seeds = game:GetSeeds()
49
50
  local customRun = seeds:IsCustomRun()
50
51
  local challenge = Isaac.GetChallenge()
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./cachedClasses";
1
2
  export { forceNewLevelCallback, forceNewRoomCallback, } from "./callbacks/reorderedCallbacks";
2
3
  export * from "./constants";
3
4
  export { deployJSONRoom, deployRandomJSONRoom, emptyRoom, } from "./features/deployJSONRoom";
package/dist/index.lua CHANGED
@@ -1,5 +1,13 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____exports = {}
3
+ do
4
+ local ____export = require("cachedClasses")
5
+ for ____exportKey, ____exportValue in pairs(____export) do
6
+ if ____exportKey ~= "default" then
7
+ ____exports[____exportKey] = ____exportValue
8
+ end
9
+ end
10
+ end
3
11
  do
4
12
  local ____reorderedCallbacks = require("callbacks.reorderedCallbacks")
5
13
  local forceNewLevelCallback = ____reorderedCallbacks.forceNewLevelCallback
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.127",
3
+ "version": "1.2.130",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",