<?xml version="1.0" encoding="utf-8" ?>
<Defs>

	<!--========== Smokeleaf Butter ==========-->
  
  <ThingDef ParentName="MSI_MealRottable">
    <defName>SmokeleafButter</defName>
    <label>smokeleaf butter</label>
    <description>Butter made from simmering smokeleaf buds with milk. Creates a potent base for edibles.</description>
    <graphicData>
      <texPath>Things/Items/MSI_butter</texPath>
      <graphicClass>Graphic_StackCount</graphicClass>
    </graphicData>
  	<soundInteract>Standard_Drop</soundInteract>
      <soundDrop>Standard_Drop</soundDrop>
  	<socialPropernessMatters>true</socialPropernessMatters>
    <statBases>
      <MarketValue>4.0</MarketValue>
      <Flammability>0.5</Flammability>
    </statBases>
  	<ingestible>
  		<nutrition>0.1</nutrition>
  		<foodType>Processed</foodType>
  		<baseIngestTicks>120</baseIngestTicks>
  		<chairSearchRadius>25</chairSearchRadius>
  		<ingestSound>Meal_Eat</ingestSound>
  		<useEatingSpeedStat>true</useEatingSpeedStat>
  		<ingestEffect>EatVegetarian</ingestEffect>
  		<preferability>RawBad</preferability>
  		<joy>0.5</joy>
  		<joyKind>Chemical</joyKind>
  		<outcomeDoers>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>EdiblesHigh</hediffDef>
  				<severity>0.15</severity>
  				<toleranceChemical>Edibles</toleranceChemical>
  			</li>
  			<li Class="IngestionOutcomeDoer_OffsetNeed">
  				<need>Rest</need>
  				<offset>-0.01</offset>
  			</li>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>EdiblesTolerance</hediffDef>
  				<severity>0.03</severity>
  				<divideByBodySize>true</divideByBodySize>
  			</li>
        </outcomeDoers>
  	</ingestible>
    <thingCategories>
      <li>SmokeleafIndCatEdibles</li>
    </thingCategories>
  </ThingDef>
  
  <!--========== Hemp Flour ==========-->
  
  <ThingDef ParentName="MSI_PlantFoodRawBase">
    <defName>HempFlour</defName>
    <label>hemp flour</label>
    <description>Smokeleaf seeds can be ground into a fine flour for baking.</description>
    <graphicData>
      <texPath>Things/Items/MSI_flour</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <soundInteract>Standard_Drop</soundInteract>
    <soundDrop>Standard_Drop</soundDrop>
    <socialPropernessMatters>true</socialPropernessMatters>
    <statBases>
      <MarketValue>2.5</MarketValue>
      <Flammability>1.0</Flammability>
      <DeteriorationRate>12</DeteriorationRate>
    </statBases>
    <ingestible>
      <preferability>RawBad</preferability>
      <foodType>Processed</foodType>
      <nutrition>0.1</nutrition>
      <maxNumToIngestAtOnce>1</maxNumToIngestAtOnce>
      <useEatingSpeedStat>true</useEatingSpeedStat>
      <baseIngestTicks>120</baseIngestTicks>
      <ingestEffect>EatVegetarian</ingestEffect>
      <ingestSound>Meal_Eat</ingestSound>
    </ingestible>
    <comps>
      <li Class="CompProperties_Rottable">
        <daysToRotStart>120</daysToRotStart>
        <rotDestroys>true</rotDestroys>
      </li>
    </comps>
    <thingCategories>
      <li>PlantFoodRaw</li>
    </thingCategories>
    <researchPrerequisites>
      <li>SmokeleafProcessing</li>
    </researchPrerequisites>
  </ThingDef>

	<!--========== Hemp Milk ==========-->
  
  <ThingDef ParentName="MSI_PlantFoodRawBase">
    <defName>HempMilk</defName>
    <label>hemp milk</label>
    <description>"Milk" made from smokeleaf seeds that are soaked and ground in water.</description>
    <graphicData>
      <texPath>Things/Items/MSI_milk</texPath>
      <graphicClass>Graphic_StackCount</graphicClass>
    </graphicData>
  	<soundInteract>Standard_Drop</soundInteract>
      <soundDrop>Standard_Drop</soundDrop>
  	<socialPropernessMatters>true</socialPropernessMatters>
    <statBases>
      <MarketValue>4.0</MarketValue>
      <Flammability>0.5</Flammability>
    </statBases>
  	<ingestible>
      <preferability>RawTasty</preferability>
  		<nutrition>0.05</nutrition>
  		<foodType>Processed</foodType>
  		<baseIngestTicks>120</baseIngestTicks>
  		<chairSearchRadius>25</chairSearchRadius>
  		<ingestSound>Meal_Eat</ingestSound>
  		<useEatingSpeedStat>true</useEatingSpeedStat>
  		<ingestEffect>EatVegetarian</ingestEffect>
  		<preferability>RawBad</preferability>
  	</ingestible>
    <thingCategories>
      <li>PlantFoodRaw</li>
    </thingCategories>
  </ThingDef>

  <!--========== Hemp Protein ==========-->
  
  <ThingDef ParentName="MSI_PlantFoodRawBase">
    <defName>HempProtein</defName>
    <label>hemp Protein</label>
    <description>A protein powder made from crushed smokeleaf seeds.</description>
    <graphicData>
      <texPath>Things/Items/MSI_hempProtein</texPath>
      <graphicClass>Graphic_StackCount</graphicClass>
    </graphicData>
    <soundInteract>Standard_Drop</soundInteract>
      <soundDrop>Standard_Drop</soundDrop>
    <socialPropernessMatters>true</socialPropernessMatters>
    <statBases>
      <MarketValue>12</MarketValue>
      <Flammability>0.5</Flammability>
      <Mass>0.15</Mass>
    </statBases>
    <ingestible>
      <nutrition>0.05</nutrition>
      <foodType>Meat</foodType>
      <preferability>DesperateOnlyForHumanlikes</preferability>
      <baseIngestTicks>120</baseIngestTicks>
      <chairSearchRadius>25</chairSearchRadius>
      <ingestSound>Meal_Eat</ingestSound>
      <useEatingSpeedStat>true</useEatingSpeedStat>
      <ingestEffect>EatMeat</ingestEffect>
      <preferability>RawBad</preferability>
    </ingestible>
    <thingCategories>
      <li>MeatRaw</li>
    </thingCategories>
  </ThingDef>

  <!--========== Smokeleaf Seed Oil ==========-->
  
  <ThingDef ParentName="MSI_PlantFoodRawBase">
    <defName>SmokeleafSeedOil</defName>
    <label>smokeleaf seed oil</label>
    <description>Oils pressed from smokeleaf seeds. While seed oil does not possess any medicinal qualities, it has many various uses.</description>
    <graphicData>
      <texPath>Things/Items/MSI_hempSeedOil</texPath>
      <graphicClass>Graphic_StackCount</graphicClass>
    </graphicData>
    <soundInteract>Standard_Drop</soundInteract>
      <soundDrop>Standard_Drop</soundDrop>
    <socialPropernessMatters>true</socialPropernessMatters>
    <statBases>
      <MarketValue>4.0</MarketValue>
      <Flammability>0.5</Flammability>
    </statBases>
    <ingestible>
      <nutrition>0.05</nutrition>
      <foodType>Processed</foodType>
      <baseIngestTicks>120</baseIngestTicks>
      <chairSearchRadius>25</chairSearchRadius>
      <ingestSound>Meal_Eat</ingestSound>
      <useEatingSpeedStat>true</useEatingSpeedStat>
      <ingestEffect>EatVegetarian</ingestEffect>
      <preferability>RawBad</preferability>
    </ingestible>
    <thingCategories>
      <li>PlantFoodRaw</li>
    </thingCategories>
  </ThingDef>

	<!--========== Edibles ==========-->

  <ThingDef ParentName="MSI_MakeableEdibleBase">
    <defName>SmokeleafBrownie</defName>
    <label>smokeleaf brownie</label>
    <thingClass>ThingWithComps</thingClass>
    <thingCategories>
      <li>SmokeleafIndCatEdibles</li>
    </thingCategories>
    <description>The infamous "special" brownie.</description>
    <graphicData>
      <texPath>Things/Items/MSI_brownie</texPath>
      <graphicClass>Graphic_StackCount</graphicClass>
    </graphicData>
    <socialPropernessMatters>true</socialPropernessMatters>
    <statBases>
  		<MarketValue>13</MarketValue>
  		<Mass>0.25</Mass>
    </statBases>
    <ingestible>
  		<outcomeDoers>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>EdiblesHigh</hediffDef>
  				<severity>0.6</severity>
  				<toleranceChemical>Edibles</toleranceChemical>
  			</li>
  			<li Class="IngestionOutcomeDoer_OffsetNeed">
  				<need>Rest</need>
  				<offset>-0.2</offset>
  			</li>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>EdiblesTolerance</hediffDef>
  				<severity>0.03</severity>
  				<divideByBodySize>true</divideByBodySize>
  			</li>
      </outcomeDoers>
  	</ingestible>
  	<comps>
        <li Class="CompProperties_Drug">
          <chemical>Edibles</chemical>
          <addictiveness>0.015</addictiveness>
          <minToleranceToAddict>0.15</minToleranceToAddict>
          <existingAddictionSeverityOffset>0.06</existingAddictionSeverityOffset>
          <needLevelOffset>1</needLevelOffset>
          <listOrder>20</listOrder>
        </li>
      </comps>
  </ThingDef>
  
  <ThingDef ParentName="MSI_MakeableEdibleBase">
    <defName>SmokeleafCookie</defName>
    <label>smokeleaf cookie</label>
    <thingClass>ThingWithComps</thingClass>
    <thingCategories>
      <li>SmokeleafIndCatEdibles</li>
    </thingCategories>
    <description>A smokeleaf butter cookie. Get comfortable.</description>
    <graphicData>
      <texPath>Things/Items/MSI_cookie</texPath>
      <graphicClass>Graphic_StackCount</graphicClass>
    </graphicData>
    <socialPropernessMatters>true</socialPropernessMatters>
    <statBases>
  		<MarketValue>10</MarketValue>
  		<Mass>0.15</Mass>
    </statBases>
    <ingestible>
  		<outcomeDoers>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>EdiblesHigh</hediffDef>
  				<severity>0.5</severity>
  				<toleranceChemical>Edibles</toleranceChemical>
  			</li>
  			<li Class="IngestionOutcomeDoer_OffsetNeed">
  				<need>Rest</need>
  				<offset>-0.2</offset>
  			</li>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>EdiblesTolerance</hediffDef>
  				<severity>0.010</severity>
  				<divideByBodySize>true</divideByBodySize>
  			</li>
      </outcomeDoers>
  	</ingestible>
  	<comps>
        <li Class="CompProperties_Drug">
          <chemical>Edibles</chemical>
          <addictiveness>0.015</addictiveness>
          <minToleranceToAddict>0.15</minToleranceToAddict>
          <existingAddictionSeverityOffset>0.06</existingAddictionSeverityOffset>
          <needLevelOffset>1</needLevelOffset>
          <listOrder>20</listOrder>
        </li>
      </comps>
  </ThingDef>
  
  <ThingDef ParentName="MSI_MakeableEdibleBase">
    <defName>SmokeleafNutriLeaf</defName>
    <label>NutriLeaf bar</label>
    <thingClass>ThingWithComps</thingClass>
    <thingCategories>
      <li>SmokeleafIndCatEdibles</li>
    </thingCategories>
    <description>A chewy, fruit filled, smokeleaf infused snack bar.</description>
    <graphicData>
      <texPath>Things/Items/MSI_NutriLeaf</texPath>
      <graphicClass>Graphic_StackCount</graphicClass>
    </graphicData>
    <socialPropernessMatters>true</socialPropernessMatters>
    <statBases>
  		<MarketValue>15</MarketValue>
  		<Mass>0.25</Mass>
    </statBases>
    <ingestible>
  		<outcomeDoers>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>EdiblesHigh</hediffDef>
  				<severity>0.5</severity>
  				<toleranceChemical>Edibles</toleranceChemical>
  			</li>
  			<li Class="IngestionOutcomeDoer_OffsetNeed">
  				<need>Rest</need>
  				<offset>-0.2</offset>
  			</li>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>EdiblesTolerance</hediffDef>
  				<severity>0.010</severity>
  				<divideByBodySize>true</divideByBodySize>
  			</li>
      </outcomeDoers>
  	</ingestible>
  	<comps>
      <li Class="CompProperties_Drug">
        <chemical>Edibles</chemical>
        <addictiveness>0.015</addictiveness>
        <minToleranceToAddict>0.15</minToleranceToAddict>
        <existingAddictionSeverityOffset>0.06</existingAddictionSeverityOffset>
        <needLevelOffset>1</needLevelOffset>
        <listOrder>20</listOrder>
      </li>
    </comps>
  </ThingDef>
  
  <!--========== Hediffs ==========-->
	
  <HediffDef>
    <defName>EdiblesHigh</defName>
    <hediffClass>HediffWithComps</hediffClass>
    <label>stoned on edibles</label>
    <defaultLabelColor>(1,0,0.5)</defaultLabelColor>
    <scenarioCanAdd>true</scenarioCanAdd>
    <maxSeverity>1.0</maxSeverity>
    <comps>
      <li Class="HediffCompProperties_Effecter">
        <stateEffecter>High</stateEffecter>
        <severityIndices>
          <min>1</min>
          <max>5</max>
        </severityIndices>
      </li>
      <li Class="HediffCompProperties_SeverityPerDay">
        <severityPerDay>-1.0</severityPerDay>
      </li>
    </comps>
      <stages>
        <li>
          <hungerRateFactor>0.95</hungerRateFactor>
          <painOffset>-0.25</painOffset>
          <capMods>
            <li>
              <capacity>Consciousness</capacity>
              <offset>-0.05</offset>
            </li>
            <li>
              <capacity>Moving</capacity>
              <offset>-0.05</offset>
            </li>
          </capMods>
        </li>
      </stages>
  </HediffDef>
  
  <ThoughtDef>
    <defName>EdiblesHigh</defName>
    <workerClass>ThoughtWorker_Hediff</workerClass>
    <hediff>EdiblesHigh</hediff>
    <validWhileDespawned>true</validWhileDespawned>
    <stages>
      <li>
        <label>high on edibles</label>
        <description>Wow. These are tasty.</description>
        <baseMoodEffect>15</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>
  
    <!--========== Edibles Addiction ==========-->

  <ChemicalDef>
    <defName>Edibles</defName>
    <label>edibles</label>
    <addictionHediff>EdiblesAddiction</addictionHediff>
    <toleranceHediff>EdiblesTolerance</toleranceHediff>
	  <onGeneratedAddictedToleranceChance>0.8</onGeneratedAddictedToleranceChance>
  </ChemicalDef>

  <NeedDef ParentName="MSI_DrugAddictionNeedBase">
    <defName>Chemical_Edibles</defName>
    <needClass>Need_Chemical</needClass>
    <label>edibles</label>
    <description>Because edibles are so good, this person needs to regularly consume them to avoid withdrawal symptoms.</description>
    <listPriority>25</listPriority>
  </NeedDef>
  
  <HediffDef ParentName="MSI_DrugToleranceBase">
    <defName>EdiblesTolerance</defName>
    <label>edibles tolerance</label>
    <comps>
      <li Class="HediffCompProperties_SeverityPerDay">
        <severityPerDay>-0.1333</severityPerDay>
      </li>
      <li Class="HediffCompProperties_DrugEffectFactor">
        <chemical>Edibles</chemical>
      </li>
    </comps>
		<hediffGivers>
			<li Class="HediffGiver_RandomDrugEffect">
				<hediff>EdibleSickness</hediff>
				<baseMtbDays>0.5</baseMtbDays>
				<minSeverity>0.5</minSeverity>
				<countToAffect>1</countToAffect>
			</li>
		</hediffGivers>
	</HediffDef>

  <HediffDef ParentName="MSI_AddictionBase">
    <defName>EdiblesAddiction</defName>
    <hediffClass>Hediff_Addiction</hediffClass>
    <label>edibles dependence</label>
    <causesNeed>Chemical_Edibles</causesNeed>
    <comps>
      <li Class="HediffCompProperties_SeverityPerDay">
        <severityPerDay>-0.0666</severityPerDay>
      </li>
    </comps>
    <stages>
      <li>
      </li>
      <li>
        <label>withdrawal</label>
        <capMods>
          <li>
            <capacity>Consciousness</capacity>
            <offset>-0.1</offset>
          </li>
          <li>
            <capacity>Moving</capacity>
            <offset>-0.1</offset>
          </li>
        </capMods>
		<mentalStateGivers>
			<li>
				<mentalState>WanderSad</mentalState>
				<mtbDays>30</mtbDays>
			</li>
			<li>
				<mentalState>BingingDrugMajor</mentalState>
				<mtbDays>30</mtbDays>
			</li>
		</mentalStateGivers>
      </li>
    </stages>
  </HediffDef>

  <ThoughtDef>
    <defName>EdiblesWithdrawal</defName>
    <workerClass>ThoughtWorker_Hediff</workerClass>
    <hediff>EdiblesAddiction</hediff>
    <validWhileDespawned>true</validWhileDespawned>
    <stages>
      <li>
        <visible>false</visible>
      </li>
      <li>
        <label>edibles withdrawal</label>
        <description>What happened to all the brownies?</description>
        <baseMoodEffect>-10</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>
  
	<!--========== Advanced Edibles ==========-->
	
  <ThingDef ParentName="MSI_MakeableEdibleBase">
    <defName>SmokeleafDeEnergyDrink</defName>
    <label>smokeleaf de-energy drink</label>
    <thingClass>ThingWithComps</thingClass>
    <thingCategories>
      <li>SmokeleafIndCatEdibles</li>
    </thingCategories>
    <description>Don't make plans for 5 hours.</description>
    <graphicData>
      <texPath>Things/Items/MSI_deEnergyDrink</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <socialPropernessMatters>true</socialPropernessMatters>
    <statBases>
  		<MarketValue>40</MarketValue>
  		<Mass>0.25</Mass>
  		<WorkToMake>300</WorkToMake>
    </statBases>
    <ingestible>
  		<outcomeDoers>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>AdvancedEdiblesHigh</hediffDef>
  				<severity>0.75</severity>
  				<toleranceChemical>Edibles</toleranceChemical>
  			</li>
  			<li Class="IngestionOutcomeDoer_OffsetNeed">
  				<need>Rest</need>
  				<offset>-0.2</offset>
  			</li>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>AdvancedEdiblesTolerance</hediffDef>
  				<severity>0.040</severity>
  				<divideByBodySize>true</divideByBodySize>
  			</li>
      </outcomeDoers>
  	</ingestible>
  	<comps>
  		<li Class="CompProperties_Drug">
  			<chemical>AdvancedEdibles</chemical>
  			<addictiveness>0.025</addictiveness>
  			<minToleranceToAddict>0.15</minToleranceToAddict>
  			<existingAddictionSeverityOffset>0.06</existingAddictionSeverityOffset>
  			<needLevelOffset>1</needLevelOffset>
  			<listOrder>20</listOrder>
  		</li>
    </comps>
  </ThingDef>
  
  <ThingDef ParentName="MSI_MakeableEdibleBase">
    <defName>SmokeleafSmoothie</defName>
    <label>smokeleaf smoothie</label>
    <thingClass>ThingWithComps</thingClass>
    <thingCategories>
      <li>SmokeleafIndCatEdibles</li>
    </thingCategories>
    <description>A delicious fruit smoothie with a smokeleaf kick.</description>
    <graphicData>
      <texPath>Things/Items/MSI_smoothie</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <socialPropernessMatters>true</socialPropernessMatters>
    <statBases>
  		<MarketValue>35</MarketValue>
  		<Mass>0.5</Mass>
  		<WorkToMake>300</WorkToMake>
    </statBases>
    <ingestible>
  		<outcomeDoers>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>AdvancedEdiblesHigh</hediffDef>
  				<severity>0.65</severity>
  				<toleranceChemical>AdvancedEdibles</toleranceChemical>
  			</li>
  			<li Class="IngestionOutcomeDoer_OffsetNeed">
  				<need>Rest</need>
  				<offset>-0.2</offset>
  			</li>
  			<li Class="IngestionOutcomeDoer_GiveHediff">
  				<hediffDef>AdvancedEdiblesTolerance</hediffDef>
  				<severity>0.030</severity>
  				<divideByBodySize>true</divideByBodySize>
  			</li>
      </outcomeDoers>
  	</ingestible>
  	<comps>
  		<li Class="CompProperties_Drug">
  			<chemical>AdvancedEdibles</chemical>
  			<addictiveness>0.025</addictiveness>
  			<minToleranceToAddict>0.25</minToleranceToAddict>
  			<existingAddictionSeverityOffset>0.06</existingAddictionSeverityOffset>
  			<needLevelOffset>1</needLevelOffset>
  			<listOrder>20</listOrder>
  		</li>
     </comps>
  </ThingDef>
  
  <ThingDef ParentName="MSI_MakeableEdibleBase">
    <defName>SmokeleafCandy</defName>
    <label>smokeleaf candy</label>
    <thingClass>ThingWithComps</thingClass>
    <thingCategories>
      <li>SmokeleafIndCatEdibles</li>
    </thingCategories>
    <description>A tasty fruit flavored infused confection.</description>
    <graphicData>
      <texPath>Things/Items/MSI_candy</texPath>
      <graphicClass>Graphic_StackCount</graphicClass>
    </graphicData>
    <socialPropernessMatters>true</socialPropernessMatters>
    <statBases>
      <MarketValue>20</MarketValue>
      <Mass>0.1</Mass>
      <WorkToMake>300</WorkToMake>
    </statBases>
    <ingestible>
      <outcomeDoers>
        <li Class="IngestionOutcomeDoer_GiveHediff">
          <hediffDef>AdvancedEdiblesHigh</hediffDef>
          <severity>0.50</severity>
          <toleranceChemical>AdvancedEdibles</toleranceChemical>
        </li>
        <li Class="IngestionOutcomeDoer_OffsetNeed">
          <need>Rest</need>
          <offset>-0.1</offset>
        </li>
        <li Class="IngestionOutcomeDoer_GiveHediff">
          <hediffDef>AdvancedEdiblesTolerance</hediffDef>
          <severity>0.030</severity>
          <divideByBodySize>true</divideByBodySize>
        </li>
      </outcomeDoers>
    </ingestible>
    <comps>
      <li Class="CompProperties_Drug">
        <chemical>AdvancedEdibles</chemical>
        <addictiveness>0.01</addictiveness>
        <minToleranceToAddict>0.15</minToleranceToAddict>
        <existingAddictionSeverityOffset>0.05</existingAddictionSeverityOffset>
        <needLevelOffset>1</needLevelOffset>
        <listOrder>20</listOrder>
      </li>
     </comps>
  </ThingDef>
  
    	<!--========== Advanced Hediffs ==========-->
	
  <HediffDef>
    <defName>AdvancedEdiblesHigh</defName>
    <hediffClass>HediffWithComps</hediffClass>
    <label>really baked on edibles</label>
    <defaultLabelColor>(1,0,0.5)</defaultLabelColor>
    <scenarioCanAdd>true</scenarioCanAdd>
    <maxSeverity>1.0</maxSeverity>
    <comps>
      <li Class="HediffCompProperties_Effecter">
        <stateEffecter>High</stateEffecter>
        <severityIndices>
          <min>1</min>
          <max>5</max>
        </severityIndices>
      </li>
      <li Class="HediffCompProperties_SeverityPerDay">
        <severityPerDay>-1.0</severityPerDay>
      </li>
    </comps>
    <stages>
        <li>
          <hungerRateFactor>0.9</hungerRateFactor>
          <painOffset>-0.35</painOffset>
          <capMods>
            <li>
              <capacity>Consciousness</capacity>
              <offset>-0.15</offset>
            </li>
            <li>
              <capacity>Moving</capacity>
              <offset>-0.15</offset>
            </li>
          </capMods>
        </li>
    </stages>
  </HediffDef>
  
  <ThoughtDef>
    <defName>AdvancedEdiblesHigh</defName>
    <workerClass>ThoughtWorker_Hediff</workerClass>
    <hediff>AdvancedEdiblesHigh</hediff>
    <validWhileDespawned>true</validWhileDespawned>
    <stages>
      <li>
        <label>really baked on edibles</label>
        <description>I think I need to go lay down...</description>
        <baseMoodEffect>20</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>
  
    <!--========== Advanced Edibles Addiction ==========-->

  <ChemicalDef>
    <defName>AdvancedEdibles</defName>
    <label>advanced edibles</label>
    <addictionHediff>AdvancedEdiblesAddiction</addictionHediff>
    <toleranceHediff>AdvancedEdiblesTolerance</toleranceHediff>
	  <onGeneratedAddictedToleranceChance>0.8</onGeneratedAddictedToleranceChance>
  </ChemicalDef>

  <NeedDef ParentName="MSI_DrugAddictionNeedBase">
    <defName>Chemical_AdvancedEdibles</defName>
    <needClass>Need_Chemical</needClass>
    <label>advanced edibles</label>
    <description>Because edibles are so good, this person needs to regularly consume them to avoid withdrawal symptoms.</description>
    <listPriority>25</listPriority>
  </NeedDef>
  
  <HediffDef ParentName="MSI_DrugToleranceBase">
    <defName>AdvancedEdiblesTolerance</defName>
    <label>advanced edibles tolerance</label>
    <comps>
      <li Class="HediffCompProperties_SeverityPerDay">
        <severityPerDay>-0.1333</severityPerDay>
      </li>
      <li Class="HediffCompProperties_DrugEffectFactor">
        <chemical>AdvancedEdibles</chemical>
      </li>
    </comps>
		<hediffGivers>
			<li Class="HediffGiver_RandomDrugEffect">
				<hediff>EdibleSickness</hediff>
				<baseMtbDays>0.25</baseMtbDays>
				<minSeverity>0.25</minSeverity>
				<countToAffect>1</countToAffect>
			</li>
		</hediffGivers>
	</HediffDef>

  <HediffDef ParentName="MSI_AddictionBase">
    <defName>AdvancedEdiblesAddiction</defName>
    <hediffClass>Hediff_Addiction</hediffClass>
    <label>advanced edibles dependence</label>
    <causesNeed>Chemical_AdvancedEdibles</causesNeed>
    <comps>
      <li Class="HediffCompProperties_SeverityPerDay">
        <severityPerDay>-0.0666</severityPerDay>
      </li>
    </comps>
    <stages>
      <li>
      </li>
      <li>
        <label>withdrawal</label>
        <capMods>
          <li>
            <capacity>Consciousness</capacity>
            <offset>-0.35</offset>
          </li>
          <li>
            <capacity>Moving</capacity>
            <offset>-0.35</offset>
          </li>
        </capMods>
		<mentalStateGivers>
			<li>
				<mentalState>WanderSad</mentalState>
				<mtbDays>10</mtbDays>
			</li>
			<li>
				<mentalState>BingingDrugMajor</mentalState>
				<mtbDays>10</mtbDays>
			</li>
		</mentalStateGivers>
      </li>
    </stages>
  </HediffDef>

  <ThoughtDef>
    <defName>AdvancedEdiblesWithdrawal</defName>
    <workerClass>ThoughtWorker_Hediff</workerClass>
    <hediff>AdvancedEdiblesAddiction</hediff>
    <validWhileDespawned>true</validWhileDespawned>
    <stages>
      <li>
        <visible>false</visible>
      </li>
      <li>
        <label>advanced edibles withdrawal</label>
        <description>...more...please...</description>
        <baseMoodEffect>-35</baseMoodEffect>
      </li>
    </stages>
  </ThoughtDef>
  
  <!--========== Infused Meal ==========--> 
    
  <ThingDef ParentName="MSI_MealEdibles">
    <defName>MealInfused</defName>
    <label>infused meal</label>
    <description>A filling meal that also gives a slight buzz.</description>
    <graphicData>
      <texPath>Things/Items/MSI_meal</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <statBases>
      <MarketValue>27</MarketValue>
      <WorkToMake>450</WorkToMake>
    </statBases>
    <ingestible>
      <foodType>Meal</foodType>
      <preferability>MealFine</preferability>
      <tasteThought>AteInfusedMeal</tasteThought>
      <nutrition>0.95</nutrition>
      <joy>0.85</joy>
      <joyKind>Chemical</joyKind>   
      <ingestEffect>EatVegetarian</ingestEffect>
      <ingestSound>Meal_Eat</ingestSound>
      <outcomeDoers>
        <li Class="IngestionOutcomeDoer_GiveHediff">
          <hediffDef>InfusedBuzz</hediffDef>
          <severity>0.5</severity>
        </li>
      </outcomeDoers>
    </ingestible>
    <thingCategories>
      <li>FoodMeals</li>
    </thingCategories>
    <researchPrerequisites>
      <li>AdvancedSmokeleafProcessing</li>
    </researchPrerequisites>
  </ThingDef> 

</Defs>