1
0
Prechádzať zdrojové kódy

[Refactored] Refactored CalcClothingBonus

ADCSux 2 rokov pred
rodič
commit
e3fdbcfd88
1 zmenil súbory, kde vykonal 12 pridanie a 86 odobranie
  1. 12 86
      locations/body.qsrc

+ 12 - 86
locations/body.qsrc

@@ -17,7 +17,7 @@ if $ARGS[0] = '':
 	if pcs_makeup = 6 and bimbolevel >= 2: extra_supnatvnesh = 2*bimbolevel - 2
 
 	!! Calculate hotcat etc
-	clothingBonus = FUNC('body', 'CalcClothesBonus', PXCloThinness, PXCloTopCut, PXCloBottomShortness, PCloQuality, $clothingworntype, pcs_bmi)
+	clothingBonus = FUNC('body', 'CalcClothingBonus')
 	accessoriesBonus = FUNC('body', 'CalcAccessoriesBonus', bonusZ, PShoQuality, $pantyworntype, $braworntype)
 	groomingBonus = FUNC('body', 'CalcGroomingBonus', pcs_lipbalm, mopkoef, pcs_hairbsh, pcs_breath, deodorant_on, pcs_bmi)
 	groomingPenalty = FUNC('body', 'CalcGroomingPenalty', pcs_hairlng, pcs_sweat, glassvnesh, dyevmod, legkoef)
@@ -159,105 +159,31 @@ if $ARGS[0] = 'SetBodyShapeBonus':
 	end
 end
 
-if $ARGS[0] = 'CalcClothesBonus':
-	!! Note there is a limit of 9 args
-	tempPXCloThinness = ARGS[1] & !! PXCloThinness
-	tempPXCloTopCut = ARGS[2] & !! PXCloTopCut
-	tempPXCloBottomShortness = ARGS[3] & !! PXCloBottomShortness
-	tempPCloQuality = ARGS[4] & !! PCloQuality
-	$tempclothingworntype = $ARGS[5] & !!$clothingworntype
-	temppcs_bmi = ARGS[6] & !! pcs_bmi
+if $ARGS[0] = 'CalcClothingBonus':
 
-	if temppcs_bmi < 16:
-		!!severely underweight
-		if $tempclothingworntype = 'nude':
-			tempRevealing = 0
-			tempPCloQuality = 1
-		else
-			tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
-			tempRevealing = tempRevealing / 2
-		end
-	elseif temppcs_bmi >= 16 and temppcs_bmi < 19:
-		!!underweight
-		if $tempclothingworntype = 'nude':
-			tempRevealing = 0
-			tempPCloQuality = 1
-		else
-			tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
-			tempRevealing = tempRevealing / 2
-		end
-	elseif temppcs_bmi >= 19 and temppcs_bmi < 25:
-		!!normal, healthy weight
-		if $tempclothingworntype = 'nude':
-			tempRevealing = 405
-			tempPCloQuality = 3
-		else
-			tempRevealing = tempPXCloThinness + tempPXCloTopCut + tempPXCloBottomShortness
-			tempRevealing = tempRevealing / 2
-		end
-	elseif temppcs_bmi >= 25 and temppcs_bmi < 30:
-		!!overweight
-		if $tempclothingworntype = 'nude':
+	if $clothingworntype = 'nude':
+		!heathy weight and overweight
+		if pcs_bmi >= 19 and pcs_bmi < 30:
 			tempRevealing = 405
 			tempPCloQuality = 3
 		else
-			tempRevealing = tempPXCloThinness + tempPXCloTopCut + tempPXCloBottomShortness
-			tempRevealing = tempRevealing / 2
-		end
-	elseif temppcs_bmi >= 30 and temppcs_bmi < 35:
-		!!moderately obese
-		if $tempclothingworntype = 'nude':
-			tempRevealing = 0
-			tempPCloQuality = 1
-		else
-			tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
-			tempRevealing = tempRevealing * 3 / 4
-		end
-	elseif temppcs_bmi >= 35 and temppcs_bmi < 40:
-		!!severely obese
-		if $tempclothingworntype = 'nude':
-			tempRevealing = 0
-			tempPCloQuality = 1
-		else
-			tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
-			tempRevealing = tempRevealing * 3 / 4
-		end
-	elseif temppcs_bmi >= 40 and temppcs_bmi < 45:
-		!!very severely obese
-		if $tempclothingworntype = 'nude':
 			tempRevealing = 0
 			tempPCloQuality = 1
-		else
-			tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
-			tempRevealing = tempRevealing * 3 / 4
 		end
-	elseif temppcs_bmi >= 45:
-		!!morbidly obese
-		if $tempclothingworntype = 'nude':
-			tempRevealing = 0
-			tempPCloQuality = 1
+	else
+		!heathy weight and overweight
+		if pcs_bmi >= 19 and pcs_bmi < 30:
+			tempRevealing = PXCloThinness + PXCloTopCut + PXCloBottomShortness
 		else
-			tempRevealing = (400 - tempPXCloThinness) + (500 - tempPXCloTopCut) + (400 - tempPXCloBottomShortness)
-			tempRevealing = tempRevealing * 3 / 4
+			tempRevealing = (400 - PXCloThinness) + (500 - PXCloTopCut) + (400 - PXCloBottomShortness)
 		end
+		tempRevealing = tempRevealing / 2
 	end
-
 	tempRevealing = tempRevealing / 76
 
-	tempCloAdjustedBeauty = tempRevealing * tempPCloQuality
-
-	!!if $tempclothingworntype = 'danilovich_outfits': tempCloAdjustedBeauty = tempCloAdjustedBeauty * 2 / 3
+	result = tempRevealing * PCloQuality
 
-	result = tempCloAdjustedBeauty
-
-	killvar 'tempPXCloThinness'
-	killvar 'tempPXCloTopCut'
-	killvar 'tempPXCloBottomShortness'
-	killvar 'tempPCloQuality'
-	killvar '$tempclothingworntype'
 	killvar 'tempRevealing'
-	killvar 'tempCloAdjustedBeauty'
-	killvar 'temppcs_bmi'
 end
 
 if $ARGS[0] = 'CalcAccessoriesBonus':