Browse Source

Set coat warth levels via a centralize variable to keep everything in sync.

KevinSmarts 6 years ago
parent
commit
de7bcaf9a0
4 changed files with 16 additions and 9 deletions
  1. 3 3
      locations/_body_image
  2. 9 2
      locations/cloakroom
  3. 3 3
      locations/outdoors
  4. 1 1
      locations/wardrobe

+ 3 - 3
locations/_body_image

@@ -37,11 +37,11 @@ if $ARGS[0] = 'coat':
 		$RESULT = 'images/pc/clothing/11coat/<<defaultcoat>>.jpg'
 		$body_image_msg += 'Your current default coat is Coat<<defaultcoat>>.<br>'
 		!make sure to sync these with [outdoors]~364
-		if defaultcoat < 4:
+		if defaultcoat_warmth = 1:
 			$body_image_msg += 'It''ll keep you fairly warm down to -10C.'
-		elseif defaultcoat = 4 or defaultcoat = 5 or defaultcoat = 8 or defaultcoat = 10 or defaultcoat = 12:
+		elseif defaultcoat_warmth = 2:
 			$body_image_msg += 'It will handle temperatures down to -20C.'
-		elseif defaultcoat = 6 or defaultcoat = 7 or defaultcoat = 9 or defaultcoat = 11:
+		elseif defaultcoat_warmth = 3:
 			$body_image_msg += 'You will be nice and warm even in the depths of winter.'
 		else
 			$body_image_msg += 'Your health will suffer if you don''t wear a coat in the winter.'

+ 9 - 2
locations/cloakroom

@@ -52,7 +52,7 @@ if $ARGS[0] = 'view_coat_list':
 	'<center><table border=1><TH>Cloakroom</TH></table></center>'
 
 	if defaultcoat = 0:
-		'<center>You have not chosen a coat to wear.</center>'
+		'<center>You will not wear a coat when outside in the cold.</center>'
 	else
 		'<center>You will wear Coat<<defaultcoat>> when a coat is required.</center>'
 	end
@@ -71,7 +71,7 @@ if $ARGS[0] = 'view_coat_list':
 		i += 1
 	if i <= ARRSIZE('coat'):jump 'loopcoat'
 	
-	act 'Don''t wear a coat':defaultcoat = 0
+	act 'Don''t wear a coat':defaultcoat_warmth = 0 & defaultcoat = 0
 
 	'</table>'
 
@@ -108,6 +108,13 @@ if $ARGS[0] = 'view_coat_item':
 	if defaultcoat ! '<<ARGS[1]>>':
 		act 'Wear this coat when outdoors in the cold':
 			defaultcoat = '<<ARGS[1]>>'
+			if defaultcoat < 4:
+				defaultcoat_warmth = 1
+			elseif defaultcoat = 4 or defaultcoat = 5 or defaultcoat = 8 or defaultcoat = 10 or defaultcoat = 12 or defaultcoat = 13 or defaultcoat = 14 or defaultcoat = 16 or defaultcoat = 17 or defaultcoat = 18 or defaultcoat = 19:
+				defaultcoat_warmth = 2
+			elseif defaultcoat = 6 or defaultcoat = 7 or defaultcoat = 9 or defaultcoat = 11 or defaultcoat = 15:
+				defaultcoat_warmth = 3
+			end
 			gt 'wardrobe'
 		end
 	end

+ 3 - 3
locations/outdoors

@@ -347,7 +347,7 @@ if $ARGS[0] = 'main':
 					if pcs_energy < 20:frost += 1
 					if $pantyworntype = 'none':frost += 1
 					if pcs_sweat > 20:frost += 1
-				elseif temper < -10 and defaultcoat < 4:
+				elseif temper < -10 and defaultcoat_warmth = 1:
 					if temper < -30:
 						frost += 2
 					else
@@ -356,11 +356,11 @@ if $ARGS[0] = 'main':
 					if pcs_energy < 20:frost += 1
 					if $pantyworntype = 'none':frost += 1
 					if pcs_sweat > 20:frost += 1
-				elseif temper < -20 and (defaultcoat = 4 or defaultcoat = 5 or defaultcoat = 8 or defaultcoat = 10 or defaultcoat = 12 or defaultcoat = 13 or defaultcoat = 14 or defaultcoat = 16 or defaultcoat = 17 or defaultcoat = 18 or defaultcoat = 19):
+				elseif temper < -20 and defaultcoat_warmth = 2:
 					frost += 1
 					if pcs_energy < 20:frost += 1
 					if pcs_sweat > 20:frost += 1
-				elseif temper < -30 and (defaultcoat = 6 or defaultcoat = 7 or defaultcoat = 9 or defaultcoat = 11 or defaultcoat = 15):
+				elseif temper < -30 and defaultcoat_warmth = 3:
 					frost += 1
 				end
 

+ 1 - 1
locations/wardrobe

@@ -27,7 +27,7 @@ else
 end
 '</center></TD><TD><center>'
 if defaultcoat ! 0:
-	'<a href="exec:defaultcoat = 0 & gt ''wardrobe''">Remove</a>'
+	'<a href="exec:defaultcoat_warmth = 0 & defaultcoat = 0 & gt ''wardrobe''">Remove</a>'
 else
 	'Remove'
 end