"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PostProjectileInitLate = 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 PostProjectileInitLate extends CustomCallback_1.CustomCallback {
    v = v;
    constructor() {
        super();
        this.callbacksUsed = [
            // 44
            [isaac_typescript_definitions_1.ModCallback.POST_PROJECTILE_UPDATE, this.postProjectileUpdate],
        ];
    }
    shouldFire = shouldFire_1.shouldFireProjectile;
    // ModCallback.POST_PROJECTILE_UPDATE (44)
    postProjectileUpdate = (projectile) => {
        const ptrHash = GetPtrHash(projectile);
        if (!v.room.firedSet.has(ptrHash)) {
            v.room.firedSet.add(ptrHash);
            this.fire(projectile);
        }
    };
}
exports.PostProjectileInitLate = PostProjectileInitLate;
