isaacscript-common 45.0.0 → 47.0.0

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 (64) hide show
  1. package/dist/index.rollup.d.ts +69 -17
  2. package/dist/isaacscript-common.lua +174 -21
  3. package/dist/src/classes/features/other/ModdedElementSets.d.ts +2 -1
  4. package/dist/src/classes/features/other/ModdedElementSets.d.ts.map +1 -1
  5. package/dist/src/classes/features/other/ModdedElementSets.lua +2 -2
  6. package/dist/src/functions/cards.d.ts +1 -1
  7. package/dist/src/functions/cards.lua +1 -1
  8. package/dist/src/functions/collectibles.d.ts +1 -1
  9. package/dist/src/functions/collectibles.d.ts.map +1 -1
  10. package/dist/src/functions/collectibles.lua +1 -1
  11. package/dist/src/functions/deepCopy.lua +1 -2
  12. package/dist/src/functions/pickups.d.ts +45 -1
  13. package/dist/src/functions/pickups.d.ts.map +1 -1
  14. package/dist/src/functions/pickups.lua +65 -0
  15. package/dist/src/functions/pills.d.ts +1 -1
  16. package/dist/src/functions/pills.lua +1 -1
  17. package/dist/src/functions/stage.d.ts +12 -12
  18. package/dist/src/functions/stage.d.ts.map +1 -1
  19. package/dist/src/functions/stage.lua +21 -21
  20. package/dist/src/objects/batteryNames.d.ts +10 -0
  21. package/dist/src/objects/batteryNames.d.ts.map +1 -0
  22. package/dist/src/objects/batteryNames.lua +13 -0
  23. package/dist/src/objects/bombNames.d.ts +13 -0
  24. package/dist/src/objects/bombNames.d.ts.map +1 -0
  25. package/dist/src/objects/bombNames.lua +16 -0
  26. package/dist/src/objects/chestNames.d.ts +16 -0
  27. package/dist/src/objects/chestNames.d.ts.map +1 -0
  28. package/dist/src/objects/chestNames.lua +19 -0
  29. package/dist/src/objects/coinNames.d.ts +13 -0
  30. package/dist/src/objects/coinNames.d.ts.map +1 -0
  31. package/dist/src/objects/coinNames.lua +16 -0
  32. package/dist/src/objects/heartNames.d.ts +18 -0
  33. package/dist/src/objects/heartNames.d.ts.map +1 -0
  34. package/dist/src/objects/heartNames.lua +21 -0
  35. package/dist/src/objects/keyNames.d.ts +10 -0
  36. package/dist/src/objects/keyNames.d.ts.map +1 -0
  37. package/dist/src/objects/keyNames.lua +13 -0
  38. package/dist/src/objects/{englishLevelNames.d.ts → levelNames.d.ts} +2 -2
  39. package/dist/src/objects/levelNames.d.ts.map +1 -0
  40. package/dist/src/objects/{englishLevelNames.lua → levelNames.lua} +1 -1
  41. package/dist/src/objects/sackNames.d.ts +8 -0
  42. package/dist/src/objects/sackNames.d.ts.map +1 -0
  43. package/dist/src/objects/sackNames.lua +7 -0
  44. package/package.json +1 -1
  45. package/src/classes/features/other/ModdedElementSets.ts +4 -3
  46. package/src/functions/cards.ts +1 -1
  47. package/src/functions/collectibles.ts +1 -1
  48. package/src/functions/deepCopy.ts +1 -2
  49. package/src/functions/pickups.ts +89 -0
  50. package/src/functions/pills.ts +3 -1
  51. package/src/functions/stage.ts +26 -26
  52. package/src/objects/batteryNames.ts +12 -0
  53. package/src/objects/bombNames.ts +16 -0
  54. package/src/objects/cardNames.ts +98 -98
  55. package/src/objects/chestNames.ts +18 -0
  56. package/src/objects/coinNames.ts +15 -0
  57. package/src/objects/heartNames.ts +20 -0
  58. package/src/objects/keyNames.ts +12 -0
  59. package/src/objects/languageNames.ts +7 -7
  60. package/src/objects/{englishLevelNames.ts → levelNames.ts} +26 -1
  61. package/src/objects/pillEffectNames.ts +50 -50
  62. package/src/objects/pillEffectTypes.ts +50 -50
  63. package/src/objects/sackNames.ts +10 -0
  64. package/dist/src/objects/englishLevelNames.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"pickups.d.ts","sourceRoot":"","sources":["../../../src/functions/pickups.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,aAAa,EACd,MAAM,8BAA8B,CAAC;AAWtC;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,GAAG,CAK1D;AAED,+EA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I,iBAAiB,EAAE,CAGlD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAI5D;AAED,gGAAgG;AAChG,wBAAgB,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAErD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAEpE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAExD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAErE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,iBAAiB,EAAE,CAGjE"}
@@ -3,9 +3,29 @@ local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
3
3
  local ____exports = {}
4
4
  local ____constants = require("src.core.constants")
5
5
  local CHEST_PICKUP_VARIANTS_SET = ____constants.CHEST_PICKUP_VARIANTS_SET
6
+ local ____batteryNames = require("src.objects.batteryNames")
7
+ local BATTERY_NAMES = ____batteryNames.BATTERY_NAMES
8
+ local DEFAULT_BATTERY_NAME = ____batteryNames.DEFAULT_BATTERY_NAME
9
+ local ____bombNames = require("src.objects.bombNames")
10
+ local BOMB_NAMES = ____bombNames.BOMB_NAMES
11
+ local DEFAULT_BOMB_NAME = ____bombNames.DEFAULT_BOMB_NAME
12
+ local ____chestNames = require("src.objects.chestNames")
13
+ local CHEST_NAMES = ____chestNames.CHEST_NAMES
14
+ local ____coinNames = require("src.objects.coinNames")
15
+ local COIN_NAMES = ____coinNames.COIN_NAMES
16
+ local DEFAULT_COIN_NAME = ____coinNames.DEFAULT_COIN_NAME
6
17
  local ____coinSubTypeToValue = require("src.objects.coinSubTypeToValue")
7
18
  local COIN_SUB_TYPE_TO_VALUE = ____coinSubTypeToValue.COIN_SUB_TYPE_TO_VALUE
8
19
  local DEFAULT_COIN_VALUE = ____coinSubTypeToValue.DEFAULT_COIN_VALUE
20
+ local ____heartNames = require("src.objects.heartNames")
21
+ local DEFAULT_HEART_NAME = ____heartNames.DEFAULT_HEART_NAME
22
+ local HEART_NAMES = ____heartNames.HEART_NAMES
23
+ local ____keyNames = require("src.objects.keyNames")
24
+ local DEFAULT_KEY_NAME = ____keyNames.DEFAULT_KEY_NAME
25
+ local KEY_NAMES = ____keyNames.KEY_NAMES
26
+ local ____sackNames = require("src.objects.sackNames")
27
+ local DEFAULT_SACK_NAME = ____sackNames.DEFAULT_SACK_NAME
28
+ local SACK_NAMES = ____sackNames.SACK_NAMES
9
29
  local ____redHeartSubTypesSet = require("src.sets.redHeartSubTypesSet")
10
30
  local RED_HEART_SUB_TYPES_SET = ____redHeartSubTypesSet.RED_HEART_SUB_TYPES_SET
11
31
  local ____entities = require("src.functions.entities")
@@ -18,12 +38,51 @@ local getHearts = ____pickupsSpecific.getHearts
18
38
  function ____exports.isChestVariant(self, pickupVariant)
19
39
  return CHEST_PICKUP_VARIANTS_SET:has(pickupVariant)
20
40
  end
41
+ --- Helper function to get a battery name from a `BatterySubType`, as listed in the "entities2.xml"
42
+ -- file.
43
+ --
44
+ -- For example, `getBatteryName(BatterySubType.MICRO)` would return "Micro Battery".
45
+ function ____exports.getBatteryName(self, batterySubType)
46
+ return BATTERY_NAMES[batterySubType] or DEFAULT_BATTERY_NAME
47
+ end
48
+ --- Helper function to get a bomb name from a `BombSubType`, as listed in the "entities2.xml" file.
49
+ --
50
+ -- For example, `getBombName(BombSubType.DOUBLE_PACK)` would return "Double Bomb".
51
+ function ____exports.getBombName(self, bombSubType)
52
+ return BOMB_NAMES[bombSubType] or DEFAULT_BOMB_NAME
53
+ end
54
+ --- Helper function to get a chest name from a `PickupVariant`, as listed in the "entities2.xml"
55
+ -- file. Returns "Unknown" if the pickup variant was not a chest.
56
+ --
57
+ -- For example, `getChestName(PickupVariant.SPIKED_CHEST)` would return "Spiked Chest".
58
+ function ____exports.getChestName(self, pickupVariant)
59
+ local chestNames = CHEST_NAMES
60
+ return chestNames[pickupVariant] or "Unknown"
61
+ end
62
+ --- Helper function to get a coin name from a `CoinSubType`, as listed in the "entities2.xml" file.
63
+ --
64
+ -- For example, `getCoinName(CoinSubType.DOUBLE_PACK)` would return "Double Penny".
65
+ function ____exports.getCoinName(self, coinSubType)
66
+ return COIN_NAMES[coinSubType] or DEFAULT_COIN_NAME
67
+ end
21
68
  --- Helper function to get the corresponding coin amount from a `CoinSubType`. Returns 1 for modded
22
69
  -- sub-types.
23
70
  function ____exports.getCoinValue(self, coinSubType)
24
71
  local value = COIN_SUB_TYPE_TO_VALUE[coinSubType]
25
72
  return value or DEFAULT_COIN_VALUE
26
73
  end
74
+ --- Helper function to get a heart name from a `HeartSubType`, as listed in the "entities2.xml" file.
75
+ --
76
+ -- For example, `getHeartName(HeartSubType.ETERNAL)` would return "Heart (eternal)".
77
+ function ____exports.getHeartName(self, heartSubType)
78
+ return HEART_NAMES[heartSubType] or DEFAULT_HEART_NAME
79
+ end
80
+ --- Helper function to get a key name from a `KeySubType`, as listed in the "entities2.xml" file.
81
+ --
82
+ -- For example, `getKeyName(KeySubType.DOUBLE_PACK)` would return "Key Ring".
83
+ function ____exports.getKeyName(self, keySubType)
84
+ return KEY_NAMES[keySubType] or DEFAULT_KEY_NAME
85
+ end
27
86
  --- Helper function to get all of the red heart pickup entities in the room.
28
87
  function ____exports.getRedHearts(self)
29
88
  local hearts = getHearts(nil)
@@ -32,6 +91,12 @@ function ____exports.getRedHearts(self)
32
91
  function(____, heart) return RED_HEART_SUB_TYPES_SET:has(heart.SubType) end
33
92
  )
34
93
  end
94
+ --- Helper function to get a sack name from a `SackSubType`, as listed in the "entities2.xml" file.
95
+ --
96
+ -- For example, `getSackName(SackSubType.NORMAL)` would return "Grab Bag".
97
+ function ____exports.getSackName(self, sackSubType)
98
+ return SACK_NAMES[sackSubType] or DEFAULT_SACK_NAME
99
+ end
35
100
  --- Helper function to test if the provided pickup matches one of the various chest variants.
36
101
  function ____exports.isChest(self, pickup)
37
102
  return ____exports.isChestVariant(nil, pickup.Variant)
@@ -60,7 +60,7 @@ export declare function getPillColorFromEffect(pillEffect: PillEffect): PillColo
60
60
  */
61
61
  export declare function getPillEffectClass(pillEffect: PillEffect): ItemConfigPillEffectClass;
62
62
  /**
63
- * Helper function to get a pill effect name from a PillEffect enum value.
63
+ * Helper function to get a pill effect name from a `PillEffect`.
64
64
  *
65
65
  * For example, `getPillEffectName(PillEffect.BAD_GAS)` would return "Bad Gas".
66
66
  */
@@ -119,7 +119,7 @@ function ____exports.getPillEffectClass(self, pillEffect)
119
119
  local pillEffectClass = PILL_EFFECT_CLASSES[pillEffect]
120
120
  return pillEffectClass or DEFAULT_PILL_EFFECT_CLASS
121
121
  end
122
- --- Helper function to get a pill effect name from a PillEffect enum value.
122
+ --- Helper function to get a pill effect name from a `PillEffect`.
123
123
  --
124
124
  -- For example, `getPillEffectName(PillEffect.BAD_GAS)` would return "Bad Gas".
125
125
  function ____exports.getPillEffectName(self, pillEffect)
@@ -16,18 +16,6 @@ export declare function calculateStageTypeRepentance(stage: LevelStage): StageTy
16
16
  * consider Downpour 2 to have a stage of 3.
17
17
  */
18
18
  export declare function getEffectiveStage(): LevelStage;
19
- /**
20
- * Helper function to get the English name of the level. For example, "Caves 1".
21
- *
22
- * This is useful because the `Level.GetName` method returns a localized version of the level name,
23
- * which will not display correctly on some fonts.
24
- *
25
- * Note that this returns "Blue Womb" instead of "???" for stage 9.
26
- *
27
- * @param stage Optional. If not specified, the current stage will be used.
28
- * @param stageType Optional. If not specified, the current stage type will be used.
29
- */
30
- export declare function getEnglishLevelName(stage?: LevelStage, stageType?: StageType): string;
31
19
  /**
32
20
  * Helper function to get the corresponding "goto" console command that would correspond to the
33
21
  * provided room type and room variant.
@@ -39,6 +27,18 @@ export declare function getEnglishLevelName(stage?: LevelStage, stageType?: Stag
39
27
  * `RoomType.DEFAULT` (1). False by default.
40
28
  */
41
29
  export declare function getGotoCommand(roomType: RoomType, roomVariant: int, useSpecialRoomsForRoomTypeDefault?: boolean): string;
30
+ /**
31
+ * Helper function to get the English name of the level. For example, "Caves 1".
32
+ *
33
+ * This is useful because the `Level.GetName` method returns a localized version of the level name,
34
+ * which will not display correctly on some fonts.
35
+ *
36
+ * Note that this returns "Blue Womb" instead of "???" for stage 9.
37
+ *
38
+ * @param stage Optional. If not specified, the current stage will be used.
39
+ * @param stageType Optional. If not specified, the current stage type will be used.
40
+ */
41
+ export declare function getLevelName(stage?: LevelStage, stageType?: StageType): string;
42
42
  /** Alias for the `Level.GetStage` method. */
43
43
  export declare function getStage(): LevelStage;
44
44
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,SAAS,EACV,MAAM,8BAA8B,CAAC;AAUtC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CA6B/D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAmBzE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAS9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,CAAC,EAAE,UAAU,EAClB,SAAS,CAAC,EAAE,SAAS,GACpB,MAAM,CAaR;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,GAAG,EAChB,iCAAiC,UAAQ,GACxC,MAAM,CAOR;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,UAAU,CAIrC;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,SAAS,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GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,UAAU,EAAE,SAAS,EAAE,GAAG,OAAO,CAI/D;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAGrD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gCAAgC,IAAI,OAAO,CAK1D;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,OAAO,CAKzD;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,IAAI,OAAO,CAM1D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,OAAO,CAMtD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAMpD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAK9C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,EACpB,MAAM,UAAQ,GACb,IAAI,CAUN;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE9D"}
@@ -8,8 +8,8 @@ local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
8
8
  local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
9
9
  local ____cachedClasses = require("src.core.cachedClasses")
10
10
  local game = ____cachedClasses.game
11
- local ____englishLevelNames = require("src.objects.englishLevelNames")
12
- local ENGLISH_LEVEL_NAMES = ____englishLevelNames.ENGLISH_LEVEL_NAMES
11
+ local ____levelNames = require("src.objects.levelNames")
12
+ local LEVEL_NAMES = ____levelNames.LEVEL_NAMES
13
13
  local ____roomTypeSpecialGotoPrefixes = require("src.objects.roomTypeSpecialGotoPrefixes")
14
14
  local ROOM_TYPE_SPECIAL_GOTO_PREFIXES = ____roomTypeSpecialGotoPrefixes.ROOM_TYPE_SPECIAL_GOTO_PREFIXES
15
15
  local ____stageToStageID = require("src.objects.stageToStageID")
@@ -91,6 +91,23 @@ function ____exports.getEffectiveStage(self)
91
91
  end
92
92
  return stage
93
93
  end
94
+ --- Helper function to get the corresponding "goto" console command that would correspond to the
95
+ -- provided room type and room variant.
96
+ --
97
+ -- @param roomType The `RoomType` of the destination room.
98
+ -- @param roomVariant The variant of the destination room.
99
+ -- @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
100
+ -- the `goto` command (instead of `d`) if the room type is
101
+ -- `RoomType.DEFAULT` (1). False by default.
102
+ function ____exports.getGotoCommand(self, roomType, roomVariant, useSpecialRoomsForRoomTypeDefault)
103
+ if useSpecialRoomsForRoomTypeDefault == nil then
104
+ useSpecialRoomsForRoomTypeDefault = false
105
+ end
106
+ local isNormalRoom = roomType == RoomType.DEFAULT and not useSpecialRoomsForRoomTypeDefault
107
+ local roomTypeSpecialGotoPrefix = ROOM_TYPE_SPECIAL_GOTO_PREFIXES[roomType]
108
+ local prefix = isNormalRoom and "d" or "s." .. roomTypeSpecialGotoPrefix
109
+ return (("goto " .. prefix) .. ".") .. tostring(roomVariant)
110
+ end
94
111
  --- Helper function to get the English name of the level. For example, "Caves 1".
95
112
  --
96
113
  -- This is useful because the `Level.GetName` method returns a localized version of the level name,
@@ -100,7 +117,7 @@ end
100
117
  --
101
118
  -- @param stage Optional. If not specified, the current stage will be used.
102
119
  -- @param stageType Optional. If not specified, the current stage type will be used.
103
- function ____exports.getEnglishLevelName(self, stage, stageType)
120
+ function ____exports.getLevelName(self, stage, stageType)
104
121
  local level = game:GetLevel()
105
122
  if stage == nil then
106
123
  stage = level:GetStage()
@@ -108,26 +125,9 @@ function ____exports.getEnglishLevelName(self, stage, stageType)
108
125
  if stageType == nil then
109
126
  stageType = level:GetStageType()
110
127
  end
111
- local stageNames = ENGLISH_LEVEL_NAMES[stage]
128
+ local stageNames = LEVEL_NAMES[stage]
112
129
  return stageNames[stageType]
113
130
  end
114
- --- Helper function to get the corresponding "goto" console command that would correspond to the
115
- -- provided room type and room variant.
116
- --
117
- -- @param roomType The `RoomType` of the destination room.
118
- -- @param roomVariant The variant of the destination room.
119
- -- @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
120
- -- the `goto` command (instead of `d`) if the room type is
121
- -- `RoomType.DEFAULT` (1). False by default.
122
- function ____exports.getGotoCommand(self, roomType, roomVariant, useSpecialRoomsForRoomTypeDefault)
123
- if useSpecialRoomsForRoomTypeDefault == nil then
124
- useSpecialRoomsForRoomTypeDefault = false
125
- end
126
- local isNormalRoom = roomType == RoomType.DEFAULT and not useSpecialRoomsForRoomTypeDefault
127
- local roomTypeSpecialGotoPrefix = ROOM_TYPE_SPECIAL_GOTO_PREFIXES[roomType]
128
- local prefix = isNormalRoom and "d" or "s." .. roomTypeSpecialGotoPrefix
129
- return (("goto " .. prefix) .. ".") .. tostring(roomVariant)
130
- end
131
131
  --- Alias for the `Level.GetStage` method.
132
132
  function ____exports.getStage(self)
133
133
  local level = game:GetLevel()
@@ -0,0 +1,10 @@
1
+ export declare const DEFAULT_BATTERY_NAME = "Unknown";
2
+ /** Taken from "entities2.xml". */
3
+ export declare const BATTERY_NAMES: {
4
+ readonly 0: "Unknown";
5
+ readonly 1: "Lil' Battery";
6
+ readonly 2: "Micro Battery";
7
+ readonly 3: "Mega Battery";
8
+ readonly 4: "Golden Battery";
9
+ };
10
+ //# sourceMappingURL=batteryNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batteryNames.d.ts","sourceRoot":"","sources":["../../../src/objects/batteryNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C,kCAAkC;AAClC,eAAO,MAAM,aAAa;;;;;;CAMyB,CAAC"}
@@ -0,0 +1,13 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local BatterySubType = ____isaac_2Dtypescript_2Ddefinitions.BatterySubType
4
+ ____exports.DEFAULT_BATTERY_NAME = "Unknown"
5
+ --- Taken from "entities2.xml".
6
+ ____exports.BATTERY_NAMES = {
7
+ [BatterySubType.NULL] = ____exports.DEFAULT_BATTERY_NAME,
8
+ [BatterySubType.NORMAL] = "Lil' Battery",
9
+ [BatterySubType.MICRO] = "Micro Battery",
10
+ [BatterySubType.MEGA] = "Mega Battery",
11
+ [BatterySubType.GOLDEN] = "Golden Battery"
12
+ }
13
+ return ____exports
@@ -0,0 +1,13 @@
1
+ export declare const DEFAULT_BOMB_NAME = "Unknown";
2
+ /** Taken from "entities2.xml". */
3
+ export declare const BOMB_NAMES: {
4
+ readonly 0: "Unknown";
5
+ readonly 1: "Bomb";
6
+ readonly 2: "Double Bomb";
7
+ readonly 3: "Troll Bomb";
8
+ readonly 4: "Golden Bomb";
9
+ readonly 5: "Megatroll Bomb";
10
+ readonly 6: "Golden Troll Bomb";
11
+ readonly 7: "Giga Bomb";
12
+ };
13
+ //# sourceMappingURL=bombNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bombNames.d.ts","sourceRoot":"","sources":["../../../src/objects/bombNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,kCAAkC;AAClC,eAAO,MAAM,UAAU;;;;;;;;;CAUyB,CAAC"}
@@ -0,0 +1,16 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local BombSubType = ____isaac_2Dtypescript_2Ddefinitions.BombSubType
4
+ ____exports.DEFAULT_BOMB_NAME = "Unknown"
5
+ --- Taken from "entities2.xml".
6
+ ____exports.BOMB_NAMES = {
7
+ [BombSubType.NULL] = ____exports.DEFAULT_BOMB_NAME,
8
+ [BombSubType.NORMAL] = "Bomb",
9
+ [BombSubType.DOUBLE_PACK] = "Double Bomb",
10
+ [BombSubType.TROLL] = "Troll Bomb",
11
+ [BombSubType.GOLDEN] = "Golden Bomb",
12
+ [BombSubType.MEGA_TROLL] = "Megatroll Bomb",
13
+ [BombSubType.GOLDEN_TROLL] = "Golden Troll Bomb",
14
+ [BombSubType.GIGA] = "Giga Bomb"
15
+ }
16
+ return ____exports
@@ -0,0 +1,16 @@
1
+ /** Taken from "entities2.xml". */
2
+ export declare const CHEST_NAMES: {
3
+ readonly 50: "Chest";
4
+ readonly 51: "Bomb Chest";
5
+ readonly 52: "Spiked Chest";
6
+ readonly 53: "Eternal Chest";
7
+ readonly 54: "Mimic Chest";
8
+ readonly 55: "Old Chest";
9
+ readonly 56: "Wooden Chest";
10
+ readonly 57: "Mega Chest";
11
+ readonly 58: "Haunted Chest";
12
+ readonly 60: "Locked Chest";
13
+ readonly 360: "Red Chest";
14
+ readonly 390: "Mom's Chest";
15
+ };
16
+ //# sourceMappingURL=chestNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chestNames.d.ts","sourceRoot":"","sources":["../../../src/objects/chestNames.ts"],"names":[],"mappings":"AAGA,kCAAkC;AAClC,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAamD,CAAC"}
@@ -0,0 +1,19 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
4
+ --- Taken from "entities2.xml".
5
+ ____exports.CHEST_NAMES = {
6
+ [PickupVariant.CHEST] = "Chest",
7
+ [PickupVariant.BOMB_CHEST] = "Bomb Chest",
8
+ [PickupVariant.SPIKED_CHEST] = "Spiked Chest",
9
+ [PickupVariant.ETERNAL_CHEST] = "Eternal Chest",
10
+ [PickupVariant.MIMIC_CHEST] = "Mimic Chest",
11
+ [PickupVariant.OLD_CHEST] = "Old Chest",
12
+ [PickupVariant.WOODEN_CHEST] = "Wooden Chest",
13
+ [PickupVariant.MEGA_CHEST] = "Mega Chest",
14
+ [PickupVariant.HAUNTED_CHEST] = "Haunted Chest",
15
+ [PickupVariant.LOCKED_CHEST] = "Locked Chest",
16
+ [PickupVariant.RED_CHEST] = "Red Chest",
17
+ [PickupVariant.MOMS_CHEST] = "Mom's Chest"
18
+ }
19
+ return ____exports
@@ -0,0 +1,13 @@
1
+ export declare const DEFAULT_COIN_NAME = "Unknown";
2
+ /** Taken from "entities2.xml". */
3
+ export declare const COIN_NAMES: {
4
+ readonly 0: "Unknown";
5
+ readonly 1: "Penny";
6
+ readonly 2: "Nickel";
7
+ readonly 3: "Dime";
8
+ readonly 4: "Double Penny";
9
+ readonly 5: "Lucky Penny";
10
+ readonly 6: "Sticky Nickel";
11
+ readonly 7: "Golden Penny";
12
+ };
13
+ //# sourceMappingURL=coinNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coinNames.d.ts","sourceRoot":"","sources":["../../../src/objects/coinNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,kCAAkC;AAClC,eAAO,MAAM,UAAU;;;;;;;;;CASyB,CAAC"}
@@ -0,0 +1,16 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local CoinSubType = ____isaac_2Dtypescript_2Ddefinitions.CoinSubType
4
+ ____exports.DEFAULT_COIN_NAME = "Unknown"
5
+ --- Taken from "entities2.xml".
6
+ ____exports.COIN_NAMES = {
7
+ [CoinSubType.NULL] = ____exports.DEFAULT_COIN_NAME,
8
+ [CoinSubType.PENNY] = "Penny",
9
+ [CoinSubType.NICKEL] = "Nickel",
10
+ [CoinSubType.DIME] = "Dime",
11
+ [CoinSubType.DOUBLE_PACK] = "Double Penny",
12
+ [CoinSubType.LUCKY_PENNY] = "Lucky Penny",
13
+ [CoinSubType.STICKY_NICKEL] = "Sticky Nickel",
14
+ [CoinSubType.GOLDEN] = "Golden Penny"
15
+ }
16
+ return ____exports
@@ -0,0 +1,18 @@
1
+ export declare const DEFAULT_HEART_NAME = "Unknown";
2
+ /** Taken from "entities2.xml". */
3
+ export declare const HEART_NAMES: {
4
+ readonly 0: "Unknown";
5
+ readonly 1: "Heart";
6
+ readonly 2: "Heart (half)";
7
+ readonly 3: "Heart (soul)";
8
+ readonly 4: "Heart (eternal)";
9
+ readonly 5: "Heart (double)";
10
+ readonly 6: "Black Heart";
11
+ readonly 7: "Gold Heart";
12
+ readonly 8: "Heart (half soul)";
13
+ readonly 9: "Scared Heart";
14
+ readonly 10: "Blended Heart";
15
+ readonly 11: "Bone Heart";
16
+ readonly 12: "Rotten Heart";
17
+ };
18
+ //# sourceMappingURL=heartNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heartNames.d.ts","sourceRoot":"","sources":["../../../src/objects/heartNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,kCAAkC;AAClC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;CAcyB,CAAC"}
@@ -0,0 +1,21 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local HeartSubType = ____isaac_2Dtypescript_2Ddefinitions.HeartSubType
4
+ ____exports.DEFAULT_HEART_NAME = "Unknown"
5
+ --- Taken from "entities2.xml".
6
+ ____exports.HEART_NAMES = {
7
+ [HeartSubType.NULL] = ____exports.DEFAULT_HEART_NAME,
8
+ [HeartSubType.FULL] = "Heart",
9
+ [HeartSubType.HALF] = "Heart (half)",
10
+ [HeartSubType.SOUL] = "Heart (soul)",
11
+ [HeartSubType.ETERNAL] = "Heart (eternal)",
12
+ [HeartSubType.DOUBLE_PACK] = "Heart (double)",
13
+ [HeartSubType.BLACK] = "Black Heart",
14
+ [HeartSubType.GOLDEN] = "Gold Heart",
15
+ [HeartSubType.HALF_SOUL] = "Heart (half soul)",
16
+ [HeartSubType.SCARED] = "Scared Heart",
17
+ [HeartSubType.BLENDED] = "Blended Heart",
18
+ [HeartSubType.BONE] = "Bone Heart",
19
+ [HeartSubType.ROTTEN] = "Rotten Heart"
20
+ }
21
+ return ____exports
@@ -0,0 +1,10 @@
1
+ export declare const DEFAULT_KEY_NAME = "Unknown";
2
+ /** Taken from "entities2.xml". */
3
+ export declare const KEY_NAMES: {
4
+ readonly 0: "Unknown";
5
+ readonly 1: "Key";
6
+ readonly 2: "Golden Key";
7
+ readonly 3: "Key Ring";
8
+ readonly 4: "Charged Key";
9
+ };
10
+ //# sourceMappingURL=keyNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyNames.d.ts","sourceRoot":"","sources":["../../../src/objects/keyNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,kCAAkC;AAClC,eAAO,MAAM,SAAS;;;;;;CAMyB,CAAC"}
@@ -0,0 +1,13 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local KeySubType = ____isaac_2Dtypescript_2Ddefinitions.KeySubType
4
+ ____exports.DEFAULT_KEY_NAME = "Unknown"
5
+ --- Taken from "entities2.xml".
6
+ ____exports.KEY_NAMES = {
7
+ [KeySubType.NULL] = ____exports.DEFAULT_KEY_NAME,
8
+ [KeySubType.NORMAL] = "Key",
9
+ [KeySubType.GOLDEN] = "Golden Key",
10
+ [KeySubType.DOUBLE_PACK] = "Key Ring",
11
+ [KeySubType.CHARGED] = "Charged Key"
12
+ }
13
+ return ____exports
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Note that this contains "Blue Womb" instead of "???" for stage 9.
8
8
  */
9
- export declare const ENGLISH_LEVEL_NAMES: {
9
+ export declare const LEVEL_NAMES: {
10
10
  readonly 1: {
11
11
  readonly 0: "Basement 1";
12
12
  readonly 1: "Cellar 1";
@@ -112,4 +112,4 @@ export declare const ENGLISH_LEVEL_NAMES: {
112
112
  readonly 5: "Home";
113
113
  };
114
114
  };
115
- //# sourceMappingURL=englishLevelNames.d.ts.map
115
+ //# sourceMappingURL=levelNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"levelNames.d.ts","sourceRoot":"","sources":["../../../src/objects/levelNames.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkI0C,CAAC"}
@@ -8,7 +8,7 @@ local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
8
8
  -- which will not display correctly on some fonts.
9
9
  --
10
10
  -- Note that this contains "Blue Womb" instead of "???" for stage 9.
11
- ____exports.ENGLISH_LEVEL_NAMES = {
11
+ ____exports.LEVEL_NAMES = {
12
12
  [LevelStage.BASEMENT_1] = {
13
13
  [StageType.ORIGINAL] = "Basement 1",
14
14
  [StageType.WRATH_OF_THE_LAMB] = "Cellar 1",
@@ -0,0 +1,8 @@
1
+ export declare const DEFAULT_SACK_NAME = "Unknown";
2
+ /** Taken from "entities2.xml". */
3
+ export declare const SACK_NAMES: {
4
+ readonly 0: "Unknown";
5
+ readonly 1: "Grab Bag";
6
+ readonly 2: "Black Sack";
7
+ };
8
+ //# sourceMappingURL=sackNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sackNames.d.ts","sourceRoot":"","sources":["../../../src/objects/sackNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,kCAAkC;AAClC,eAAO,MAAM,UAAU;;;;CAIyB,CAAC"}
@@ -0,0 +1,7 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local SackSubType = ____isaac_2Dtypescript_2Ddefinitions.SackSubType
4
+ ____exports.DEFAULT_SACK_NAME = "Unknown"
5
+ --- Taken from "entities2.xml".
6
+ ____exports.SACK_NAMES = {[SackSubType.NULL] = ____exports.DEFAULT_SACK_NAME, [SackSubType.NORMAL] = "Grab Bag", [SackSubType.BLACK] = "Black Sack"}
7
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "45.0.0",
3
+ "version": "47.0.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -29,7 +29,7 @@ import {
29
29
  collectibleHasCacheFlag,
30
30
  isActiveCollectible,
31
31
  isHiddenCollectible,
32
- isPassiveCollectible,
32
+ isPassiveOrFamiliarCollectible,
33
33
  } from "../../../functions/collectibles";
34
34
  import { getFlagName } from "../../../functions/flag";
35
35
  import { getRandomSeed } from "../../../functions/rng";
@@ -413,7 +413,7 @@ export class ModdedElementSets extends Feature {
413
413
  this.edenActiveCollectibleTypesSet.add(collectibleType);
414
414
  }
415
415
 
416
- if (isPassiveCollectible(collectibleType)) {
416
+ if (isPassiveOrFamiliarCollectible(collectibleType)) {
417
417
  this.edenPassiveCollectibleTypesSet.add(collectibleType);
418
418
  }
419
419
  }
@@ -1167,7 +1167,8 @@ export class ModdedElementSets extends Feature {
1167
1167
  }
1168
1168
 
1169
1169
  /**
1170
- * Returns a random passive collectible type that that is a valid starting item for Eden.
1170
+ * Returns a random passive collectible type that that is a valid starting item for Eden
1171
+ * (including familiars).
1171
1172
  *
1172
1173
  * This function can only be called if at least one callback has been executed. This is because
1173
1174
  * not all collectible types will necessarily be present when a mod first loads (due to mod load
@@ -34,7 +34,7 @@ export function getCardDescription(cardType: CardType): string {
34
34
  }
35
35
 
36
36
  /**
37
- * Helper function to get a card name from a Card.
37
+ * Helper function to get a card name from a `CardType`.
38
38
  *
39
39
  * For example, `getCardName(Card.FOOL)` would return "0 - The Fool".
40
40
  */
@@ -477,7 +477,7 @@ export function isModdedCollectibleType(
477
477
  * Returns true if the item type in the item config is equal to `ItemType.ITEM_PASSIVE` or
478
478
  * `ItemType.ITEM_FAMILIAR`.
479
479
  */
480
- export function isPassiveCollectible(
480
+ export function isPassiveOrFamiliarCollectible(
481
481
  collectibleOrCollectibleType: EntityPickup | CollectibleType,
482
482
  ): boolean {
483
483
  const collectibleType = getCollectibleTypeFromArg(
@@ -740,9 +740,8 @@ function deepCopyUserdata(
740
740
  return serializeIsaacAPIClass(value);
741
741
  }
742
742
 
743
- // eslint-disable-next-line isaacscript/require-break
744
743
  case SerializationType.DESERIALIZE: {
745
- error(
744
+ return error(
746
745
  `The deep copy function can not deserialize "${traversalDescription}", since it is userdata.`,
747
746
  );
748
747
  }