Topic on Talk:Beer

Jump to navigation Jump to search

The first paragraph is absolutely correct. All the conversions to F are on the front end and are fractional both in the math and because they're using C to set the thresholds rather than F.

As for the second part, it does seem to do as you say. Tick up at a rate defined by the difference between actual temperature and the safe temperature, and then ruin when it gets to 100% (1)


private void DoTicks(int ticks) { if (!this.Ruined) { float ambientTemperature = this.parent.AmbientTemperature; if (ambientTemperature > this.Props.maxSafeTemperature) { this.ruinedPercent += (ambientTemperature - this.Props.maxSafeTemperature) * this.Props.progressPerDegreePerTick * (float)ticks; } else if (ambientTemperature < this.Props.minSafeTemperature) { this.ruinedPercent -= (ambientTemperature - this.Props.minSafeTemperature) * this.Props.progressPerDegreePerTick * (float)ticks; } if (this.ruinedPercent >= 1f) { this.ruinedPercent = 1f; this.parent.BroadcastCompSignal("RuinedByTemperature"); return; } if (this.ruinedPercent < 0f) { this.ruinedPercent = 0f; } } }