"use strict";
/*
eslint sort-exports/sort-exports: [
  "error",
  {
    sortDir: "asc",
  },
]
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldFireTrinketType = exports.shouldFireTear = exports.shouldFireTNT = exports.shouldFireSpikes = exports.shouldFireSlot = exports.shouldFireRoom = exports.shouldFireRock = exports.shouldFireProjectile = exports.shouldFirePressurePlate = exports.shouldFirePoop = exports.shouldFirePlayer = exports.shouldFirePit = exports.shouldFirePickup = exports.shouldFireNPC = exports.shouldFireLevel = exports.shouldFireLaser = exports.shouldFireKnife = exports.shouldFireItemPickup = exports.shouldFireGridEntityCustom = exports.shouldFireGridEntity = exports.shouldFireFamiliar = exports.shouldFireEntity = exports.shouldFireEffect = exports.shouldFireDoor = exports.shouldFireCollectibleType = exports.shouldFireBoolean = exports.shouldFireBomb = exports.shouldFireAmbush = void 0;
function shouldFireAmbush(fireArgs, optionalArgs) {
    const [ambushType] = fireArgs;
    const [callbackAmbushType] = optionalArgs;
    return callbackAmbushType === undefined || callbackAmbushType === ambushType;
}
exports.shouldFireAmbush = shouldFireAmbush;
function shouldFireBomb(fireArgs, optionalArgs) {
    const [bomb] = fireArgs;
    const [callbackBombVariant, callbackSubType] = optionalArgs;
    return ((callbackBombVariant === undefined ||
        callbackBombVariant === bomb.Variant) &&
        (callbackSubType === undefined || callbackSubType === bomb.SubType));
}
exports.shouldFireBomb = shouldFireBomb;
function shouldFireBoolean(fireArgs, optionalArgs) {
    const [fireArg] = fireArgs;
    const [optionalArg] = optionalArgs;
    return optionalArg === undefined || optionalArg === fireArg;
}
exports.shouldFireBoolean = shouldFireBoolean;
function shouldFireCollectibleType(fireArgs, optionalArgs) {
    const [_player, collectibleType] = fireArgs;
    const [callbackCollectibleType] = optionalArgs;
    return (callbackCollectibleType === undefined ||
        callbackCollectibleType === collectibleType);
}
exports.shouldFireCollectibleType = shouldFireCollectibleType;
function shouldFireDoor(fireArgs, optionalArgs) {
    const [door] = fireArgs;
    const [callbackDoorVariant] = optionalArgs;
    const doorVariant = door.GetVariant();
    return (callbackDoorVariant === undefined || callbackDoorVariant === doorVariant);
}
exports.shouldFireDoor = shouldFireDoor;
function shouldFireEffect(fireArgs, optionalArgs) {
    const [effect] = fireArgs;
    const [callbackEffectVariant, callbackSubType] = optionalArgs;
    return ((callbackEffectVariant === undefined ||
        callbackEffectVariant === effect.Variant) &&
        (callbackSubType === undefined || callbackSubType === effect.SubType));
}
exports.shouldFireEffect = shouldFireEffect;
function shouldFireEntity(fireArgs, optionalArgs) {
    const [entity] = fireArgs;
    const [callbackEntityType, callbackVariant, callbackSubType] = optionalArgs;
    return ((callbackEntityType === undefined || callbackEntityType === entity.Type) &&
        (callbackVariant === undefined || callbackVariant === entity.Variant) &&
        (callbackSubType === undefined || callbackSubType === entity.SubType));
}
exports.shouldFireEntity = shouldFireEntity;
function shouldFireFamiliar(fireArgs, optionalArgs) {
    const [familiar] = fireArgs;
    const [callbackFamiliarVariant, callbackSubType] = optionalArgs;
    return ((callbackFamiliarVariant === undefined ||
        callbackFamiliarVariant === familiar.Variant) &&
        (callbackSubType === undefined || callbackSubType === familiar.SubType));
}
exports.shouldFireFamiliar = shouldFireFamiliar;
function shouldFireGridEntity(fireArgs, optionalArgs) {
    const [gridEntity] = fireArgs;
    const [callbackGridEntityType, callbackVariant] = optionalArgs;
    const gridEntityType = gridEntity.GetType();
    const variant = gridEntity.GetVariant();
    return ((callbackGridEntityType === undefined ||
        callbackGridEntityType === gridEntityType) &&
        (callbackVariant === undefined || callbackVariant === variant));
}
exports.shouldFireGridEntity = shouldFireGridEntity;
function shouldFireGridEntityCustom(fireArgs, optionalArgs) {
    const [_gridEntity, gridEntityTypeCustom] = fireArgs;
    const [callbackGridEntityTypeCustom] = optionalArgs;
    return (callbackGridEntityTypeCustom === undefined ||
        callbackGridEntityTypeCustom === gridEntityTypeCustom);
}
exports.shouldFireGridEntityCustom = shouldFireGridEntityCustom;
function shouldFireItemPickup(fireArgs, optionalArgs) {
    const [_player, pickingUpItem] = fireArgs;
    const [callbackItemType, callbackSubtype] = optionalArgs;
    return ((callbackItemType === undefined ||
        callbackItemType === pickingUpItem.itemType) &&
        (callbackSubtype === undefined || callbackSubtype === pickingUpItem.subType));
}
exports.shouldFireItemPickup = shouldFireItemPickup;
function shouldFireKnife(fireArgs, optionalArgs) {
    const [knife] = fireArgs;
    const [callbackKnifeVariant, callbackSubType] = optionalArgs;
    return ((callbackKnifeVariant === undefined ||
        callbackKnifeVariant === knife.Variant) &&
        (callbackSubType === undefined || callbackSubType === knife.SubType));
}
exports.shouldFireKnife = shouldFireKnife;
function shouldFireLaser(fireArgs, optionalArgs) {
    const [laser] = fireArgs;
    const [callbackLaserVariant, callbackSubType] = optionalArgs;
    return ((callbackLaserVariant === undefined ||
        callbackLaserVariant === laser.Variant) &&
        (callbackSubType === undefined || callbackSubType === laser.SubType));
}
exports.shouldFireLaser = shouldFireLaser;
function shouldFireLevel(fireArgs, optionalArgs) {
    const [stage, stageType] = fireArgs;
    const [callbackStage, callbackStageType] = optionalArgs;
    return ((callbackStage === undefined || callbackStage === stage) &&
        (callbackStageType === undefined || callbackStageType === stageType));
}
exports.shouldFireLevel = shouldFireLevel;
function shouldFireNPC(fireArgs, optionalArgs) {
    const [npc] = fireArgs;
    const [callbackEntityType, callbackVariant, callbackSubType] = optionalArgs;
    return ((callbackEntityType === undefined || callbackEntityType === npc.Type) &&
        (callbackVariant === undefined || callbackVariant === npc.Variant) &&
        (callbackSubType === undefined || callbackSubType === npc.SubType));
}
exports.shouldFireNPC = shouldFireNPC;
function shouldFirePickup(fireArgs, optionalArgs) {
    const [pickup] = fireArgs;
    const [callbackPickupVariant, callbackPickupSubType] = optionalArgs;
    return ((callbackPickupVariant === undefined ||
        callbackPickupVariant === pickup.Variant) &&
        (callbackPickupSubType === undefined ||
            callbackPickupSubType === pickup.SubType));
}
exports.shouldFirePickup = shouldFirePickup;
function shouldFirePit(fireArgs, optionalArgs) {
    const [pit] = fireArgs;
    const [callbackPitVariant] = optionalArgs;
    const pitVariant = pit.GetVariant();
    return callbackPitVariant === undefined || callbackPitVariant === pitVariant;
}
exports.shouldFirePit = shouldFirePit;
function shouldFirePlayer(fireArgs, optionalArgs) {
    const [player] = fireArgs;
    const [callbackPlayerVariant, callbackCharacter] = optionalArgs;
    const character = player.GetPlayerType();
    return ((callbackPlayerVariant === undefined ||
        callbackPlayerVariant === player.Variant) &&
        (callbackCharacter === undefined || callbackCharacter === character));
}
exports.shouldFirePlayer = shouldFirePlayer;
function shouldFirePoop(fireArgs, optionalArgs) {
    const [poop] = fireArgs;
    const [callbackPoopGridEntityVariant] = optionalArgs;
    const poopGridEntityVariant = poop.GetVariant();
    return (callbackPoopGridEntityVariant === undefined ||
        callbackPoopGridEntityVariant === poopGridEntityVariant);
}
exports.shouldFirePoop = shouldFirePoop;
function shouldFirePressurePlate(fireArgs, optionalArgs) {
    const [pressurePlate] = fireArgs;
    const [callbackPressurePlateVariant] = optionalArgs;
    const pressurePlateVariant = pressurePlate.GetVariant();
    return (callbackPressurePlateVariant === undefined ||
        callbackPressurePlateVariant === pressurePlateVariant);
}
exports.shouldFirePressurePlate = shouldFirePressurePlate;
function shouldFireProjectile(fireArgs, optionalArgs) {
    const [projectile] = fireArgs;
    const [callbackProjectileVariant, callbackSubType] = optionalArgs;
    return ((callbackProjectileVariant === undefined ||
        callbackProjectileVariant === projectile.Variant) &&
        (callbackSubType === undefined || callbackSubType === projectile.SubType));
}
exports.shouldFireProjectile = shouldFireProjectile;
function shouldFireRock(fireArgs, optionalArgs) {
    const [rock] = fireArgs;
    const [callbackGridEntity, callbackVariant] = optionalArgs;
    const gridEntityType = rock.GetType();
    const variant = rock.GetVariant();
    return ((callbackGridEntity === undefined ||
        callbackGridEntity === gridEntityType) &&
        (callbackVariant === undefined || callbackVariant === variant));
}
exports.shouldFireRock = shouldFireRock;
function shouldFireRoom(fireArgs, optionalArgs) {
    const [roomType] = fireArgs;
    const [callbackRoomType] = optionalArgs;
    return callbackRoomType === undefined || callbackRoomType === roomType;
}
exports.shouldFireRoom = shouldFireRoom;
function shouldFireSlot(fireArgs, optionalArgs) {
    const [slot] = fireArgs;
    const [callbackSlotVariant, callbackSubType] = optionalArgs;
    return ((callbackSlotVariant === undefined ||
        callbackSlotVariant === slot.Variant) &&
        (callbackSubType === undefined || callbackSubType === slot.SubType));
}
exports.shouldFireSlot = shouldFireSlot;
function shouldFireSpikes(fireArgs, optionalArgs) {
    const [spikes] = fireArgs;
    const [callbackVariant] = optionalArgs;
    const variant = spikes.GetVariant();
    return callbackVariant === undefined || callbackVariant === variant;
}
exports.shouldFireSpikes = shouldFireSpikes;
function shouldFireTNT(fireArgs, optionalArgs) {
    const [tnt] = fireArgs;
    const [callbackVariant] = optionalArgs;
    const variant = tnt.GetVariant();
    return callbackVariant === undefined || callbackVariant === variant;
}
exports.shouldFireTNT = shouldFireTNT;
function shouldFireTear(fireArgs, optionalArgs) {
    const [tear] = fireArgs;
    const [callbackTearVariant, callbackSubType] = optionalArgs;
    return ((callbackTearVariant === undefined ||
        callbackTearVariant === tear.Variant) &&
        (callbackSubType === undefined || callbackSubType === tear.SubType));
}
exports.shouldFireTear = shouldFireTear;
function shouldFireTrinketType(fireArgs, optionalArgs) {
    const [_player, trinketType] = fireArgs;
    const [callbackTrinketType] = optionalArgs;
    return (callbackTrinketType === undefined || callbackTrinketType === trinketType);
}
exports.shouldFireTrinketType = shouldFireTrinketType;
