module SmokersChoice
{
    imports
    {
        Base
    }

    /* Cigarette packs: copies of Base.CigarettePack. Vanilla handles nicotine,
       stress, cough, sickness and the lighter. Smoking straight from a pack
       goes through the take-pill action, which ignores UnhappyChange,
       BoredomChange and HungerChange on a pack (tested in game), so the menthol and cheap
       pack values are applied in Lua instead (SmokersChoice.Extras).
       Singles below are food, so their values work as script fields, except
       HungerChange: on food it turns one cigarette into several recipe "uses"
       (repacking would eat part of one), so singles keep 0 and their hunger
       is applied in Lua (SmokersChoice.EatHunger).
       Cheap cigarettes use the menthol cough values. Cough fields:
       higher = rarer. */

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

    item CigarettePackMenthol
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        ItemType = base:drainable,
        Weight = 0.2,
        Icon = SC_PackMenthol,
        UseDelta = 0.05,
        UseWhileEquipped = false,
        StaticModel = SC_Cig_Menthol_Lit,
        WorldStaticModel = CigarettePack_Closed,
        Tags = base:packed;base:lessfull;base:consumable;base:smokable,
        EatType = Cigarettes,
        OnEat = RecipeCodeOnEat.consumeNicotine,
        StressChange = -5,
        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 CigarettePackCheap
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        ItemType = base:drainable,
        Weight = 0.2,
        Icon = SC_PackCheap,
        UseDelta = 0.05,
        UseWhileEquipped = false,
        StaticModel = SC_Cig_Cheap_Lit,
        WorldStaticModel = CigarettePack_Closed,
        Tags = base:packed;base:lessfull;base:consumable;base:smokable,
        EatType = Cigarettes,
        OnEat = RecipeCodeOnEat.consumeNicotine,
        StressChange = -5,
        CustomEatSound = ,
        Eattime = 460,
        RequireInHandOrInventory = Base.CandleLit/Base.Matches/Base.Matchbox/Base.LighterDisposable/Base.Lighter/Base.LighterBBQ/Base.Lighter_Battery,
        CustomContextMenu = Smoke,
        FoodSicknessChange = 25,
        InverseCoughProbability = 6,
        InverseCoughProbabilitySmoker = 2,
        KeepOnDeplete = false,
    }

    /* Singles: copies of Base.CigaretteSingle (food, smoked via the eat
       action, so extras are plain script fields). */

    item CigaretteLight
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        ItemType = base:food,
        Weight = 0.01,
        Icon = SC_CigLight,
        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 = -4,
        StaticModel = SC_Cig_Light_Lit,
        WorldStaticModel = SC_Cig_Light,
        CustomEatSound = ,
        Tags = base:useall;base:smokable,
        Eattime = 460,
        FoodSicknessChange = 14,
        InverseCoughProbability = 8,
        InverseCoughProbabilitySmoker = 4,
    }

    item CigaretteMenthol
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        ItemType = base:food,
        Weight = 0.01,
        Icon = SC_CigMenthol,
        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 = -5,
        UnhappyChange = -10,
        BoredomChange = -10,
        StaticModel = SC_Cig_Menthol_Lit,
        WorldStaticModel = SC_Cig_Menthol,
        CustomEatSound = ,
        Tags = base:useall;base:smokable,
        Eattime = 460,
        FoodSicknessChange = 14,
        InverseCoughProbability = 6,
        InverseCoughProbabilitySmoker = 2,
    }

    item CigaretteCheap
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        ItemType = base:food,
        Weight = 0.01,
        Icon = SC_CigCheap,
        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 = -5,
        UnhappyChange = 5,
        StaticModel = SC_Cig_Cheap_Lit,
        WorldStaticModel = SC_Cig_Cheap,
        CustomEatSound = ,
        Tags = base:useall;base:smokable,
        Eattime = 460,
        FoodSicknessChange = 25,
        InverseCoughProbability = 6,
        InverseCoughProbabilitySmoker = 2,
    }

    /* Cartons: copies of Base.CigaretteCarton, double-click to unpack. */

    item CigaretteCartonLight
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        Weight = 2.0,
        ItemType = base:normal,
        Icon = SC_CartLight,
        WorldStaticModel = CigaretteCarton,
        Tags = base:ignorezombiedensity,
        DoubleClickRecipe = UnpackCigaretteCartonLight,
    }

    item CigaretteCartonMenthol
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        Weight = 2.0,
        ItemType = base:normal,
        Icon = SC_CartMenthol,
        WorldStaticModel = CigaretteCarton,
        Tags = base:ignorezombiedensity,
        DoubleClickRecipe = UnpackCigaretteCartonMenthol,
    }

    item CigaretteCartonCheap
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        Weight = 2.0,
        ItemType = base:normal,
        Icon = SC_CartCheap,
        WorldStaticModel = CigaretteCarton,
        Tags = base:ignorezombiedensity,
        DoubleClickRecipe = UnpackCigaretteCartonCheap,
    }

    item CigarilloCarton
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        Weight = 0.4,
        ItemType = base:normal,
        Icon = SC_CigarilloCarton,
        WorldStaticModel = SC_CigarilloCarton,
        Tags = base:ignorezombiedensity,
        DoubleClickRecipe = UnpackCigarilloCarton,
    }

    /* Cigarillo pack: 2 vanilla cigarillos (UseDelta 0.5), smoked
       straight from the pack like a cigarette pack. Smoking stats copied
       from Base.Cigarillo; its unhappiness and hunger are applied in Lua
       (SmokersChoice.Extras), since the take-pill action ignores them on
       a pack. */
    item CigarilloPack
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = Junk,
        ItemType = base:drainable,
        Weight = 0.04,
        Icon = SC_CigarilloPack,
        UseDelta = 0.5,
        UseWhileEquipped = false,
        StaticModel = Cigarillo_Lit,
        WorldStaticModel = SC_CigarilloWrapper,
        Tags = base:ignorezombiedensity;base:packed;base:lessfull;base:consumable;base:smokable,
        EatType = Cigarettes,
        OnEat = RecipeCodeOnEat.consumeNicotine,
        StressChange = -8,
        CustomEatSound = ,
        Eattime = 920,
        RequireInHandOrInventory = Base.CandleLit/Base.Matches/Base.Matchbox/Base.LighterDisposable/Base.Lighter/Base.LighterBBQ/Base.Lighter_Battery,
        CustomContextMenu = Smoke,
        FoodSicknessChange = 25,
        InverseCoughProbability = 5,
        InverseCoughProbabilitySmoker = 2,
        KeepOnDeplete = false,
    }

    /* Nicotine replacement. Consumable drainables, so vanilla offers them
       through the take-pill action; the effect is applied in Lua.
       No cough, no lighter, no food sickness; only gum relieves stress. */

    /* Box of 5 patches: apply straight from the box, or take one out. */
    item NicotinePatches
    {
        DisplayCategory = FirstAid,
        ItemType = base:drainable,
        Weight = 0.1,
        Icon = SC_PackNicotinePatch,
        UseDelta = 0.2,
        UseWhileEquipped = false,
        WorldStaticModel = CigaretteRollingPapers,
        Tags = base:consumable;base:fitswallet,
        CustomContextMenu = ApplyPatch,
        Tooltip = Tooltip_SV_NicotinePatches,
    }

    /* Loose patch: a single-use drainable, like the loose heat stick. */
    item NicotinePatch
    {
        DisplayCategory = FirstAid,
        ItemType = base:drainable,
        Weight = 0.01,
        Icon = SC_NicotinePatch,
        UseDelta = 1.0,
        UseWhileEquipped = false,
        KeepOnDeplete = false,
        WorldStaticModel = CigaretteRollingPapers,
        Tags = base:consumable;base:fitswallet,
        CustomContextMenu = ApplyPatch,
        Tooltip = Tooltip_SV_NicotinePatches,
    }

    /* Box of 5 pieces of gum: chew straight from the box, or take one
       out. Same pattern as the patches. */
    item NicotineGum
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = FirstAid,
        ItemType = base:drainable,
        Weight = 0.1,
        Icon = SC_PackNicotineGum,
        UseDelta = 0.2,
        UseWhileEquipped = false,
        StaticModel = Gum_Ground,
        WorldStaticModel = Gum_Ground,
        Tags = base:consumable;base:fitswallet,
        CustomContextMenu = Chew,
        EatType = EatBox,
        KeepOnDeplete = false,
        Tooltip = Tooltip_SV_NicotineGum,
    }

    /* Loose piece of gum: a single-use drainable, like the loose patch. */
    item NicotineGumPiece
    {
        OnCreate = SmokersChoiceBrands.onCreate,
        DisplayCategory = FirstAid,
        ItemType = base:drainable,
        Weight = 0.01,
        Icon = SC_NicotineGum,
        UseDelta = 1.0,
        UseWhileEquipped = false,
        StaticModel = Gum_Ground,
        WorldStaticModel = Gum_Ground,
        Tags = base:consumable;base:fitswallet,
        CustomContextMenu = Chew,
        EatType = EatBox,
        KeepOnDeplete = false,
        Tooltip = Tooltip_SV_NicotineGum,
    }

    /* Small lighter fluid can: 107 uses, a third of the big can, about three
       empty-to-full refills of a 32-use Zippo (SmokersChoice_Refill.lua).
       The vanilla can's model at 70% size. No lighterfluid tag, so vanilla's
       RefillLighter (big can only) doesn't take it; it has its own recipe,
       RefillZippoSmall. */
    item LighterFluidSmall
    {
        OnCreate = SmokersChoiceRefill.onCreateFluid,
        DisplayCategory = Household,
        ItemType = base:drainable,
        Weight = 0.1,
        Icon = SC_LighterFluidSmall,
        UseDelta = 0.0093457,
        UseWhileEquipped = false,
        WorldStaticModel = SC_LighterFluidSmall,
        Tags = base:hasmetal,
    }
}

