1
0
Преглед на файлове

[fixed] prostitute vs sport outfits fight 2.0

Lusticon преди 9 месеца
родител
ревизия
06034370d6
променени са 4 файла, в които са добавени 106 реда и са изтрити 77 реда
  1. 18 31
      locations/prostitution_functions.qsrc
  2. 3 3
      locations/underwear.qsrc
  3. 1 1
      locations/underwear_bodysuits.qsrc
  4. 84 42
      locations/wardrobe.qsrc

+ 18 - 31
locations/prostitution_functions.qsrc

@@ -125,8 +125,7 @@ if $ARGS[0] = 'prostitute_outfit_at_home':
 	if func('homes_properties', 'is_current_home') and prostitute['active']:
 		gs 'prostitution_functions', 'work_clothes'
 		if prostitute['work_clothes']:
-			gs 'prostitution_functions', 'is_default'
-			if prostitute['outfit_is_set'] = 1 and is_default = 0:
+			if prostitute['outfit_is_set'] = 1 and func('prostitution_functions', 'is_default') = 0:
 				act 'Replace your default prostitute outfit with the current outfit':
 					gs 'prostitution_functions', 'set_default_outfit'
 					gt $loc, $loc_arg
@@ -147,7 +146,6 @@ if $ARGS[0] = 'prostitute_outfit_at_home':
 				gt $loc, $loc_arg
 			end
 		end
-		killvar 'is_default'
 	end
 end
 
@@ -410,7 +408,7 @@ if $ARGS[0] = 'work_clothes':
 end
 
 if $ARGS[0] = 'is_default':
-	is_default = prostitute['clothingwornnumber'] = clothingwornnumber _ 
+	RESULT = prostitute['clothingwornnumber'] = clothingwornnumber _ 
 			 and prostitute['shoewornnumber']     = shoewornnumber _ 
 			 and prostitute['currentpursenumber'] = currentpursenumber _ 
 			 and prostitute['coatwornnumber']     = coatwornnumber _ 
@@ -428,7 +426,9 @@ if $ARGS[0] = 'set_default_outfit':
 	prostitute['clothingwornnumber'] = clothingwornnumber
 
 	!!-- Underwear
-	if bodysuitwornnumber > 0:
+	prostitute['underweartype'] = 0
+	if underwear['type'] = 2:
+		prostitute['underweartype'] = 2
 		$prostitute['bodysuitworntype'] = $bodysuitworntype
 		prostitute['bodysuitwornnumber'] = bodysuitwornnumber
 	else
@@ -482,11 +482,16 @@ end
 
 
 if $ARGS[0] = 'change_into_prostitute_outfit':
+	!! if last outfit is sport outfit
+	gs 'wardrobe', 'is_sport'
+	gs 'wardrobe', 'back_to_regular_clothes'
+
 	!!-- Backup
 	$lastwornclothingtype['prostitute'] = $clothingworntype
 	lastwornclothingnumber['prostitute'] = clothingwornnumber
-	lastwornunderwear['prostitute'] = underwear['type']
-	if bodysuitwornnumber > 0:
+	lastwornunderwear['prostitute'] = 0
+	if underwear['type'] = 2:
+		lastwornunderwear['prostitute'] = 2
 		$lastwornbodysuittype['prostitute'] = $bodysuitworntype
 		lastwornbodysuitnumber['prostitute'] = bodysuitwornnumber
 	else
@@ -505,7 +510,7 @@ if $ARGS[0] = 'change_into_prostitute_outfit':
 	!!-- Clothing
 	gs 'clothing', 'wear', $prostitute['clothingworntype'], prostitute['clothingwornnumber']
 	!!-- Underwear
-	if lastwornbodysuitnumber['prostitute'] > 0:
+	if prostitute['underweartype'] = 2:
 		gs 'underwear_bodysuits', 'wear', $lastwornbodysuittype['prostitute'], lastwornbodysuitnumber['prostitute']
 	else
 		gs 'panties', 'wear', $prostitute['pantyworntype'], prostitute['pantywornnumber']
@@ -525,29 +530,11 @@ if $ARGS[0] = 'change_into_prostitute_outfit':
 end
 
 if $ARGS[0] = 'change_into_regular_clothes':
-	if $lastwornclothingtype['prostitute'] = '':
-		gs 'clothing', 'wear_last_worn'
-		gs 'underwear', 'wear'
-		gs 'shoes', 'wear', 'last_worn'
-		gs 'purses', 'wear', 'last_worn'
-		gs 'coats', 'wear', 'last_worn'
-	else
-		!!-- Clothing
-		gs 'clothing', 'wear', $lastwornclothingtype['prostitute'], lastwornclothingnumber['prostitute']
-		!!-- Underwear
-		if lastwornunderwear['prostitute'] = 2:
-			gs 'underwear_bodysuits', 'wear', $lastwornbodysuittype['prostitute'], lastwornbodysuitnumber['prostitute']
-		else
-			gs 'panties', 'wear', $lastwornpantytype['prostitute'], lastwornpantynumber['prostitute']
-			gs 'bras',    'wear', $lastwornbratype['prostitute'],   lastwornbranumber['prostitute']
-		end
-		!!-- Shoes
-		gs 'shoes',  'wear', $lastwornshoetype['prostitute'],  lastwornshoenumber['prostitute']
-		gs 'purses', 'wear', $lastwornpursetype['prostitute'], lastwornpursenumber['prostitute']
-		gs 'coats',  'wear', $lastworncoattype['prostitute'],  lastworncoatnumber['prostitute']
-		gs 'prostitution_functions', 'work_clothes'
-		if prostitute['changed_for_work']: prostitute['changed_for_work'] = 0
-	end
+	gs 'wardrobe', 'back_to_regular_clothes'
+
+	!! if last outfit is sport outfit
+	gs 'wardrobe', 'is_sport'
+	gs 'wardrobe', 'back_to_regular_clothes'
 end
 
 !!---------- Chaging outfits in public locations ------------------------------------------------------------------------

+ 3 - 3
locations/underwear.qsrc

@@ -54,10 +54,10 @@ end
 
 if $ARGS[0] = 'wear':
 	if underwear['lastworntype'] = 2:
-		gs 'underwear_bodysuits', 'wear'
+		gs 'underwear_bodysuits', 'wear', $ARGS[1]
 	else
-		gs 'panties', 'wear'
-		gs 'bras', 'wear'
+		gs 'panties', 'wear', $ARGS[1]
+		gs 'bras', 'wear', $ARGS[1]
 	end
 end
 

+ 1 - 1
locations/underwear_bodysuits.qsrc

@@ -368,7 +368,7 @@ if $ARGS[0] = 'wear':
 		end
 	else
 		if dyneval('RESULT = <<$ARGS[1]>>_bodysuits_s[<<ARGS[2]>>]') = 0:
-			gs 'underwear_bodysuits', 'wear2', $ARGS[2], ARGS[3]
+			gs 'underwear_bodysuits', 'wear2', $ARGS[1], ARGS[2]
 		else
 			underwear['type'] = 0
 			$bodysuitworntype = 'none'

+ 84 - 42
locations/wardrobe.qsrc

@@ -347,20 +347,20 @@ end
 if $ARGS[0] = 'default_set_name':
 	*clr & cla
 	$clothing_default_page[clothing_default_page] = input('Enter new name for this set')
-	act 'Return': gt 'wardrobe', 'default<<clothing_default_page>>'
+	gt 'wardrobe', 'default<<clothing_default_page>>'
 end
 
 if $ARGS[0] = 'default_actions':
-	act 'Return':
-		gt $loc, $loc_arg
-	end
+	act 'Return': gt $loc, $loc_arg
  
 	act 'Select outfit to wear':
 		cla
+		act 'Return': gt 'wardrobe', $wardrobeDefaultPagePref
 		gs 'wardrobe', 'default_actions_wear'
 	end
 	act 'Choose another page':
 		cla
+		act 'Return': gt 'wardrobe', $wardrobeDefaultPagePref
 		gs 'wardrobe', 'default_actions_page'
 	end
 	act 'Rename this set': gs 'wardrobe', 'default_set_name'
@@ -925,29 +925,20 @@ if $ARGS[0] = 'default_sport_options':
 	if default_sport_number = 0:
 		'You have no default sports clothing set, you can set this in your wardrobe.'
 	else
-		!! checks to see if player is wearing the default sports set using default_sport_number[2]
-		default_sport_number[2] = 0
-		if $clothingworntype = $defclothingtype[default_sport_number] and clothingwornnumber = defclothingnumber[default_sport_number]: default_sport_number[2] += 1
-		if defunderwear[default_sport_number] = 2:
-			if $bodysuitworntype = $defbodysuittype[default_sport_number] and bodysuitwornnumber = defbodysuitnumber[default_sport_number]: default_sport_number[2] += 1
-		else
-			if $pantyworntype = $defpantytype[default_sport_number] and pantywornnumber = defpantynumber[default_sport_number] and $braworntype = $defbratype[default_sport_number] and brawornnumber = defbranumber[default_sport_number]: default_sport_number[2] += 1
-		end
-		if $shoeworntype = $defshoetype[default_sport_number] and shoewornnumber = defshoenumber[default_sport_number]: default_sport_number[2] += 1
-		if $currentpursetype = $defpursetype[default_sport_number] and currentpursenumber = defpursenumber[default_sport_number]: default_sport_number[2] += 1
-		if $coatworntype = $defcoattype[default_sport_number] and coatwornnumber = defcoatnumber[default_sport_number]: default_sport_number[2] += 1
-
+		gs 'wardrobe', 'is_sport'
 		!! check to see if sports outfit is worn out
 		if dyneval('RESULT = <<$defclothingtype[default_sport_number]>>_h[<<defclothingnumber[default_sport_number]>>]') = 0:
-			act '<font color="red">Put on your sports clothes - unavailable as outfit is worn out</font>':
-			end
+			act 'Put on your sports clothes': msg '<font color="red">Unavailable as outfit is worn out!</font>'
 		!! check to see that player is not wearing default sports outfit
 		elseif default_sport_number[2] ! 5:
-			act'Put on your sports clothes':
+			act 'Put on your sports clothes':
+				if func('prostitution_functions', 'is_default') ! 0: gs 'wardrobe', 'back_to_regular_clothes'
+				
 				$lastwornclothingtype['sport'] = $clothingworntype
 				lastwornclothingnumber['sport'] = clothingwornnumber
-				lastwornunderwear['sport'] = underwear['type']
-				if defunderwear[default_sport_number] = 2:
+				lastwornunderwear['sport'] = 0
+				if underwear['type'] = 2:
+					lastwornunderwear['sport'] = 2
 					$lastwornbodysuittype['sport'] = $bodysuitworntype
 					lastwornbodysuitnumber['sport'] = bodysuitwornnumber
 				else
@@ -966,32 +957,83 @@ if $ARGS[0] = 'default_sport_options':
 				gt $loc, $loc_arg
 			end
 		else
-			act'Put your regular clothes back on':
-				if $lastwornclothingtype['sport'] = '':
-					gs 'clothing', 'wear_last_worn'
-					gs 'underwear', 'wear'
-					gs 'shoes', 'wear', 'last_worn'
-					gs 'purses', 'wear', 'last_worn'
-					gs 'coats', 'wear', 'last_worn'
-				else
-					gs 'clothing', 'wear', $lastwornclothingtype['sport'], lastwornclothingnumber['sport']
-
-					if lastwornunderwear['sport'] = 2:
-						gs 'underwear_bodysuits', 'wear', $lastwornbodysuittype['sport'], lastwornbodysuitnumber['sport']
-					else
-						gs 'panties', 'wear', $lastwornpantytype['sport'], lastwornpantynumber['sport']
-						gs 'bras',    'wear', $lastwornbratype['sport'],   lastwornbranumber['sport']
-					end
-					gs 'shoes',  'wear', $lastwornshoetype['sport'],  lastwornshoenumber['sport']
-					gs 'purses', 'wear', $lastwornpursetype['sport'], lastwornpursenumber['sport']
-					gs 'coats',  'wear', $lastworncoattype['sport'],  lastworncoatnumber['sport']
-					gt $loc, $loc_arg
-				end
+			act 'Change into your regular clothes':
+				gs 'wardrobe', 'back_to_regular_clothes'
+				if func('prostitution_functions', 'is_default') ! 0: gs 'wardrobe', 'back_to_regular_clothes'
+				gt $loc, $loc_arg
 			end
 		end
 	end
 end
 
+if $ARGS[0] = 'is_sport':
+	!! checks to see if player is wearing the default sports set using default_sport_number[2]
+	default_sport_number[2] = 0
+	if $clothingworntype = $defclothingtype[default_sport_number] and clothingwornnumber = defclothingnumber[default_sport_number]: default_sport_number[2] += 1
+	if defunderwear[default_sport_number] = 2:
+		if $bodysuitworntype = $defbodysuittype[default_sport_number] and bodysuitwornnumber = defbodysuitnumber[default_sport_number]: default_sport_number[2] += 1
+	else
+		if $pantyworntype = $defpantytype[default_sport_number] and pantywornnumber = defpantynumber[default_sport_number] and $braworntype = $defbratype[default_sport_number] and brawornnumber = defbranumber[default_sport_number]: default_sport_number[2] += 1
+	end
+	if $shoeworntype = $defshoetype[default_sport_number] and shoewornnumber = defshoenumber[default_sport_number]: default_sport_number[2] += 1
+	if $currentpursetype = $defpursetype[default_sport_number] and currentpursenumber = defpursenumber[default_sport_number]: default_sport_number[2] += 1
+	if $coatworntype = $defcoattype[default_sport_number] and coatwornnumber = defcoatnumber[default_sport_number]: default_sport_number[2] += 1
+end
+
+if $ARGS[0] = 'back_to_regular_clothes':
+
+	!! wearing prostitute outfit
+	if func('prostitution_functions', 'is_default') ! 0:
+		if $lastwornclothingtype['prostitute'] = '':
+			gs 'clothing', 'wear_last_worn'
+			gs 'underwear', 'wear', 'wear_last_worn'
+			gs 'shoes', 'wear', 'last_worn'
+			gs 'purses', 'wear', 'last_worn'
+			gs 'coats', 'wear', 'last_worn'
+		else
+			!!-- Clothing
+			gs 'clothing', 'wear', $lastwornclothingtype['prostitute'], lastwornclothingnumber['prostitute']
+			!!-- Underwear
+			if lastwornunderwear['prostitute'] = 2:
+				gs 'underwear_bodysuits', 'wear', $lastwornbodysuittype['prostitute'], lastwornbodysuitnumber['prostitute']
+			else
+				gs 'panties', 'wear', $lastwornpantytype['prostitute'], lastwornpantynumber['prostitute']
+				gs 'bras',    'wear', $lastwornbratype['prostitute'],   lastwornbranumber['prostitute']
+			end
+			!!-- Shoes
+			gs 'shoes',  'wear', $lastwornshoetype['prostitute'],  lastwornshoenumber['prostitute']
+			gs 'purses', 'wear', $lastwornpursetype['prostitute'], lastwornpursenumber['prostitute']
+			gs 'coats',  'wear', $lastworncoattype['prostitute'],  lastworncoatnumber['prostitute']
+		end
+
+		gs 'prostitution_functions', 'work_clothes'
+		if prostitute['changed_for_work']: prostitute['changed_for_work'] = 0
+
+	!! wearing sport outfit
+	elseif default_sport_number[2] >= 5:
+		if $lastwornclothingtype['sport'] = '':
+			gs 'clothing', 'wear_last_worn'
+			gs 'underwear', 'wear', 'wear_last_worn'
+			gs 'shoes', 'wear', 'last_worn'
+			gs 'purses', 'wear', 'last_worn'
+			gs 'coats', 'wear', 'last_worn'
+		else
+			gs 'clothing', 'wear', $lastwornclothingtype['sport'], lastwornclothingnumber['sport']
+
+			if lastwornunderwear['sport'] = 2:
+				gs 'underwear_bodysuits', 'wear', $lastwornbodysuittype['sport'], lastwornbodysuitnumber['sport']
+			else
+				gs 'panties', 'wear', $lastwornpantytype['sport'], lastwornpantynumber['sport']
+				gs 'bras',    'wear', $lastwornbratype['sport'],   lastwornbranumber['sport']
+			end
+			gs 'shoes',  'wear', $lastwornshoetype['sport'],  lastwornshoenumber['sport']
+			gs 'purses', 'wear', $lastwornpursetype['sport'], lastwornpursenumber['sport']
+			gs 'coats',  'wear', $lastworncoattype['sport'],  lastworncoatnumber['sport']
+		end
+
+		default_sport_number[2] = 0
+	end
+end
 
 --- wardrobe ---------------------------------