isaacscript-common 1.2.172 → 1.2.175

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 (80) hide show
  1. package/dist/callbacks/postNewRoomEarly.lua +2 -2
  2. package/dist/classes/null.d.ts +6 -7
  3. package/dist/classes/null.lua +5 -5
  4. package/dist/constants.d.ts +10 -10
  5. package/dist/constants.lua +3 -3
  6. package/dist/features/collectiblesSeen.d.ts +6 -0
  7. package/dist/features/collectiblesSeen.lua +43 -0
  8. package/dist/features/deployJSONRoom.lua +2 -1
  9. package/dist/features/extraConsoleCommands/commands.d.ts +11 -11
  10. package/dist/features/extraConsoleCommands/commands.lua +23 -22
  11. package/dist/features/extraConsoleCommands/init.lua +6 -6
  12. package/dist/features/playerInventory.d.ts +10 -2
  13. package/dist/features/playerInventory.lua +60 -21
  14. package/dist/features/saveDataManager/constants.d.ts +1 -1
  15. package/dist/features/saveDataManager/constants.lua +1 -1
  16. package/dist/features/saveDataManager/exports.d.ts +6 -6
  17. package/dist/features/saveDataManager/exports.lua +4 -4
  18. package/dist/features/saveDataManager/merge.lua +9 -8
  19. package/dist/featuresInitialized.d.ts +1 -1
  20. package/dist/featuresInitialized.lua +3 -3
  21. package/dist/functions/array.d.ts +39 -39
  22. package/dist/functions/array.lua +79 -79
  23. package/dist/functions/cards.d.ts +3 -3
  24. package/dist/functions/cards.lua +7 -7
  25. package/dist/functions/charge.d.ts +11 -11
  26. package/dist/functions/charge.lua +13 -13
  27. package/dist/functions/collectibles.d.ts +53 -15
  28. package/dist/functions/collectibles.lua +44 -21
  29. package/dist/functions/color.d.ts +2 -2
  30. package/dist/functions/color.lua +6 -6
  31. package/dist/functions/deepCopy.d.ts +0 -3
  32. package/dist/functions/deepCopy.lua +5 -22
  33. package/dist/functions/doors.d.ts +8 -8
  34. package/dist/functions/doors.lua +16 -16
  35. package/dist/functions/entity.d.ts +13 -14
  36. package/dist/functions/entity.lua +27 -34
  37. package/dist/functions/gridEntity.d.ts +8 -1
  38. package/dist/functions/gridEntity.lua +7 -11
  39. package/dist/functions/jsonHelpers.d.ts +7 -7
  40. package/dist/functions/jsonHelpers.lua +10 -11
  41. package/dist/functions/log.d.ts +21 -21
  42. package/dist/functions/log.lua +75 -74
  43. package/dist/functions/math.d.ts +1 -1
  44. package/dist/functions/math.lua +3 -3
  45. package/dist/functions/mergeTests.lua +56 -1
  46. package/dist/functions/player.d.ts +8 -10
  47. package/dist/functions/player.lua +22 -29
  48. package/dist/functions/playerHealth.d.ts +1 -1
  49. package/dist/functions/playerHealth.lua +20 -20
  50. package/dist/functions/positionVelocity.d.ts +3 -0
  51. package/dist/functions/positionVelocity.lua +19 -5
  52. package/dist/functions/random.d.ts +7 -7
  53. package/dist/functions/revive.d.ts +5 -5
  54. package/dist/functions/revive.lua +8 -8
  55. package/dist/functions/roomData.d.ts +96 -0
  56. package/dist/functions/roomData.lua +57 -0
  57. package/dist/functions/rooms.d.ts +1 -96
  58. package/dist/functions/rooms.lua +30 -75
  59. package/dist/functions/set.d.ts +2 -2
  60. package/dist/functions/set.lua +7 -7
  61. package/dist/functions/trinketCacheFlag.d.ts +4 -4
  62. package/dist/functions/trinketCacheFlag.lua +3 -2
  63. package/dist/functions/trinketGive.d.ts +7 -7
  64. package/dist/functions/trinketGive.lua +27 -27
  65. package/dist/functions/trinkets.d.ts +2 -2
  66. package/dist/functions/trinkets.lua +6 -6
  67. package/dist/functions/ui.d.ts +13 -13
  68. package/dist/functions/ui.lua +28 -28
  69. package/dist/functions/utils.d.ts +6 -0
  70. package/dist/functions/utils.lua +7 -0
  71. package/dist/functions/vector.d.ts +2 -0
  72. package/dist/functions/vector.lua +13 -0
  73. package/dist/index.d.ts +2 -0
  74. package/dist/index.lua +8 -0
  75. package/dist/maps/roomShapeToTopLeftWallGridIndexMap.d.ts +1 -1
  76. package/dist/maps/roomShapeToTopLeftWallGridIndexMap.lua +1 -1
  77. package/dist/types/CollectibleIndex.d.ts +15 -0
  78. package/dist/types/CollectibleIndex.lua +3 -0
  79. package/dist/upgradeMod.lua +3 -0
  80. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
+ export declare const DEFAULT_TOP_LEFT_WALL_GRID_INDEX = 0;
2
3
  /**
3
4
  * Only used for special room shapes where the top left wall grid index is not equal to
4
5
  * `DEFAULT_TOP_LEFT_WALL_GRID_INDEX`.
5
6
  */
6
7
  export declare const ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP: ReadonlyMap<RoomShape, int>;
7
- export declare const DEFAULT_TOP_LEFT_WALL_GRID_INDEX = 0;
@@ -3,6 +3,7 @@ local ____lualib = require("lualib_bundle")
3
3
  local Map = ____lualib.Map
4
4
  local __TS__New = ____lualib.__TS__New
5
5
  local ____exports = {}
6
+ ____exports.DEFAULT_TOP_LEFT_WALL_GRID_INDEX = 0
6
7
  ____exports.ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP = __TS__New(Map, {
7
8
  {RoomShape.ROOMSHAPE_IH, 30},
8
9
  {RoomShape.ROOMSHAPE_IV, 4},
@@ -10,5 +11,4 @@ ____exports.ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP = __TS__New(Map, {
10
11
  {RoomShape.ROOMSHAPE_IIH, 56},
11
12
  {RoomShape.ROOMSHAPE_LTL, 13}
12
13
  })
13
- ____exports.DEFAULT_TOP_LEFT_WALL_GRID_INDEX = 0
14
14
  return ____exports
@@ -0,0 +1,15 @@
1
+ /**
2
+ * CollectibleIndex is a specific type of string; see the documentation for the
3
+ * [[`getCollectibleIndex`]] function. Mods can signify that data structures handle collectibles by
4
+ * using this type.
5
+ *
6
+ * Example:
7
+ * ```
8
+ * const collectiblesNameMap = new Map<CollectibleIndex, string>();
9
+ * ```
10
+ *
11
+ * This type is branded for extra type safety.
12
+ */
13
+ export declare type CollectibleIndex = string & {
14
+ __collectibleIndexBrand: unknown;
15
+ };
@@ -0,0 +1,3 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____exports = {}
3
+ return ____exports
@@ -77,6 +77,8 @@ local ____roomClearChange = require("callbacks.roomClearChange")
77
77
  local roomClearChangeCallbackInit = ____roomClearChange.roomClearChangeCallbackInit
78
78
  local ____ModUpgraded = require("classes.ModUpgraded")
79
79
  local ModUpgraded = ____ModUpgraded.ModUpgraded
80
+ local ____collectiblesSeen = require("features.collectiblesSeen")
81
+ local collectiblesSeenInit = ____collectiblesSeen.collectiblesSeenInit
80
82
  local ____deployJSONRoom = require("features.deployJSONRoom")
81
83
  local deployJSONRoomInit = ____deployJSONRoom.deployJSONRoomInit
82
84
  local ____disableInputs = require("features.disableInputs")
@@ -155,6 +157,7 @@ function initFeatures(self, mod)
155
157
  isPonyActiveInit(nil, mod)
156
158
  playerInventoryInit(nil, mod)
157
159
  taintedLazarusPlayersInit(nil, mod)
160
+ collectiblesSeenInit(nil, mod)
158
161
  end
159
162
  function ____exports.upgradeMod(self, modVanilla, verbose)
160
163
  if verbose == nil then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.172",
3
+ "version": "1.2.175",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "devDependencies": {
28
28
  "isaac-typescript-definitions": "^1.0.371",
29
- "isaacscript-lint": "^1.0.91",
29
+ "isaacscript-lint": "^1.0.93",
30
30
  "isaacscript-tsconfig": "^1.1.8",
31
31
  "typedoc": "^0.22.13",
32
32
  "typescript": "4.6.2",