isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
32 lines (31 loc) • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PostEffectInitLate = void 0;
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
const shouldFire_1 = require("../../shouldFire");
const CustomCallback_1 = require("../private/CustomCallback");
const v = {
room: {
firedSet: new Set(),
},
};
class PostEffectInitLate extends CustomCallback_1.CustomCallback {
v = v;
constructor() {
super();
this.callbacksUsed = [
// 55
[isaac_typescript_definitions_1.ModCallback.POST_EFFECT_UPDATE, this.postEffectUpdate],
];
}
shouldFire = shouldFire_1.shouldFireEffect;
// ModCallback.POST_EFFECT_UPDATE (55)
postEffectUpdate = (effect) => {
const index = GetPtrHash(effect);
if (!v.room.firedSet.has(index)) {
v.room.firedSet.add(index);
this.fire(effect);
}
};
}
exports.PostEffectInitLate = PostEffectInitLate;