Browse Source

[added] a dedicated variable for the lactation breast size. Reported by rgacct

anjuna krokus 1 month ago
parent
commit
defe43c625
2 changed files with 10 additions and 10 deletions
  1. 1 1
      locations/body.qsrc
  2. 9 9
      locations/lact_lib.qsrc

+ 1 - 1
locations/body.qsrc

@@ -65,7 +65,7 @@ if $ARGS[0] = 'UpdateBodyMeasurement':
 	pcs_hips  = (pcs_hgt   * bodyVars['hratio']) / 100 + bodyVars['vhips']
 	pcs_hips  = (pcs_hgt   * bodyVars['hratio']) / 100 + bodyVars['vhips']
 	pcs_waist = (pcs_hips  * bodyVars['wratio']) / 100 + bodyVars['vofat']
 	pcs_waist = (pcs_hips  * bodyVars['wratio']) / 100 + bodyVars['vofat']
 	pcs_band  = (pcs_waist * bodyVars['bratio']) / 100 + bodyVars['vofat']
 	pcs_band  = (pcs_waist * bodyVars['bratio']) / 100 + bodyVars['vofat']
-	pcs_bust  = (pcs_waist * bodyVars['bratio']) / 100 + pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone'] + max(-10, min(bodyVars['bust_other'], 10)) + pcs_mass['preg'] / 5
+	pcs_bust  = (pcs_waist * bodyVars['bratio']) / 100 + pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone'] + max(-10, min(bodyVars['bust_other'], 10)) + pcs_mass['preg'] / 5 + bodyVars['bust_lact']
 	pcs_butt  = min(pcs_mass['butt'], 50) + bodyVars['butt_bonus'] + bodyVars['butt_silicone'] + bodyVars['butt_cheat'] + pcs_butt_tr + max(-10, min(bodyVars['butt_other'], 10))
 	pcs_butt  = min(pcs_mass['butt'], 50) + bodyVars['butt_bonus'] + bodyVars['butt_silicone'] + bodyVars['butt_cheat'] + pcs_butt_tr + max(-10, min(bodyVars['butt_other'], 10))
 
 
 	!! pcs_cupsize = pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone'] - bodyVars['vofat']
 	!! pcs_cupsize = pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone'] - bodyVars['vofat']

+ 9 - 9
locations/lact_lib.qsrc

@@ -45,7 +45,7 @@
 if $ARGS[0] = 'init_breasttissue':
 if $ARGS[0] = 'init_breasttissue':
 	!!	use func('lact_lib','init_breasttissue')
 	!!	use func('lact_lib','init_breasttissue')
 	!!	getting the useable tissue
 	!!	getting the useable tissue
-	lactation['useable_cupsize'] = pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_other'] - bodyVars['vofat']
+	lactation['useable_cupsize'] = pcs_mass['bust'] + bodyVars['bust_lact'] + bodyVars['bust_magic'] + bodyVars['bust_other'] - bodyVars['vofat']
 	!!	checking the variable. If it is greater 0, sveta has natural breast tissue to work with.
 	!!	checking the variable. If it is greater 0, sveta has natural breast tissue to work with.
 	!!	else she has fake breasts or no breasts at all and no ability to lactate
 	!!	else she has fake breasts or no breasts at all and no ability to lactate
 	if lactation['useable_cupsize'] > 0:
 	if lactation['useable_cupsize'] > 0:
@@ -102,7 +102,7 @@ if $ARGS[0] = 'bsizetoccm':
 	!!	Getting breast ccm per breast function based on the bra size chart in here https://en.wikipedia.org/wiki/Bra_size
 	!!	Getting breast ccm per breast function based on the bra size chart in here https://en.wikipedia.org/wiki/Bra_size
 	!!	I tried to create a math polynom for this, but ended up with x^16 monsters and inaccurate numbers, so I am going this approach.
 	!!	I tried to create a math polynom for this, but ended up with x^16 monsters and inaccurate numbers, so I am going this approach.
 	!!	This is the most accurate function I was able to make, and is doing the job really good. So please do not touch it.
 	!!	This is the most accurate function I was able to make, and is doing the job really good. So please do not touch it.
-	!!	usage func('lact_lib','bsizetoccm', (pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone']))
+	!!	usage func('lact_lib','bsizetoccm', (pcs_mass['bust'] + bodyVars['bust_lact'] + bodyVars['bust_magic'] + bodyVars['bust_silicone']))
 	if ARGS[1] < 0:
 	if ARGS[1] < 0:
 		result = 100
 		result = 100
 	elseif ARGS[1] <= 15:
 	elseif ARGS[1] <= 15:
@@ -143,7 +143,7 @@ if $ARGS[0] = 'bsizetoccm':
 end
 end
 
 
 if $ARGS[0] = 'bccmtosize':
 if $ARGS[0] = 'bccmtosize':
-	!!	backwardsfunction of bsizetoccm. It just reverts breast ccm to "pcs_mass['bust'] + bodyVars['bust_magic'] + bodyVars['bust_silicone']" 
+	!!	backwardsfunction of bsizetoccm. It just reverts breast ccm to "pcs_mass['bust'] + bodyVars['bust_lact'] + bodyVars['bust_magic'] + bodyVars['bust_silicone']" 
 	!!	func('lact_lib','bccmtosize',lactation['breastccm'])
 	!!	func('lact_lib','bccmtosize',lactation['breastccm'])
 	if ARGS[1] < 0:
 	if ARGS[1] < 0:
 		result = 0
 		result = 0
@@ -188,18 +188,18 @@ end
 if $ARGS[0] = 'lactationBreastGrowth':
 if $ARGS[0] = 'lactationBreastGrowth':
 	if lactation['maturebreast'] = 1 and lactation['preggrowth'] > 0:
 	if lactation['maturebreast'] = 1 and lactation['preggrowth'] > 0:
 !!		lactation['lactlib_change'] = 1
 !!		lactation['lactlib_change'] = 1
-		lactation['useable_cupsize'] = pcs_mass['bust'] + bodyVars['bust_magic'] - bodyVars['vofat']
-		pcs_mass['bust'] += func('lact_lib','bccmtosize',(func('lact_lib','bsizetoccm', lactation['useable_cupsize']) + (lactation['preggrowth']/100))) + bodyVars['vofat'] - bodyVars['bust_magic'] - pcs_mass['bust']
+		lactation['useable_cupsize'] = pcs_mass['bust'] + bodyVars['bust_lact'] + bodyVars['bust_magic'] - bodyVars['vofat']
+		bodyVars['bust_lact'] += func('lact_lib','bccmtosize',(func('lact_lib','bsizetoccm', lactation['useable_cupsize']) + (lactation['preggrowth']/100))) + bodyVars['vofat'] - bodyVars['bust_magic'] - pcs_mass['bust'] - bodyVars['bust_lact']
 		lactation['result'] = func('lact_lib','init_breasttissue')
 		lactation['result'] = func('lact_lib','init_breasttissue')
 	end
 	end
 	if lactation['alveoliexpandlvl_change'] <> lactation['alveoliexpandlvl']:
 	if lactation['alveoliexpandlvl_change'] <> lactation['alveoliexpandlvl']:
 		!!	lactlib makes a change. we need to flag that, else checkExtBreastGrowth will go off and mess up everything.
 		!!	lactlib makes a change. we need to flag that, else checkExtBreastGrowth will go off and mess up everything.
 !!		lactation['lactlib_change'] = 1
 !!		lactation['lactlib_change'] = 1
 		if lactation['alveoliexpandlvl'] mod 3 = 0 and lactation['alveoliexpandlvl_change'] + 1 = lactation['alveoliexpandlvl']:
 		if lactation['alveoliexpandlvl'] mod 3 = 0 and lactation['alveoliexpandlvl_change'] + 1 = lactation['alveoliexpandlvl']:
-			pcs_mass['bust'] += 5
+			bodyVars['bust_lact'] += 5
 			'<b>Your breasts seem fuller.</b>'
 			'<b>Your breasts seem fuller.</b>'
-		elseif lactation['alveoliexpandlvl_change'] mod 3 = 0 and lactation['alveoliexpandlvl'] + 1 = lactation['alveoliexpandlvl_change'] and lactation['alveoliexpandlvl_change'] > 0 and pcs_mass['bust'] > 10:
-			pcs_mass['bust'] -= 5
+		elseif lactation['alveoliexpandlvl_change'] mod 3 = 0 and lactation['alveoliexpandlvl'] + 1 = lactation['alveoliexpandlvl_change'] and lactation['alveoliexpandlvl_change'] > 0 and bodyVars['bust_lact'] >= 5:
+			bodyVars['bust_lact'] -= 5
 			'<b>Your breasts seem to be getting smaller.</b>'
 			'<b>Your breasts seem to be getting smaller.</b>'
 		end	
 		end	
 		lactation['alveoliexpandlvl_change'] = lactation['alveoliexpandlvl'] 	
 		lactation['alveoliexpandlvl_change'] = lactation['alveoliexpandlvl'] 	
@@ -306,7 +306,7 @@ if $ARGS[0] = 'prod_milk':
 			else
 			else
 				!!	If energy is too low, milk will be produced but there is a chance that pcs_mass['body'] will shrink.
 				!!	If energy is too low, milk will be produced but there is a chance that pcs_mass['body'] will shrink.
 				pcs_energy = 1
 				pcs_energy = 1
-				if rand(0,100) > 95: pcs_mass['body'] -= 1
+				if rand(0, 100) < 5: pcs_mass['body'] -= 1
 				if pain['breasts'] < 20: pain['breasts'] += 1
 				if pain['breasts'] < 20: pain['breasts'] += 1
 			end
 			end
 			if pcs_energy < 1: pcs_energy = 1
 			if pcs_energy < 1: pcs_energy = 1