Skip to content

Temperature Transforms

juanosarg edited this page Jun 24, 2025 · 1 revision

<- Back

CompProperties_TempTransforms makes an item transform into a different one if a certain temperature is reached

        public float minSafeTemperature;
        public float maxSafeTemperature = 100f;
        public float progressPerDegreePerTick = 1E-05f;
        public string thingToTransformInto = "";

How do I use this code?

It is a comp class, so you just add it in XML in the <comps> tag. It is used for example in Vanilla Cooking Expanded's grills, that turn into "ruined" versions of themselves if frozen, or in vanilla Brewing Expanded's Hot coffee, that turns into Iced coffee when frozen.

<comps>
	<li Class="VEF.Cooking.CompProperties_TempTransforms">
		<minSafeTemperature>10</minSafeTemperature>
		<maxSafeTemperature>75</maxSafeTemperature>
		<progressPerDegreePerTick>0.00003</progressPerDegreePerTick>
		<thingToTransformInto>VCE_RuinedSimpleGrill</thingToTransformInto>
	</li>
</comps>

Clone this wiki locally