Explorar o código

[fixed] Default clothing sets can now be renamed and trying to doesn't break the game

Kevin_Smarts %!s(int64=2) %!d(string=hai) anos
pai
achega
6706ea170e
Modificáronse 1 ficheiros con 47 adicións e 41 borrados
  1. 47 41
      locations/wardrobe.qsrc

+ 47 - 41
locations/wardrobe.qsrc

@@ -200,16 +200,16 @@ $default_sports_line = {
 }
 
 if $ARGS[0] = 'default':
-	if $clothing_default['page_name1'] = '': $clothing_default['page_name1'] = 'Custom1'
-	if $clothing_default['page_name2'] = '': $clothing_default['page_name2'] = 'Custom2'
-	if $clothing_default['page_name3'] = '': $clothing_default['page_name3'] = 'Custom3'
-	if $clothing_default['page_name4'] = '': $clothing_default['page_name4'] = 'Custom4'
-	if $clothing_default['page_name5'] = '': $clothing_default['page_name5'] = 'Custom5'
-	if $clothing_default['page_name6'] = '': $clothing_default['page_name6'] = 'Custom6'
-	if $clothing_default['page_name7'] = '': $clothing_default['page_name7'] = 'Custom7'
-	if $clothing_default['page_name8'] = '': $clothing_default['page_name8'] = 'Custom8'
-	if $clothing_default['page_name9'] = '': $clothing_default['page_name9'] = 'Custom9'
-	if $clothing_default['page_name10'] = '': $clothing_default['page_name10'] = 'Custom10'
+	if $clothing_default_page[1] = '': $clothing_default_page[1] = 'Custom1'
+	if $clothing_default_page[2] = '': $clothing_default_page[2] = 'Custom2'
+	if $clothing_default_page[3] = '': $clothing_default_page[3] = 'Custom3'
+	if $clothing_default_page[4] = '': $clothing_default_page[4] = 'Custom4'
+	if $clothing_default_page[5] = '': $clothing_default_page[5] = 'Custom5'
+	if $clothing_default_page[6] = '': $clothing_default_page[6] = 'Custom6'
+	if $clothing_default_page[7] = '': $clothing_default_page[7] = 'Custom7'
+	if $clothing_default_page[8] = '': $clothing_default_page[8] = 'Custom8'
+	if $clothing_default_page[9] = '': $clothing_default_page[9] = 'Custom9'
+	if $clothing_default_page[10] = '': $clothing_default_page[10] = 'Custom10'
 	$wloc = 'default'
 	gs 'stat'
 	
@@ -232,9 +232,10 @@ if $ARGS[0] = 'default':
 end
 
 if $ARGS[0] = 'default_template':
+	clothing_default_page = ARGS[1]
 	gs 'stat'
 	
-	'<center><table><TH><a href="exec:gt ''wardrobe'', ''main''"><img src="images/system/icons/clothing/clothes.png" height="50"></TH><TH><B>Default sets: <<$default_entry[2]>></B></TH><TH><a href="exec:gt ''wardrobe'', ''default''"><img src="images/system/icons/clothing/default.png" height="50"></TH><TR><TD></TD><TD><a href="exec:$clothing_default[''page_name<<ARGS[1]>>'']=input(''Enter new name for this set'') & gt ''wardrobe'', ''default<<ARGS[1]>>''">Rename set</a></TD></table></center>'
+	'<center><table><TH><a href="exec:gt ''wardrobe'', ''main''"><img src="images/system/icons/clothing/clothes.png" height="50"></TH><TH><B>Default sets: <<$default_entry[2]>></B></TH><TH><a href="exec:gt ''wardrobe'', ''default''"><img src="images/system/icons/clothing/default.png" height="50"></TH><TR><TD></TD><TD><center><a href="exec: gs ''wardrobe'', ''default_set_name''">Rename set</a></center></TD></table></center>'
 	'<center><table><TH>Name</TH><TH>Outfit</TH><TH>Panties</TH><TH>Bra</TH><TH>Shoes</TH><TH>Coat</TH><TH>Purse</TH><TH></TH><TH></TH><TH></TH><TH></TH><TR>'
 
 
@@ -249,31 +250,36 @@ if $ARGS[0] = 'default_template':
 	'</table></center>'
 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>>'
+end
 
 if $ARGS[0] = 'default_actions':
 	act 'Return':
 		gt $loc, $loc_arg
 	end
 	if ARGS[1] ! 0: act 'Sport': gt 'wardrobe', 'default'
-	if ARGS[1] ! 1: act '<<$clothing_default[''page_name1'']>>': gt 'wardrobe', 'default1'
-	if ARGS[1] ! 2: act '<<$clothing_default[''page_name2'']>>': gt 'wardrobe', 'default2'
-	if ARGS[1] ! 3: act '<<$clothing_default[''page_name3'']>>': gt 'wardrobe', 'default3'
-	if ARGS[1] ! 4: act '<<$clothing_default[''page_name4'']>>': gt 'wardrobe', 'default4'
-	if ARGS[1] ! 5: act '<<$clothing_default[''page_name5'']>>': gt 'wardrobe', 'default5'
-	if ARGS[1] ! 6: act '<<$clothing_default[''page_name6'']>>': gt 'wardrobe', 'default6'
-	if ARGS[1] ! 7: act '<<$clothing_default[''page_name7'']>>': gt 'wardrobe', 'default7'
-	if ARGS[1] ! 8: act '<<$clothing_default[''page_name8'']>>': gt 'wardrobe', 'default8'
-	if ARGS[1] ! 9: act '<<$clothing_default[''page_name9'']>>': gt 'wardrobe', 'default9'
-	if ARGS[1] ! 10: act '<<$clothing_default[''page_name10'']>>': gt 'wardrobe', 'default10'
+	if ARGS[1] ! 1: act '<<$clothing_default_page[1]>>': gt 'wardrobe', 'default1'
+	if ARGS[1] ! 2: act '<<$clothing_default_page[2]>>': gt 'wardrobe', 'default2'
+	if ARGS[1] ! 3: act '<<$clothing_default_page[3]>>': gt 'wardrobe', 'default3'
+	if ARGS[1] ! 4: act '<<$clothing_default_page[4]>>': gt 'wardrobe', 'default4'
+	if ARGS[1] ! 5: act '<<$clothing_default_page[5]>>': gt 'wardrobe', 'default5'
+	if ARGS[1] ! 6: act '<<$clothing_default_page[6]>>': gt 'wardrobe', 'default6'
+	if ARGS[1] ! 7: act '<<$clothing_default_page[7]>>': gt 'wardrobe', 'default7'
+	if ARGS[1] ! 8: act '<<$clothing_default_page[8]>>': gt 'wardrobe', 'default8'
+	if ARGS[1] ! 9: act '<<$clothing_default_page[9]>>': gt 'wardrobe', 'default9'
+	if ARGS[1] ! 10: act '<<$clothing_default_page[10]>>': gt 'wardrobe', 'default10'
 end
 
 if $ARGS[0] = 'default1':
 	$wloc = 'default1'
 	default_entry = 1
 	default_entry[1] = 10
-	$default_entry[2] = $clothing_default['page_name1']
+	$default_entry[2] = $clothing_default_page[1]
 
-	gs 'wardrobe', 'default_template'
+	gs 'wardrobe', 'default_template', 1
 	gs 'wardrobe', 'default_actions', 1
 end
 
@@ -281,9 +287,9 @@ if $ARGS[0] = 'default2':
 	$wloc = 'default2'
 	default_entry = 11
 	default_entry[1] = 20
-	$default_entry[2] = $clothing_default['page_name2']
+	$default_entry[2] = $clothing_default_page[2]
 
-	gs 'wardrobe', 'default_template'
+	gs 'wardrobe', 'default_template', 2
 	gs 'wardrobe', 'default_actions', 2
 end
 
@@ -291,9 +297,9 @@ if $ARGS[0] = 'default3':
 	$wloc = 'default3'
 	default_entry = 21
 	default_entry[1] = 30
-	$default_entry[2] = $clothing_default['page_name3']
+	$default_entry[2] = $clothing_default_page[3]
 
-	gs 'wardrobe', 'default_template'
+	gs 'wardrobe', 'default_template', 3
 	gs 'wardrobe', 'default_actions', 3
 end
 
@@ -301,9 +307,9 @@ if $ARGS[0] = 'default4':
 	$wloc = 'default4'
 	default_entry = 31
 	default_entry[1] = 40
-	$default_entry[2] = $clothing_default['page_name4']
+	$default_entry[2] = $clothing_default_page[4]
 
-	gs 'wardrobe', 'default_template'
+	gs 'wardrobe', 'default_template', 4
 	gs 'wardrobe', 'default_actions', 4
 end
 
@@ -311,9 +317,9 @@ if $ARGS[0] = 'default5':
 	$wloc = 'default5'
 	default_entry = 41
 	default_entry[1] = 50
-	$default_entry[2] = $clothing_default['page_name5']
+	$default_entry[2] = $clothing_default_page[5]
 
-	gs 'wardrobe', 'default_template'
+	gs 'wardrobe', 'default_template', 5
 	gs 'wardrobe', 'default_actions', 5
 end
 
@@ -321,9 +327,9 @@ if $ARGS[0] = 'default6':
 	$wloc = 'default6'
 	default_entry = 51
 	default_entry[1] = 60
-	$default_entry[2] = $clothing_default['page_name6']
+	$default_entry[2] = $clothing_default_page[6]
 
-	gs 'wardrobe', 'default_template'
+	gs 'wardrobe', 'default_template', 6
 	gs 'wardrobe', 'default_actions', 6
 end
 
@@ -331,9 +337,9 @@ if $ARGS[0] = 'default7':
 	$wloc = 'default7'
 	default_entry = 61
 	default_entry[1] = 70
-	$default_entry[2] = $clothing_default['page_name7']
+	$default_entry[2] = $clothing_default_page[7]
 
-	gs 'wardrobe', 'default_template'
+	gs 'wardrobe', 'default_template', 7
 	gs 'wardrobe', 'default_actions', 7
 end
 
@@ -341,9 +347,9 @@ if $ARGS[0] = 'default8':
 	$wloc = 'default8'
 	default_entry = 71
 	default_entry[1] = 80
-	$default_entry[2] = $clothing_default['page_name8']
+	$default_entry[2] = $clothing_default_page[8]
 
-	gs 'wardrobe', 'default_template'
+	gs 'wardrobe', 'default_template', 8
 	gs 'wardrobe', 'default_actions', 8
 end
 
@@ -351,9 +357,9 @@ if $ARGS[0] = 'default9':
 	$wloc = 'default9'
 	default_entry = 81
 	default_entry[1] = 90
-	$default_entry[2] = $clothing_default['page_name9']
+	$default_entry[2] = $clothing_default_page[9]
 
-	gs 'wardrobe', 'default_template'
+	gs 'wardrobe', 'default_template', 9
 	gs 'wardrobe', 'default_actions', 9
 end
 
@@ -361,9 +367,9 @@ if $ARGS[0] = 'default10':
 	$wloc = 'default10'
 	default_entry = 91
 	default_entry[1] = 100
-	$default_entry[2] = $clothing_default['page_name10']
+	$default_entry[2] = $clothing_default_page[10]
 
-	gs 'wardrobe', 'default_template'
+	gs 'wardrobe', 'default_template', 10
 	gs 'wardrobe', 'default_actions', 10
 end