"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PostFamiliarInitLate = 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 PostFamiliarInitLate extends CustomCallback_1.CustomCallback {
    v = v;
    constructor() {
        super();
        this.callbacksUsed = [
            // 6
            [isaac_typescript_definitions_1.ModCallback.POST_FAMILIAR_UPDATE, this.postFamiliarUpdate],
        ];
    }
    shouldFire = shouldFire_1.shouldFireFamiliar;
    // ModCallback.POST_FAMILIAR_UPDATE (6)
    postFamiliarUpdate = (familiar) => {
        const index = GetPtrHash(familiar);
        if (!v.room.firedSet.has(index)) {
            v.room.firedSet.add(index);
            this.fire(familiar);
        }
    };
}
exports.PostFamiliarInitLate = PostFamiliarInitLate;
