From b454c1e7da4b830e0ecf82019555557c4417db08 Mon Sep 17 00:00:00 2001 From: hexall90 <hexall90@gmail.com> Date: Wed, 22 Nov 2017 08:10:24 +0100 Subject: [PATCH] bug with growth stimulants --- src/pregmod/incubatorReport.tw | 2 +- src/uncategorized/BackwardsCompatibility.tw | 4 ++++ src/uncategorized/saDrugs.tw | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pregmod/incubatorReport.tw b/src/pregmod/incubatorReport.tw index e027dda4387..43d9542b475 100644 --- a/src/pregmod/incubatorReport.tw +++ b/src/pregmod/incubatorReport.tw @@ -140,7 +140,7 @@ <<if $incubatorUpgradeGrowthStims == 1 && $incubatorGrowthStimsSetting != 0>> <br> - <<set _heightLimit = Math.clamp((Height.mean($tanks[_inc].height) * 1.25),0,274)>> + <<set _heightLimit = Math.trunc(Math.clamp((Height.mean($tanks[_inc].height) * 1.25),0,274))>> <<set _heightLimitAge = Height.forAge($tanks[_inc].height, $tanks[_inc])>> <<if $tanks[_inc].height >= _heightLimit>> The monitoring system detects her body is not able to support further increases in height, so it carefully regulates stimulant injections to @@.yellow;maintain her current stature.@@ diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 6959af341eb..095c242426d 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -2809,6 +2809,10 @@ Setting missing slave variables: <<set _Slave.faceImplant = 65>> <</if>> +<<if !isInt(_Slave.height)>> + <<set _Slave.height = Math.trunc(_Slave.height)>> +<</if>> + <<set $slaves[_bci] = _Slave>> <</for>> diff --git a/src/uncategorized/saDrugs.tw b/src/uncategorized/saDrugs.tw index 032f1a83f0c..8d06167615b 100644 --- a/src/uncategorized/saDrugs.tw +++ b/src/uncategorized/saDrugs.tw @@ -1174,7 +1174,7 @@ /* DRUG EXPIRY */ <<switch $slaves[$i].drugs>> <<case "growth stimulants">> - <<set _maxHeight = Math.clamp((Height.mean($slaves[$i]) * 1.25),0,274)>> /*max achievable height is expected height plus 25%*/ + <<set _maxHeight = Math.trunc(Math.clamp((Height.mean($slaves[$i]) * 1.25),0,274))>> /*max achievable height is expected height plus 25%*/ <<if $slaves[$i].height >= _maxHeight>> $possessiveCap body has already grown far past $possessive natural limits; further injections of stimulants will have no effect. @@.yellow;$possessiveCap drug regimen has been ended.@@ <<set $slaves[$i].height = Math.clamp($slaves[$i].height,0,_maxHeight), $slaves[$i].drugs = "no drugs">> -- GitLab