From c71ec50031c4b0e47904abaf8756fd228b19276d Mon Sep 17 00:00:00 2001 From: pregmodfan <pregmodfan@cock.li> Date: Tue, 14 Apr 2020 15:48:11 +0300 Subject: [PATCH] No, it's not the fully identical logic, and also my variant work faster (single sugarcube tag). Critical for endweek processing. I'm not big fan of the ternary ?, but here it's better. --- src/pregmod/incubatorReport.tw | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pregmod/incubatorReport.tw b/src/pregmod/incubatorReport.tw index 1f6a20361f2..0bb2b7be3b6 100644 --- a/src/pregmod/incubatorReport.tw +++ b/src/pregmod/incubatorReport.tw @@ -750,10 +750,7 @@ <<if ($incubatorPregAdaptationSetting == 1 && $tanks[_inc].genes == "XX") || ($incubatorPregAdaptationSetting == 2 && $tanks[_inc].genes == "XY") || $incubatorPregAdaptationSetting == 3>> <br> The incubator is working on adapting $his abdomen and reproductive organs for future pregnancies. - <<if isNaN($tanks[_inc].incubatorPregAdaptationInWeek)>> - <<set ($tanks[_inc].incubatorPregAdaptationInWeek = (15000 / 2000 - $tanks[_inc].pregAdaptation) / $tanks[_inc].growTime)>> - <</if>> - <<set _weekAdapt = $tanks[_inc].incubatorPregAdaptationInWeek * $incubatorUpgradeSpeed>> + <<set _weekAdapt = isNaN($tanks[_inc].incubatorPregAdaptationInWeek) ? ($tanks[_inc].incubatorPregAdaptationInWeek = (15000 / 2000 - $tanks[_inc].pregAdaptation) / $tanks[_inc].growTime) * $incubatorUpgradeSpeed : $tanks[_inc].incubatorPregAdaptationInWeek * $incubatorUpgradeSpeed>> <<set _weekAdapt *= 1 + ($incubatorReproductionSetting / 5)>> <<set _weekAdapt *= 1 + ($tanks[_inc].hormoneBalance / 1500)>> /*And now we done*/ -- GitLab