isaacscript-common 80.2.3 → 80.2.5

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.
@@ -1,9 +1,5 @@
1
1
  import type { CardType, CollectibleType, PillEffect, TrinketType } from "isaac-typescript-definitions";
2
2
  import { Feature } from "../../private/Feature";
3
- export declare const FIRST_MODDED_COLLECTIBLE_TYPE: CollectibleType;
4
- export declare const FIRST_MODDED_TRINKET_TYPE: TrinketType;
5
- export declare const FIRST_MODDED_CARD_TYPE: CardType;
6
- export declare const FIRST_MODDED_PILL_EFFECT: PillEffect;
7
3
  /**
8
4
  * Mods can add extra things to the game (e.g. collectibles, trinkets, and so on). Since mods load
9
5
  * in alphabetical order, the total number of things can't be properly be known until at least one
@@ -1 +1 @@
1
- {"version":3,"file":"ModdedElementDetection.d.ts","sourceRoot":"","sources":["../../../../src/classes/features/other/ModdedElementDetection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AActC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGhD,eAAO,MAAM,6BAA6B,EAAE,eACT,CAAC;AAGpC,eAAO,MAAM,yBAAyB,EAAE,WACT,CAAC;AAGhC,eAAO,MAAM,sBAAsB,EAAE,QAAqC,CAAC;AAG3E,eAAO,MAAM,wBAAwB,EAAE,UACT,CAAC;AAE/B;;;;;;;;;GASG;AACH,qBAAa,sBAAuB,SAAQ,OAAO;IACjD,OAAO,CAAC,uBAAuB,CAAS;IAaxC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAE7B;IAEF,OAAO,CAAC,uBAAuB;IAY/B;;;;;;;;;;;OAWG;IAEI,6BAA6B,IAAI,eAAe,GAAG,SAAS;IAYnE;;;;;;;;;;;;;;;;;OAiBG;IAEI,sBAAsB,IAAI,eAAe;IAKhD;;;;;;;;;;;;;OAaG;IAEI,sBAAsB,I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G;IAEI,sBAAsB,IAAI,eAAe;IAKhD;;;;;;;;;;;;;OAaG;IAEI,sBAAsB,IAAI,GAAG;IAKpC;;;;;;;;;;;OAWG;IAEI,4BAA4B,IAAI,GAAG;IAS1C;;;;;;;;;;OAUG;IAEI,yBAAyB,IAAI,WAAW,GAAG,SAAS;IAO3D;;;;;;;;;;;;;;;;OAgBG;IAEI,kBAAkB,IAAI,WAAW;IAKxC;;;;;;;;;;;;OAYG;IAEI,kBAAkB,IAAI,GAAG;IAKhC;;;;;;;;;;OAUG;IAEI,wBAAwB,IAAI,GAAG;IAStC;;;;;;;;;;OAUG;IAEI,sBAAsB,IAAI,QAAQ,GAAG,SAAS;IAOrD;;;;;;;;;;;;;;;;OAgBG;IAEI,eAAe,IAAI,QAAQ;IAKlC;;;;;;;;;;;OAWG;IAEI,eAAe,IAAI,GAAG;IAK7B;;;;;;;;;;OAUG;IAEI,qBAAqB,IAAI,GAAG;IASnC;;;;;;;;;;;OAWG;IAEI,wBAAwB,IAAI,UAAU,GAAG,SAAS;IAYzD;;;;;;;;;;;;;;;;;;OAkBG;IAEI,iBAAiB,IAAI,UAAU;IAKtC;;;;;;;;;;;;OAYG;IAEI,iBAAiB,IAAI,GAAG;IAK/B;;;;;;;;;;OAUG;IAEI,uBAAuB,IAAI,GAAG;CAItC"}
@@ -20,10 +20,10 @@ local ____decorators = require("decorators")
20
20
  local Exported = ____decorators.Exported
21
21
  local ____Feature = require("classes.private.Feature")
22
22
  local Feature = ____Feature.Feature
23
- ____exports.FIRST_MODDED_COLLECTIBLE_TYPE = LAST_VANILLA_COLLECTIBLE_TYPE + 1
24
- ____exports.FIRST_MODDED_TRINKET_TYPE = LAST_VANILLA_TRINKET_TYPE + 1
25
- ____exports.FIRST_MODDED_CARD_TYPE = LAST_VANILLA_CARD_TYPE + 1
26
- ____exports.FIRST_MODDED_PILL_EFFECT = LAST_VANILLA_PILL_EFFECT + 1
23
+ local FIRST_MODDED_COLLECTIBLE_TYPE = LAST_VANILLA_COLLECTIBLE_TYPE + 1
24
+ local FIRST_MODDED_TRINKET_TYPE = LAST_VANILLA_TRINKET_TYPE + 1
25
+ local FIRST_MODDED_CARD_TYPE = LAST_VANILLA_CARD_TYPE + 1
26
+ local FIRST_MODDED_PILL_EFFECT = LAST_VANILLA_PILL_EFFECT + 1
27
27
  --- Mods can add extra things to the game (e.g. collectibles, trinkets, and so on). Since mods load
28
28
  -- in alphabetical order, the total number of things can't be properly be known until at least one
29
29
  -- callback fires (which indicates that all mods have been loaded).
@@ -51,12 +51,12 @@ function ModdedElementDetection.prototype.errorIfNoCallbacksFired(self, constant
51
51
  end
52
52
  function ModdedElementDetection.prototype.getFirstModdedCollectibleType(self)
53
53
  self:errorIfNoCallbacksFired("collectible")
54
- local itemConfigItem = itemConfig:GetCollectible(____exports.FIRST_MODDED_COLLECTIBLE_TYPE)
54
+ local itemConfigItem = itemConfig:GetCollectible(FIRST_MODDED_COLLECTIBLE_TYPE)
55
55
  local ____temp_0
56
56
  if itemConfigItem == nil then
57
57
  ____temp_0 = nil
58
58
  else
59
- ____temp_0 = ____exports.FIRST_MODDED_COLLECTIBLE_TYPE
59
+ ____temp_0 = FIRST_MODDED_COLLECTIBLE_TYPE
60
60
  end
61
61
  return ____temp_0
62
62
  end
@@ -78,12 +78,12 @@ end
78
78
  __TS__DecorateLegacy({Exported}, ModdedElementDetection.prototype, "getNumModdedCollectibleTypes", true)
79
79
  function ModdedElementDetection.prototype.getFirstModdedTrinketType(self)
80
80
  self:errorIfNoCallbacksFired("trinket")
81
- local itemConfigItem = itemConfig:GetTrinket(____exports.FIRST_MODDED_TRINKET_TYPE)
81
+ local itemConfigItem = itemConfig:GetTrinket(FIRST_MODDED_TRINKET_TYPE)
82
82
  local ____temp_1
83
83
  if itemConfigItem == nil then
84
84
  ____temp_1 = nil
85
85
  else
86
- ____temp_1 = ____exports.FIRST_MODDED_TRINKET_TYPE
86
+ ____temp_1 = FIRST_MODDED_TRINKET_TYPE
87
87
  end
88
88
  return ____temp_1
89
89
  end
@@ -105,12 +105,12 @@ end
105
105
  __TS__DecorateLegacy({Exported}, ModdedElementDetection.prototype, "getNumModdedTrinketTypes", true)
106
106
  function ModdedElementDetection.prototype.getFirstModdedCardType(self)
107
107
  self:errorIfNoCallbacksFired("card")
108
- local itemConfigCard = itemConfig:GetCard(____exports.FIRST_MODDED_CARD_TYPE)
108
+ local itemConfigCard = itemConfig:GetCard(FIRST_MODDED_CARD_TYPE)
109
109
  local ____temp_2
110
110
  if itemConfigCard == nil then
111
111
  ____temp_2 = nil
112
112
  else
113
- ____temp_2 = ____exports.FIRST_MODDED_CARD_TYPE
113
+ ____temp_2 = FIRST_MODDED_CARD_TYPE
114
114
  end
115
115
  return ____temp_2
116
116
  end
@@ -132,12 +132,12 @@ end
132
132
  __TS__DecorateLegacy({Exported}, ModdedElementDetection.prototype, "getNumModdedCardTypes", true)
133
133
  function ModdedElementDetection.prototype.getFirstModdedPillEffect(self)
134
134
  self:errorIfNoCallbacksFired("pill")
135
- local itemConfigPillEffect = itemConfig:GetPillEffect(____exports.FIRST_MODDED_PILL_EFFECT)
135
+ local itemConfigPillEffect = itemConfig:GetPillEffect(FIRST_MODDED_PILL_EFFECT)
136
136
  local ____temp_3
137
137
  if itemConfigPillEffect == nil then
138
138
  ____temp_3 = nil
139
139
  else
140
- ____temp_3 = ____exports.FIRST_MODDED_PILL_EFFECT
140
+ ____temp_3 = FIRST_MODDED_PILL_EFFECT
141
141
  end
142
142
  return ____temp_3
143
143
  end
@@ -39,8 +39,13 @@ export declare function getCollectibleDevilHeartPrice(collectibleOrCollectibleTy
39
39
  */
40
40
  export declare function getCollectibleGfxFilename(collectibleOrCollectibleType: EntityPickup | CollectibleType | -1): string;
41
41
  /**
42
- * Helper function to get the initial amount of charges that a collectible has. Returns 0 if the
43
- * provided collectible type was not valid.
42
+ * Helper function to get the initial amount of charges that a collectible has. In most cases, when
43
+ * picking up an active collectible for the first time, it will be fully charged, which corresponds
44
+ * to an `InitCharge` value of -1. However, in some cases, this may be different. For example,
45
+ * Eden's Soul starts without any charges, so it has an `InitCharge` value of 0.
46
+ *
47
+ * This function returns 0 if the provided collectible type was not valid. This function returns -1
48
+ * if the provided collectible type was not an active collectible.
44
49
  */
45
50
  export declare function getCollectibleInitCharge(collectibleOrCollectibleType: EntityPickup | CollectibleType): int;
46
51
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAEpB,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAgEtC,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAStE;AAED,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,SAAS,EAAE,SAAS,GACnB,OAAO,CAYT;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,oBAAoB,CAYtB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,MAAM,CAqBR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,GAAG,CAgBL;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,MAAM,EAAE,YAAY,GACnB,WAAW,CA6Bb;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAA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AED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,YAAY,EACzB,kBAAkB,EAAE,eAAe,GAClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
1
+ {"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAEpB,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAgEtC,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAStE;AAED,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,SAAS,EAAE,SAAS,GACnB,OAAO,CAYT;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,oBAAoB,CAYtB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,MAAM,CAqBR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,GAAG,CAgBL;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,MAAM,EAAE,YAAY,GACnB,WAAW,CA6Bb;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAAG,CAAC,CAAC,GAChE,MAAM,CAgBR;AAED;;;;;;;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kBAAkB,EAAE,eAAe,GAClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
@@ -267,8 +267,13 @@ function ____exports.getCollectibleGfxFilename(self, collectibleOrCollectibleTyp
267
267
  end
268
268
  return itemConfigItem.GfxFileName
269
269
  end
270
- --- Helper function to get the initial amount of charges that a collectible has. Returns 0 if the
271
- -- provided collectible type was not valid.
270
+ --- Helper function to get the initial amount of charges that a collectible has. In most cases, when
271
+ -- picking up an active collectible for the first time, it will be fully charged, which corresponds
272
+ -- to an `InitCharge` value of -1. However, in some cases, this may be different. For example,
273
+ -- Eden's Soul starts without any charges, so it has an `InitCharge` value of 0.
274
+ --
275
+ -- This function returns 0 if the provided collectible type was not valid. This function returns -1
276
+ -- if the provided collectible type was not an active collectible.
272
277
  function ____exports.getCollectibleInitCharge(self, collectibleOrCollectibleType)
273
278
  local collectibleType = getCollectibleTypeFromArg(nil, collectibleOrCollectibleType, "getCollectibleInitCharge")
274
279
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
@@ -5439,8 +5439,13 @@ export declare function getCollectibleDevilHeartPrice(collectibleOrCollectibleTy
5439
5439
  export declare function getCollectibleGfxFilename(collectibleOrCollectibleType: EntityPickup | CollectibleType | -1): string;
5440
5440
 
5441
5441
  /**
5442
- * Helper function to get the initial amount of charges that a collectible has. Returns 0 if the
5443
- * provided collectible type was not valid.
5442
+ * Helper function to get the initial amount of charges that a collectible has. In most cases, when
5443
+ * picking up an active collectible for the first time, it will be fully charged, which corresponds
5444
+ * to an `InitCharge` value of -1. However, in some cases, this may be different. For example,
5445
+ * Eden's Soul starts without any charges, so it has an `InitCharge` value of 0.
5446
+ *
5447
+ * This function returns 0 if the provided collectible type was not valid. This function returns -1
5448
+ * if the provided collectible type was not an active collectible.
5444
5449
  */
5445
5450
  export declare function getCollectibleInitCharge(collectibleOrCollectibleType: EntityPickup | CollectibleType): int;
5446
5451
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 80.2.2
3
+ isaacscript-common 80.2.4
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -27712,8 +27712,13 @@ function ____exports.getCollectibleGfxFilename(self, collectibleOrCollectibleTyp
27712
27712
  end
27713
27713
  return itemConfigItem.GfxFileName
27714
27714
  end
27715
- --- Helper function to get the initial amount of charges that a collectible has. Returns 0 if the
27716
- -- provided collectible type was not valid.
27715
+ --- Helper function to get the initial amount of charges that a collectible has. In most cases, when
27716
+ -- picking up an active collectible for the first time, it will be fully charged, which corresponds
27717
+ -- to an `InitCharge` value of -1. However, in some cases, this may be different. For example,
27718
+ -- Eden's Soul starts without any charges, so it has an `InitCharge` value of 0.
27719
+ --
27720
+ -- This function returns 0 if the provided collectible type was not valid. This function returns -1
27721
+ -- if the provided collectible type was not an active collectible.
27717
27722
  function ____exports.getCollectibleInitCharge(self, collectibleOrCollectibleType)
27718
27723
  local collectibleType = getCollectibleTypeFromArg(nil, collectibleOrCollectibleType, "getCollectibleInitCharge")
27719
27724
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
@@ -44474,10 +44479,10 @@ local ____decorators = require("decorators")
44474
44479
  local Exported = ____decorators.Exported
44475
44480
  local ____Feature = require("classes.private.Feature")
44476
44481
  local Feature = ____Feature.Feature
44477
- ____exports.FIRST_MODDED_COLLECTIBLE_TYPE = LAST_VANILLA_COLLECTIBLE_TYPE + 1
44478
- ____exports.FIRST_MODDED_TRINKET_TYPE = LAST_VANILLA_TRINKET_TYPE + 1
44479
- ____exports.FIRST_MODDED_CARD_TYPE = LAST_VANILLA_CARD_TYPE + 1
44480
- ____exports.FIRST_MODDED_PILL_EFFECT = LAST_VANILLA_PILL_EFFECT + 1
44482
+ local FIRST_MODDED_COLLECTIBLE_TYPE = LAST_VANILLA_COLLECTIBLE_TYPE + 1
44483
+ local FIRST_MODDED_TRINKET_TYPE = LAST_VANILLA_TRINKET_TYPE + 1
44484
+ local FIRST_MODDED_CARD_TYPE = LAST_VANILLA_CARD_TYPE + 1
44485
+ local FIRST_MODDED_PILL_EFFECT = LAST_VANILLA_PILL_EFFECT + 1
44481
44486
  --- Mods can add extra things to the game (e.g. collectibles, trinkets, and so on). Since mods load
44482
44487
  -- in alphabetical order, the total number of things can't be properly be known until at least one
44483
44488
  -- callback fires (which indicates that all mods have been loaded).
@@ -44505,12 +44510,12 @@ function ModdedElementDetection.prototype.errorIfNoCallbacksFired(self, constant
44505
44510
  end
44506
44511
  function ModdedElementDetection.prototype.getFirstModdedCollectibleType(self)
44507
44512
  self:errorIfNoCallbacksFired("collectible")
44508
- local itemConfigItem = itemConfig:GetCollectible(____exports.FIRST_MODDED_COLLECTIBLE_TYPE)
44513
+ local itemConfigItem = itemConfig:GetCollectible(FIRST_MODDED_COLLECTIBLE_TYPE)
44509
44514
  local ____temp_0
44510
44515
  if itemConfigItem == nil then
44511
44516
  ____temp_0 = nil
44512
44517
  else
44513
- ____temp_0 = ____exports.FIRST_MODDED_COLLECTIBLE_TYPE
44518
+ ____temp_0 = FIRST_MODDED_COLLECTIBLE_TYPE
44514
44519
  end
44515
44520
  return ____temp_0
44516
44521
  end
@@ -44532,12 +44537,12 @@ end
44532
44537
  __TS__DecorateLegacy({Exported}, ModdedElementDetection.prototype, "getNumModdedCollectibleTypes", true)
44533
44538
  function ModdedElementDetection.prototype.getFirstModdedTrinketType(self)
44534
44539
  self:errorIfNoCallbacksFired("trinket")
44535
- local itemConfigItem = itemConfig:GetTrinket(____exports.FIRST_MODDED_TRINKET_TYPE)
44540
+ local itemConfigItem = itemConfig:GetTrinket(FIRST_MODDED_TRINKET_TYPE)
44536
44541
  local ____temp_1
44537
44542
  if itemConfigItem == nil then
44538
44543
  ____temp_1 = nil
44539
44544
  else
44540
- ____temp_1 = ____exports.FIRST_MODDED_TRINKET_TYPE
44545
+ ____temp_1 = FIRST_MODDED_TRINKET_TYPE
44541
44546
  end
44542
44547
  return ____temp_1
44543
44548
  end
@@ -44559,12 +44564,12 @@ end
44559
44564
  __TS__DecorateLegacy({Exported}, ModdedElementDetection.prototype, "getNumModdedTrinketTypes", true)
44560
44565
  function ModdedElementDetection.prototype.getFirstModdedCardType(self)
44561
44566
  self:errorIfNoCallbacksFired("card")
44562
- local itemConfigCard = itemConfig:GetCard(____exports.FIRST_MODDED_CARD_TYPE)
44567
+ local itemConfigCard = itemConfig:GetCard(FIRST_MODDED_CARD_TYPE)
44563
44568
  local ____temp_2
44564
44569
  if itemConfigCard == nil then
44565
44570
  ____temp_2 = nil
44566
44571
  else
44567
- ____temp_2 = ____exports.FIRST_MODDED_CARD_TYPE
44572
+ ____temp_2 = FIRST_MODDED_CARD_TYPE
44568
44573
  end
44569
44574
  return ____temp_2
44570
44575
  end
@@ -44586,12 +44591,12 @@ end
44586
44591
  __TS__DecorateLegacy({Exported}, ModdedElementDetection.prototype, "getNumModdedCardTypes", true)
44587
44592
  function ModdedElementDetection.prototype.getFirstModdedPillEffect(self)
44588
44593
  self:errorIfNoCallbacksFired("pill")
44589
- local itemConfigPillEffect = itemConfig:GetPillEffect(____exports.FIRST_MODDED_PILL_EFFECT)
44594
+ local itemConfigPillEffect = itemConfig:GetPillEffect(FIRST_MODDED_PILL_EFFECT)
44590
44595
  local ____temp_3
44591
44596
  if itemConfigPillEffect == nil then
44592
44597
  ____temp_3 = nil
44593
44598
  else
44594
- ____temp_3 = ____exports.FIRST_MODDED_PILL_EFFECT
44599
+ ____temp_3 = FIRST_MODDED_PILL_EFFECT
44595
44600
  end
44596
44601
  return ____temp_3
44597
44602
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "80.2.3",
3
+ "version": "80.2.5",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -37,6 +37,6 @@
37
37
  "lint": "tsx --tsconfig ./scripts/tsconfig.json ./scripts/lint.mts"
38
38
  },
39
39
  "dependencies": {
40
- "isaac-typescript-definitions": "^39.0.4"
40
+ "isaac-typescript-definitions": "^39.0.5"
41
41
  }
42
42
  }
@@ -20,19 +20,17 @@ import { Exported } from "../../../decorators";
20
20
  import { Feature } from "../../private/Feature";
21
21
 
22
22
  // eslint-disable-next-line isaacscript/strict-enums
23
- export const FIRST_MODDED_COLLECTIBLE_TYPE: CollectibleType =
23
+ const FIRST_MODDED_COLLECTIBLE_TYPE: CollectibleType =
24
24
  LAST_VANILLA_COLLECTIBLE_TYPE + 1;
25
25
 
26
26
  // eslint-disable-next-line isaacscript/strict-enums
27
- export const FIRST_MODDED_TRINKET_TYPE: TrinketType =
28
- LAST_VANILLA_TRINKET_TYPE + 1;
27
+ const FIRST_MODDED_TRINKET_TYPE: TrinketType = LAST_VANILLA_TRINKET_TYPE + 1;
29
28
 
30
29
  // eslint-disable-next-line isaacscript/strict-enums
31
- export const FIRST_MODDED_CARD_TYPE: CardType = LAST_VANILLA_CARD_TYPE + 1;
30
+ const FIRST_MODDED_CARD_TYPE: CardType = LAST_VANILLA_CARD_TYPE + 1;
32
31
 
33
32
  // eslint-disable-next-line isaacscript/strict-enums
34
- export const FIRST_MODDED_PILL_EFFECT: PillEffect =
35
- LAST_VANILLA_PILL_EFFECT + 1;
33
+ const FIRST_MODDED_PILL_EFFECT: PillEffect = LAST_VANILLA_PILL_EFFECT + 1;
36
34
 
37
35
  /**
38
36
  * Mods can add extra things to the game (e.g. collectibles, trinkets, and so on). Since mods load
@@ -278,8 +278,13 @@ export function getCollectibleGfxFilename(
278
278
  }
279
279
 
280
280
  /**
281
- * Helper function to get the initial amount of charges that a collectible has. Returns 0 if the
282
- * provided collectible type was not valid.
281
+ * Helper function to get the initial amount of charges that a collectible has. In most cases, when
282
+ * picking up an active collectible for the first time, it will be fully charged, which corresponds
283
+ * to an `InitCharge` value of -1. However, in some cases, this may be different. For example,
284
+ * Eden's Soul starts without any charges, so it has an `InitCharge` value of 0.
285
+ *
286
+ * This function returns 0 if the provided collectible type was not valid. This function returns -1
287
+ * if the provided collectible type was not an active collectible.
283
288
  */
284
289
  export function getCollectibleInitCharge(
285
290
  collectibleOrCollectibleType: EntityPickup | CollectibleType,