module SmokersChoice
{
    imports
    {
        Base
    }

    /* Colored cigarettes: Tecumseh Jefferson (bright, American;
       the Colored items) and Delacroix Masquerade (pastel, European; the
       Pastel items). Item names are generic; the brand shows through
       the brand system's name templates (IG_UI.json). One single and one pack
       per line; each color is a brand (SmokersChoice_Brands.lua), and a new
       pack is an assorted pack holding exactly two of each of its five
       colors. Colors are looks only. Both lines are luxury cigarettes:
       a cigarillo's comforts (stress -8, unhappiness -15) with a
       cigarette's downsides (sickness, cough, smoking time). Packs get
       their unhappiness in Lua (SmokersChoice.Extras). */

    item CigarettePackColored
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        ItemType = base:drainable,
        Weight = 0.1,
        Icon = SC_PackColored,
        UseDelta = 0.1,
        UseWhileEquipped = false,
        StaticModel = Cigarette_Lit,
        WorldStaticModel = SC_PackSlim_Colored,
        Tags = base:packed;base:lessfull;base:consumable;base:smokable,
        EatType = Cigarettes,
        OnEat = RecipeCodeOnEat.consumeNicotine,
        StressChange = -8,
        CustomEatSound = ,
        Eattime = 460,
        RequireInHandOrInventory = Base.CandleLit/Base.Matches/Base.Matchbox/Base.LighterDisposable/Base.Lighter/Base.LighterBBQ/Base.Lighter_Battery,
        CustomContextMenu = Smoke,
        FoodSicknessChange = 14,
        InverseCoughProbability = 6,
        InverseCoughProbabilitySmoker = 2,
        KeepOnDeplete = false,
    }

    item CigaretteColored
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        ItemType = base:food,
        Weight = 0.01,
        Icon = SC_CigaretteColored_Red,
        CantBeFrozen = true,
        CustomContextMenu = Smoke,
        EatType = Cigarettes,
        HungerChange = 0.0,
        OnEat = RecipeCodeOnEat.consumeNicotine,
        RequireInHandOrInventory = Base.CandleLit/Base.Matches/Base.Matchbox/Base.LighterDisposable/Base.Lighter/Base.LighterBBQ/Base.Lighter_Battery,
        StressChange = -8,
        UnhappyChange = -15,
        StaticModel = Cigarette_Lit,
        WorldStaticModel = Cigarette2,
        CustomEatSound = ,
        Tags = base:useall;base:smokable,
        Eattime = 460,
        FoodSicknessChange = 14,
        InverseCoughProbability = 6,
        InverseCoughProbabilitySmoker = 2,
    }

    craftRecipe UnpackCigarettesColored
    {
        OnCreate = SmokersChoiceBrands.inherit,
        timedAction = UnpackCigarettes,
        time = 15,
        Tags = InHandCraft;CanBeDoneInDark,
        category = Miscellaneous,
        inputs
        {
            item 1 [SmokersChoice.CigarettePackColored] mode:destroy flags[IsFull;AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 10 SmokersChoice.CigaretteColored,
        }
    }

    craftRecipe PackCigarettesColored
    {
        OnCreate = SmokersChoiceBrands.inherit,
        timedAction = PackCigarettes,
        time = 15,
        Tags = InHandCraft;CanBeDoneInDark,
        category = Miscellaneous,
        inputs
        {
            item 10 [SmokersChoice.CigaretteColored] flags[AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 1 SmokersChoice.CigarettePackColored,
        }
    }

    craftRecipe TakeACigaretteColored
    {
        OnCreate = SmokersChoiceBrands.inherit,
        timedAction = TakeCigarette,
        time = 15,
        Tags = InHandCraft;CanBeDoneInDark,
        category = Miscellaneous,
        inputs
        {
            item 1 [SmokersChoice.CigarettePackColored] flags[AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 1 SmokersChoice.CigaretteColored,
        }
    }

    craftRecipe AddACigaretteColored
    {
        timedAction = AddCigarette,
        time = 25,
        OnCreate = SmokersChoiceBrands.addToPack,
        OnTest = RecipeCodeOnTest.canAddToPack,
        Tags = InHandCraft;CanBeDoneInDark,
        category = Miscellaneous,
        inputs
        {
            item 1 [SmokersChoice.CigaretteColored] flags[AllowFavorite;InheritFavorite],
            item 1 [SmokersChoice.CigarettePackColored] mode:keep flags[AllowFavorite;InheritFavorite],
        }
        outputs
        {

        }
    }

    item CigarettePackPastel
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        ItemType = base:drainable,
        Weight = 0.1,
        Icon = SC_PackPastel,
        UseDelta = 0.1,
        UseWhileEquipped = false,
        StaticModel = Cigarette_Lit,
        WorldStaticModel = SC_PackSlim_Pastel,
        Tags = base:packed;base:lessfull;base:consumable;base:smokable,
        EatType = Cigarettes,
        OnEat = RecipeCodeOnEat.consumeNicotine,
        StressChange = -8,
        CustomEatSound = ,
        Eattime = 460,
        RequireInHandOrInventory = Base.CandleLit/Base.Matches/Base.Matchbox/Base.LighterDisposable/Base.Lighter/Base.LighterBBQ/Base.Lighter_Battery,
        CustomContextMenu = Smoke,
        FoodSicknessChange = 14,
        InverseCoughProbability = 6,
        InverseCoughProbabilitySmoker = 2,
        KeepOnDeplete = false,
    }

    item CigarettePastel
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        ItemType = base:food,
        Weight = 0.01,
        Icon = SC_CigarettePastel_Pink,
        CantBeFrozen = true,
        CustomContextMenu = Smoke,
        EatType = Cigarettes,
        HungerChange = 0.0,
        OnEat = RecipeCodeOnEat.consumeNicotine,
        RequireInHandOrInventory = Base.CandleLit/Base.Matches/Base.Matchbox/Base.LighterDisposable/Base.Lighter/Base.LighterBBQ/Base.Lighter_Battery,
        StressChange = -8,
        UnhappyChange = -15,
        StaticModel = Cigarette_Lit,
        WorldStaticModel = Cigarette2,
        CustomEatSound = ,
        Tags = base:useall;base:smokable,
        Eattime = 460,
        FoodSicknessChange = 14,
        InverseCoughProbability = 6,
        InverseCoughProbabilitySmoker = 2,
    }

    craftRecipe UnpackCigarettesPastel
    {
        OnCreate = SmokersChoiceBrands.inherit,
        timedAction = UnpackCigarettes,
        time = 15,
        Tags = InHandCraft;CanBeDoneInDark,
        category = Miscellaneous,
        inputs
        {
            item 1 [SmokersChoice.CigarettePackPastel] mode:destroy flags[IsFull;AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 10 SmokersChoice.CigarettePastel,
        }
    }

    craftRecipe PackCigarettesPastel
    {
        OnCreate = SmokersChoiceBrands.inherit,
        timedAction = PackCigarettes,
        time = 15,
        Tags = InHandCraft;CanBeDoneInDark,
        category = Miscellaneous,
        inputs
        {
            item 10 [SmokersChoice.CigarettePastel] flags[AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 1 SmokersChoice.CigarettePackPastel,
        }
    }

    craftRecipe TakeACigarettePastel
    {
        OnCreate = SmokersChoiceBrands.inherit,
        timedAction = TakeCigarette,
        time = 15,
        Tags = InHandCraft;CanBeDoneInDark,
        category = Miscellaneous,
        inputs
        {
            item 1 [SmokersChoice.CigarettePackPastel] flags[AllowFavorite;InheritFavorite],
        }
        outputs
        {
            item 1 SmokersChoice.CigarettePastel,
        }
    }

    craftRecipe AddACigarettePastel
    {
        timedAction = AddCigarette,
        time = 25,
        OnCreate = SmokersChoiceBrands.addToPack,
        OnTest = RecipeCodeOnTest.canAddToPack,
        Tags = InHandCraft;CanBeDoneInDark,
        category = Miscellaneous,
        inputs
        {
            item 1 [SmokersChoice.CigarettePastel] flags[AllowFavorite;InheritFavorite],
            item 1 [SmokersChoice.CigarettePackPastel] mode:keep flags[AllowFavorite;InheritFavorite],
        }
        outputs
        {

        }
    }
}
