isaacscript-common 1.2.159 → 1.2.162

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 (85) hide show
  1. package/dist/callbacks/customRevive.lua +2 -2
  2. package/dist/callbacks/itemPickup.lua +4 -4
  3. package/dist/callbacks/postCustomDoorEnter.d.ts +2 -1
  4. package/dist/callbacks/postCustomDoorEnter.lua +34 -17
  5. package/dist/callbacks/postGridEntityCollision.lua +2 -2
  6. package/dist/callbacks/postPlayerChangeHealth.lua +6 -6
  7. package/dist/callbacks/postPlayerChangeType.lua +4 -4
  8. package/dist/callbacks/postPurchase.lua +4 -4
  9. package/dist/callbacks/postSlotRender.lua +2 -2
  10. package/dist/callbacks/postTransformation.lua +4 -4
  11. package/dist/callbacks/postTrinketBreak.lua +4 -4
  12. package/dist/callbacks/preBerserkDeath.lua +2 -2
  13. package/dist/callbacks/roomClearChange.d.ts +1 -0
  14. package/dist/callbacks/roomClearChange.lua +39 -0
  15. package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +1 -1
  16. package/dist/callbacks/subscriptions/roomClearChange.d.ts +1 -0
  17. package/dist/callbacks/subscriptions/roomClearChange.lua +18 -0
  18. package/dist/classes/DefaultMap.d.ts +74 -0
  19. package/dist/classes/DefaultMap.lua +85 -0
  20. package/dist/classes/ModUpgraded.d.ts +19 -0
  21. package/dist/classes/ModUpgraded.lua +73 -0
  22. package/dist/enums/CardType.d.ts +40 -0
  23. package/dist/enums/CardType.lua +20 -0
  24. package/dist/enums/CollectiblePedestalType.d.ts +38 -0
  25. package/dist/enums/CollectiblePedestalType.lua +36 -0
  26. package/dist/enums/HealthType.d.ts +16 -0
  27. package/dist/enums/HealthType.lua +22 -0
  28. package/dist/enums/ModCallbacksCustom.d.ts +61 -0
  29. package/dist/enums/ModCallbacksCustom.lua +108 -0
  30. package/dist/enums/PillEffectClass.d.ts +17 -0
  31. package/dist/enums/PillEffectClass.lua +16 -0
  32. package/dist/enums/PillEffectType.d.ts +16 -0
  33. package/dist/enums/PillEffectType.lua +14 -0
  34. package/dist/enums/PocketItemType.d.ts +8 -0
  35. package/dist/enums/PocketItemType.lua +16 -0
  36. package/dist/enums/private/SaveDataKeys.d.ts +6 -0
  37. package/dist/enums/private/SaveDataKeys.lua +8 -0
  38. package/dist/enums/private/SerializationBrand.d.ts +15 -0
  39. package/dist/enums/private/SerializationBrand.lua +24 -0
  40. package/dist/features/deployJSONRoom.lua +2 -2
  41. package/dist/features/extraConsoleCommands/commands.lua +2 -2
  42. package/dist/features/isPonyActive.lua +2 -2
  43. package/dist/features/playerInventory.lua +4 -4
  44. package/dist/features/saveDataManager/exports.d.ts +6 -2
  45. package/dist/features/saveDataManager/exports.lua +4 -4
  46. package/dist/features/saveDataManager/main.lua +4 -4
  47. package/dist/features/saveDataManager/merge.lua +3 -3
  48. package/dist/functions/cards.d.ts +1 -1
  49. package/dist/functions/cards.lua +2 -2
  50. package/dist/functions/collectibles.d.ts +1 -1
  51. package/dist/functions/deepCopy.lua +4 -4
  52. package/dist/functions/deepCopyTests.lua +2 -2
  53. package/dist/functions/map.d.ts +1 -1
  54. package/dist/functions/pills.d.ts +2 -2
  55. package/dist/functions/player.d.ts +1 -1
  56. package/dist/functions/player.lua +2 -2
  57. package/dist/functions/playerDataStructures.d.ts +1 -1
  58. package/dist/functions/playerHealth.d.ts +1 -1
  59. package/dist/functions/playerHealth.lua +1 -1
  60. package/dist/functions/pocketItems.lua +1 -1
  61. package/dist/functions/transformations.lua +2 -2
  62. package/dist/functions/trinkets.d.ts +12 -0
  63. package/dist/functions/trinkets.lua +15 -0
  64. package/dist/index.d.ts +10 -8
  65. package/dist/index.lua +73 -57
  66. package/dist/objects/callbackRegisterFunctions.d.ts +1 -1
  67. package/dist/objects/callbackRegisterFunctions.lua +10 -1
  68. package/dist/objects/cardTypes.d.ts +1 -1
  69. package/dist/objects/cardTypes.lua +1 -1
  70. package/dist/objects/directionNames.d.ts +4 -0
  71. package/dist/objects/directionNames.lua +10 -0
  72. package/dist/objects/pillEffectClasses.d.ts +1 -1
  73. package/dist/objects/pillEffectClasses.lua +1 -1
  74. package/dist/objects/pillEffectTypes.d.ts +1 -1
  75. package/dist/objects/pillEffectTypes.lua +1 -1
  76. package/dist/types/AddCallbackParametersCustom.d.ts +11 -1
  77. package/dist/types/AddCallbackParametersCustom.lua +1 -1
  78. package/dist/types/ModCallbacksCustom.d.ts +43 -40
  79. package/dist/types/ModCallbacksCustom.lua +46 -40
  80. package/dist/types/PocketItemDescription.d.ts +1 -1
  81. package/dist/types/private/SaveData.d.ts +0 -6
  82. package/dist/types/private/SaveData.lua +0 -5
  83. package/dist/upgradeMod.d.ts +1 -1
  84. package/dist/upgradeMod.lua +8 -2
  85. package/package.json +1 -1
@@ -5,15 +5,15 @@ local ____exports = {}
5
5
  local postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, mod, loadedDataOnThisRun
6
6
  local ____cachedClasses = require("cachedClasses")
7
7
  local game = ____cachedClasses.game
8
+ local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
9
+ local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
10
+ local ____SaveDataKeys = require("enums.private.SaveDataKeys")
11
+ local SaveDataKeys = ____SaveDataKeys.SaveDataKeys
8
12
  local ____deepCopy = require("functions.deepCopy")
9
13
  local deepCopy = ____deepCopy.deepCopy
10
14
  local SerializationType = ____deepCopy.SerializationType
11
15
  local ____table = require("functions.table")
12
16
  local clearTable = ____table.clearTable
13
- local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
14
- local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
15
- local ____SaveData = require("types.private.SaveData")
16
- local SaveDataKeys = ____SaveData.SaveDataKeys
17
17
  local ____constants = require("features.saveDataManager.constants")
18
18
  local SAVE_DATA_MANAGER_FEATURE_NAME = ____constants.SAVE_DATA_MANAGER_FEATURE_NAME
19
19
  local ____load = require("features.saveDataManager.load")
@@ -5,6 +5,9 @@ local __TS__InstanceOf = ____lualib.__TS__InstanceOf
5
5
  local Set = ____lualib.Set
6
6
  local ____exports = {}
7
7
  local mergeArray, mergeTSTLObject, mergeTable, mergeVector
8
+ local ____SerializationBrand = require("enums.private.SerializationBrand")
9
+ local isSerializationBrand = ____SerializationBrand.isSerializationBrand
10
+ local SerializationBrand = ____SerializationBrand.SerializationBrand
8
11
  local ____array = require("functions.array")
9
12
  local isArray = ____array.isArray
10
13
  local ____deepCopy = require("functions.deepCopy")
@@ -17,9 +20,6 @@ local ____log = require("functions.log")
17
20
  local log = ____log.log
18
21
  local ____table = require("functions.table")
19
22
  local clearTable = ____table.clearTable
20
- local ____SerializationBrand = require("types.private.SerializationBrand")
21
- local isSerializationBrand = ____SerializationBrand.isSerializationBrand
22
- local SerializationBrand = ____SerializationBrand.SerializationBrand
23
23
  local ____constants = require("features.saveDataManager.constants")
24
24
  local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
25
25
  function ____exports.merge(self, oldObject, newTable, traversalDescription)
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- import { CardType } from "../types/CardType";
2
+ import { CardType } from "../enums/CardType";
3
3
  /**
4
4
  * Helper function to get a card description from a Card enum value.
5
5
  *
@@ -8,6 +8,8 @@ local ____exports = {}
8
8
  local initCardObjects, CARD_TYPE_TO_CARDS_MAP, CARD_SET
9
9
  local ____cachedClasses = require("cachedClasses")
10
10
  local itemConfig = ____cachedClasses.itemConfig
11
+ local ____CardType = require("enums.CardType")
12
+ local CardType = ____CardType.CardType
11
13
  local ____cardDescriptions = require("objects.cardDescriptions")
12
14
  local CARD_DESCRIPTIONS = ____cardDescriptions.CARD_DESCRIPTIONS
13
15
  local DEFAULT_CARD_DESCRIPTION = ____cardDescriptions.DEFAULT_CARD_DESCRIPTION
@@ -17,8 +19,6 @@ local DEFAULT_CARD_NAME = ____cardNames.DEFAULT_CARD_NAME
17
19
  local ____cardTypes = require("objects.cardTypes")
18
20
  local CARD_TYPES = ____cardTypes.CARD_TYPES
19
21
  local DEFAULT_CARD_TYPE = ____cardTypes.DEFAULT_CARD_TYPE
20
- local ____CardType = require("types.CardType")
21
- local CardType = ____CardType.CardType
22
22
  local ____math = require("functions.math")
23
23
  local range = ____math.range
24
24
  local ____set = require("functions.set")
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- import { CollectiblePedestalType } from "../types/CollectiblePedestalType";
2
+ import { CollectiblePedestalType } from "../enums/CollectiblePedestalType";
3
3
  export declare function collectibleHasTag(collectibleType: CollectibleType | int, tag: ItemConfigTag): boolean;
4
4
  export declare function clearCollectibleSprite(collectible: EntityPickup): void;
5
5
  export declare function collectibleHasCacheFlag(collectibleType: CollectibleType | int, cacheFlag: CacheFlag): boolean;
@@ -7,13 +7,13 @@ local __TS__InstanceOf = ____lualib.__TS__InstanceOf
7
7
  local __TS__Iterator = ____lualib.__TS__Iterator
8
8
  local ____exports = {}
9
9
  local isTSTLClass, copyClass, getNewClassFromMetatable, deepCopyValue, copyVector, checkMetatable, validateValue, TSTL_CLASS_KEYS
10
- local ____constants = require("features.saveDataManager.constants")
11
- local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
12
- local ____DefaultMap = require("types.DefaultMap")
10
+ local ____DefaultMap = require("classes.DefaultMap")
13
11
  local DefaultMap = ____DefaultMap.DefaultMap
14
- local ____SerializationBrand = require("types.private.SerializationBrand")
12
+ local ____SerializationBrand = require("enums.private.SerializationBrand")
15
13
  local isSerializationBrand = ____SerializationBrand.isSerializationBrand
16
14
  local SerializationBrand = ____SerializationBrand.SerializationBrand
15
+ local ____constants = require("features.saveDataManager.constants")
16
+ local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
17
17
  local ____log = require("functions.log")
18
18
  local log = ____log.log
19
19
  local ____vector = require("functions.vector")
@@ -6,9 +6,9 @@ local __TS__InstanceOf = ____lualib.__TS__InstanceOf
6
6
  local Set = ____lualib.Set
7
7
  local ____exports = {}
8
8
  local copiedObjectIsTable, copiedObjectHasKeyAndValueString, copiedTableHasKeyAndValueNumber, copiedTableDoesNotCoerceTypes, copiedObjectHasNoReferencesForPrimitivesForward, copiedObjectHasNoReferencesForPrimitivesBackward, copiedObjectHasNoReferencesForArray, copiedObjectHasChildObject, copiedMapIsMap, copiedMapHasValue, copiedSetIsSet, copiedSetHasValue, copiedMapHasChildMap, copiedDefaultMapHasChildDefaultMap, copiedDefaultMapHasBrand
9
- local ____DefaultMap = require("types.DefaultMap")
9
+ local ____DefaultMap = require("classes.DefaultMap")
10
10
  local DefaultMap = ____DefaultMap.DefaultMap
11
- local ____SerializationBrand = require("types.private.SerializationBrand")
11
+ local ____SerializationBrand = require("enums.private.SerializationBrand")
12
12
  local SerializationBrand = ____SerializationBrand.SerializationBrand
13
13
  local ____array = require("functions.array")
14
14
  local arrayEquals = ____array.arrayEquals
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- import { DefaultMap } from "../types/DefaultMap";
2
+ import { DefaultMap } from "../classes/DefaultMap";
3
3
  /** Helper function to copy a map. (You can also use a Map constructor to accomplish this task.) */
4
4
  export declare function copyMap<K, V>(oldMap: Map<K, V>): Map<K, V>;
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- import { PillEffectClass } from "../types/PillEffectClass";
3
- import { PillEffectType } from "../types/PillEffectType";
2
+ import { PillEffectClass } from "../enums/PillEffectClass";
3
+ import { PillEffectType } from "../enums/PillEffectType";
4
4
  /**
5
5
  * Helper function to get the final pill effect in the game. This cannot be reliably determined
6
6
  * before run-time due to mods adding a variable amount of new pill effects.
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- import { HealthType } from "../types/HealthType";
2
+ import { HealthType } from "../enums/HealthType";
3
3
  import { PlayerIndex } from "../types/PlayerIndex";
4
4
  export declare function addCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType | int): void;
5
5
  export declare function addTrinketCostume(player: EntityPlayer, trinketType: TrinketType | int): void;
@@ -22,11 +22,11 @@ local CHARACTERS_WITH_NO_RED_HEARTS = ____constants.CHARACTERS_WITH_NO_RED_HEART
22
22
  local CHARACTERS_WITH_NO_SOUL_HEARTS = ____constants.CHARACTERS_WITH_NO_SOUL_HEARTS
23
23
  local LOST_STYLE_PLAYER_TYPES = ____constants.LOST_STYLE_PLAYER_TYPES
24
24
  local MAX_VANILLA_CHARACTER = ____constants.MAX_VANILLA_CHARACTER
25
+ local ____HealthType = require("enums.HealthType")
26
+ local HealthType = ____HealthType.HealthType
25
27
  local ____characterNames = require("objects.characterNames")
26
28
  local CHARACTER_NAMES = ____characterNames.CHARACTER_NAMES
27
29
  local DEFAULT_CHARACTER_NAME = ____characterNames.DEFAULT_CHARACTER_NAME
28
- local ____HealthType = require("types.HealthType")
29
- local HealthType = ____HealthType.HealthType
30
30
  local ____array = require("functions.array")
31
31
  local getLastElement = ____array.getLastElement
32
32
  local sumArray = ____array.sumArray
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- import { DefaultMap } from "../types/DefaultMap";
2
+ import { DefaultMap } from "../classes/DefaultMap";
3
3
  import { PlayerIndex } from "../types/PlayerIndex";
4
4
  /**
5
5
  * Helper function to make using default maps with an index of `PlayerIndex` easier. Use this
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- import { HealthType } from "../types/HealthType";
2
+ import { HealthType } from "../enums/HealthType";
3
3
  import { PlayerHealth } from "../types/PlayerHealth";
4
4
  export declare function addPlayerHealthType(player: EntityPlayer, healthType: HealthType, numHearts: int): void;
5
5
  /**
@@ -5,7 +5,7 @@ local __TS__ArrayForEach = ____lualib.__TS__ArrayForEach
5
5
  local ____exports = {}
6
6
  local ____constants = require("constants")
7
7
  local MAX_PLAYER_HEART_CONTAINERS = ____constants.MAX_PLAYER_HEART_CONTAINERS
8
- local ____HealthType = require("types.HealthType")
8
+ local ____HealthType = require("enums.HealthType")
9
9
  local HealthType = ____HealthType.HealthType
10
10
  local ____player = require("functions.player")
11
11
  local getBlackHearts = ____player.getBlackHearts
@@ -6,7 +6,7 @@ local __TS__ArraySome = ____lualib.__TS__ArraySome
6
6
  local ____exports = {}
7
7
  local ____constants = require("constants")
8
8
  local MAX_PLAYER_POCKET_ITEM_SLOTS = ____constants.MAX_PLAYER_POCKET_ITEM_SLOTS
9
- local ____PocketItemType = require("types.PocketItemType")
9
+ local ____PocketItemType = require("enums.PocketItemType")
10
10
  local PocketItemType = ____PocketItemType.PocketItemType
11
11
  local ____math = require("functions.math")
12
12
  local range = ____math.range
@@ -5,11 +5,11 @@ local __TS__New = ____lualib.__TS__New
5
5
  local Set = ____lualib.Set
6
6
  local __TS__Iterator = ____lualib.__TS__Iterator
7
7
  local ____exports = {}
8
+ local ____DefaultMap = require("classes.DefaultMap")
9
+ local DefaultMap = ____DefaultMap.DefaultMap
8
10
  local ____transformationNames = require("objects.transformationNames")
9
11
  local DEFAULT_TRANSFORMATION_NAME = ____transformationNames.DEFAULT_TRANSFORMATION_NAME
10
12
  local TRANSFORMATION_NAMES = ____transformationNames.TRANSFORMATION_NAMES
11
- local ____DefaultMap = require("types.DefaultMap")
12
- local DefaultMap = ____DefaultMap.DefaultMap
13
13
  local ____collectibles = require("functions.collectibles")
14
14
  local collectibleHasTag = ____collectibles.collectibleHasTag
15
15
  local getMaxCollectibleType = ____collectibles.getMaxCollectibleType
@@ -45,6 +45,18 @@ export declare function getTrinketName(trinketType: TrinketType | int): string;
45
45
  */
46
46
  export declare function hasOpenTrinketSlot(player: EntityPlayer): boolean;
47
47
  export declare function isGoldenTrinket(trinketType: TrinketType | int): boolean;
48
+ /**
49
+ * Helper function to change the sprite of a trinket entity.
50
+ *
51
+ * For more information about removing the trinket sprite, see the documentation for the
52
+ * "clearSprite" helper function.
53
+ *
54
+ * @param trinket The trinket whose sprite you want to modify.
55
+ * @param pngPath Equal to either the spritesheet path to load (e.g.
56
+ * "gfx/items/collectibles/collectibles_001_thesadonion.png") or undefined. If undefined, the sprite
57
+ * will be removed, making it appear like the collectible has already been taken by the player.
58
+ */
59
+ export declare function setTrinketSprite(trinket: EntityPickup, pngPath: string | undefined): void;
48
60
  /**
49
61
  * Helper function to smelt a trinket. Before smelting, this function will automatically remove the
50
62
  * trinkets that the player is holding, if any, and then give them back after the new trinket is
@@ -16,11 +16,14 @@ local ____pickups = require("functions.pickups")
16
16
  local getPickups = ____pickups.getPickups
17
17
  local ____player = require("functions.player")
18
18
  local useActiveItemTemp = ____player.useActiveItemTemp
19
+ local ____sprite = require("functions.sprite")
20
+ local clearSprite = ____sprite.clearSprite
19
21
  local ____trinketGive = require("functions.trinketGive")
20
22
  local giveTrinketsBack = ____trinketGive.giveTrinketsBack
21
23
  local temporarilyRemoveTrinkets = ____trinketGive.temporarilyRemoveTrinkets
22
24
  local ____utils = require("functions.utils")
23
25
  local ____repeat = ____utils["repeat"]
26
+ local TRINKET_SPRITE_LAYER = 0
24
27
  function ____exports.getMaxTrinketType(self)
25
28
  return itemConfig:GetTrinkets().Size - 1
26
29
  end
@@ -78,6 +81,18 @@ end
78
81
  function ____exports.isGoldenTrinket(self, trinketType)
79
82
  return trinketType > TRINKET_GOLDEN_FLAG
80
83
  end
84
+ function ____exports.setTrinketSprite(self, trinket, pngPath)
85
+ if trinket.Variant ~= PickupVariant.PICKUP_TRINKET then
86
+ error("You cannot set a trinket sprite for pickups of variant: " .. tostring(trinket.Variant))
87
+ end
88
+ local sprite = trinket:GetSprite()
89
+ if pngPath == nil then
90
+ clearSprite(nil, sprite, TRINKET_SPRITE_LAYER)
91
+ else
92
+ sprite:ReplaceSpritesheet(TRINKET_SPRITE_LAYER, pngPath)
93
+ sprite:LoadGraphics()
94
+ end
95
+ end
81
96
  function ____exports.smeltTrinket(self, player, trinketType, numTrinkets)
82
97
  if numTrinkets == nil then
83
98
  numTrinkets = 1
package/dist/index.d.ts CHANGED
@@ -1,7 +1,16 @@
1
1
  export * from "./cachedClasses";
2
2
  export { initCustomDoor, spawnCustomDoor, } from "./callbacks/postCustomDoorEnter";
3
3
  export { forceNewLevelCallback, forceNewRoomCallback, } from "./callbacks/reorderedCallbacks";
4
+ export * from "./classes/DefaultMap";
5
+ export * from "./classes/ModUpgraded";
4
6
  export * from "./constants";
7
+ export * from "./enums/CardType";
8
+ export * from "./enums/CollectiblePedestalType";
9
+ export * from "./enums/HealthType";
10
+ export * from "./enums/ModCallbacksCustom";
11
+ export * from "./enums/PillEffectClass";
12
+ export * from "./enums/PillEffectType";
13
+ export * from "./enums/PocketItemType";
5
14
  export { deployJSONRoom, deployRandomJSONRoom, emptyRoom, } from "./features/deployJSONRoom";
6
15
  export { disableAllInputs, disableAllInputsExceptFor, disableMovementInputs, disableShootingInputs, enableAllInputs, enableAllInputsExceptFor, } from "./features/disableInputs";
7
16
  export { disableAllSound, enableAllSound } from "./features/disableSound";
@@ -75,24 +84,17 @@ export * from "./maps/cardMap";
75
84
  export * from "./maps/characterMap";
76
85
  export * from "./maps/pillEffectMap";
77
86
  export * from "./maps/roomTypeMap";
87
+ export * from "./objects/directionNames";
78
88
  export * from "./types/AddCallbackParametersCustom";
79
89
  export * from "./types/AnyEntity";
80
- export * from "./types/CardType";
81
- export * from "./types/DefaultMap";
82
- export * from "./types/HealthType";
83
90
  export * from "./types/JSONDoor";
84
91
  export * from "./types/JSONEntity";
85
92
  export * from "./types/JSONRoom";
86
93
  export * from "./types/JSONRooms";
87
94
  export * from "./types/JSONSpawn";
88
- export * from "./types/ModCallbacksCustom";
89
- export * from "./types/ModUpgraded";
90
95
  export * from "./types/PickingUpItem";
91
- export * from "./types/PillEffectClass";
92
- export * from "./types/PillEffectType";
93
96
  export * from "./types/PlayerHealth";
94
97
  export * from "./types/PlayerIndex";
95
98
  export * from "./types/PocketItemDescription";
96
- export * from "./types/PocketItemType";
97
99
  export * from "./types/TrinketSituation";
98
100
  export * from "./upgradeMod";
package/dist/index.lua CHANGED
@@ -22,6 +22,22 @@ do
22
22
  ____exports.forceNewLevelCallback = forceNewLevelCallback
23
23
  ____exports.forceNewRoomCallback = forceNewRoomCallback
24
24
  end
25
+ do
26
+ local ____export = require("classes.DefaultMap")
27
+ for ____exportKey, ____exportValue in pairs(____export) do
28
+ if ____exportKey ~= "default" then
29
+ ____exports[____exportKey] = ____exportValue
30
+ end
31
+ end
32
+ end
33
+ do
34
+ local ____export = require("classes.ModUpgraded")
35
+ for ____exportKey, ____exportValue in pairs(____export) do
36
+ if ____exportKey ~= "default" then
37
+ ____exports[____exportKey] = ____exportValue
38
+ end
39
+ end
40
+ end
25
41
  do
26
42
  local ____export = require("constants")
27
43
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -30,6 +46,62 @@ do
30
46
  end
31
47
  end
32
48
  end
49
+ do
50
+ local ____export = require("enums.CardType")
51
+ for ____exportKey, ____exportValue in pairs(____export) do
52
+ if ____exportKey ~= "default" then
53
+ ____exports[____exportKey] = ____exportValue
54
+ end
55
+ end
56
+ end
57
+ do
58
+ local ____export = require("enums.CollectiblePedestalType")
59
+ for ____exportKey, ____exportValue in pairs(____export) do
60
+ if ____exportKey ~= "default" then
61
+ ____exports[____exportKey] = ____exportValue
62
+ end
63
+ end
64
+ end
65
+ do
66
+ local ____export = require("enums.HealthType")
67
+ for ____exportKey, ____exportValue in pairs(____export) do
68
+ if ____exportKey ~= "default" then
69
+ ____exports[____exportKey] = ____exportValue
70
+ end
71
+ end
72
+ end
73
+ do
74
+ local ____export = require("enums.ModCallbacksCustom")
75
+ for ____exportKey, ____exportValue in pairs(____export) do
76
+ if ____exportKey ~= "default" then
77
+ ____exports[____exportKey] = ____exportValue
78
+ end
79
+ end
80
+ end
81
+ do
82
+ local ____export = require("enums.PillEffectClass")
83
+ for ____exportKey, ____exportValue in pairs(____export) do
84
+ if ____exportKey ~= "default" then
85
+ ____exports[____exportKey] = ____exportValue
86
+ end
87
+ end
88
+ end
89
+ do
90
+ local ____export = require("enums.PillEffectType")
91
+ for ____exportKey, ____exportValue in pairs(____export) do
92
+ if ____exportKey ~= "default" then
93
+ ____exports[____exportKey] = ____exportValue
94
+ end
95
+ end
96
+ end
97
+ do
98
+ local ____export = require("enums.PocketItemType")
99
+ for ____exportKey, ____exportValue in pairs(____export) do
100
+ if ____exportKey ~= "default" then
101
+ ____exports[____exportKey] = ____exportValue
102
+ end
103
+ end
104
+ end
33
105
  do
34
106
  local ____deployJSONRoom = require("features.deployJSONRoom")
35
107
  local deployJSONRoom = ____deployJSONRoom.deployJSONRoom
@@ -606,39 +678,7 @@ do
606
678
  end
607
679
  end
608
680
  do
609
- local ____export = require("types.CardType")
610
- for ____exportKey, ____exportValue in pairs(____export) do
611
- if ____exportKey ~= "default" then
612
- ____exports[____exportKey] = ____exportValue
613
- end
614
- end
615
- end
616
- do
617
- local ____export = require("types.DefaultMap")
618
- for ____exportKey, ____exportValue in pairs(____export) do
619
- if ____exportKey ~= "default" then
620
- ____exports[____exportKey] = ____exportValue
621
- end
622
- end
623
- end
624
- do
625
- local ____export = require("types.HealthType")
626
- for ____exportKey, ____exportValue in pairs(____export) do
627
- if ____exportKey ~= "default" then
628
- ____exports[____exportKey] = ____exportValue
629
- end
630
- end
631
- end
632
- do
633
- local ____export = require("types.ModCallbacksCustom")
634
- for ____exportKey, ____exportValue in pairs(____export) do
635
- if ____exportKey ~= "default" then
636
- ____exports[____exportKey] = ____exportValue
637
- end
638
- end
639
- end
640
- do
641
- local ____export = require("types.ModUpgraded")
681
+ local ____export = require("objects.directionNames")
642
682
  for ____exportKey, ____exportValue in pairs(____export) do
643
683
  if ____exportKey ~= "default" then
644
684
  ____exports[____exportKey] = ____exportValue
@@ -653,30 +693,6 @@ do
653
693
  end
654
694
  end
655
695
  end
656
- do
657
- local ____export = require("types.PillEffectClass")
658
- for ____exportKey, ____exportValue in pairs(____export) do
659
- if ____exportKey ~= "default" then
660
- ____exports[____exportKey] = ____exportValue
661
- end
662
- end
663
- end
664
- do
665
- local ____export = require("types.PillEffectType")
666
- for ____exportKey, ____exportValue in pairs(____export) do
667
- if ____exportKey ~= "default" then
668
- ____exports[____exportKey] = ____exportValue
669
- end
670
- end
671
- end
672
- do
673
- local ____export = require("types.PocketItemType")
674
- for ____exportKey, ____exportValue in pairs(____export) do
675
- if ____exportKey ~= "default" then
676
- ____exports[____exportKey] = ____exportValue
677
- end
678
- end
679
- end
680
696
  do
681
697
  local ____export = require("upgradeMod")
682
698
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -1,5 +1,5 @@
1
+ import { ModCallbacksCustom } from "../enums/ModCallbacksCustom";
1
2
  import { AddCallbackParametersCustom } from "../types/AddCallbackParametersCustom";
2
- import { ModCallbacksCustom } from "../types/ModCallbacksCustom";
3
3
  export declare const CALLBACK_REGISTER_FUNCTIONS: {
4
4
  readonly [key in ModCallbacksCustom]: (...args: AddCallbackParametersCustom[key]) => void;
5
5
  };
@@ -18,6 +18,10 @@ local ____postFamiliarInitLate = require("callbacks.subscriptions.postFamiliarIn
18
18
  local postFamiliarInitLateRegister = ____postFamiliarInitLate.postFamiliarInitLateRegister
19
19
  local ____postFirstEsauJr = require("callbacks.subscriptions.postFirstEsauJr")
20
20
  local postFirstEsauJrRegister = ____postFirstEsauJr.postFirstEsauJrRegister
21
+ local ____postFirstFlip = require("callbacks.subscriptions.postFirstFlip")
22
+ local postFirstFlipRegister = ____postFirstFlip.postFirstFlipRegister
23
+ local ____postFlip = require("callbacks.subscriptions.postFlip")
24
+ local postFlipRegister = ____postFlip.postFlipRegister
21
25
  local ____postGameStartedReordered = require("callbacks.subscriptions.postGameStartedReordered")
22
26
  local postGameStartedReorderedRegister = ____postGameStartedReordered.postGameStartedReorderedRegister
23
27
  local ____postGridEntityBroken = require("callbacks.subscriptions.postGridEntityBroken")
@@ -98,7 +102,9 @@ local ____preItemPickup = require("callbacks.subscriptions.preItemPickup")
98
102
  local preItemPickupRegister = ____preItemPickup.preItemPickupRegister
99
103
  local ____preNewLevel = require("callbacks.subscriptions.preNewLevel")
100
104
  local preNewLevelRegister = ____preNewLevel.preNewLevelRegister
101
- local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
105
+ local ____roomClearChange = require("callbacks.subscriptions.roomClearChange")
106
+ local roomClearChangedRegister = ____roomClearChange.roomClearChangedRegister
107
+ local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
102
108
  local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
103
109
  ____exports.CALLBACK_REGISTER_FUNCTIONS = {
104
110
  [ModCallbacksCustom.MC_POST_GAME_STARTED_REORDERED] = postGameStartedReorderedRegister,
@@ -110,6 +116,7 @@ ____exports.CALLBACK_REGISTER_FUNCTIONS = {
110
116
  [ModCallbacksCustom.MC_POST_PLAYER_RENDER_REORDERED] = postPlayerRenderReorderedRegister,
111
117
  [ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY] = postNewRoomEarlyRegister,
112
118
  [ModCallbacksCustom.MC_PRE_NEW_LEVEL] = preNewLevelRegister,
119
+ [ModCallbacksCustom.MC_ROOM_CLEAR_CHANGE] = roomClearChangedRegister,
113
120
  [ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE] = postPlayerInitLateRegister,
114
121
  [ModCallbacksCustom.MC_POST_TEAR_INIT_LATE] = postTearInitLateRegister,
115
122
  [ModCallbacksCustom.MC_POST_TEAR_INIT_VERY_LATE] = postTearInitVeryLateRegister,
@@ -130,6 +137,8 @@ ____exports.CALLBACK_REGISTER_FUNCTIONS = {
130
137
  [ModCallbacksCustom.MC_PRE_BERSERK_DEATH] = preBerserkDeathRegister,
131
138
  [ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE] = preCustomReviveRegister,
132
139
  [ModCallbacksCustom.MC_POST_CUSTOM_REVIVE] = postCustomReviveRegister,
140
+ [ModCallbacksCustom.MC_POST_FLIP] = postFlipRegister,
141
+ [ModCallbacksCustom.MC_POST_FIRST_FLIP] = postFirstFlipRegister,
133
142
  [ModCallbacksCustom.MC_POST_ESAU_JR] = postEsauJrRegister,
134
143
  [ModCallbacksCustom.MC_POST_FIRST_ESAU_JR] = postFirstEsauJrRegister,
135
144
  [ModCallbacksCustom.MC_POST_TRANSFORMATION] = postTransformationRegister,
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- import { CardType } from "../types/CardType";
2
+ import { CardType } from "../enums/CardType";
3
3
  export declare const DEFAULT_CARD_TYPE = CardType.MODDED;
4
4
  export declare const CARD_TYPES: {
5
5
  readonly [key in Card]: CardType;
@@ -1,6 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____exports = {}
3
- local ____CardType = require("types.CardType")
3
+ local ____CardType = require("enums.CardType")
4
4
  local CardType = ____CardType.CardType
5
5
  ____exports.DEFAULT_CARD_TYPE = CardType.MODDED
6
6
  ____exports.CARD_TYPES = {
@@ -0,0 +1,4 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare const DIRECTION_NAMES: {
3
+ readonly [key in Direction]: string | undefined;
4
+ };
@@ -0,0 +1,10 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____exports = {}
3
+ ____exports.DIRECTION_NAMES = {
4
+ [Direction.NO_DIRECTION] = nil,
5
+ [Direction.LEFT] = "left",
6
+ [Direction.UP] = "up",
7
+ [Direction.RIGHT] = "right",
8
+ [Direction.DOWN] = "down"
9
+ }
10
+ return ____exports
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- import { PillEffectClass } from "../types/PillEffectClass";
2
+ import { PillEffectClass } from "../enums/PillEffectClass";
3
3
  export declare const DEFAULT_PILL_EFFECT_CLASS = PillEffectClass.MODDED;
4
4
  export declare const PILL_EFFECT_CLASSES: {
5
5
  readonly [key in PillEffect]: PillEffectClass;
@@ -1,6 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____exports = {}
3
- local ____PillEffectClass = require("types.PillEffectClass")
3
+ local ____PillEffectClass = require("enums.PillEffectClass")
4
4
  local PillEffectClass = ____PillEffectClass.PillEffectClass
5
5
  ____exports.DEFAULT_PILL_EFFECT_CLASS = PillEffectClass.MODDED
6
6
  ____exports.PILL_EFFECT_CLASSES = {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- import { PillEffectType } from "../types/PillEffectType";
2
+ import { PillEffectType } from "../enums/PillEffectType";
3
3
  export declare const DEFAULT_PILL_EFFECT_TYPE = PillEffectType.MODDED;
4
4
  export declare const PILL_EFFECT_TYPES: {
5
5
  readonly [key in PillEffect]: PillEffectType;
@@ -1,6 +1,6 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____exports = {}
3
- local ____PillEffectType = require("types.PillEffectType")
3
+ local ____PillEffectType = require("enums.PillEffectType")
4
4
  local PillEffectType = ____PillEffectType.PillEffectType
5
5
  ____exports.DEFAULT_PILL_EFFECT_TYPE = PillEffectType.MODDED
6
6
  ____exports.PILL_EFFECT_TYPES = {
@@ -8,6 +8,8 @@ import { PostEffectInitLateCallbackType } from "../callbacks/subscriptions/postE
8
8
  import { PostEsauJrCallbackType } from "../callbacks/subscriptions/postEsauJr";
9
9
  import { PostFamiliarInitLateCallbackType } from "../callbacks/subscriptions/postFamiliarInitLate";
10
10
  import { PostFirstEsauJrCallbackType } from "../callbacks/subscriptions/postFirstEsauJr";
11
+ import { PostFirstFlipCallbackType } from "../callbacks/subscriptions/postFirstFlip";
12
+ import { PostFlipCallbackType } from "../callbacks/subscriptions/postFlip";
11
13
  import { PostGameStartedReorderedCallbackType } from "../callbacks/subscriptions/postGameStartedReordered";
12
14
  import { PostGridEntityBrokenCallbackType } from "../callbacks/subscriptions/postGridEntityBroken";
13
15
  import { PostGridEntityCollisionCallbackType } from "../callbacks/subscriptions/postGridEntityCollision";
@@ -48,7 +50,8 @@ import { PreBerserkDeathCallbackType } from "../callbacks/subscriptions/preBerse
48
50
  import { PreCustomReviveCallbackType } from "../callbacks/subscriptions/preCustomRevive";
49
51
  import { PreItemPickupCallbackType } from "../callbacks/subscriptions/preItemPickup";
50
52
  import { PreNewLevelCallbackType } from "../callbacks/subscriptions/preNewLevel";
51
- import { ModCallbacksCustom } from "./ModCallbacksCustom";
53
+ import { RoomClearChangeCallbackType } from "../callbacks/subscriptions/roomClearChange";
54
+ import { ModCallbacksCustom } from "../enums/ModCallbacksCustom";
52
55
  export interface AddCallbackParametersCustom {
53
56
  [ModCallbacksCustom.MC_POST_GAME_STARTED_REORDERED]: [
54
57
  callback: PostGameStartedReorderedCallbackType
@@ -79,6 +82,9 @@ export interface AddCallbackParametersCustom {
79
82
  callback: PostNewRoomEarlyCallbackType
80
83
  ];
81
84
  [ModCallbacksCustom.MC_PRE_NEW_LEVEL]: [callback: PreNewLevelCallbackType];
85
+ [ModCallbacksCustom.MC_ROOM_CLEAR_CHANGE]: [
86
+ callback: RoomClearChangeCallbackType
87
+ ];
82
88
  [ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE]: [
83
89
  callback: PostPlayerInitLateCallbackType,
84
90
  playerVariant?: PlayerVariant
@@ -159,6 +165,10 @@ export interface AddCallbackParametersCustom {
159
165
  callback: PostCustomReviveCallbackType,
160
166
  revivalType?: int
161
167
  ];
168
+ [ModCallbacksCustom.MC_POST_FLIP]: [callback: PostFlipCallbackType];
169
+ [ModCallbacksCustom.MC_POST_FIRST_FLIP]: [
170
+ callback: PostFirstFlipCallbackType
171
+ ];
162
172
  [ModCallbacksCustom.MC_POST_ESAU_JR]: [callback: PostEsauJrCallbackType];
163
173
  [ModCallbacksCustom.MC_POST_FIRST_ESAU_JR]: [
164
174
  callback: PostFirstEsauJrCallbackType
@@ -1,5 +1,5 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____exports = {}
3
- local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
3
+ local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
4
4
  local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
5
5
  return ____exports