1
0
Pārlūkot izejas kodu

[fixed] clothing now uses new themes system

LinaHirata 5 mēneši atpakaļ
vecāks
revīzija
11eee57c59

+ 3 - 5
locations/clothing.qsrc

@@ -8,9 +8,9 @@ $clothing_list_line = {
 	!! ARGS 1 - clothing type
 	!! ARGS 2 - clothing index
 
-	gs 'themes', 'clothing', 1
+	gs 'themes', 'clothing'
 
-	$RESULT = '<TR bgcolor='+$bgcolor+'>'
+	$RESULT = '<TR bgcolor='+$temp_bcolor+'>'
 
 	if Enable_clothwidth > 0:
 		clothing_temp = Enable_clothwidth - 1
@@ -230,10 +230,7 @@ if $ARGS[0] = 'view_clothing_list':
 end
 
 if $ARGS[0] = 'clothing_list':
-
 	$ward_list_file = 'clothing'
-	$bgcolor='#f3f4ee'
-	
 
 	if $args[1] = 'all':
 		$ward_list_store = 'all'
@@ -1355,6 +1352,7 @@ if $ARGS[0] = 'clothing_list':
 		gs 'clothing', 'clothwidth'
 	end
 	'</table>'
+	killvar '$temp_bcolor'
 end
 
 if $ARGS[0] = 'clothinglist_header':

+ 5 - 5
locations/kiosk.qsrc

@@ -141,11 +141,11 @@ if $ARGS[0] = 'counter':
 			pcs_breath = 0
 			gs 'stat'
 			'<center><img <<$set_imgh>> src="images/shared/food/food.jpg"></center>'
-			'<center><table><TR BGCOLOR="' + $bgcolor + '"><TD><b></b>You enjoy a small tasty, but somewhat fattening, snack.</TD></TR></table></center>'
+			'<center><table><TR BGCOLOR="' + $theme['table_bg'] + '"><TD><b></b>You enjoy a small tasty, but somewhat fattening, snack.</TD></TR></table></center>'
 			act 'return': gt 'kiosk', 'start'
 		end
 	else
-		'<center><table><TR BGCOLOR="' + $bgcolor + '"><TD><b></b>You don''t have enough money to buy some snack.</TD></TR></table></center>'
+		'<center><table><TR BGCOLOR="' + $theme['table_bg'] + '"><TD><b></b>You don''t have enough money to buy some snack.</TD></TR></table></center>'
 	end
 
 	if money >= 40:
@@ -168,11 +168,11 @@ if $ARGS[0] = 'counter':
 			gs 'cum_cleanup'
 			gs 'stat'
 			'<center><img <<$set_imgh>> src="images/locations/shared/brothel/barorderwater.jpg"></center>'
-			'<center><table><TR BGCOLOR="' + $bgcolor + '"><TD><b></b>You enjoy a drink of water</TD></TR></table></center>'
+			'<center><table><TR BGCOLOR="' + $theme['table_bg'] + '"><TD><b></b>You enjoy a drink of water</TD></TR></table></center>'
 			act 'return': gt 'kiosk', 'start'
 		end
 	else
-		'<center><table><TR BGCOLOR="' + $bgcolor + '"><TD><b></b>You don''t have enough money to buy some water.</TD></TR></table></center>'
+		'<center><table><TR BGCOLOR="' + $theme['table_bg'] + '"><TD><b></b>You don''t have enough money to buy some water.</TD></TR></table></center>'
 	end
 
 	act 'View phone themes': $kioskloc = '' & gt 'kiosk', 'themes'
@@ -207,7 +207,7 @@ if $ARGS[0] =  'themes':
 		if i < 14: jump 'phonethemeloop'
 		killvar '$phoneNameTemp'
 	else
-		'<TR BGCOLOR="' + $bgcolor + '"><TD><b></b>You don''t have enough money to buy a phone theme.</TD></TR>'
+		'<TR BGCOLOR="' + $theme['table_bg'] + '"><TD><b></b>You don''t have enough money to buy a phone theme.</TD></TR>'
 	end
 
 	act 'Return': gt 'kiosk', 'counter'

+ 6 - 0
locations/saveupdater.qsrc

@@ -2360,6 +2360,12 @@ if temp_current_save_version < 00090101:
 		end
 
 		killvar 'night_mode'
+		killvar '$bgcolor'
+		killvar '$bgcolor1'
+		killvar '$bgcolor2'
+		killvar '$bgcolor3'
+		killvar '$fgcolor'
+		killvar '$fgcolor1'
 	end
 end
 

+ 3 - 5
locations/shoes.qsrc

@@ -8,9 +8,9 @@ $shoe_list_line = {
 	!! ARGS 1 - shoe type
 	!! ARGS 2 - shoe index
 
-	gs 'themes', 'clothing', 1
+	gs 'themes', 'clothing'
 
-	$RESULT = '<TR bgcolor='+$bgcolor+'>'
+	$RESULT = '<TR bgcolor='+$temp_bcolor+'>'
 
 	if Enable_clothwidth > 0:
 		shoe_temp = Enable_clothwidth - 1
@@ -97,8 +97,6 @@ if $ARGS[0] = 'view_shoe_list':
 	end
 	gs 'shoes', 'filter_header', 'store'
 
-	$bgcolor='#f3f4ee'
-
 	'<center><table border=0 cellspacing=0 cellpadding=5><TH></TH><TH>Shoe</TH><TH>Description</TH><TH>Bimbo</TH><TH>Stripper</TH><TH>Actions</TH>'
 
 	!!To filter just this set
@@ -231,7 +229,7 @@ if $ARGS[0] = 'view_shoe_list':
 	end
 
 	'</table></center>' 
-
+	killvar '$temp_bcolor'
 end
 
 if $ARGS[0] = 'moncheri':

+ 22 - 51
locations/themes.qsrc

@@ -2,20 +2,29 @@
 
 if $theme['name'] = '': $theme['name'] = 'Dynamic' & gs 'themes', 'set_dynamic'
 
+!! ------------------------------------------------------------------------------
+!! ---------------------------------- Helpers -----------------------------------
+!! ------------------------------------------------------------------------------
+if $ARGS[0] = 'alt_color':
+	$result = iif($ARGS[1] = $theme['table_bg'], $theme['table_bg_alt'], $theme['table_bg'])
+end
+
+if $ARGS[0] = 'clothing':
+	$temp_bcolor = func('themes', 'alt_color', $temp_bcolor)
+end
+
 !! ------------------------------------------------------------------------------
 !! ---------------------------------- Routing -----------------------------------
 !! ------------------------------------------------------------------------------
 if $ARGS[0] = 'outdoors':
 	gs 'themes', 'apply_'+$theme['type'], $ARGS[0]
-end
-
-if $ARGS[0] = 'indoors':
+elseif $ARGS[0] = 'indoors':
 	gs 'themes', 'apply_'+$theme['type'], $ARGS[0]
 	gs 'indoors'
 end
 
 !! ------------------------------------------------------------------------------
-!! ---------------------------------- Helpers -----------------------------------
+!! ----------------------------------- Apply ------------------------------------
 !! ------------------------------------------------------------------------------
 if $ARGS[0] = 'apply_dynamic':
 	if $ARGS[1] = 'indoors':
@@ -88,9 +97,8 @@ if $ARGS[0] = 'apply_dynamic':
 	end
 
 	gs 'themes', 'apply_static'
-end
 
-if $ARGS[0] = 'apply_static':
+elseif $ARGS[0] = 'apply_static':
 	bcolor = theme['bcolor']
 	fcolor = theme['fcolor']
 	lcolor = theme['lcolor']
@@ -101,9 +109,11 @@ if $ARGS[0] = 'apply_static':
 
 	fsize = theme['fsize']
 	$fname = $theme['fname']
-end
 
-if $ARGS[0] = 'reset':
+elseif $ARGS[0] = 'reset':
+	killvar 'theme'
+	killvar '$theme'
+
 	killvar 'bcolor'
 	killvar 'fcolor'
 	killvar 'lcolor'
@@ -118,10 +128,6 @@ if $ARGS[0] = 'reset':
 	theme['is_dark'] = 0
 end
 
-if $ARGS[0] = 'alt_color':
-	$result = iif($ARGS[1] = $theme['table_bg'], $theme['table_bg_alt'], $theme['table_bg'])
-end
-
 !! ------------------------------------------------------------------------------
 !! ----------------------------------- Themes -----------------------------------
 !! ------------------------------------------------------------------------------
@@ -133,9 +139,8 @@ if $ARGS[0] = 'set_dynamic':
 
 	theme['fsize'] = 12
 	$theme['fname'] = 'Tahoma'
-end
 
-if $ARGS[0] = 'set_white':
+elseif $ARGS[0] = 'set_white':
 	$theme['name'] = 'White'
 	$theme['type'] = 'static'
 	theme['is_dark'] = 0
@@ -155,9 +160,8 @@ if $ARGS[0] = 'set_white':
 
 	$theme['table_bg'] = "#FFFFFF"
 	$theme['table_bg_alt'] = "#e6f2ff"
-end
 
-if $ARGS[0] = 'set_black':
+elseif $ARGS[0] = 'set_black':
 	$theme['name'] = 'Black'
 	$theme['type'] = 'static'
 	theme['is_dark'] = 1
@@ -177,9 +181,8 @@ if $ARGS[0] = 'set_black':
 
 	$theme['table_bg'] = "#202020"
 	$theme['table_bg_alt'] = "#303030"
-end
 
-if $ARGS[0] = 'set_gray':
+elseif $ARGS[0] = 'set_gray':
 	$theme['name'] = 'Modern Grey'
 	$theme['type'] = 'static'
 	theme['is_dark'] = 1
@@ -199,9 +202,8 @@ if $ARGS[0] = 'set_gray':
 
 	$theme['table_bg'] = "#202020"
 	$theme['table_bg_alt'] = "#303030"
-end
 
-if $ARGS[0] = 'set_custom':
+elseif $ARGS[0] = 'set_custom':
 	$theme['name'] = 'Custom'
 	$theme['type'] = 'static'
 	theme['is_dark'] = 1
@@ -291,35 +293,4 @@ if $ARGS[0] = 'default_palette':
 	$theme['green']   = "#859900"
 end
 
-
-!! ------------------------------------------------------------------------------
-!! --------------------------------- DEPRECATED ---------------------------------
-!! ------------------------------------------------------------------------------
-
-!clothing th themes are for table backgrounds. 1 is first colour, 2 is second colour.
-!eg gs 'themes', 'clothing', 1
-if $ARGS[0] = 'clothing':
-	if ARGS[1] = 1:
-		if night_mode = 0:
-			$bgcolor = iif($bgcolor='#f3f4ee','#ffffff','#f3f4ee')
-		elseif night_mode = 1:
-			$bgcolor = iif($bgcolor='#0C0B11','#000000','#0C0B11')
-		elseif night_mode = 2:
-			$bgcolor = iif($bgcolor='#0C0B11','#141414','#0C0B11')
-		elseif night_mode = 99:
-			killvar 'bgcolor'
-		end
-	elseif ARGS[1] = 2:
-		if night_mode = 0:
-			$bgcolor = iif($bgcolor='#f3f4ee','#ffffff','#f3f4ee')
-		elseif night_mode = 1:
-			$bgcolor = iif($bgcolor='#0C0B11','#000000','#0C0B11')
-		elseif night_mode = 2:
-			$bgcolor = iif($bgcolor='#0C0B11','#202020','#0C0B11')
-		elseif night_mode = 99:
-			killvar '$bgcolor'
-		end
-	end
-end
-
 --- themes ---------------------------------

+ 3 - 2
locations/wardrobe.qsrc

@@ -227,10 +227,10 @@ $default_clothing_line = {
 	!! ARGS 1 - clothing type
 	!! ARGS 2 - clothing index
 
-	gs 'themes', 'clothing', 1
+	gs 'themes', 'clothing'
 	gs 'clothing_attributes', $defclothingtype[default_entry], defclothingnumber[default_entry]
 
-	$RESULT = '<TR bgcolor='+$bgcolor+'>'
+	$RESULT = '<TR bgcolor='+$temp_bcolor+'>'
 
 	$RESULT +='<TD><b><<$def_clothing_name[default_entry]>></b></TD>'
 	
@@ -341,6 +341,7 @@ if $ARGS[0] = 'default_template':
 	if default_entry <= default_entry[1]:jump 'loopdefault_entry_empty'
 
 	'</table></center>'
+	killvar '$temp_bcolor'
 end
 
 if $ARGS[0] = 'default_set_name':