isaacscript-common 30.11.3 → 30.11.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.
@@ -5756,6 +5756,22 @@ export declare function getPHDPillEffect(pillEffect: PillEffect): PillEffect;
5756
5756
  */
5757
5757
  export declare function getPickups(pickupVariant?: PickupVariant | -1, subType?: number): EntityPickup[];
5758
5758
 
5759
+ /**
5760
+ * Helper function to get the corresponding pill color from an effect by repeatedly using the
5761
+ * `ItemPool.GetPillEffect` method.
5762
+ *
5763
+ * Note that this will return the corresponding effect even if the passed pill color is not yet
5764
+ * identified by the player.
5765
+ *
5766
+ * Returns `PillColor.NULL` if there is the corresponding pill color cannot be found.
5767
+ *
5768
+ * This function is especially useful in the `POST_USE_PILL` callback, since at that point, the used
5769
+ * pill is already consumed, and the callback only passes the effect. In this specific circumstance,
5770
+ * consider using the `POST_USE_PILL_FILTER` callback instead of the `POST_USE_PILL` callback, since
5771
+ * it correctly passes the color and handles the case of horse pills.
5772
+ */
5773
+ export declare function getPillColorFromEffect(pillEffect: PillEffect): PillColor;
5774
+
5759
5775
  /**
5760
5776
  * Helper function to get a pill effect class from a PillEffect enum value. In this context, the
5761
5777
  * class is equal to the numerical prefix in the "class" tag in the "pocketitems.xml" file. Use the
@@ -5775,10 +5791,10 @@ export declare function getPillEffectClass(pillEffect: PillEffect): ItemConfigPi
5775
5791
  export declare function getPillEffectName(pillEffect: PillEffect): string;
5776
5792
 
5777
5793
  /**
5778
- * Helper function to get a pill effect type from a PillEffect enum value. In this context, the type
5779
- * is equal to positive, negative, or neutral. This is derived from the suffix of the "class" tag in
5780
- * the "pocketitems.xml" file. Use the `getPillEffectClass` helper function to determine the "power"
5781
- * of the pill.
5794
+ * Helper function to get a pill effect type from a `PillEffect` enum value. In this context, the
5795
+ * type is equal to positive, negative, or neutral. This is derived from the suffix of the "class"
5796
+ * tag in the "pocketitems.xml" file. Use the `getPillEffectClass` helper function to determine the
5797
+ * "power" of the pill.
5782
5798
  *
5783
5799
  * Due to limitations in the API, this function will not work properly for modded pill effects, and
5784
5800
  * will always return `DEFAULT_PILL_EFFECT_TYPE` in those cases.
@@ -13550,6 +13566,9 @@ export declare interface PocketItemDescription {
13550
13566
  subType: int;
13551
13567
  }
13552
13568
 
13569
+ /** Helper function to see if two sets of pocket item descriptions are identical. */
13570
+ export declare function pocketItemsEquals(pocketItems1: PocketItemDescription[], pocketItems2: PocketItemDescription[]): boolean;
13571
+
13553
13572
  /** This is used in the various pocket item helper functions. */
13554
13573
  export declare enum PocketItemType {
13555
13574
  EMPTY = 0,
@@ -13775,6 +13794,7 @@ declare class PreventChildEntities extends Feature {
13775
13794
 
13776
13795
  declare class PreventCollectibleRotation extends Feature {
13777
13796
  private pickupIndexCreation;
13797
+ private runInNFrames;
13778
13798
  private preUseItem;
13779
13799
  /**
13780
13800
  * Soul of Isaac causes items to flip. We assume that the player deliberately wants to roll a