module Base
{
    craftRecipe OpenBoxOf50Bullets
    {
        timedAction = OpenAmmoBox,
        time        = 15,
        category    = Packing,
        recipeGroup = OpenBox,
        Tags        = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 1 tags[vfe:ammobox50] mappers[ammoType] flags[Prop2;AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 50 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.Bullets9mm = Base.Bullets9mmBox,
            Base.Bullets45  = Base.Bullets45Box,
            Base.Bullets38  = Base.Bullets38Box,
            Base.223Bullets = Base.223Box,
            Base.556Bullets = Base.556Box,
            Base.762Bullets = Base.762Box,
            Base.22Bullets  = Base.22Box,
            Base.Bullets357 = Base.Bullets357Box,
        }
    }
    
    craftRecipe OpenBoxOf20Bullets
    {
        timedAction = OpenAmmoBox,
        time        = 15,
        category    = Packing,
        recipeGroup = OpenBox,
        Tags        = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 1 tags[vfe:ammobox20] mappers[ammoType] flags[Prop2;AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 20 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.Bullets44   = Base.Bullets44Box,
            Base.308Bullets  = Base.308Box,
            Base.3030Bullets = Base.3030Box,
        }
    }
    
    craftRecipe OpenBoxOf25Bullets
    {
        timedAction = OpenShellsBox,
        time        = 15,
        category    = Packing,
        recipeGroup = OpenBox,
        Tags        = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 1 tags[vfe:ammobox25] mappers[ammoType] flags[Prop2;AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 25 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.ShotgunShells = Base.ShotgunShellsBox,
        }
    }
    
    craftRecipe place50BulletsInBox
    {
        timedAction = PlaceAmmoInBox,
        time        = 15,
        category    = Packing,
        Tags        = InHandCraft,
        inputs
        {
            item 50 tags[vfe:ammo50] mappers[ammoType] flags[AllowFavorite;InheritFavorite;IsExclusive],
        }
        outputs
        {
            item 1 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.223Box        = Base.223Bullets,
            Base.556Box        = Base.556Bullets,
            Base.Bullets9mmBox = Base.Bullets9mm,
            Base.Bullets45Box  = Base.Bullets45,
            Base.Bullets38Box  = Base.Bullets38,
            Base.762Box        = Base.762Bullets,
            Base.22Box         = Base.22Bullets,
            Base.Bullets357Box = Base.Bullets357,
        }
    }
    
    craftRecipe place20BulletsInBox
    {
        timedAction = PlaceAmmoInBox,
        time        = 15,
        category    = Packing,
        Tags        = InHandCraft,
        inputs
        {
            item 20 tags[vfe:ammo20] mappers[ammoType] flags[AllowFavorite;InheritFavorite;IsExclusive],
        }
        outputs
        {
            item 1 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.Bullets44Box = Base.Bullets44,
            Base.308Box       = Base.308Bullets,
            Base.3030Box      = Base.3030Bullets,
        }
    }
    
    craftRecipe place25BulletsInBox
    {
        timedAction = PlaceAmmoInBox,
        time        = 15,
        category    = Packing,
        Tags        = InHandCraft,
        inputs
        {
            item 25 tags[vfe:ammo25] mappers[ammoType] flags[AllowFavorite;InheritFavorite;IsExclusive],
        }
        outputs
        {
            item 1 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.ShotgunShellsBox = Base.ShotgunShells,
        }
    }
    
    craftRecipe OpenPackOfAmmo
    {
        timedAction = UnPackBox,
        Time        = 50,
        category    = Packing,
        Tags        = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 1 tags[vfe:ammopack] mappers[ammoType] flags[AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 4 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.762Box           = Base.762Pack,
            Base.22Box            = Base.22Pack,
            Base.308Box           = Base.308Pack,
            Base.556Box           = Base.556Pack,
            Base.223Box           = Base.223Pack,
            Base.ShotgunShellsBox = Base.Base.ShotgunShellsPack,
            Base.Bullets9mmBox    = Base.9mmPack,
            Base.Bullets38Box     = Base.38Pack,
            Base.Bullets44Box     = Base.44Pack,
            Base.Bullets45Box     = Base.45Pack,
        }
    }
    
    craftRecipe PackBoxesAmmo
    {
        timedAction = PackingBox,
        Time        = 50,
        category    = Packing,
        Tags        = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 4 tags[vfe:ammobox] mappers[ammoType] flags[AllowFavorite;InheritFavorite;IsExclusive],
        }
        outputs
        {
            item 1 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.762Pack                = Base.762Box,
            Base.22Pack                 = Base.22Box,
            Base.308Pack                = Base.308Box,
            Base.556Pack                = Base.556Box,
            Base.223Pack                = Base.223Box,
            Base.Base.ShotgunShellsPack = Base.ShotgunShellsBox,
            Base.9mmPack                = Base.Bullets9mmBox,
            Base.38Pack                 = Base.Bullets38Box,
            Base.44Pack                 = Base.Bullets44Box,
            Base.45Pack                 = Base.Bullets45Box,
        }
    }
    
    craftRecipe OpenCaseOfAmmo
    {
        timedAction = UnPackBox,
        Time        = 50,
        category    = Packing,
        Tags        = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 1 tags[vfe:ammocase] mappers[ammoType] flags[AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 4 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.762Pack           = Base.762Case,
            Base.22Pack            = Base.22Case,
            Base.308Pack           = Base.308Case,
            Base.556Pack           = Base.556Case,
            Base.223Pack           = Base.223Case,
            Base.ShotgunShellsPack = Base.Base.ShotgunShellsCase,
            Base.9mmPack           = Base.9mmCase,
            Base.38Pack            = Base.38Case,
            Base.44Pack            = Base.44Case,
            Base.45Pack            = Base.45Case,
        }
    }
    
    craftRecipe CaseBoxesAmmo
    {
        timedAction = PackingBox,
        Time        = 50,
        category    = Packing,
        Tags        = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 4 tags[vfe:ammopack] mappers[ammoType] flags[AllowFavorite;InheritFavorite;IsExclusive],
        }
        outputs
        {
            item 1 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.762Case           = Base.762Pack,
            Base.22Case            = Base.22Pack,
            Base.308Case           = Base.308Pack,
            Base.556Case           = Base.556Pack,
            Base.223Case           = Base.223Pack,
            Base.ShotgunShellsCase = Base.Base.ShotgunShellsPack,
            Base.9mmCase           = Base.9mmPack,
            Base.38Case            = Base.38Pack,
            Base.44Case            = Base.44Pack,
            Base.45Case            = Base.45Pack,
        }
    }
    
    craftRecipe OpenCrateOfAmmo
    {
        timedAction = UnPackBox,
        Time        = 50,
        category    = Packing,
        Tags        = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 1 tags[vfe:ammocrate] mappers[ammoType] flags[AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 4 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.762Case           = Base.762Crate,
            Base.22Case            = Base.22Crate,
            Base.308Case           = Base.308Crate,
            Base.556Case           = Base.556Crate,
            Base.223Case           = Base.223Crate,
            Base.ShotgunShellsCase = Base.Base.ShotgunShellsCrate,
            Base.9mmCase           = Base.9mmCrate,
            Base.38Case            = Base.38Crate,
            Base.44Case            = Base.44Crate,
            Base.45Case            = Base.45Crate,
        }
    }
    
    craftRecipe CrateBoxesAmmo
    {
        timedAction = PackingBox,
        Time        = 50,
        category    = Packing,
        Tags        = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 4 tags[vfe:ammocase] mappers[ammoType] flags[AllowFavorite;InheritFavorite;IsExclusive],
        }
        outputs
        {
            item 1 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.762Crate           = Base.762Case,
            Base.22Crate            = Base.22Case,
            Base.308Crate           = Base.308Case,
            Base.556Crate           = Base.556Case,
            Base.223Crate           = Base.223Case,
            Base.ShotgunShellsCrate = Base.Base.ShotgunShellsCase,
            Base.9mmCrate           = Base.9mmCase,
            Base.38Crate            = Base.38Case,
            Base.44Crate            = Base.44Case,
            Base.45Crate            = Base.45Case,
        }
    }
    
    craftRecipe OpenCartonOfBoxesOfAmmo
    {
        timedAction = UnPackBox,
        time        = 50,
        category    = Packing,
        Tags        = InHandCraft;CanBeDoneInDark,
        inputs
        {
            item 1 tags[vfe:ammocarton] mappers[ammoType] flags[AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 12 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.Bullets9mmBox    = Base.Bullets9mmCarton,
            Base.Bullets45Box     = Base.Bullets45Carton,
            Base.Bullets38Box     = Base.Bullets38Carton,
            Base.Bullets44Box     = Base.Bullets44Carton,
            Base.223Box           = Base.223Carton,
            Base.308Box           = Base.308Carton,
            Base.ShotgunShellsBox = Base.ShotgunShellsCarton,
            Base.556Box           = Base.556Carton,
            Base.762Box           = Base.762Carton,
            Base.22Box            = Base.22Carton,
            Base.3030Box          = Base.3030Carton,
            Base.Bullets357Box    = Base.Bullets357Carton
        }
    }
    
    craftRecipe PlaceBoxesOfAmmoInCarton
    {
        timedAction = PackingBox,
        time        = 50,
        category    = Packing,
        Tags        = InHandCraft,
        inputs
        {
            item 12 tags[vfe:ammobox] mappers[ammoType] flags[AllowFavorite;InheritFavorite;IsExclusive],
        }
        outputs
        {
            item 1 mapper:ammoType,
        }
        itemMapper ammoType
        {
            Base.Bullets9mmCarton    = Base.Bullets9mmBox,
            Base.Bullets45Carton     = Base.Bullets45Box,
            Base.Bullets38Carton     = Base.Bullets38Box,
            Base.Bullets44Carton     = Base.Bullets44Box,
            Base.223Carton           = Base.223Box,
            Base.308Carton           = Base.308Box,
            Base.ShotgunShellsCarton = Base.ShotgunShellsBox,
            Base.556Carton           = Base.556Box,
            Base.762Carton           = Base.762Box,
            Base.22Carton            = Base.22Box,
            Base.3030Carton          = Base.3030Box,
            Base.Bullets357Carton    = Base.Bullets357Box,
        }
    }
    
    craftRecipe Open 556 Battle Pack
    {
        time        = 60,
        timedAction = Making,
        category    = Ammo,
        tags        = InHandCraft;CanBeDoneFromFloor,
        
        inputs
        {
            item 1 [556BattlePack],
        }
        outputs
        {
            item 40 556Bullets,
        }
    }
}
