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