isaacscript-common 1.0.487 → 1.0.488

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.
@@ -27,11 +27,6 @@ export declare const FIRST_GLITCHED_COLLECTIBLE_TYPE: number;
27
27
  export declare const GENESIS_ROOM_VARIANT = 1000;
28
28
  export declare const GENESIS_ROOM_SUBTYPE = 99;
29
29
  export declare const GOLDEN_TRINKET_SHIFT: number;
30
- /**
31
- * This maps the GridEntityXMLType (i.e. the type contained in the room XML/STB file) to the
32
- * GridEntityType and the variant used by the game.
33
- */
34
- export declare const GRID_ENTITY_XML_MAP: Map<GridEntityXMLType, [GridEntityType, number]>;
35
30
  export declare const GRID_INDEX_CENTER_OF_1X1_ROOM = 67;
36
31
  export declare const GAME_FRAMES_PER_SECOND = 30;
37
32
  export declare const ISAAC_FRAMES_PER_SECOND = 60;
@@ -70,7 +65,6 @@ export declare const MAX_ROOM_INDEX = 168;
70
65
  export declare const MAX_VANILLA_COLLECTIBLE_TYPE = CollectibleType.COLLECTIBLE_MOMS_RING;
71
66
  export declare const MOVEMENT_ACTIONS: Set<ButtonAction>;
72
67
  export declare const ONE_BY_ONE_ROOM_GRID_SIZE = 135;
73
- export declare const ROOM_TYPE_TO_ITEM_POOL_TYPE_MAP: Map<RoomType, ItemPoolType>;
74
68
  export declare const SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES: Set<CollectibleType>;
75
69
  export declare const SHOOTING_ACTIONS: Set<ButtonAction>;
76
70
  /**
@@ -13,7 +13,6 @@ ____exports.FIRST_GLITCHED_COLLECTIBLE_TYPE = (1 << 32) - 1
13
13
  ____exports.GENESIS_ROOM_VARIANT = 1000
14
14
  ____exports.GENESIS_ROOM_SUBTYPE = 99
15
15
  ____exports.GOLDEN_TRINKET_SHIFT = 1 << 15
16
- ____exports.GRID_ENTITY_XML_MAP = __TS__New(Map, {{1000, {GridEntityType.GRID_ROCK, 0}}, {1001, {GridEntityType.GRID_ROCK_BOMB, 0}}, {1002, {GridEntityType.GRID_ROCK_ALT, 0}}, {1003, {GridEntityType.GRID_ROCKT, 0}}, {1008, {GridEntityType.GRID_ROCK_ALT2, 0}}, {1009, {GridEntityType.GRID_ROCK_ALT2, 1}}, {1010, {GridEntityType.GRID_ROCK_SPIKED, 0}}, {1011, {GridEntityType.GRID_ROCK_GOLD, 0}}, {1300, {GridEntityType.GRID_TNT, 0}}, {1490, {GridEntityType.GRID_POOP, 1}}, {1494, {GridEntityType.GRID_POOP, 4}}, {1495, {GridEntityType.GRID_POOP, 2}}, {1496, {GridEntityType.GRID_POOP, 3}}, {1497, {GridEntityType.GRID_POOP, 5}}, {1498, {GridEntityType.GRID_POOP, 6}}, {1500, {GridEntityType.GRID_POOP, 0}}, {1501, {GridEntityType.GRID_POOP, 11}}, {1900, {GridEntityType.GRID_ROCKB, 0}}, {1901, {GridEntityType.GRID_PILLAR, 0}}, {1930, {GridEntityType.GRID_SPIKES, 0}}, {1931, {GridEntityType.GRID_SPIKES_ONOFF, 0}}, {1940, {GridEntityType.GRID_SPIDERWEB, 0}}, {1999, {GridEntityType.GRID_WALL, 0}}, {3000, {GridEntityType.GRID_PIT, 0}}, {3001, {GridEntityType.GRID_PIT, 16}}, {3009, {GridEntityType.GRID_PIT, 0}}, {4000, {GridEntityType.GRID_LOCK, 0}}, {4500, {GridEntityType.GRID_PRESSURE_PLATE, 0}}, {5000, {GridEntityType.GRID_STATUE, 0}}, {5001, {GridEntityType.GRID_STATUE, 1}}, {6100, {GridEntityType.GRID_TELEPORTER, 0}}, {9000, {GridEntityType.GRID_TRAPDOOR, 0}}, {9100, {GridEntityType.GRID_STAIRS, 0}}, {10000, {GridEntityType.GRID_GRAVITY, 0}}})
17
16
  ____exports.GRID_INDEX_CENTER_OF_1X1_ROOM = 67
18
17
  ____exports.GAME_FRAMES_PER_SECOND = 30
19
18
  ____exports.ISAAC_FRAMES_PER_SECOND = 60
@@ -29,7 +28,6 @@ ____exports.MAX_ROOM_INDEX = 168
29
28
  ____exports.MAX_VANILLA_COLLECTIBLE_TYPE = CollectibleType.COLLECTIBLE_MOMS_RING
30
29
  ____exports.MOVEMENT_ACTIONS = __TS__New(Set, {ButtonAction.ACTION_LEFT, ButtonAction.ACTION_RIGHT, ButtonAction.ACTION_UP, ButtonAction.ACTION_DOWN})
31
30
  ____exports.ONE_BY_ONE_ROOM_GRID_SIZE = 135
32
- ____exports.ROOM_TYPE_TO_ITEM_POOL_TYPE_MAP = __TS__New(Map, {{RoomType.ROOM_SHOP, ItemPoolType.POOL_SHOP}, {RoomType.ROOM_TREASURE, ItemPoolType.POOL_TREASURE}, {RoomType.ROOM_BOSS, ItemPoolType.POOL_BOSS}, {RoomType.ROOM_SECRET, ItemPoolType.POOL_SECRET}, {RoomType.ROOM_CURSE, ItemPoolType.POOL_CURSE}, {RoomType.ROOM_CHALLENGE, ItemPoolType.POOL_BOSS}, {RoomType.ROOM_LIBRARY, ItemPoolType.POOL_LIBRARY}, {RoomType.ROOM_DEVIL, ItemPoolType.POOL_DEVIL}, {RoomType.ROOM_ANGEL, ItemPoolType.POOL_ANGEL}, {RoomType.ROOM_CHEST, ItemPoolType.POOL_GOLDEN_CHEST}, {RoomType.ROOM_BLACK_MARKET, ItemPoolType.POOL_SHOP}, {RoomType.ROOM_PLANETARIUM, ItemPoolType.POOL_PLANETARIUM}, {RoomType.ROOM_ULTRASECRET, ItemPoolType.POOL_ULTRA_SECRET}})
33
31
  ____exports.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES = __TS__New(Set, {CollectibleType.COLLECTIBLE_FORGET_ME_NOW, CollectibleType.COLLECTIBLE_EDENS_SOUL, CollectibleType.COLLECTIBLE_ALABASTER_BOX, CollectibleType.COLLECTIBLE_PLAN_C, CollectibleType.COLLECTIBLE_MAMA_MEGA, CollectibleType.COLLECTIBLE_SACRIFICIAL_ALTAR, CollectibleType.COLLECTIBLE_DEATH_CERTIFICATE, CollectibleType.COLLECTIBLE_R_KEY})
34
32
  ____exports.SHOOTING_ACTIONS = __TS__New(Set, {ButtonAction.ACTION_SHOOTLEFT, ButtonAction.ACTION_SHOOTRIGHT, ButtonAction.ACTION_SHOOTUP, ButtonAction.ACTION_SHOOTDOWN})
35
33
  ____exports.UI_HEART_WIDTH = 12
@@ -28,16 +28,28 @@ export declare function arrayShuffleInPlace<T>(array: T[], seed?: number): void;
28
28
  export declare function arraySum(array: int[]): int;
29
29
  export declare function arrayToString<T>(array: T[]): string;
30
30
  /**
31
- * Shallow copies and removes the specified element from the array. Returns the copied array. If the
32
- * specified element is not found in the array, it will simply return a shallow copy of the array.
31
+ * Shallow copies and removes the specified element(s) from the array. Returns the copied array. If
32
+ * the specified element(s) are not found in the array, it will simply return a shallow copy of the
33
+ * array.
34
+ *
35
+ * This function is variadic, meaning that you can specify N arguments to remove N elements.
33
36
  */
34
- export declare function arrayRemove<T>(originalArray: T[], element: T): T[];
37
+ export declare function arrayRemove<T>(originalArray: T[], ...elements: T[]): T[];
35
38
  /**
36
- * Removes the specified element from the array. If the specified element is not found in the array,
37
- * this function will do nothing. Returns whether or not the element was found.
39
+ * Removes the specified element(s) from the array. If the specified element(s) are not found in the
40
+ * array, this function will do nothing. Returns whether or not one or more elements were found.
41
+ *
42
+ * This function is variadic, meaning that you can specify N arguments to remove N elements.
43
+ */
44
+ export declare function arrayRemoveInPlace<T>(array: T[], ...elements: T[]): boolean;
45
+ /**
46
+ * Helper function to get a random element from the provided array.
47
+ *
48
+ * @param array The array to get an element from.
49
+ * @param seed Optional. The seed used to select the random element. `Random()` by default.
50
+ * @param exceptions Optional. An array of elements to skip over if selected.
38
51
  */
39
- export declare function arrayRemoveInPlace<T>(array: T[], element: T): boolean;
40
- export declare function getRandomArrayElement<T>(array: T[], seed?: number): T;
52
+ export declare function getRandomArrayElement<T>(array: T[], seed?: number, exceptions?: T[]): T;
41
53
  export declare function getRandomArrayIndex<T>(array: T[], seed?: number): int;
42
54
  /**
43
55
  * Since Lua uses tables for every non-primitive data structure, it is non-trivial to determine if a
@@ -91,28 +91,43 @@ function ____exports.arrayToString(self, array)
91
91
  end
92
92
  return ("[" .. table.concat(strings, ", " or ",")) .. "]"
93
93
  end
94
- function ____exports.arrayRemove(self, originalArray, element)
94
+ function ____exports.arrayRemove(self, originalArray, ...)
95
+ local elements = {...}
95
96
  local array = {
96
97
  table.unpack(originalArray)
97
98
  }
98
- local index = __TS__ArrayIndexOf(array, element)
99
- __TS__ArraySplice(array, index, 1)
99
+ for ____, element in ipairs(elements) do
100
+ local index = __TS__ArrayIndexOf(array, element)
101
+ __TS__ArraySplice(array, index, 1)
102
+ end
100
103
  return array
101
104
  end
102
- function ____exports.arrayRemoveInPlace(self, array, element)
103
- local index = __TS__ArrayIndexOf(array, element)
104
- if index == -1 then
105
- return false
105
+ function ____exports.arrayRemoveInPlace(self, array, ...)
106
+ local elements = {...}
107
+ local removedOneOrMoreElements = false
108
+ for ____, element in ipairs(elements) do
109
+ local index = __TS__ArrayIndexOf(array, element)
110
+ if index > -1 then
111
+ removedOneOrMoreElements = true
112
+ __TS__ArraySplice(array, index, 1)
113
+ end
106
114
  end
107
- __TS__ArraySplice(array, index, 1)
108
- return true
115
+ return removedOneOrMoreElements
109
116
  end
110
- function ____exports.getRandomArrayElement(self, array, seed)
117
+ function ____exports.getRandomArrayElement(self, array, seed, exceptions)
111
118
  if seed == nil then
112
119
  seed = Random()
113
120
  end
114
- local randomIndex = ____exports.getRandomArrayIndex(nil, array, seed)
115
- return array[randomIndex + 1]
121
+ if exceptions == nil then
122
+ exceptions = {}
123
+ end
124
+ local arrayWithoutExceptions = ____exports.arrayRemove(
125
+ nil,
126
+ array,
127
+ table.unpack(exceptions)
128
+ )
129
+ local randomIndex = ____exports.getRandomArrayIndex(nil, arrayWithoutExceptions, seed)
130
+ return arrayWithoutExceptions[randomIndex + 1]
116
131
  end
117
132
  function ____exports.isArray(self, ____table)
118
133
  local metatable = getmetatable(____table)
@@ -21,25 +21,31 @@ export declare function getCardDescription(card: Card | int): string;
21
21
  export declare function getCardName(card: Card | int): string;
22
22
  /**
23
23
  * Has an equal chance of returning any card (e.g. Fool, Reverse Fool, Wild Card, etc.). This will
24
- * not return any runes or objects.
24
+ * not return any runes or objects like Dice Shard.
25
+ *
26
+ * @param seed Optional. The seed with which to select the random card. `Random()` by default.
27
+ * @param exceptions Optional. An array of cards to not select.
25
28
  */
26
- export declare function getRandomCard(seed?: number): Card;
29
+ export declare function getRandomCard(seed?: number, exceptions?: Card[]): Card;
27
30
  /**
28
31
  * Has an equal chance of returning any rune (e.g. Rune of Hagalaz, Blank Rune, Black Rune, Soul of
29
32
  * Isaac, etc.). This will never return a Rune Shard.
33
+ *
34
+ * @param seed Optional. The seed with which to select the random rune. `Random()` by default.
35
+ * @param exceptions Optional. An array of runes to not select.
30
36
  */
31
- export declare function getRandomRune(seed?: number): Card;
37
+ export declare function getRandomRune(seed?: number, exceptions?: Card[]): Card;
32
38
  /**
33
- * Returns true for entries in the Card enum that are not a rune or an object (e.g. Fool, Reverse
34
- * Fool, Wild Card, etc.).
39
+ * Returns true for entries in the Card enum that are not a rune and not an object (e.g. Fool,
40
+ * Reverse Fool, Wild Card, etc.).
35
41
  */
36
42
  export declare function isCard(card: Card): boolean;
37
43
  /**
38
- * Returns true for entries in the Card enum that are not a card and not a rune (like Dice Shard).
44
+ * Returns true for entries in the Card enum that are an object (like Dice Shard).
39
45
  */
40
- export declare function isNotCardOrRune(card: Card): boolean;
46
+ export declare function isPocketItemObject(card: Card): boolean;
41
47
  /**
42
- * Returns true for entries in the Card enum that are a rune. (e.g. Rune of Hagalaz, Blank Rune,
43
- * Black Rune, Rune Shard, Soul of Isaac, etc.)
48
+ * Returns true for entries in the Card enum that are a rune (e.g. Rune of Hagalaz, Blank Rune,
49
+ * Black Rune, Rune Shard, Soul of Isaac, etc.).
44
50
  */
45
51
  export declare function isRune(card: Card): boolean;
@@ -1,21 +1,19 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ require("lualib_bundle");
2
3
  local ____exports = {}
3
4
  local ____cardDescriptionMap = require("maps.cardDescriptionMap")
4
5
  local CARD_DESCRIPTION_MAP = ____cardDescriptionMap.CARD_DESCRIPTION_MAP
5
6
  local ____cardNameMap = require("maps.cardNameMap")
6
7
  local CARD_NAME_MAP = ____cardNameMap.CARD_NAME_MAP
7
- local ____random = require("functions.random")
8
- local getRandomInt = ____random.getRandomInt
9
- local nextSeed = ____random.nextSeed
10
- function ____exports.isCard(self, card)
11
- return ____exports.isNotCardOrRune(nil, card) and (not ____exports.isRune(nil, card))
12
- end
13
- function ____exports.isNotCardOrRune(self, card)
14
- return ((card == Card.CARD_DICE_SHARD) or (card == Card.CARD_EMERGENCY_CONTACT)) or (card == Card.CARD_CRACKED_KEY)
15
- end
16
- function ____exports.isRune(self, card)
17
- return (((card >= Card.RUNE_HAGALAZ) and (card <= Card.RUNE_BLACK)) or (card == Card.RUNE_SHARD)) or ((card >= Card.CARD_SOUL_ISAAC) and (card <= Card.CARD_SOUL_JACOB))
18
- end
8
+ local ____cards = require("sets.cards")
9
+ local CARDS = ____cards.CARDS
10
+ local CARD_SET = ____cards.CARD_SET
11
+ local POCKET_ITEM_OBJECT_SET = ____cards.POCKET_ITEM_OBJECT_SET
12
+ local RUNES = ____cards.RUNES
13
+ local RUNE_SET = ____cards.RUNE_SET
14
+ local ____array = require("functions.array")
15
+ local arrayRemove = ____array.arrayRemove
16
+ local getRandomArrayElement = ____array.getRandomArrayElement
19
17
  function ____exports.getCardDescription(self, card)
20
18
  local itemConfig = Isaac.GetItemConfig()
21
19
  local defaultDescription = "Unknown"
@@ -48,30 +46,42 @@ function ____exports.getCardName(self, card)
48
46
  end
49
47
  return itemConfigCard.Name
50
48
  end
51
- function ____exports.getRandomCard(self, seed)
49
+ function ____exports.getRandomCard(self, seed, exceptions)
52
50
  if seed == nil then
53
51
  seed = Random()
54
52
  end
55
- local card
56
- repeat
57
- do
58
- seed = nextSeed(nil, seed)
59
- card = getRandomInt(nil, 1, Card.NUM_CARDS - 1)
60
- end
61
- until ____exports.isCard(nil, card)
62
- return card
53
+ if exceptions == nil then
54
+ exceptions = {}
55
+ end
56
+ local cardsWithoutExceptions = arrayRemove(
57
+ nil,
58
+ CARDS,
59
+ table.unpack(exceptions)
60
+ )
61
+ return getRandomArrayElement(nil, cardsWithoutExceptions, seed)
63
62
  end
64
- function ____exports.getRandomRune(self, seed)
63
+ function ____exports.getRandomRune(self, seed, exceptions)
65
64
  if seed == nil then
66
65
  seed = Random()
67
66
  end
68
- local card
69
- repeat
70
- do
71
- seed = nextSeed(nil, seed)
72
- card = getRandomInt(nil, 1, Card.NUM_CARDS - 1)
73
- end
74
- until not ((not ____exports.isRune(nil, card)) or (card == Card.RUNE_SHARD))
75
- return card
67
+ if exceptions == nil then
68
+ exceptions = {}
69
+ end
70
+ __TS__ArrayPush(exceptions, Card.RUNE_SHARD)
71
+ local runesWithoutExceptions = arrayRemove(
72
+ nil,
73
+ RUNES,
74
+ table.unpack(exceptions)
75
+ )
76
+ return getRandomArrayElement(nil, runesWithoutExceptions, seed)
77
+ end
78
+ function ____exports.isCard(self, card)
79
+ return CARD_SET:has(card)
80
+ end
81
+ function ____exports.isPocketItemObject(self, card)
82
+ return POCKET_ITEM_OBJECT_SET:has(card)
83
+ end
84
+ function ____exports.isRune(self, card)
85
+ return RUNE_SET:has(card)
76
86
  end
77
87
  return ____exports
@@ -1,8 +1,8 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  require("lualib_bundle");
3
3
  local ____exports = {}
4
- local ____constants = require("constants")
5
- local GRID_ENTITY_XML_MAP = ____constants.GRID_ENTITY_XML_MAP
4
+ local ____gridEntityXMLMap = require("maps.gridEntityXMLMap")
5
+ local GRID_ENTITY_XML_MAP = ____gridEntityXMLMap.GRID_ENTITY_XML_MAP
6
6
  local ____rooms = require("functions.rooms")
7
7
  local roomUpdateSafe = ____rooms.roomUpdateSafe
8
8
  function ____exports.removeGridEntity(self, gridEntity, updateRoom)
@@ -1,4 +1,9 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- /** Has an equal chance of returning any value in the `HeartSubType` enum. */
3
- export declare function getRandomHeartSubType(seed?: number): HeartSubType;
2
+ /**
3
+ * Has as an equal chance of returning any value in the `HeartSubType` enum. Useful for spawning a random type of heart.
4
+ *
5
+ * @param seed Optional. The seed with which to select the random sub-type. `Random()` by default.
6
+ * @param exceptions Optional. An array of sub-types to not select.
7
+ */
8
+ export declare function getRandomHeartSubType(seed?: number, exceptions?: HeartSubType[]): HeartSubType;
4
9
  export declare function isChest(pickup: EntityPickup): boolean;
@@ -5,12 +5,15 @@ local ____array = require("functions.array")
5
5
  local getRandomArrayElement = ____array.getRandomArrayElement
6
6
  local ____util = require("functions.util")
7
7
  local getEnumValues = ____util.getEnumValues
8
- function ____exports.getRandomHeartSubType(self, seed)
8
+ function ____exports.getRandomHeartSubType(self, seed, exceptions)
9
9
  if seed == nil then
10
10
  seed = Random()
11
11
  end
12
+ if exceptions == nil then
13
+ exceptions = {}
14
+ end
12
15
  local heartSubTypes = getEnumValues(nil, HeartSubType)
13
- return getRandomArrayElement(nil, heartSubTypes, seed)
16
+ return getRandomArrayElement(nil, heartSubTypes, seed, exceptions)
14
17
  end
15
18
  local CHEST_PICKUP_VARIANTS = __TS__New(Set, {PickupVariant.PICKUP_CHEST, PickupVariant.PICKUP_BOMBCHEST, PickupVariant.PICKUP_SPIKEDCHEST, PickupVariant.PICKUP_ETERNALCHEST, PickupVariant.PICKUP_MIMICCHEST, PickupVariant.PICKUP_OLDCHEST, PickupVariant.PICKUP_WOODENCHEST, PickupVariant.PICKUP_MEGACHEST, PickupVariant.PICKUP_HAUNTEDCHEST, PickupVariant.PICKUP_LOCKEDCHEST, PickupVariant.PICKUP_REDCHEST, PickupVariant.PICKUP_MOMSCHEST})
16
19
  function ____exports.isChest(self, pickup)
@@ -6,7 +6,8 @@ local DEFAULT_ITEM_POOL_TYPE = ____constants.DEFAULT_ITEM_POOL_TYPE
6
6
  local GENESIS_ROOM_SUBTYPE = ____constants.GENESIS_ROOM_SUBTYPE
7
7
  local GENESIS_ROOM_VARIANT = ____constants.GENESIS_ROOM_VARIANT
8
8
  local MAX_ROOM_INDEX = ____constants.MAX_ROOM_INDEX
9
- local ROOM_TYPE_TO_ITEM_POOL_TYPE_MAP = ____constants.ROOM_TYPE_TO_ITEM_POOL_TYPE_MAP
9
+ local ____roomTypeToItemPoolMap = require("maps.roomTypeToItemPoolMap")
10
+ local ROOM_TYPE_TO_ITEM_POOL_TYPE_MAP = ____roomTypeToItemPoolMap.ROOM_TYPE_TO_ITEM_POOL_TYPE_MAP
10
11
  local ____doors = require("functions.doors")
11
12
  local closeAllDoors = ____doors.closeAllDoors
12
13
  local getDoors = ____doors.getDoors
package/dist/index.d.ts CHANGED
@@ -50,9 +50,12 @@ export * from "./functions/util";
50
50
  export * from "./functions/vector";
51
51
  export * from "./maps/cardNameMap";
52
52
  export * from "./maps/collectibleNameMap";
53
+ export * from "./maps/gridEntityXMLMap";
53
54
  export * from "./maps/pillEffectNameMap";
55
+ export * from "./maps/roomTypeToItemPoolMap";
54
56
  export * from "./maps/transformationMap";
55
57
  export * from "./maps/trinketNameMap";
58
+ export * from "./sets/cards";
56
59
  export * from "./types/CallbackParametersCustom";
57
60
  export * from "./types/HealthType";
58
61
  export * from "./types/JSONDoor";
package/dist/index.lua CHANGED
@@ -406,6 +406,14 @@ do
406
406
  end
407
407
  end
408
408
  end
409
+ do
410
+ local ____export = require("maps.gridEntityXMLMap")
411
+ for ____exportKey, ____exportValue in pairs(____export) do
412
+ if ____exportKey ~= "default" then
413
+ ____exports[____exportKey] = ____exportValue
414
+ end
415
+ end
416
+ end
409
417
  do
410
418
  local ____export = require("maps.pillEffectNameMap")
411
419
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -414,6 +422,14 @@ do
414
422
  end
415
423
  end
416
424
  end
425
+ do
426
+ local ____export = require("maps.roomTypeToItemPoolMap")
427
+ for ____exportKey, ____exportValue in pairs(____export) do
428
+ if ____exportKey ~= "default" then
429
+ ____exports[____exportKey] = ____exportValue
430
+ end
431
+ end
432
+ end
417
433
  do
418
434
  local ____export = require("maps.transformationMap")
419
435
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -430,6 +446,14 @@ do
430
446
  end
431
447
  end
432
448
  end
449
+ do
450
+ local ____export = require("sets.cards")
451
+ for ____exportKey, ____exportValue in pairs(____export) do
452
+ if ____exportKey ~= "default" then
453
+ ____exports[____exportKey] = ____exportValue
454
+ end
455
+ end
456
+ end
433
457
  do
434
458
  local ____export = require("types.HealthType")
435
459
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -0,0 +1,6 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ /**
3
+ * This maps the GridEntityXMLType (i.e. the type contained in the room XML/STB file) to the
4
+ * GridEntityType and the variant used by the game.
5
+ */
6
+ export declare const GRID_ENTITY_XML_MAP: Map<GridEntityXMLType, [GridEntityType, number]>;
@@ -0,0 +1,5 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ require("lualib_bundle");
3
+ local ____exports = {}
4
+ ____exports.GRID_ENTITY_XML_MAP = __TS__New(Map, {{1000, {GridEntityType.GRID_ROCK, 0}}, {1001, {GridEntityType.GRID_ROCK_BOMB, 0}}, {1002, {GridEntityType.GRID_ROCK_ALT, 0}}, {1003, {GridEntityType.GRID_ROCKT, 0}}, {1008, {GridEntityType.GRID_ROCK_ALT2, 0}}, {1009, {GridEntityType.GRID_ROCK_ALT2, 1}}, {1010, {GridEntityType.GRID_ROCK_SPIKED, 0}}, {1011, {GridEntityType.GRID_ROCK_GOLD, 0}}, {1300, {GridEntityType.GRID_TNT, 0}}, {1490, {GridEntityType.GRID_POOP, 1}}, {1494, {GridEntityType.GRID_POOP, 4}}, {1495, {GridEntityType.GRID_POOP, 2}}, {1496, {GridEntityType.GRID_POOP, 3}}, {1497, {GridEntityType.GRID_POOP, 5}}, {1498, {GridEntityType.GRID_POOP, 6}}, {1500, {GridEntityType.GRID_POOP, 0}}, {1501, {GridEntityType.GRID_POOP, 11}}, {1900, {GridEntityType.GRID_ROCKB, 0}}, {1901, {GridEntityType.GRID_PILLAR, 0}}, {1930, {GridEntityType.GRID_SPIKES, 0}}, {1931, {GridEntityType.GRID_SPIKES_ONOFF, 0}}, {1940, {GridEntityType.GRID_SPIDERWEB, 0}}, {1999, {GridEntityType.GRID_WALL, 0}}, {3000, {GridEntityType.GRID_PIT, 0}}, {3001, {GridEntityType.GRID_PIT, 16}}, {3009, {GridEntityType.GRID_PIT, 0}}, {4000, {GridEntityType.GRID_LOCK, 0}}, {4500, {GridEntityType.GRID_PRESSURE_PLATE, 0}}, {5000, {GridEntityType.GRID_STATUE, 0}}, {5001, {GridEntityType.GRID_STATUE, 1}}, {6100, {GridEntityType.GRID_TELEPORTER, 0}}, {9000, {GridEntityType.GRID_TRAPDOOR, 0}}, {9100, {GridEntityType.GRID_STAIRS, 0}}, {10000, {GridEntityType.GRID_GRAVITY, 0}}})
5
+ return ____exports
@@ -0,0 +1,2 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare const ROOM_TYPE_TO_ITEM_POOL_TYPE_MAP: Map<RoomType, ItemPoolType>;
@@ -0,0 +1,5 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ require("lualib_bundle");
3
+ local ____exports = {}
4
+ ____exports.ROOM_TYPE_TO_ITEM_POOL_TYPE_MAP = __TS__New(Map, {{RoomType.ROOM_SHOP, ItemPoolType.POOL_SHOP}, {RoomType.ROOM_TREASURE, ItemPoolType.POOL_TREASURE}, {RoomType.ROOM_BOSS, ItemPoolType.POOL_BOSS}, {RoomType.ROOM_SECRET, ItemPoolType.POOL_SECRET}, {RoomType.ROOM_CURSE, ItemPoolType.POOL_CURSE}, {RoomType.ROOM_CHALLENGE, ItemPoolType.POOL_BOSS}, {RoomType.ROOM_LIBRARY, ItemPoolType.POOL_LIBRARY}, {RoomType.ROOM_DEVIL, ItemPoolType.POOL_DEVIL}, {RoomType.ROOM_ANGEL, ItemPoolType.POOL_ANGEL}, {RoomType.ROOM_CHEST, ItemPoolType.POOL_GOLDEN_CHEST}, {RoomType.ROOM_BLACK_MARKET, ItemPoolType.POOL_SHOP}, {RoomType.ROOM_PLANETARIUM, ItemPoolType.POOL_PLANETARIUM}, {RoomType.ROOM_ULTRASECRET, ItemPoolType.POOL_ULTRA_SECRET}})
5
+ return ____exports
@@ -0,0 +1,25 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ /**
3
+ * Contains all of the entries in the `Card` enum that are not a rune and not an object (e.g. Fool,
4
+ * Reverse Fool, Wild Card, etc.).
5
+ */
6
+ export declare const CARDS: Card[];
7
+ /**
8
+ * Contains all of the entries in the `Card` enum that are not a rune and not an object (e.g. Fool,
9
+ * Reverse Fool, Wild Card, etc.).
10
+ */
11
+ export declare const CARD_SET: Set<Card>;
12
+ /**
13
+ * Contains all of the entries in the `Card` enum that are a rune (e.g. Rune of Hagalaz, Blank Rune,
14
+ * Black Rune, Rune Shard, Soul of Isaac, etc.).
15
+ */
16
+ export declare const RUNES: Card[];
17
+ /**
18
+ * Contains all of the entries in the `Card` enum that are a rune (e.g. Rune of Hagalaz, Blank Rune,
19
+ * Black Rune, Rune Shard, Soul of Isaac, etc.).
20
+ */
21
+ export declare const RUNE_SET: Set<Card>;
22
+ /** Contains all of the entries in the `Card` enum that are objects (like Dice Shard). */
23
+ export declare const POCKET_ITEM_OBJECTS: Card[];
24
+ /** Contains all of the entries in the `Card` enum that are objects (like Dice Shard). */
25
+ export declare const POCKET_ITEM_OBJECT_SET: Set<Card>;
@@ -0,0 +1,10 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ require("lualib_bundle");
3
+ local ____exports = {}
4
+ ____exports.CARDS = {Card.CARD_FOOL, Card.CARD_MAGICIAN, Card.CARD_HIGH_PRIESTESS, Card.CARD_EMPRESS, Card.CARD_EMPEROR, Card.CARD_HIEROPHANT, Card.CARD_LOVERS, Card.CARD_CHARIOT, Card.CARD_JUSTICE, Card.CARD_HERMIT, Card.CARD_WHEEL_OF_FORTUNE, Card.CARD_STRENGTH, Card.CARD_HANGED_MAN, Card.CARD_DEATH, Card.CARD_TEMPERANCE, Card.CARD_DEVIL, Card.CARD_TOWER, Card.CARD_STARS, Card.CARD_MOON, Card.CARD_SUN, Card.CARD_JUDGEMENT, Card.CARD_WORLD, Card.CARD_CLUBS_2, Card.CARD_DIAMONDS_2, Card.CARD_SPADES_2, Card.CARD_HEARTS_2, Card.CARD_ACE_OF_CLUBS, Card.CARD_ACE_OF_DIAMONDS, Card.CARD_ACE_OF_SPADES, Card.CARD_ACE_OF_HEARTS, Card.CARD_JOKER, Card.CARD_CHAOS, Card.CARD_CREDIT, Card.CARD_RULES, Card.CARD_HUMANITY, Card.CARD_SUICIDE_KING, Card.CARD_GET_OUT_OF_JAIL, Card.CARD_QUESTIONMARK, Card.CARD_HOLY, Card.CARD_HUGE_GROWTH, Card.CARD_ANCIENT_RECALL, Card.CARD_ERA_WALK, Card.CARD_REVERSE_FOOL, Card.CARD_REVERSE_MAGICIAN, Card.CARD_REVERSE_HIGH_PRIESTESS, Card.CARD_REVERSE_EMPRESS, Card.CARD_REVERSE_EMPEROR, Card.CARD_REVERSE_HIEROPHANT, Card.CARD_REVERSE_LOVERS, Card.CARD_REVERSE_CHARIOT, Card.CARD_REVERSE_JUSTICE, Card.CARD_REVERSE_HERMIT, Card.CARD_REVERSE_WHEEL_OF_FORTUNE, Card.CARD_REVERSE_STRENGTH, Card.CARD_REVERSE_HANGED_MAN, Card.CARD_REVERSE_DEATH, Card.CARD_REVERSE_TEMPERANCE, Card.CARD_REVERSE_DEVIL, Card.CARD_REVERSE_TOWER, Card.CARD_REVERSE_STARS, Card.CARD_REVERSE_MOON, Card.CARD_REVERSE_SUN, Card.CARD_REVERSE_JUDGEMENT, Card.CARD_REVERSE_WORLD, Card.CARD_QUEEN_OF_HEARTS, Card.CARD_WILD}
5
+ ____exports.CARD_SET = __TS__New(Set, ____exports.CARDS)
6
+ ____exports.RUNES = {Card.RUNE_HAGALAZ, Card.RUNE_JERA, Card.RUNE_EHWAZ, Card.RUNE_DAGAZ, Card.RUNE_ANSUZ, Card.RUNE_PERTHRO, Card.RUNE_BERKANO, Card.RUNE_ALGIZ, Card.RUNE_BLANK, Card.RUNE_BLACK, Card.RUNE_SHARD, Card.CARD_SOUL_ISAAC, Card.CARD_SOUL_MAGDALENE, Card.CARD_SOUL_CAIN, Card.CARD_SOUL_JUDAS, Card.CARD_SOUL_BLUEBABY, Card.CARD_SOUL_EVE, Card.CARD_SOUL_SAMSON, Card.CARD_SOUL_AZAZEL, Card.CARD_SOUL_LAZARUS, Card.CARD_SOUL_EDEN, Card.CARD_SOUL_LOST, Card.CARD_SOUL_LILITH, Card.CARD_SOUL_KEEPER, Card.CARD_SOUL_APOLLYON, Card.CARD_SOUL_FORGOTTEN, Card.CARD_SOUL_BETHANY, Card.CARD_SOUL_JACOB}
7
+ ____exports.RUNE_SET = __TS__New(Set, ____exports.RUNES)
8
+ ____exports.POCKET_ITEM_OBJECTS = {Card.CARD_DICE_SHARD, Card.CARD_EMERGENCY_CONTACT, Card.CARD_CRACKED_KEY}
9
+ ____exports.POCKET_ITEM_OBJECT_SET = __TS__New(Set, ____exports.POCKET_ITEM_OBJECTS)
10
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.487",
3
+ "version": "1.0.488",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",