Переглянути джерело

[added/changed] Added a train_functions to centralise prises (and other repeated information) and completed the centre -> center change

anjuna krokus 3 місяців тому
батько
коміт
bdc60ea7dc

+ 38 - 33
glife.qproj

@@ -8,15 +8,17 @@
 	<Location name="begin"/>
 	<Location name="onobjsel"/>
 	<Location name="obj_din"/>
-	<Location name="journal"/>
-	<Location name="journal_work"/>
-	<Location name="journal_school"/>
-	<Location name="journal_uni"/>
-	<Location name="journal_quests"/>
-	<Location name="journal_portfolio"/>
-	<Location name="journal_NPC_information"/>
-	<Location name="Cheatmenu_din"/>
 	<Location name="themes"/>
+	<Folder name="Journal">
+		<Location name="journal"/>
+		<Location name="journal_work"/>
+		<Location name="journal_school"/>
+		<Location name="journal_uni"/>
+		<Location name="journal_quests"/>
+		<Location name="journal_portfolio"/>
+		<Location name="journal_NPC_information"/>
+		<Location name="Cheatmenu_din"/>
+	</Folder>
 	<Folder name="System">
 		<Location name="counter"/>
 		<Location name="loadg"/>
@@ -349,10 +351,6 @@
 		<Location name="bank"/>
 		<Location name="kiosk"/>
 		<Location name="taxi"/>
-		<Location name="train"/>
-		<Location name="train_incidental"/>
-		<Location name="metro"/>
-		<Location name="metro_events"/>
 		<Location name="events"/>
 		<Location name="flash"/>
 		<Location name="street_event"/>
@@ -363,6 +361,14 @@
 		<Location name="gloryhole"/>
 		<Location name="home_activity"/>
 	</Folder>
+	<Folder name="Transportation">
+		<Location name="train"/>
+		<Location name="train_functions"/>
+		<Location name="train_incidental"/>
+		<Location name="metro"/>
+		<Location name="metro_events"/>
+		<Location name="bicycle"/>
+	</Folder>
 	<Folder name="Post office">
 		<Location name="post_office"/>
 		<Location name="post_master"/>
@@ -427,26 +433,6 @@
 		<Location name="WorkHosp"/>
 		<Location name="worksalon"/>
 	</Folder>
-	<Folder name="Nicholas">
-		<Location name="nichApartment"/>
-		<Location name="nichBathGuest"/>
-		<Location name="nichBathMaster"/>
-		<Location name="nichBathServant"/>
-		<Location name="nichBedroomMaster"/>
-		<Location name="nichBedroomServant"/>
-		<Location name="nichBedroomTanja"/>
-		<Location name="nichChore"/>
-		<Location name="nichClub"/>
-		<Location name="nichCook"/>
-		<Location name="nichGala"/>
-		<Location name="nichKitchen"/>
-		<Location name="nichLivingroom"/>
-		<Location name="nichNicholas"/>
-		<Location name="nichStudy"/>
-		<Location name="nichTanya"/>
-		<Location name="nichTaras"/>
-		<Location name="nichUtil"/>
-	</Folder>
 	<Folder name="Home- City Residental Apartment">
 		<Location name="bedr"/>
 		<Location name="sitr"/>
@@ -520,6 +506,26 @@
 		<Location name="rex_party_smallEvents"/>
 		<Location name="rex_party_sexEvents"/>
 	</Folder>
+	<Folder name="Nicholas">
+		<Location name="nichApartment"/>
+		<Location name="nichBathGuest"/>
+		<Location name="nichBathMaster"/>
+		<Location name="nichBathServant"/>
+		<Location name="nichBedroomMaster"/>
+		<Location name="nichBedroomServant"/>
+		<Location name="nichBedroomTanja"/>
+		<Location name="nichChore"/>
+		<Location name="nichClub"/>
+		<Location name="nichCook"/>
+		<Location name="nichGala"/>
+		<Location name="nichKitchen"/>
+		<Location name="nichLivingroom"/>
+		<Location name="nichNicholas"/>
+		<Location name="nichStudy"/>
+		<Location name="nichTanya"/>
+		<Location name="nichTaras"/>
+		<Location name="nichUtil"/>
+	</Folder>
 	<Folder name="Dima Nosov">
 		<Location name="dimaEv"/>
 		<Location name="dimaHome"/>
@@ -1128,7 +1134,6 @@
 		<Location name="gadriver"/>
 		<Location name="meadow"/>
 		<Location name="gadprostitutes"/>
-		<Location name="bicycle"/>
 		<Location name="gadfield"/>
 		<Location name="gadgarden"/>
 		<Location name="gadmarket"/>

+ 5 - 47
locations/city_industrial_train.qsrc

@@ -76,7 +76,7 @@ if $ARGS[0] = 'platform':
 	act 'Return to the station': minut += 5 & gt 'city_industrial_train', 'inside'
 	
 	if Trainpass_day > daystart:
-		act 'Take a train to the city center': gt 'city_industrial_train', 'centre'
+		act 'Take a train to the city center': gt 'city_industrial_train', 'center'
 		
 		act 'Take a train to the old platform by the communal village': gt 'city_industrial_train', 'communal'
 		
@@ -132,62 +132,20 @@ if $ARGS[0] = 'ticket':
 		end
 	end
 
-	if money >= 1500 and Trainpass_day <= daystart:
-		act 'Buy a weekly pass  (7 days - 1500 <b>₽</b>) ':
-			cla
-			money -= 1500
-			Trainpass_day = daystart + 7
-			act 'Return': gt 'city_industrial_train', 'inside'
-		end
-	end
-
-	if money >= 5500 and Trainpass_day <= daystart:
-		act 'Buy a monthly pass (30day -  5500 <b>₽</b>)':
-			cla
-			money -= 5500
-			Trainpass_day = daystart + 30
-			act 'Return': gt 'city_industrial_train', 'inside'
-		end
-	end
+	gs 'train_functions', 'buy_train_pass'
 end
 
-if $ARGS[0] = 'buy_ticket':	
+if $ARGS[0] = 'buy_ticket':
 	$menu_loc = 'city_industrial_train'
 	$menu_arg = 'buy_ticket'
 	menu_off = 0
 	
 	act 'Leave the ticket office': gt 'city_industrial_train', 'inside'
-	
-	if money >= 50:
-		act 'Buy a ticket to the city center (50 <b>₽</b>)':
-			money -= 50
-			gt 'city_industrial_train', 'centre'
-		end
-	end
-
-	if money >= 50:
-		act 'Buy a ticket to the old platform by the communal village (50 <b>₽</b>)':
-			money -= 100
-			gt 'city_industrial_train', 'communal'
-		end
-	end
 
-	if money >= 75:
-		act 'Buy a ticket to the village of Gadukino (75 <b>₽</b>)':
-			money -= 75
-			gt 'city_industrial_train', 'village'
-		end
-	end
-
-	if money >= 125:
-		act 'Buy a ticket to Pavlovsk (125 <b>₽</b>)':
-			money -= 125
-			gt 'city_industrial_train', 'pavlovsk'
-		end
-	end
+	gs 'train_functions', 'buy_ticket', 'ind'
 end
 
-if $ARGS[0] = 'centre':
+if $ARGS[0] = 'center':
 	$loc = 'city_train'
 	$loc_arg = 'start'
 	menu_off = 1

+ 3 - 55
locations/city_train.qsrc

@@ -11,7 +11,7 @@ if $ARGS[0] = 'start':
 	gs'stat'
 	'<center><B>City center railway station</B></center>'
 	'<center><img <<$set_imgh>> src="images/locations/city/shared/trainstation/central_station_inside.jpg"></center>'
-	'The grand old station in the city centre is an impressive building. It is busy and has a number of shops and bars as well as all the platforms and trains. '
+	'The grand old station in the city center is an impressive building. It is busy and has a number of shops and bars as well as all the platforms and trains. '
 	*nl
 	if car > 0 and cardrive = 2:
 		'In the parking lot is <a href="exec:GS ''carF'',''start''">your <<$car>></a>.'
@@ -42,25 +42,7 @@ if $ARGS[0] = 'tickets':
 		gs 'city_train', 'buy_ticket'
 	end
 
-	if money >= 1500 and Trainpass_day <= daystart:
-		act 'Buy a weekly pass  (7 days - 1500 <b>₽</b>) ':
-			cla
-			menu_off = 1
-			money -= 1500
-			Trainpass_day = daystart + 7
-			act 'Return': gt 'city_train', 'start'
-		end
-	end
-
-	if money >= 5500 and Trainpass_day <= daystart:
-		act 'Buy a monthly pass (30day -  5500 <b>₽</b>)':
-			cla
-			menu_off = 1
-			money -= 5500
-			Trainpass_day = daystart + 30
-			act 'Return': gt 'city_train', 'start'
-		end
-	end	
+	gs 'train_functions', 'buy_train_pass'
 end
 
 if $ARGS[0] = 'buy_ticket':
@@ -69,42 +51,8 @@ if $ARGS[0] = 'buy_ticket':
 	menu_off = 0
 	
 	act 'Leave the ticket office': minut += 1 & gt 'city_train', 'start'
-	
-	act 'Buy a ticket to the city industrial area (50 <b>₽</b>)':
-		if money >= 50:
-			money -= 50
-			gt 'city_train', 'ind'
-		else
-			'You don''t have enough money for this ticket.'
-		end
-	end
 
-	act 'Buy a ticket to the old platform by the communal village (75 <b>₽</b>)':
-		if money >= 75:
-			money -= 75
-			gt 'city_train', 'communal'
-		else
-			'You don''t have enough money for this ticket.'
-		end	
-	end
-
-	act 'Buy a ticket to the village of Gadukino (100 <b>₽</b>)':
-		if money >= 100:
-			money -= 100
-			gt 'city_train', 'village'
-		else
-			'You don''t have enough money for this ticket.'	
-		end
-	end
-
-	act 'Buy a ticket to Pavlovsk (150 <b>₽</b>)':
-		if money >= 150:
-			money -= 150
-			gt 'city_train', 'pavlovsk'
-		else
-			'You don''t have enough money for this ticket.'		
-		end
-	end
+	gs 'train_functions', 'buy_ticket', 'center'
 end
 
 if $ARGS[0] = 'platform':

+ 5 - 48
locations/pav_train_hall.qsrc

@@ -2,8 +2,8 @@
 
 if $ARGS[0] = '':
 	$region = 'pav'
-	$loc_arg = ''
 	$loc = 'pav_train_hall'
+	$loc_arg = ''
 	$menu_loc = 'pav_train_hall'
 	$menu_arg = ''
 	menu_off = 0
@@ -166,7 +166,7 @@ if $ARGS[0] = 'platform':
 
 		act 'Take the train to city industrial area': gt 'pav_train_hall', 'ind'
 
-		act 'Take the train to city center': gt 'pav_train_hall', 'centre'
+		act 'Take the train to city center': gt 'pav_train_hall', 'center'
 	end
 end
 
@@ -243,23 +243,7 @@ if $ARGS[0] = 'ticket':
 		end
 	end
 
-	if money >= 1500 and Trainpass_day <= daystart:
-		act 'Buy a weekly pass (7 days - 1500 <b>₽</b>) ':
-			cla
-			money -= 1500
-			Trainpass_day = daystart + 7
-			act 'Return': gt 'pav_train_hall'
-		end
-	end
-
-	if money >= 5500 and Trainpass_day <= daystart:
-		act 'Buy a monthly pass (30day - 5500 <b>₽</b>)':
-			cla
-			money -= 5500
-			Trainpass_day = daystart + 30
-			act 'Return': gt 'pav_train_hall'
-		end
-	end
+	gs 'train_functions', 'buy_train_pass'
 end
 
 if $ARGS[0] = 'buy_ticket':
@@ -269,34 +253,7 @@ if $ARGS[0] = 'buy_ticket':
 
 	act 'Leave the ticket office':minut += 1 & gt 'pav_train_hall'
 
-	if money >= 75:
-		act 'Buy a ticket to the village of Gadukino (75 <b>₽</b>)':
-			money -= 75
-			gt 'pav_train_hall', 'village'
-		end
-	end
-
-	if money >= 100:
-		act 'Buy a ticket to the communal village (100 <b>₽</b>)':
-			money -= 100
-			gt 'pav_train_hall', 'communal'
-		end
-	end
-
-	if money >= 125:
-		act 'Buy a ticket to city industrial area (125 <b>₽</b>)':
-			money -= 125
-			gt 'pav_train_hall', 'ind'
-		end
-	end
-
-	if money >= 150:
-		act 'Buy a ticket to city center (150 <b>₽</b>)':
-			money -= 150
-			if rand(0,10) = 0: gt 'train', 'weed'
-			gt 'pav_train_hall', 'centre'
-		end
-	end
+	gs 'train_functions', 'buy_ticket', 'pavlovsk'
 end
 
 if $ARGS[0] = 'village':
@@ -349,7 +306,7 @@ if $ARGS[0] = 'ind':
 	end
 end
 
-if $ARGS[0] = 'centre':
+if $ARGS[0] = 'center':
 	$loc = 'city_train'
 	$loc_arg = 'start'
 	menu_off = 1

+ 8 - 46
locations/train.qsrc

@@ -24,48 +24,10 @@ if $ARGS[0] = 'communal_tickets':
 	$menu_loc = 'train'
 	$menu_arg = 'communal_tickets'
 	menu_off = 0
-	
+
 	act 'Leave the ticket office': gt 'train', 'communal'
-	
-	act 'Buy a ticket to St. Petersburg city center (75 <b>₽</b>)':
-		if money >= 75:
-			money -= 75
-			menu_off = 1
-			gt 'train', 'communal_centre'
-		else
-			'You don''t have enough money for this ticket.'
-		end
-	end
-	
-	act 'Buy a ticket to St. Petersburg city industrial area (50 <b>₽</b>)':
-		if money >= 50:
-			money -= 50
-			menu_off = 1
-			gt 'train', 'communal_ind'
-		else
-			'You don''t have enough money for this ticket.'
-		end
-	end
-	
-	act 'Buy a ticket to the village of Gadukino (50 <b>₽</b>)':
-		if money >= 50:
-			money -= 50
-			menu_off = 1
-			gt 'train', 'communal_village'
-		else
-			'You don''t have enough money for this ticket.'
-		end
-	end
 
-	act 'Buy a ticket to Pavlovsk (100 <b>₽</b>)':
-		if money >= 100:
-			money -= 100
-			menu_off = 1
-			gt 'train', 'communal_pavlovsk'
-		else
-			'You don''t have enough money for this ticket.'
-		end
-	end
+	gs 'train_functions', 'buy_ticket', 'communal'
 end
 
 if $ARGS[0] = 'communal_trains':
@@ -75,7 +37,7 @@ if $ARGS[0] = 'communal_trains':
 
 	act 'Leave the platform': gt 'train', 'communal'
 	
-	act 'Take a train to St. Petersburg city center': gt 'train', 'communal_centre'
+	act 'Take a train to St. Petersburg city center': gt 'train', 'communal_center'
 	
 	act 'Take a train to St. Petersburg city industrial area': gt 'train', 'communal_ind'
 	
@@ -84,12 +46,12 @@ if $ARGS[0] = 'communal_trains':
 	act 'Take a train to Pavlovsk': gt 'train', 'communal_pavlovsk'
 end
 
-if $ARGS[0] = 'communal_centre':
+if $ARGS[0] = 'communal_center':
 	minut += 15
 	$loc = 'city_train'
 	$loc_arg = 'start'
 	$menu_loc = 'city_train'
-	$menu_arg = 'communal_centre'
+	$menu_arg = 'communal_center'
 	menu_off = 0
 	if rand(1, 100) <= 10: gt 'train_incidental', 'events'
 	if rand(1, 100) <= 20: gt 'train', 'events'
@@ -179,7 +141,7 @@ if $ARGS[0] = 'village_tickets':
 		if money >= 100:
 			money -= 100
 			menu_off = 1
-			gt 'train', 'village_centre'
+			gt 'train', 'village_center'
 		else
 			'You don''t have enough money for this ticket.'
 		end
@@ -223,7 +185,7 @@ if $ARGS[0] = 'village_trains':
 
 	act 'Leave the platform': gt 'train', 'village'
 
-	act 'Take a train to St. Petersburg city center': gt 'train', 'village_centre'
+	act 'Take a train to St. Petersburg city center': gt 'train', 'village_center'
 
 	act 'Take a train to St. Petersburg city industrial area': gt 'train', 'village_ind'
 
@@ -232,7 +194,7 @@ if $ARGS[0] = 'village_trains':
 	act 'Take a train to Pavlovsk': gt 'train', 'village_pavlovsk'
 end
 
-if $ARGS[0] = 'village_centre':
+if $ARGS[0] = 'village_center':
 	$loc = 'city_train'
 	$loc_arg = 'start'
 	menu_off = 1