isaacscript-common 1.2.13 → 1.2.17

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.
@@ -10,9 +10,10 @@ local copySet = ____set.copySet
10
10
  local COLLECTIBLE_SET = __TS__New(Set)
11
11
  local function initCollectibleSet(self)
12
12
  local itemConfig = Isaac.GetItemConfig()
13
+ local maxCollectibleID = getMaxCollectibleID(nil)
13
14
  do
14
15
  local collectibleType = 1
15
- while collectibleType <= getMaxCollectibleID(nil) do
16
+ while collectibleType <= maxCollectibleID do
16
17
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
17
18
  if itemConfigItem ~= nil then
18
19
  COLLECTIBLE_SET:add(collectibleType)
@@ -1,5 +1,6 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  export declare function collectibleHasTag(collectibleType: CollectibleType | int, tag: ItemConfigTag): boolean;
3
+ export declare function collectibleHasCacheFlag(collectibleType: CollectibleType | int, cacheFlag: CacheFlag): boolean;
3
4
  /**
4
5
  * Helper function to get the in-game description for a collectible. Returns "Unknown" if the
5
6
  * provided collectible type was not valid.
@@ -14,6 +14,8 @@ local COLLECTIBLE_NAME_MAP = ____collectibleNameMap.COLLECTIBLE_NAME_MAP
14
14
  local ____entity = require("functions.entity")
15
15
  local getPickups = ____entity.getPickups
16
16
  local removeAllPickups = ____entity.removeAllPickups
17
+ local ____flag = require("functions.flag")
18
+ local hasFlag = ____flag.hasFlag
17
19
  local ____sprite = require("functions.sprite")
18
20
  local clearSprite = ____sprite.clearSprite
19
21
  function ____exports.setCollectibleSprite(self, collectible, pngPath)
@@ -39,6 +41,14 @@ function ____exports.collectibleHasTag(self, collectibleType, tag)
39
41
  end
40
42
  return itemConfigItem:HasTags(tag)
41
43
  end
44
+ function ____exports.collectibleHasCacheFlag(self, collectibleType, cacheFlag)
45
+ local itemConfig = Isaac.GetItemConfig()
46
+ local itemConfigItem = itemConfig:GetCollectible(collectibleType)
47
+ if itemConfigItem == nil then
48
+ return false
49
+ end
50
+ return hasFlag(nil, itemConfigItem.CacheFlags, cacheFlag)
51
+ end
42
52
  function ____exports.getCollectibleDescription(self, collectibleType)
43
53
  local itemConfig = Isaac.GetItemConfig()
44
54
  local defaultDescription = "Unknown"
@@ -1,4 +1,16 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
+ import { PillEffectClass } from "../types/PillEffectClass";
3
+ import { PillEffectType } from "../types/PillEffectType";
4
+ /**
5
+ * Helper function to get a pill effect class from a PillEffect enum value. In this context, the
6
+ * class is equal to the numerical prefix in the "class" tag in the "pocketitems.xml" file. Use the
7
+ * `getPillEffectType` helper function to determine whether or not the pill effect is positive,
8
+ * negative, or neutral.
9
+ *
10
+ * Due to limitations in the API, this function will not work properly for modded pill effects, and
11
+ * will always return `DEFAULT_PILL_EFFECT_CLASS` in those cases.
12
+ */
13
+ export declare function getPillEffectClass(pillEffect: PillEffect | int): PillEffectClass;
2
14
  /**
3
15
  * Helper function to get a pill effect name from a PillEffect enum value.
4
16
  *
@@ -9,3 +21,13 @@
9
21
  * ```
10
22
  */
11
23
  export declare function getPillEffectName(pillEffect: PillEffect | int): string;
24
+ /**
25
+ * Helper function to get a pill effect type from a PillEffect enum value. In this context, the
26
+ * type is equal to positive, negative, or neutral. This is derived from the suffix of the the
27
+ * "class" tag in the "pocketitems.xml" file. Use the `getPillEffectClass` helper function to
28
+ * determine the "power" of the pill.
29
+ *
30
+ * Due to limitations in the API, this function will not work properly for modded pill effects, and
31
+ * will always return `DEFAULT_PILL_EFFECT_TYPE` in those cases.
32
+ */
33
+ export declare function getPillEffectType(pillEffect: PillEffect | int): PillEffectType;
@@ -2,8 +2,20 @@
2
2
  local ____lualib = require("lualib_bundle")
3
3
  local Map = ____lualib.Map
4
4
  local ____exports = {}
5
+ local ____pillEffectClassMap = require("maps.pillEffectClassMap")
6
+ local PILL_EFFECT_CLASS_MAP = ____pillEffectClassMap.PILL_EFFECT_CLASS_MAP
5
7
  local ____pillEffectNameMap = require("maps.pillEffectNameMap")
6
8
  local PILL_EFFECT_NAME_MAP = ____pillEffectNameMap.PILL_EFFECT_NAME_MAP
9
+ local ____pillEffectTypeMap = require("maps.pillEffectTypeMap")
10
+ local PILL_EFFECT_TYPE_MAP = ____pillEffectTypeMap.PILL_EFFECT_TYPE_MAP
11
+ local ____PillEffectClass = require("types.PillEffectClass")
12
+ local DEFAULT_PILL_EFFECT_CLASS = ____PillEffectClass.DEFAULT_PILL_EFFECT_CLASS
13
+ local ____PillEffectType = require("types.PillEffectType")
14
+ local DEFAULT_PILL_EFFECT_TYPE = ____PillEffectType.DEFAULT_PILL_EFFECT_TYPE
15
+ function ____exports.getPillEffectClass(self, pillEffect)
16
+ local pillEffectClass = PILL_EFFECT_CLASS_MAP:get(pillEffect)
17
+ return pillEffectClass == nil and DEFAULT_PILL_EFFECT_CLASS or pillEffectClass
18
+ end
7
19
  function ____exports.getPillEffectName(self, pillEffect)
8
20
  local itemConfig = Isaac.GetItemConfig()
9
21
  local defaultName = "Unknown"
@@ -20,4 +32,8 @@ function ____exports.getPillEffectName(self, pillEffect)
20
32
  end
21
33
  return itemConfigPillEffect.Name
22
34
  end
35
+ function ____exports.getPillEffectType(self, pillEffect)
36
+ local pillEffectClass = PILL_EFFECT_TYPE_MAP:get(pillEffect)
37
+ return pillEffectClass == nil and DEFAULT_PILL_EFFECT_TYPE or pillEffectClass
38
+ end
23
39
  return ____exports
@@ -59,6 +59,10 @@ export declare function getClosestPlayer(position: Vector): EntityPlayer;
59
59
  * Tainted Forgotten have a 20 frame death animation (i.e. the "ForgottenDeath" animation).
60
60
  */
61
61
  export declare function getDeathAnimationName(player: EntityPlayer): string;
62
+ /**
63
+ * Helper function to return the player with the highest index, according to the
64
+ * `Isaac.GetPlayer()` method.
65
+ */
62
66
  export declare function getFinalPlayer(): EntityPlayer;
63
67
  /**
64
68
  * Helper function that returns the type of the rightmost heart, not including golden hearts since
@@ -219,6 +223,10 @@ export declare function isTainted(player: EntityPlayer): boolean;
219
223
  export declare function isTaintedLazarus(player: EntityPlayer): boolean;
220
224
  export declare function isModdedCharacter(player: EntityPlayer): boolean;
221
225
  export declare function isVanillaCharacter(player: EntityPlayer): boolean;
226
+ /**
227
+ * Helper function to remove a collectible costume from a player. Use this helper function to avoid
228
+ * having to request the collectible from the item config.
229
+ */
222
230
  export declare function removeCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType | int): void;
223
231
  /**
224
232
  * Helper function to remove the Dead Eye multiplier from a player.
@@ -227,6 +235,10 @@ export declare function removeCollectibleCostume(player: EntityPlayer, collectib
227
235
  * chance of working, so this function calls it 100 times to be safe.
228
236
  */
229
237
  export declare function removeDeadEyeMultiplier(player: EntityPlayer): void;
238
+ /**
239
+ * Helper function to remove a trinket costume from a player. Use this helper function to avoid
240
+ * having to request the trinket from the item config.
241
+ */
230
242
  export declare function removeTrinketCostume(player: EntityPlayer, trinketType: TrinketType | int): void;
231
243
  /**
232
244
  * Helper function to set an active collectible to a particular slot. This has different behavior
package/dist/index.d.ts CHANGED
@@ -57,7 +57,9 @@ export * from "./functions/vector";
57
57
  export * from "./maps/cardNameMap";
58
58
  export * from "./maps/collectibleNameMap";
59
59
  export * from "./maps/gridEntityXMLMap";
60
+ export * from "./maps/pillEffectClassMap";
60
61
  export * from "./maps/pillEffectNameMap";
62
+ export * from "./maps/pillEffectTypeMap";
61
63
  export * from "./maps/roomShapeToTopLeftWallGridIndexMap";
62
64
  export * from "./maps/transformationMaps";
63
65
  export * from "./maps/transformationNameMap";
@@ -74,6 +76,8 @@ export * from "./types/JSONSpawn";
74
76
  export * from "./types/ModCallbacksCustom";
75
77
  export * from "./types/ModUpgraded";
76
78
  export * from "./types/PickingUpItem";
79
+ export * from "./types/PillEffectClass";
80
+ export * from "./types/PillEffectType";
77
81
  export * from "./types/PlayerHealth";
78
82
  export * from "./types/PocketItemDescription";
79
83
  export * from "./types/PocketItemType";
package/dist/index.lua CHANGED
@@ -462,6 +462,14 @@ do
462
462
  end
463
463
  end
464
464
  end
465
+ do
466
+ local ____export = require("maps.pillEffectClassMap")
467
+ for ____exportKey, ____exportValue in pairs(____export) do
468
+ if ____exportKey ~= "default" then
469
+ ____exports[____exportKey] = ____exportValue
470
+ end
471
+ end
472
+ end
465
473
  do
466
474
  local ____export = require("maps.pillEffectNameMap")
467
475
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -470,6 +478,14 @@ do
470
478
  end
471
479
  end
472
480
  end
481
+ do
482
+ local ____export = require("maps.pillEffectTypeMap")
483
+ for ____exportKey, ____exportValue in pairs(____export) do
484
+ if ____exportKey ~= "default" then
485
+ ____exports[____exportKey] = ____exportValue
486
+ end
487
+ end
488
+ end
473
489
  do
474
490
  local ____export = require("maps.roomShapeToTopLeftWallGridIndexMap")
475
491
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -534,6 +550,22 @@ do
534
550
  end
535
551
  end
536
552
  end
553
+ do
554
+ local ____export = require("types.PillEffectClass")
555
+ for ____exportKey, ____exportValue in pairs(____export) do
556
+ if ____exportKey ~= "default" then
557
+ ____exports[____exportKey] = ____exportValue
558
+ end
559
+ end
560
+ end
561
+ do
562
+ local ____export = require("types.PillEffectType")
563
+ for ____exportKey, ____exportValue in pairs(____export) do
564
+ if ____exportKey ~= "default" then
565
+ ____exports[____exportKey] = ____exportValue
566
+ end
567
+ end
568
+ end
537
569
  do
538
570
  local ____export = require("types.PocketItemType")
539
571
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -0,0 +1,3 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ import { PillEffectClass } from "../types/PillEffectClass";
3
+ export declare const PILL_EFFECT_CLASS_MAP: Map<PillEffect, PillEffectClass>;
@@ -0,0 +1,60 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
4
+ local __TS__New = ____lualib.__TS__New
5
+ local ____exports = {}
6
+ local ____PillEffectClass = require("types.PillEffectClass")
7
+ local PillEffectClass = ____PillEffectClass.PillEffectClass
8
+ ____exports.PILL_EFFECT_CLASS_MAP = __TS__New(Map, {
9
+ {PillEffect.PILLEFFECT_BAD_GAS, PillEffectClass.MINOR},
10
+ {PillEffect.PILLEFFECT_BAD_TRIP, PillEffectClass.MEDIUM},
11
+ {PillEffect.PILLEFFECT_BALLS_OF_STEEL, PillEffectClass.MEDIUM},
12
+ {PillEffect.PILLEFFECT_BOMBS_ARE_KEYS, PillEffectClass.MEDIUM},
13
+ {PillEffect.PILLEFFECT_EXPLOSIVE_DIARRHEA, PillEffectClass.MINOR},
14
+ {PillEffect.PILLEFFECT_FULL_HEALTH, PillEffectClass.MEDIUM},
15
+ {PillEffect.PILLEFFECT_HEALTH_DOWN, PillEffectClass.MAJOR},
16
+ {PillEffect.PILLEFFECT_HEALTH_UP, PillEffectClass.MAJOR},
17
+ {PillEffect.PILLEFFECT_I_FOUND_PILLS, PillEffectClass.JOKE},
18
+ {PillEffect.PILLEFFECT_PUBERTY, PillEffectClass.JOKE},
19
+ {PillEffect.PILLEFFECT_PRETTY_FLY, PillEffectClass.MEDIUM},
20
+ {PillEffect.PILLEFFECT_RANGE_DOWN, PillEffectClass.MAJOR},
21
+ {PillEffect.PILLEFFECT_RANGE_UP, PillEffectClass.MAJOR},
22
+ {PillEffect.PILLEFFECT_SPEED_DOWN, PillEffectClass.MAJOR},
23
+ {PillEffect.PILLEFFECT_SPEED_UP, PillEffectClass.MAJOR},
24
+ {PillEffect.PILLEFFECT_TEARS_DOWN, PillEffectClass.MAJOR},
25
+ {PillEffect.PILLEFFECT_TEARS_UP, PillEffectClass.MAJOR},
26
+ {PillEffect.PILLEFFECT_LUCK_DOWN, PillEffectClass.MAJOR},
27
+ {PillEffect.PILLEFFECT_LUCK_UP, PillEffectClass.MAJOR},
28
+ {PillEffect.PILLEFFECT_TELEPILLS, PillEffectClass.MAJOR},
29
+ {PillEffect.PILLEFFECT_48HOUR_ENERGY, PillEffectClass.MEDIUM},
30
+ {PillEffect.PILLEFFECT_HEMATEMESIS, PillEffectClass.MEDIUM},
31
+ {PillEffect.PILLEFFECT_PARALYSIS, PillEffectClass.MINOR},
32
+ {PillEffect.PILLEFFECT_SEE_FOREVER, PillEffectClass.MEDIUM},
33
+ {PillEffect.PILLEFFECT_PHEROMONES, PillEffectClass.MINOR},
34
+ {PillEffect.PILLEFFECT_AMNESIA, PillEffectClass.MEDIUM},
35
+ {PillEffect.PILLEFFECT_LEMON_PARTY, PillEffectClass.MINOR},
36
+ {PillEffect.PILLEFFECT_WIZARD, PillEffectClass.MINOR},
37
+ {PillEffect.PILLEFFECT_PERCS, PillEffectClass.MINOR},
38
+ {PillEffect.PILLEFFECT_ADDICTED, PillEffectClass.MINOR},
39
+ {PillEffect.PILLEFFECT_RELAX, PillEffectClass.JOKE},
40
+ {PillEffect.PILLEFFECT_QUESTIONMARK, PillEffectClass.MINOR},
41
+ {PillEffect.PILLEFFECT_LARGER, PillEffectClass.MINOR},
42
+ {PillEffect.PILLEFFECT_SMALLER, PillEffectClass.MINOR},
43
+ {PillEffect.PILLEFFECT_INFESTED_EXCLAMATION, PillEffectClass.MINOR},
44
+ {PillEffect.PILLEFFECT_INFESTED_QUESTION, PillEffectClass.MINOR},
45
+ {PillEffect.PILLEFFECT_POWER, PillEffectClass.MINOR},
46
+ {PillEffect.PILLEFFECT_RETRO_VISION, PillEffectClass.MINOR},
47
+ {PillEffect.PILLEFFECT_FRIENDS_TILL_THE_END, PillEffectClass.MINOR},
48
+ {PillEffect.PILLEFFECT_X_LAX, PillEffectClass.MINOR},
49
+ {PillEffect.PILLEFFECT_SOMETHINGS_WRONG, PillEffectClass.JOKE},
50
+ {PillEffect.PILLEFFECT_IM_DROWSY, PillEffectClass.MINOR},
51
+ {PillEffect.PILLEFFECT_IM_EXCITED, PillEffectClass.MINOR},
52
+ {PillEffect.PILLEFFECT_GULP, PillEffectClass.MEDIUM},
53
+ {PillEffect.PILLEFFECT_HORF, PillEffectClass.JOKE},
54
+ {PillEffect.PILLEFFECT_SUNSHINE, PillEffectClass.MINOR},
55
+ {PillEffect.PILLEFFECT_VURP, PillEffectClass.MEDIUM},
56
+ {PillEffect.PILLEFFECT_SHOT_SPEED_DOWN, PillEffectClass.MAJOR},
57
+ {PillEffect.PILLEFFECT_SHOT_SPEED_UP, PillEffectClass.MAJOR},
58
+ {PillEffect.PILLEFFECT_EXPERIMENTAL, PillEffectClass.MAJOR}
59
+ })
60
+ return ____exports
@@ -0,0 +1,3 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ import { PillEffectType } from "../types/PillEffectType";
3
+ export declare const PILL_EFFECT_TYPE_MAP: Map<PillEffect, PillEffectType>;
@@ -0,0 +1,60 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____lualib = require("lualib_bundle")
3
+ local Map = ____lualib.Map
4
+ local __TS__New = ____lualib.__TS__New
5
+ local ____exports = {}
6
+ local ____PillEffectType = require("types.PillEffectType")
7
+ local PillEffectType = ____PillEffectType.PillEffectType
8
+ ____exports.PILL_EFFECT_TYPE_MAP = __TS__New(Map, {
9
+ {PillEffect.PILLEFFECT_BAD_GAS, PillEffectType.POSITIVE},
10
+ {PillEffect.PILLEFFECT_BAD_TRIP, PillEffectType.NEGATIVE},
11
+ {PillEffect.PILLEFFECT_BALLS_OF_STEEL, PillEffectType.POSITIVE},
12
+ {PillEffect.PILLEFFECT_BOMBS_ARE_KEYS, PillEffectType.NEUTRAL},
13
+ {PillEffect.PILLEFFECT_EXPLOSIVE_DIARRHEA, PillEffectType.NEUTRAL},
14
+ {PillEffect.PILLEFFECT_FULL_HEALTH, PillEffectType.POSITIVE},
15
+ {PillEffect.PILLEFFECT_HEALTH_DOWN, PillEffectType.NEGATIVE},
16
+ {PillEffect.PILLEFFECT_HEALTH_UP, PillEffectType.POSITIVE},
17
+ {PillEffect.PILLEFFECT_I_FOUND_PILLS, PillEffectType.NEUTRAL},
18
+ {PillEffect.PILLEFFECT_PUBERTY, PillEffectType.NEUTRAL},
19
+ {PillEffect.PILLEFFECT_PRETTY_FLY, PillEffectType.POSITIVE},
20
+ {PillEffect.PILLEFFECT_RANGE_DOWN, PillEffectType.NEGATIVE},
21
+ {PillEffect.PILLEFFECT_RANGE_UP, PillEffectType.POSITIVE},
22
+ {PillEffect.PILLEFFECT_SPEED_DOWN, PillEffectType.NEGATIVE},
23
+ {PillEffect.PILLEFFECT_SPEED_UP, PillEffectType.POSITIVE},
24
+ {PillEffect.PILLEFFECT_TEARS_DOWN, PillEffectType.NEGATIVE},
25
+ {PillEffect.PILLEFFECT_TEARS_UP, PillEffectType.POSITIVE},
26
+ {PillEffect.PILLEFFECT_LUCK_DOWN, PillEffectType.NEGATIVE},
27
+ {PillEffect.PILLEFFECT_LUCK_UP, PillEffectType.POSITIVE},
28
+ {PillEffect.PILLEFFECT_TELEPILLS, PillEffectType.NEUTRAL},
29
+ {PillEffect.PILLEFFECT_48HOUR_ENERGY, PillEffectType.POSITIVE},
30
+ {PillEffect.PILLEFFECT_HEMATEMESIS, PillEffectType.NEUTRAL},
31
+ {PillEffect.PILLEFFECT_PARALYSIS, PillEffectType.NEGATIVE},
32
+ {PillEffect.PILLEFFECT_SEE_FOREVER, PillEffectType.POSITIVE},
33
+ {PillEffect.PILLEFFECT_PHEROMONES, PillEffectType.POSITIVE},
34
+ {PillEffect.PILLEFFECT_AMNESIA, PillEffectType.NEGATIVE},
35
+ {PillEffect.PILLEFFECT_LEMON_PARTY, PillEffectType.POSITIVE},
36
+ {PillEffect.PILLEFFECT_WIZARD, PillEffectType.NEGATIVE},
37
+ {PillEffect.PILLEFFECT_PERCS, PillEffectType.POSITIVE},
38
+ {PillEffect.PILLEFFECT_ADDICTED, PillEffectType.NEGATIVE},
39
+ {PillEffect.PILLEFFECT_RELAX, PillEffectType.NEUTRAL},
40
+ {PillEffect.PILLEFFECT_QUESTIONMARK, PillEffectType.NEGATIVE},
41
+ {PillEffect.PILLEFFECT_LARGER, PillEffectType.NEUTRAL},
42
+ {PillEffect.PILLEFFECT_SMALLER, PillEffectType.NEUTRAL},
43
+ {PillEffect.PILLEFFECT_INFESTED_EXCLAMATION, PillEffectType.POSITIVE},
44
+ {PillEffect.PILLEFFECT_INFESTED_QUESTION, PillEffectType.POSITIVE},
45
+ {PillEffect.PILLEFFECT_POWER, PillEffectType.POSITIVE},
46
+ {PillEffect.PILLEFFECT_RETRO_VISION, PillEffectType.NEGATIVE},
47
+ {PillEffect.PILLEFFECT_FRIENDS_TILL_THE_END, PillEffectType.POSITIVE},
48
+ {PillEffect.PILLEFFECT_X_LAX, PillEffectType.NEGATIVE},
49
+ {PillEffect.PILLEFFECT_SOMETHINGS_WRONG, PillEffectType.POSITIVE},
50
+ {PillEffect.PILLEFFECT_IM_DROWSY, PillEffectType.NEUTRAL},
51
+ {PillEffect.PILLEFFECT_IM_EXCITED, PillEffectType.NEUTRAL},
52
+ {PillEffect.PILLEFFECT_GULP, PillEffectType.POSITIVE},
53
+ {PillEffect.PILLEFFECT_HORF, PillEffectType.NEUTRAL},
54
+ {PillEffect.PILLEFFECT_SUNSHINE, PillEffectType.POSITIVE},
55
+ {PillEffect.PILLEFFECT_VURP, PillEffectType.POSITIVE},
56
+ {PillEffect.PILLEFFECT_SHOT_SPEED_DOWN, PillEffectType.NEGATIVE},
57
+ {PillEffect.PILLEFFECT_SHOT_SPEED_UP, PillEffectType.POSITIVE},
58
+ {PillEffect.PILLEFFECT_EXPERIMENTAL, PillEffectType.NEUTRAL}
59
+ })
60
+ return ____exports
@@ -11,12 +11,13 @@ local ____collectibles = require("functions.collectibles")
11
11
  local collectibleHasTag = ____collectibles.collectibleHasTag
12
12
  local getMaxCollectibleID = ____collectibles.getMaxCollectibleID
13
13
  function initMaps(self)
14
+ local maxCollectibleID = getMaxCollectibleID(nil)
14
15
  for ____, playerForm in __TS__Iterator(____exports.TRANSFORMATION_TO_TAG_MAP:keys()) do
15
16
  ____exports.TRANSFORMATION_TO_ITEMS_MAP:set(playerForm, {})
16
17
  end
17
18
  do
18
19
  local collectibleType = 1
19
- while collectibleType <= getMaxCollectibleID(nil) do
20
+ while collectibleType <= maxCollectibleID do
20
21
  for ____, ____value in __TS__Iterator(____exports.TRANSFORMATION_TO_TAG_MAP:entries()) do
21
22
  local playerForm = ____value[1]
22
23
  local tag = ____value[2]
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Equal to the number in the "class" tag in the "pocketitems.xml" file. The "+" or "-" part of the
3
+ * tag is contained within the `PillEffectType` enum.
4
+ */
5
+ export declare enum PillEffectClass {
6
+ JOKE = 0,
7
+ MINOR = 1,
8
+ MEDIUM = 2,
9
+ MAJOR = 3
10
+ }
11
+ export declare const DEFAULT_PILL_EFFECT_CLASS = PillEffectClass.MEDIUM;
@@ -0,0 +1,13 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____exports = {}
3
+ ____exports.PillEffectClass = PillEffectClass or ({})
4
+ ____exports.PillEffectClass.JOKE = 0
5
+ ____exports.PillEffectClass[____exports.PillEffectClass.JOKE] = "JOKE"
6
+ ____exports.PillEffectClass.MINOR = 1
7
+ ____exports.PillEffectClass[____exports.PillEffectClass.MINOR] = "MINOR"
8
+ ____exports.PillEffectClass.MEDIUM = 2
9
+ ____exports.PillEffectClass[____exports.PillEffectClass.MEDIUM] = "MEDIUM"
10
+ ____exports.PillEffectClass.MAJOR = 3
11
+ ____exports.PillEffectClass[____exports.PillEffectClass.MAJOR] = "MAJOR"
12
+ ____exports.DEFAULT_PILL_EFFECT_CLASS = ____exports.PillEffectClass.MEDIUM
13
+ return ____exports
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Equal to the suffix of the "class" tag in the "pocketitems.xml" file. "+" is equal to `POSITIVE`,
3
+ * "-" is equal to `NEGATIVE`, and no suffix is equal to `NEUTRAL`.
4
+ */
5
+ export declare enum PillEffectType {
6
+ POSITIVE = 0,
7
+ NEGATIVE = 1,
8
+ NEUTRAL = 2
9
+ }
10
+ export declare const DEFAULT_PILL_EFFECT_TYPE = PillEffectType.NEUTRAL;
@@ -0,0 +1,11 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____exports = {}
3
+ ____exports.PillEffectType = PillEffectType or ({})
4
+ ____exports.PillEffectType.POSITIVE = 0
5
+ ____exports.PillEffectType[____exports.PillEffectType.POSITIVE] = "POSITIVE"
6
+ ____exports.PillEffectType.NEGATIVE = 1
7
+ ____exports.PillEffectType[____exports.PillEffectType.NEGATIVE] = "NEGATIVE"
8
+ ____exports.PillEffectType.NEUTRAL = 2
9
+ ____exports.PillEffectType[____exports.PillEffectType.NEUTRAL] = "NEUTRAL"
10
+ ____exports.DEFAULT_PILL_EFFECT_TYPE = ____exports.PillEffectType.NEUTRAL
11
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.13",
3
+ "version": "1.2.17",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "devDependencies": {
28
28
  "@zamiell/typescript-to-lua": "^1.4.0",
29
- "isaac-typescript-definitions": "^1.0.336",
29
+ "isaac-typescript-definitions": "^1.0.338",
30
30
  "isaacscript-lint": "^1.0.79",
31
31
  "isaacscript-tsconfig": "^1.1.8",
32
32
  "typedoc": "^0.22.11",