private float WaterFallPerTickAssumingCategory(ThirstCategory cat) { // 基本低下量(基本値+温度補正) float fallPerTickBase = this.ext.fallPerTickBase + this.ext.fallPerTickFromTempCurve.Evaluate(this.pawn.AmbientTemperature - this.pawn.ComfortableTemperatureRange().max); // 食事と同じ値を利用 fallPerTickBase *= this.pawn.ageTracker.CurLifeStage.hungerRateFactor * this.RaceThirstRate * this.pawn.health.hediffSet.GetThirstRateFactor(); switch (cat) { case ThirstCategory.Healthy: return(fallPerTickBase); case ThirstCategory.SlightlyThirsty: return(fallPerTickBase); case ThirstCategory.Thirsty: return(fallPerTickBase * 0.5f); case ThirstCategory.UrgentlyThirsty: return(fallPerTickBase * 0.25f); case ThirstCategory.Dehydration: return(fallPerTickBase * 0.15f); default: return(999f); } }
private string GetLabel(ThirstCategory thirst) { switch (thirst) { case ThirstCategory.Healthy: return("MizuThirstLevel_Healthy".Translate()); case ThirstCategory.SlightlyThirsty: return("MizuThirstLevel_SlightlyThirsty".Translate()); case ThirstCategory.Thirsty: return("MizuThirstLevel_Thirsty".Translate()); case ThirstCategory.UrgentlyThirsty: return("MizuThirstLevel_UrgentlyThirsty".Translate()); case ThirstCategory.Dehydration: return("MizuThirstLevel_Dehydration".Translate()); default: throw new InvalidOperationException(); } }
private float WaterMultiplier(ThirstCategory thirst) { switch (thirst) { case ThirstCategory.Healthy: return(this.factorHealthy); case ThirstCategory.SlightlyThirsty: return(this.factorSlightlyThirsty); case ThirstCategory.Thirsty: return(this.factorThirsty); case ThirstCategory.UrgentlyThirsty: return(this.factorUrgentThirsty); case ThirstCategory.Dehydration: return(this.factorDehydration); default: throw new InvalidOperationException(); } }