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.
- package/dist/index.rollup.d.ts +24 -4
- package/dist/isaacscript-common.lua +421 -364
- package/dist/src/classes/callbacks/PostUsePillFilter.d.ts +13 -4
- package/dist/src/classes/callbacks/PostUsePillFilter.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostUsePillFilter.lua +40 -15
- package/dist/src/classes/features/other/PreventCollectibleRotation.d.ts +1 -0
- package/dist/src/classes/features/other/PreventCollectibleRotation.d.ts.map +1 -1
- package/dist/src/classes/features/other/PreventCollectibleRotation.lua +9 -3
- package/dist/src/features.d.ts.map +1 -1
- package/dist/src/features.lua +1 -1
- package/dist/src/functions/pills.d.ts +19 -4
- package/dist/src/functions/pills.d.ts.map +1 -1
- package/dist/src/functions/pills.lua +28 -4
- package/dist/src/functions/pocketItems.d.ts +2 -0
- package/dist/src/functions/pocketItems.d.ts.map +1 -1
- package/dist/src/functions/pocketItems.lua +22 -0
- package/dist/src/indexLua.d.ts +186 -0
- package/dist/src/indexLua.d.ts.map +1 -0
- package/dist/src/indexLua.lua +1114 -0
- package/dist/src/objects/pillEffectClasses.d.ts.map +1 -1
- package/dist/src/objects/pillEffectClasses.lua +0 -1
- package/package.json +2 -2
- package/src/classes/callbacks/PostUsePillFilter.ts +48 -19
- package/src/classes/features/other/PreventCollectibleRotation.ts +24 -3
- package/src/features.ts +1 -0
- package/src/functions/pills.ts +32 -5
- package/src/functions/pocketItems.ts +26 -0
- package/src/objects/pillEffectClasses.ts +50 -51
package/dist/index.rollup.d.ts
CHANGED
|
@@ -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
|
|
5779
|
-
* is equal to positive, negative, or neutral. This is derived from the suffix of the "class"
|
|
5780
|
-
* the "pocketitems.xml" file. Use the `getPillEffectClass` helper function to determine the
|
|
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
|