@PART[bluedog_Agena_ResupplyContainer]:NEEDS[USILifeSupport]
{       
        @description ^= :$: Holds up to 21 Kerbal-days of Snacks.:
        RESOURCE
        {
                name = Supplies
                // 21 Kerbal-days
                amount = 0
                maxAmount = 341
        }
}

@PART[bluedog_Gemini_Resupply_Capsule]:NEEDS[USILifeSupport]
{
        @description ^= :$: Holds up to 45 Kerbal-days of Snacks.:
        RESOURCE
        {
                name = Supplies
                // 45 Kerbal-days
                amount = 0
                maxAmount = 729
        }
}

@PART[bluedog_MOL_KISmodule]:NEEDS[USILifeSupport]
{       // This is the largest of these three, right? I have not unlocked it yet...
        @description ^= :a week: 3 crew members for 30 days:
        RESOURCE
        {
                name = Supplies
                // 3*30 Kerbal-days
                amount = 0
                maxAmount = 1458
        }
}

@PART[bluedog_Gemini_Crew_A]:NEEDS[USILifeSupport]
{
        @description ^= :$: Comes stocked with 1 week of Snacks, and can hold up to a 2 week supply:
        RESOURCE
        {
                name = Supplies
                // 14*2 Kerbal-days max
                amount = 227
                maxAmount = 454
        }

        RESOURCE
        {
                name = Mulch
                amount = 0
                maxAmount = 50 // Guessing...
        }

//      MODULE
//      {
//              name = ModuleHabitation
//              KerbalMonths = 0.94 // 14d/30d * 2 Kerbals, rounded up
//      }

}

@PART[bluedog_Gemini_Crew_B]:NEEDS[USILifeSupport]
{
        @description ^= :$: Includes Snacks for 2 days for each passenger, and can hold up to a 4 day supply.:
        RESOURCE
        {
                name = Supplies
                // 4*4 Kerbal-days max
                // More seats, but less duration, assuming this module in a crew shuttle mode.
                amount = 130
                maxAmount = 260
        }

        RESOURCE
        {
                name = Mulch
                amount = 0
                maxAmount = 50 // Guessing...
        }

//      MODULE
//      {
//              name = ModuleHabitation
//              KerbalMonths = 0.54 // 4d/30d * 4 Kerbals, rounded up
//      }

}

@PART[bluedog_Gemini_MalhenaSM]:NEEDS[USILifeSupport]
{
	RESOURCE
        {
                name = Supplies
                // 2*7 Kerbal-days max, 3.5 default
		// I have no idea how to value this part... Any ideas?
                amount = 114
                maxAmount = 227
        }
}

@PART[bluedog_mercuryPod]:NEEDS[USILifeSupport]
{
        @description ^= :$: Comes complete with 3 days of HSNPT. (Healthy Squeezable Nutrient Pellet Tubes): 
        RESOURCE
        {
                name = Supplies
                // 1*3 Kerbal-days
                // 3 days may be generous here...
                amount = 48.6
                maxAmount = 48.6
        }

        RESOURCE
        {
                name = Mulch
                amount = 0
                maxAmount = 10 //Hope you can hold it!...
        }

//      MODULE
//      {
//              name = ModuleHabitation
//              KerbalMonths = 0.1 // 3d/30d * 1 Kerbals, rounded up
//      }

        @RESOURCE[ElectricCharge]
        {
                @amount += 648 // 3d * 6h/d * 60m/h * 60s/m * 0.01ec/s
        }

}

@PART[bluedog_MOL_Hab]:NEEDS[USILifeSupport]
{
        @description ^= :$: Includes 45-days of Snacks, and 120-days of Sanity-Saving* Living Space. (*Sanity retention not guaranteed.): 
        MODULE
        {
                name = ModuleHabitation
                KerbalMonths = 4
        }

        RESOURCE
        {
                name = Supplies
                // 3*45 Kerbal-days
                amount = 2187
                maxAmount = 2187
        }

        RESOURCE
        {
                name = Mulch
                amount = 0
                maxAmount = 200
        }
        
        @RESOURCE[ElectricCharge]
        {
                @amount += 216 // 1d * 6h/d * 60m/h * 60s/m * 0.01ec/s
        }
}

@PART[bluedog_MOL_Lab]:NEEDS[USILifeSupport]
{
        @description ^= :$: Includes CO2 and Dirty Sock Scrubbers. Includes a Bonus 30-day supply of Sanity-Saving Living Space. (*Sanity retention not guaranteed.): 
        MODULE
        {
                name = ModuleLifeSupportRecycler
                CrewCapacity = 3
                RecyclePercent = .4 // Guessing on the efficiency here.
                ConverterName = Recycler
                tag = Recycler
                StartActionName = Start Recycler
                StopActionName = Stop Recycler

                INPUT_RESOURCE
                {
                        ResourceName = ElectricCharge
                        Ratio = 1
                }
        }

        MODULE
        {
                name = ModuleHabitation
                KerbalMonths = 1 // Hey, space is space...
        }
}

@PART[bluedog_Apollo_Block2_ServiceModule]:NEEDS[USILifeSupport]
{
        @description ^= :cells,;cells, snacks,:
        @description ^= :Kerbin.:Kerbin. Includes sufficient tankage for up to 6 days of Soylent Snacks. (100% Kale, we promise!) : 
        RESOURCE
        {
                name = Supplies
                // 3*3 Kerbal-days default, 6 K-d max.
                // I’m not sure how best to do this. Some supplies are in the SM?
                amount = 146
                maxAmount = 292
        }

        RESOURCE
        {
                name = Mulch
                amount = 0
                maxAmount = 50 // Guessing...
        }
}

@PART[bluedog_Apollo_Block2_Capsule]:NEEDS[USILifeSupport]
{
        @description ^= :$: Includes ample (Ample = 3 days) storage for assorted Snacks, NOMS, Sammiches, and other delicacies. Includes a Bonus CO2 and Dirty Sock Scrubber at No Extra Charge. (Bubbles Sold Separately.): 
        RESOURCE
        {
                name = Supplies
                amount = 109 // 3d w/ recycling for 3 kerbals
                maxAmount = 218 // 218 + 292 = 510, should be enough for 3 kerbals * 14 days w/ recycling.
        }

        RESOURCE
        {
                name = Mulch
                amount = 0
                maxAmount = 100 //Guessing...
        }

        MODULE
        {
                name = ModuleLifeSupportRecycler
                CrewCapacity = 3
                RecyclePercent = .25 // This fits the above numbers for a 14 day max mission.
                ConverterName = Recycler
                tag = Recycler
                StartActionName = Start Recycler
                StopActionName = Stop Recycler

                INPUT_RESOURCE
                {
                        ResourceName = ElectricCharge
                        Ratio = 1
                }
        }

//      MODULE
//      {
//              name = ModuleHabitation
//              KerbalMonths = 0.54 // 4d/30d * 4 Kerbals, rounded up
//      }
}

@PART[bluedog*,Bluedog*]:HAS[@RESOURCE[Supplies]]:NEEDS[USILifeSupport]:AFTER[Bluedog_DB]
{
    supcostmult = #$@RESOURCE_DEFINITION[Supplies]/unitCost$
    supcost = #$/RESOURCE[Supplies]/maxAmount$
    @supcost *= #$supcostmult$
    @cost += #$supcost$
    !supcostmult = del
    !supcost = del
}
