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