isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
29 lines • 1.46 kB
TypeScript
import type { PillColor, PillEffect } from "isaac-typescript-definitions";
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
import type { PocketItemDescription } from "../../interfaces/PocketItemDescription";
import type { PlayerIndex } from "../../types/PlayerIndex";
import { CustomCallback } from "../private/CustomCallback";
/**
* The vanilla `POST_USE_PILL` callback does not pass the `PillColor` of the used pill. We can
* resolve pill effect to pill color by using the `ItemPool.GetPillEffect` method. However, this
* does not tell us whether the pill used was a horse pill. Thus, we must keep track of the pills
* that the player is holding on every frame to account for this.
*
* In some cases, pills can be used without a corresponding pocket item slot, like in the case of
* the reverse Temperance card. In this case, we fall back to looking up the color using the
* `ItemPool.GetPillEffect` method.
*/
export declare class PostUsePillFilter extends CustomCallback<ModCallbackCustom.POST_USE_PILL_FILTER> {
v: {
run: {
pillColorToPillEffect: Map<PillColor, PillEffect>;
playerPocketItems: Map<PlayerIndex, PocketItemDescription[]>;
};
};
constructor();
private readonly postUsePill;
private getPillColorOfCurrentlyUsedPill;
private readonly postPEffectUpdateReordered;
private updateCurrentPocketItems;
}
//# sourceMappingURL=PostUsePillFilter.d.ts.map