isaacscript-common 30.11.1 → 30.11.4
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 +25 -7
- package/dist/isaacscript-common.lua +437 -578
- package/dist/lualib_bundle.lua +4 -7
- package/dist/src/classes/DefaultMap.d.ts +0 -2
- package/dist/src/classes/DefaultMap.d.ts.map +1 -1
- package/dist/src/classes/DefaultMap.lua +0 -2
- 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/DeployJSONRoom.d.ts +2 -1
- package/dist/src/classes/features/other/DeployJSONRoom.d.ts.map +1 -1
- package/dist/src/functions/bosses.lua +0 -9
- package/dist/src/functions/entities.lua +0 -18
- package/dist/src/functions/entitiesSpecific.lua +0 -90
- package/dist/src/functions/pickupsSpecific.lua +0 -81
- 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/package.json +2 -2
- package/src/classes/DefaultMap.ts +0 -2
- package/src/classes/callbacks/PostUsePillFilter.ts +48 -19
- package/src/classes/features/other/DeployJSONRoom.ts +2 -1
- package/src/functions/pills.ts +32 -5
- package/src/functions/pocketItems.ts +26 -0
package/dist/index.rollup.d.ts
CHANGED
|
@@ -3244,8 +3244,6 @@ export declare const DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE;
|
|
|
3244
3244
|
* However, if a factory function was provided during instantiation, and the factory function has
|
|
3245
3245
|
* one or more arguments, then you must call this method instead (and provide the corresponding
|
|
3246
3246
|
* arguments).
|
|
3247
|
-
* - `getWithoutDefault` - Calls the original `Map.get` function (without setting the default
|
|
3248
|
-
* value).
|
|
3249
3247
|
* - `getDefaultValue` - Returns the default value to be used for a new key. (If a factory function
|
|
3250
3248
|
* was provided during instantiation, this will execute the factory function.)
|
|
3251
3249
|
* - `getConstructorArg` - Helper method for cloning the map. Returns either the default value or
|
|
@@ -3336,7 +3334,8 @@ declare class DeployJSONRoom extends Feature {
|
|
|
3336
3334
|
/**
|
|
3337
3335
|
* Helper function to deconstruct a vanilla room and set up a custom room in its place.
|
|
3338
3336
|
* Specifically, this will clear the current room of all entities and grid entities, and then
|
|
3339
|
-
* spawn all of the entries and grid entities in the provided JSON room.
|
|
3337
|
+
* spawn all of the entries and grid entities in the provided JSON room. For this reason, you must
|
|
3338
|
+
* be in the actual room in order to use this function.
|
|
3340
3339
|
*
|
|
3341
3340
|
* A JSON room is simply an XML file converted to JSON. You can create JSON rooms by using the
|
|
3342
3341
|
* Basement Renovator room editor to create an XML file, and then convert it to JSON using the
|
|
@@ -5757,6 +5756,22 @@ export declare function getPHDPillEffect(pillEffect: PillEffect): PillEffect;
|
|
|
5757
5756
|
*/
|
|
5758
5757
|
export declare function getPickups(pickupVariant?: PickupVariant | -1, subType?: number): EntityPickup[];
|
|
5759
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
|
+
|
|
5760
5775
|
/**
|
|
5761
5776
|
* Helper function to get a pill effect class from a PillEffect enum value. In this context, the
|
|
5762
5777
|
* class is equal to the numerical prefix in the "class" tag in the "pocketitems.xml" file. Use the
|
|
@@ -5776,10 +5791,10 @@ export declare function getPillEffectClass(pillEffect: PillEffect): ItemConfigPi
|
|
|
5776
5791
|
export declare function getPillEffectName(pillEffect: PillEffect): string;
|
|
5777
5792
|
|
|
5778
5793
|
/**
|
|
5779
|
-
* Helper function to get a pill effect type from a PillEffect enum value. In this context, the
|
|
5780
|
-
* is equal to positive, negative, or neutral. This is derived from the suffix of the "class"
|
|
5781
|
-
* the "pocketitems.xml" file. Use the `getPillEffectClass` helper function to determine the
|
|
5782
|
-
* 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.
|
|
5783
5798
|
*
|
|
5784
5799
|
* Due to limitations in the API, this function will not work properly for modded pill effects, and
|
|
5785
5800
|
* will always return `DEFAULT_PILL_EFFECT_TYPE` in those cases.
|
|
@@ -13551,6 +13566,9 @@ export declare interface PocketItemDescription {
|
|
|
13551
13566
|
subType: int;
|
|
13552
13567
|
}
|
|
13553
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
|
+
|
|
13554
13572
|
/** This is used in the various pocket item helper functions. */
|
|
13555
13573
|
export declare enum PocketItemType {
|
|
13556
13574
|
EMPTY = 0,
|