label coxSlutteryUnload():
    $ renpy.dynamic("coxTemplist", "swap", "the_tag", "coxTagPoints", "the_varname", "the_var")
    "Carina Cox" "You've disabled CoxSluttery, and are now in a save that used to have it enabled.\nThis means I need to do a cleanup, as best possible, at least."
    "Carina Cox" "However, there is a choice.\nYou can either have the mod reset to its default values, or you can keep changes."
    "Carina Cox" "Keeping the changes means, if you re-enable the mod later, you will, for instance, keep the clothes you've purchased, keep the corruption points earned, and keep the mod's event progression."
    "Carina Cox" "Resetting to default values means exactly that. You would have to unlock everything over again if you re-enable the mod. Part of this process is emptying the lists for clothes, so any mods dependent on this mod to add clothes would need to add those clothes over again."
    menu:
        "Carina Cox" "Reset to default or keep settings?"
        "Reset to default":
            $ coxKeepSettings = False
        "Keep changes":
            $ coxKeepSettings = True
    python:
        event_system.on_time_change.remove(coxTimeEvents)
        event_system.on_day_change.remove(coxDayEvents)
        
        cheerleader_base_underwear.set_name="Default Underwear"
        cheerleader_base_outfit.set_name="Default Outfit"
        cheerleader.set_current_outfit(new_outfit=cheerleader_base_outfit, new_underwear=cheerleader_base_underwear)
        
        list_of_outfits.remove(coxDailySave)
        list_of_uniforms.remove(coxWorkSave)
        list_of_swimwear.remove(coxSwimwearSave)
        list_of_workout_wear.remove(coxGymSave)
        
        if mom.outfit_manager.persistent_texture_swaps:
            coxTemplist = []
            for swap in mom.outfit_manager.persistent_texture_swaps:
                if swap.texture_id != 0:
                    coxTemplist.append(swap)
            for swap in coxTemplist:
                mom.outfit_manager.persistent_texture_swaps.remove(swap)
        
        mom.default_homewear = None
        mom.default_workwear = None
        mom.default_swimwear = None
        mom.default_workout_wear = None
        
        if not coxKeepSettings:
            coxExtendCasual         = False
            coxCasualFridayEnabled  = True
            coxPlusOneChurch        = True
            coxPiercingsUnlocked    = False
            coxTattoosUnlocked      = False
            coxVisitedEmporium      = False
            coxCoxTutorial          = False
            coxEmporiumPurchases    = 0
            coxSeenBody             = False
            coxSeenBimbo            = False
            coxSeenEdgelady         = False
            coxSeenTopHeavy         = False
            coxImaginative          = False
            
        coxTemplist = ["coxExtendCasual", "coxSecretsToNudity", "coxSewedSkirtAgain"]
        the_varname = None
        the_var = None
        coxTagPoints = 0
        for the_varname, the_var in vars(renpy.store).items():
            if isinstance(the_var, Person):
                coxTagPoints = 0
                for the_tag in coxTemplist:
                    if the_tag in the_var.corruption_tags:
                        if coxKeepSettings:
                            if the_var is mom:
                                coxKeptMomTags.append(the_tag)
                        coxTagPoints += 1
                        the_var.corruption_tags.remove(the_tag)
                the_var.corruption_progress = the_var.corruption_progress - coxTagPoints
                while the_var.corruption_progress < 0:
                    the_var.corrpution_progress = the_var.corrpution_progress + the_var.corruption_level
                    the_var.corruption_level -= 1
            
    
    if coxLocationDick[mom.current_location.name] == "School":
        call dress_work()
    else:
        call dress_daily()
    
    if not coxKeepSettings:
        "Carina Cox" "Goodbye, cruel world!"
        python:
            lListBras               = []
            lListHalfCupBras        = []
            lListExoticBras         = []
            lListBikiniTops         = []
            lListMicroBikiniTops    = []
            lListPanties            = []
            lListThongs             = []
            lListFloss              = []
            lListBikiniBottoms      = []
            lListMicroBikiniBottoms = []
            lListNegligees          = []
            lListCorsets            = []
            lListSwimsuits          = []
            lListMonokinis          = []
            lListSleevedTops        = []
            lListTankTops           = []
            lListTubeTops           = []
            lListHalterTops         = []
            lListCropTops           = []
            lListShirts             = []
            lListAsymmetricTops     = []
            lListPants              = []
            lListShorts             = []
            lListHotpants           = []
            lListLeggings           = []
            lListSkirtsLong         = []
            lListSkirtsMini         = []
            lListSkirtsMicro        = []
            lListSkirtsUnderBust    = []
            lListSets               = []
            lListDressesLong        = []
            lListDressesMini        = []
            lListDressesMicro       = []
            lListHoisery            = []
            lListShoes              = []
            lListBoots              = []
            lListMMO                = []
            lListCosplay            = []
            lListAccessories        = []
            lListMisc               = []
            lListNecklaces          = []
            lListFacePiercings      = []
            lListNipplePiercings    = []
            lListOtherPiercings     = []
            lListSkins              = []
            lListPubes              = []
            lListLipstick           = []
            lListEyeshadow          = []
            lListBlush              = []
            lListNipples            = []
            lListEyes               = []
            lListHair               = []
            lListWaterHair          = []
            lListWater              = []
            lListCurrent            = []
            lListRemoval            = []
            lListFirebrand          = []
            lListBusty              = []
            lListCheerHair          = []
            lListCheerSkin          = []
            lListCheerNipples       = []
            lListCheerEyes          = []
            lListCheerBras          = []
            lListCheerPanties       = []
            lListCheerTops          = []
            lListCheerSkirts        = []
            lListCheerHoisery       = []
            lListCheerFootwear      = []
            lListCheerAccessories   = []
            lListCheerMakeup        = []
            lListCheerHomeOutfits   = []
            lListCheerSchoolOutfits = []
            lListCheerUnderwear     = []
            lListExtendedCasual     = []
        "You deleted Carina. Rude."
    
    return
