/// <summary> /// Gets the temperature offset for a given game condition; returns false if we should use the /// vanilla cacluatation instead /// </summary> /// <param name="condition">The condition to check for</param> /// <returns>True if we overwrote the value, false if we should use vanilla instead.</returns> public float GetBiomeConditionTemperatureOffset(GameCondition condition) { // Check if we have a value: if (!conditionOffsets.TryGetValue(condition.def, out var offsetMax) || offsetMax.HasDefaultValue()) { return(condition.TemperatureOffset()); } // Otherwise, do the thing: return(GameConditionUtility.LerpInOutValue(condition.TicksPassed, condition.TicksLeft, 12000f, offsetMax)); }
public override float TemperatureOffset() { Map map = Find.CurrentMap; if (GenLocalDate.HourInteger(map) >= 11 && GenLocalDate.HourInteger(map) <= 19) { return(GameConditionUtility.LerpInOutValue(this, 10000f, MaxTempOffset)); } else if (GenLocalDate.HourInteger(map) >= 20 || GenLocalDate.HourInteger(map) <= 10) { return(GameConditionUtility.LerpInOutValue(this, 10000f, MinTempOffset)); } return(GameConditionUtility.LerpInOutValue(this, 10000f, MaxTempOffset)); }
public override float SkyTargetLerpFactor(Map map) { return(GameConditionUtility.LerpInOutValue(this, 200f)); }
public override float SkyTargetLerpFactor(Map map) { return(GameConditionUtility.LerpInOutValue(TicksPassed, TicksLeft, LerpTicks)); }
public override float TemperatureOffset() { return(GameConditionUtility.LerpInOutValue(this, 12000f, -20f)); }
public override float SkyTargetLerpFactor(Map map) { return(GameConditionUtility.LerpInOutValue((float)base.TicksPassed, (float)base.TicksLeft, (float)lerpTicks, 1f)); }
public override float TemperatureOffset() { return(GameConditionUtility.LerpInOutValue(this, TransitionTicks, 17f)); }
public override float SkyTargetLerpFactor(Map map) { return(GameConditionUtility.LerpInOutValue(this, (float)this.TransitionTicks, 0.5f)); }