Browse Source

[changed] Moved the logic and the courtletter itself into a new location. This should make it easier to update everything in the future

anjuna krokus 7 tháng trước cách đây
mục cha
commit
380797a46e

+ 1 - 0
glife.qproj

@@ -837,6 +837,7 @@
 	<Folder name="Crime and Punishment">
 		<Location name="police_station"/>
 		<Location name="sentence"/>
+		<Location name="courtletter"/>
 		<Location name="shoplifting"/>
 	</Folder>
 	<Folder name="Mansion">

+ 15 - 34
locations/budilnik.qsrc

@@ -3,17 +3,16 @@
 menu_off = 1
 
 if $ARGS[0] = 'start':
-	*clr & cla
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/shared/home/bedroom/bed2.jpg"></center>'
 	'<center>Enter time using number pad and click set to change alarm times, don''t forget to turn your alarm on.</center>'
 	*nl
 
-	if numbud = 4:'<center><b><<bud1>><<bud2>>:<<bud3>><<bud4>></b></center>'
-	if numbud = 3:'<center><b><<bud1>><<bud2>>:<<bud3>></b><<bud4>></center>'
-	if numbud = 2:'<center><b><<bud1>><<bud2>></b>:<<bud3>><<bud4>></center>'
-	if numbud = 1:'<center><b><<bud1>></b><<bud2>>:<<bud3>><<bud4>></center>'
-	if numbud = 0:'<center><<bud1>><<bud2>> : <<bud3>><<bud4>></center>'
+	if numbud = 4: '<center><b><<bud1>><<bud2>>:<<bud3>><<bud4>></b></center>'
+	if numbud = 3: '<center><b><<bud1>><<bud2>>:<<bud3>></b><<bud4>></center>'
+	if numbud = 2: '<center><b><<bud1>><<bud2>></b>:<<bud3>><<bud4>></center>'
+	if numbud = 1: '<center><b><<bud1>></b><<bud2>>:<<bud3>><<bud4>></center>'
+	if numbud = 0: '<center><<bud1>><<bud2>> : <<bud3>><<bud4>></center>'
 
 	'<center><b><a href="exec:gt ''budilnik'', ''clear''">Clear</a>'
 	'<center><b><a href="exec:gt ''budilnik'', ''1''">1</a> <a href="exec:gt ''budilnik'', ''2''">2</a> <a href="exec:gt ''budilnik'', ''3''">3</a></b></center>'
@@ -21,25 +20,24 @@ if $ARGS[0] = 'start':
 	'<center><b><a href="exec:gt ''budilnik'', ''7''">7</a> <a href="exec:gt ''budilnik'', ''8''">8</a> <a href="exec:gt ''budilnik'', ''9''">9</a></b></center>'
 	'<center><b><a href="exec:gt ''budilnik'', ''0''">0</a></b></center>'
 	'<center><b><a href="exec: bud_weekend = 0 & gt ''budilnik'', ''Reset''">Reset weekday alarm</a> <a href="exec: bud_weekend = 0 & gt ''budilnik'', ''Time''">Set</a> weekday alarm to this time</b></center>'
-	'<center><b>Currently set for '+iif(timer < 10,'0<<timer>>','<<timer>>')+':'+iif(timerM < 10,'0<<timerM>>','<<timerM>>')+' </b></center>'
-	'<center><b><a href="exec:  bud_weekend = 1 & gt ''budilnik'', ''Reset''">Reset weekend alarm</a> <a href="exec: bud_weekend = 1 & gt ''budilnik'', ''Time''">Set</a> weekend alarm to this time</b></center>'
-	'<center><b>Currently set for '+iif(timerEnd < 10,'0<<timerEnd>>','<<timerEnd>>')+':'+iif(timerEndM < 10,'0<<timerEndM>>','<<timerEndM>>')+'</b></center>'
+
+	'<center><b>Currently set for <<func(''budilnik'', ''alarm_display'', timer, timerM)>></center>'
+	'<center><b><a href="exec: bud_weekend = 1 & gt ''budilnik'', ''Reset''">Reset weekend alarm</a> <a href="exec: bud_weekend = 1 & gt ''budilnik'', ''Time''">Set</a> weekend alarm to this time</b></center>'
+	'<center><b>Currently set for <<func(''budilnik'', ''alarm_display'', timerEnd, timerEndM)>></center>'
 	if mid($start_type,1,2) = 'sg' and alarm_holiday = 0:
 		'<center><b>Use weekend alarm for holidays - <a href="exec:  alarm_holiday = 1 & gt ''budilnik'', ''start''">OFF</a></b></center>'
 	elseif mid($start_type,1,2) = 'sg' and alarm_holiday = 1:
 		'<center><b>Use weekend alarm for holidays - <a href="exec:  alarm_holiday = 0 & gt ''budilnik'', ''start''">ON</a></b></center>'
 	end
 
-	
 	*nl
 	if budilnikOn = 0:
 		'<center>Your alarm is currently turned <a href="exec: budilnikOn = 1 & gt ''budilnik'', ''start''"><b>OFF</a></b></center>'
 	else
 		'<center>Your alarm is currently turned <a href="exec: budilnikOn = 0 & gt ''budilnik'', ''start''"><b>ON</b></a></center>'
-		'<center>The alarm is set to '+iif(timer < 10,'0<<timer>>','<<timer>>')+':'+iif(timerM < 10,'0<<timerM>>','<<timerM>>')+' during the week and to '+iif(timerEnd < 10,'0<<timerEnd>>','<<timerEnd>>')+':'+iif(timerEndM < 10,'0<<timerEndM>>','<<timerEndM>>')+' during the weekend.</center>'		
+		'<center>The alarm is set to <<func(''budilnik'', ''alarm_display'', timer, timerM)>> during the week and to <<func(''budilnik'', ''alarm_display'', timerEnd, timerEndM)>> during the weekend.</center>'
 	end
 	act 'Clear time display':
-		cla
 		bud1 = 0
 		bud2 = 0
 		bud3 = 0
@@ -48,7 +46,6 @@ if $ARGS[0] = 'start':
 		gt 'budilnik', 'fin'
 	end
 	act 'Finish':
-		cla
 		bud1 = 0
 		bud2 = 0
 		bud3 = 0
@@ -58,6 +55,11 @@ if $ARGS[0] = 'start':
 	end
 end
 
+if $ARGS[0] = 'alarm_display':
+	!! func('...', 'alarm_display', hour, minutes)
+	$result = '<b><<$mid(100 + hour, 2, 2)>>:<<$mid(100 + minut, 2, 2)>></b>'
+end
+
 if $ARGS[0] = 'clear':
 	cla
 	bud1 = 0
@@ -69,7 +71,6 @@ if $ARGS[0] = 'clear':
 end
 
 if $ARGS[0] = 'Time':
-	cla
 	budilnikOn = 1
 
 	if bud_weekend = 1:
@@ -90,8 +91,6 @@ if $ARGS[0] = 'Time':
 end
 
 if $ARGS[0] = '1':
-	cla
-
 	!!if numbud = 4:end
 	if numbud = 3:bud4 = 1 & numbud = 4
 	if numbud = 2:bud3 = 1 & numbud = 3
@@ -102,8 +101,6 @@ if $ARGS[0] = '1':
 end
 
 if $ARGS[0] = '2':
-	cla
-
 	!!if numbud = 4:end
 	if numbud = 3:bud4 = 2 & numbud = 4
 	if numbud = 2:bud3 = 2 & numbud = 3
@@ -114,7 +111,6 @@ if $ARGS[0] = '2':
 end
 
 if $ARGS[0] = '3':
-	cla
 	!!if numbud = 4:end
 	if numbud = 3:bud4 = 3 & numbud = 4
 	if numbud = 2:bud3 = 3 & numbud = 3
@@ -125,8 +121,6 @@ if $ARGS[0] = '3':
 end
 
 if $ARGS[0] = '4':
-	cla
-
 	!!if numbud = 4:end
 	if numbud = 3:bud4 = 4 & numbud = 4
 	if numbud = 2:bud3 = 4 & numbud = 3
@@ -137,8 +131,6 @@ if $ARGS[0] = '4':
 end
 
 if $ARGS[0] = '5':
-	cla
-
 	!!if numbud = 4:end
 	if numbud = 3:bud4 = 5 & numbud = 4
 	if numbud = 2:bud3 = 5 & numbud = 3
@@ -149,8 +141,6 @@ if $ARGS[0] = '5':
 end
 
 if $ARGS[0] = '6':
-	cla
-
 	!!if numbud = 4:end
 	if numbud = 3:bud4 = 6 & numbud = 4
 	if numbud = 2:bud3 = 6 & numbud = 3
@@ -161,8 +151,6 @@ if $ARGS[0] = '6':
 end
 
 if $ARGS[0] = '7':
-	cla
-
 	!!if numbud = 4:end
 	if numbud = 3:bud4 = 7 & numbud = 4
 	if numbud = 2:bud3 = 7 & numbud = 3
@@ -173,8 +161,6 @@ if $ARGS[0] = '7':
 end
 
 if $ARGS[0] = '8':
-	cla
-
 	!!if numbud = 4:end
 	if numbud = 3:bud4 = 8 & numbud = 4
 	if numbud = 2:bud3 = 8 & numbud = 3
@@ -185,8 +171,6 @@ if $ARGS[0] = '8':
 end
 
 if $ARGS[0] = '9':
-	cla
-
 	!!if numbud = 4:end
 	if numbud = 3:bud4 = 9 & numbud = 4
 	if numbud = 2:bud3 = 9 & numbud = 3
@@ -197,8 +181,6 @@ if $ARGS[0] = '9':
 end
 
 if $ARGS[0] = '0':
-	cla
-
 	!!if numbud = 4:end
 	if numbud = 3:bud4 = 0 & numbud = 4
 	if numbud = 2:bud3 = 0 & numbud = 3
@@ -209,7 +191,6 @@ if $ARGS[0] = '0':
 end
 
 if $ARGS[0] = 'Reset':
-	cla
 	if bud_weekend = 1:
 		timerEnd = 0
 		timerEndM = 0

+ 1 - 1
locations/city_house_res_misc.qsrc

@@ -63,7 +63,7 @@ if $ARGS[0] = 'hallw':
 	'<center><b><font color="maroon">Hallway</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/city/residential/house/crh_hallway.jpg"></center>'
 	
-	if arrsize('policeQW_courtletter_dates') > 0 and daystart >= policeQW_courtletter_dates[0]: gt 'sentence', 'letter'
+	gs 'courtletter'
 
 	act 'Go out front':
 		if $clothingworntype ! 'nude':

+ 1 - 1
locations/city_mansion_residence_1.qsrc

@@ -27,7 +27,7 @@ if $ARGS[0] = 'yfoyer':
 		'<center><img <<$set_imgh>> src="images/locations/city/suburb/mansion/i_unfinished.jpg"></center>'
 	end
 	
-	if arrsize('policeQW_courtletter_dates') > 0 and daystart >= policeQW_courtletter_dates[0]: gt 'sentence', 'letter'
+	gs 'courtletter'
 
 	act 'Walk outside':
 		if $clothingworntype ! 'nude':

+ 235 - 0
locations/courtletter.qsrc

@@ -0,0 +1,235 @@
+# courtletter
+
+if $ARGS[0] = '':
+	if arrsize('policeQW_courtletter_dates') > 0 and daystart >= policeQW_courtletter_dates[0]: gt 'courtletter', 'letter'
+end
+
+
+if $ARGS[0] = 'letter':
+	*clr & cla
+	menu_off = 1
+	minut += 5
+
+	killvar 'policeQW_courtletter_dates', 0
+
+	if (policeQW['missed_court_dates'] + policeQW['missed_fine_deadlines']) > 1:
+		if (policeQW['tot_court_dates_missed'] + policeQW['tot_fines_deadlines_missed']) > 30 and policeQW['tot_arrested'] > 10:
+			killvar 'policeQW_courtletter_subjects', 0
+			policeQW['tot_arrested'] += 1
+			if policeQW['arrest_gameover_flag'] = 1:
+				gt 'sentence', 'police_arrest', 2
+			else
+				policeQW['arrest_gameover_flag'] = 1
+				gt 'sentence', 'police_arrest', 1
+			end
+		end
+
+		if (policeQW['missed_court_dates'] + policeQW['missed_fine_deadlines']) > 3:
+			killvar 'policeQW_courtletter_subjects', 0
+			policeQW['tot_arrested'] += 1
+			gt 'sentence', 'police_arrest', 0
+		end
+	end
+
+	'<center><img <<$set_imgh>> src="images/locations/city/shared/court/openletter.jpg"></center>'
+
+	!! Handling the various different letters.
+	if $policeQW_courtletter_subjects[0] = 'fine':
+
+		if policeQW['courtletter_fine_counter'] < 10:
+			policeQW['courtletter_fine_counter'] += 1
+			pcs_mood -= 100
+			gs 'stat'
+
+			'As you enter your home you notice an envelope from the court. You anxiously look at it and take a deep breath before opening the envelope.'
+
+			if week < 6:
+				'Going through the letter you read that you''ve a week to pay your fine in full.'
+			else
+				'Going through the letter you read that you''ve until Monday, a week from now, to pay your fine in full.'
+			end
+
+			'<i>Failure to pay the fine in full with in a week from now, will have dire consequences for the accused.</i> Your heart drops as you read that line...'
+			'<i>You should mail your fine payment using the enclosed envelope.</i>'
+			'You put the letter back in the envelope and let out a loud sigh...'
+
+			if policeQW['legal_fine'] <= 0:
+				pcs_mood += 90
+				gs 'stat'
+				'You realise that you''ve already paid off your fines and sigh with relief.'
+			else
+				'You put the letter back in the envelope and let out a loud sigh...'
+			end
+
+		else
+			'As you come home you see the familiar envelope from the court. You already know the gist of it, <i>failure to pay your fine will have dire consequences,</i> yadda yadda...'
+			'You glance through the letter seeing the same information once again and as you finish you throw it to the side and continue further on inside your apartment...'
+			if policeQW['legal_fine'] <= 0:
+				'You''ve already paid your fines, why are they even bothering you.'
+			end
+		end
+
+		if policeQW['legal_fine'] > 0:
+			if money < policeQW['legal_fine']:
+				act 'Mail the payment for your legal fine/s (<font color="red"><<policeQW[''legal_fine'']>> <b>₽</b></font>)': '<br><font color="red">You don''t have enough cash to use this action.</font>'
+			else
+				act 'Mail the payment for your legal fine/s (<<policeQW[''legal_fine'']>> <b>₽</b>)':
+					*clr & cla
+					money -= policeQW['legal_fine']
+					policeQW['legal_fine'] = 0
+					policeQW['missed_fine_deadlines'] = 0
+					policeQW['fine_deadline'] = 0
+					policeQW['arrest_gameover_flag'] = 0
+					minut += 5
+					gs 'stat'
+
+					!!Need an image of Sveta putting money in the envelope!!
+					!'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/counter.jpg"></center>'
+					'You put the full amount of your outstanding fine/s in the evelope and seal it. No more than 5 minutes later you''ve posted the letter and are back.'
+					act 'Done': gt $loc, $loc_arg
+				end
+			end
+		end
+
+	elseif $policeQW_courtletter_subjects[0] = 'missed_fine':
+		if policeQW['courtletter_fine_counter'] < 10:
+			policeQW['courtletter_fine_counter'] += 1
+			pcs_mood -= 100
+			gs 'stat'
+
+			'As you enter your home you notice an envelope from the court. You anxiously look at it and take a deep breath before opening the envelope.'
+
+			if policeQW['legal_fine'] <= 0:
+				pcs_mood += 90
+				gs 'stat'
+				'Going through the letter you read that you''ve a week to pay your fine in full, which you already did.'
+				'Happy that you''ve managed to avoid this worry, you put the letter away.'
+			else
+				temp_fine = 250 * rand(5, 10)
+				gs 'sentence', 'add_fine', temp_fine
+				if week < 6:
+					'Going through the letter you read that you''ve failed to pay your fine. The court given you another <<temp_rand>> <b>₽</b> fine and has graciously decided to give you a week to pay your fine in full.'
+				else
+					'Going through the letter you read that you''ve failed to pay your fine. The court given you another <<temp_rand>> <b>₽</b> fine and has graciously decided to give you until Monday, a week from now, to pay your fine in full.'
+				end
+
+				'<i>Failure to pay the fine in full with in a week from now, will have dire consequences for the accused.</i> Your heart drops as you read that line...'
+				'<i>You should mail your fine payment using the enclosed envelope.</i>'
+				'You put the letter back in the envelope and let out a loud sigh...'
+			end
+
+		else
+			if policeQW['legal_fine'] <= 0:
+				'As you come home you see the familiar envelope from the court. You already know the gist of it, <i>failed to pay your fine, failure to pay your fine will have dire consequences,</i> yadda yadda...'
+				'You already paid off your fines and as you finish you throw it to the side and continue further on inside your apartment...'
+
+			else
+				temp_fine = 250 * rand(10, 20)
+				gs 'sentence', 'add_fine', temp_fine
+				'As you come home you see the familiar envelope from the court. You already know the gist of it, <i>failed to pay your fine, additional <<temp_rand>> <b>₽</b> fine, failure to pay your fine will have dire consequences,</i> yadda yadda...'
+				'You glance through the letter seeing the same information once again and as you finish you throw it to the side and continue further on inside your apartment...'
+			end
+		end
+
+		if policeQW['legal_fine'] > 0:
+			if money < policeQW['legal_fine']:
+				act 'Mail the payment for your legal fine/s (<font color="red"><<policeQW[''legal_fine'']>> <b>₽</b></font>)': '<br><font color="red">You don''t have enough cash to use this action.</font>'
+			else
+				act 'Mail the payment for your legal fine/s (<<policeQW[''legal_fine'']>> <b>₽</b>)':
+					*clr & cla
+					money -= policeQW['legal_fine']
+					policeQW['legal_fine'] = 0
+					policeQW['missed_fine_deadlines'] = 0
+					policeQW['fine_deadline'] = 0
+					policeQW['arrest_gameover_flag'] = 0
+					minut += 5
+					gs 'stat'
+
+					!!Need an image of Sveta putting money in the envelope!!
+					!'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/counter.jpg"></center>'
+					'You put the full amount of your outstanding fine/s in the evelope and seal it. No more than 5 minutes later you''ve posted the letter and are back.'
+					act 'Done': gt $loc, $loc_arg
+				end
+			end
+		end
+
+
+	elseif mid('policeQW_courtletter_subjects', 1, 12) = 'missed_court':
+		if week = 6:
+			policeQW_courthearing_dates[] = daystart + 9
+		elseif week = 7:
+			policeQW_courthearing_dates[] = daystart + 8
+		else
+			policeQW_courthearing_dates[] = daystart + 7
+		end
+
+		$policeQW_courthearing_subjects[] = mid($policeQW_courtletter_subjects[0], 14)
+
+		if $policeQW['courtletter_hearing_counter'] < 10:
+			policeQW['courtletter_hearing_counter'] += 1
+			pcs_mood -= 100
+			gs 'stat'
+
+			'As you enter your home you notice an envelope from the court. You anxiously look at it and take a deep breath before opening the envelope.'
+
+			temp_fine = 500 * rand(5, 10)
+			gs 'sentence', 'letter_add_fine', 'missed_court', temp_fine
+			if week < 6:
+				'Going through the letter you read that you''ve missed your court hearing. A new court hearing has been scheduled a week from now and you''ve been fined <<temp_rand>> <b>₽</b>.'
+			else
+				'Going through the letter you read that you''ve missed your court hearing. A new court hearing has been scheduled on Monday, a week from now and you''ve been fined <<temp_rand>> <b>₽</b>.'
+			end
+
+			'<i>Failing to appear in court will have dire consequences for the accused.</i> Your heart drops as you read that line...'
+			'<i>The court is located in the city center. You should arrive at 9:00 as there are a lot of cases and we can''t say when your turn might come up.</i>'
+			'You put the letter back in the envelope and let out a loud sigh...'
+
+		else
+			temp_fine = 500 * rand(10, 20)
+			gs 'sentence', 'letter_add_fine', 'missed_court', temp_fine
+			'As you come home you see the familiar envelope from the court. You already know the gist of it, <i>missed court, <<temp_rand>> <b>₽</b> fine, failure to show up will have dire consequences,</i> yadda yadda...'
+			'You glance through the letter seeing the same information once again and as you finish you throw it to the side and continue further on inside your apartment...'
+		end
+
+	else
+		if week = 6:
+			policeQW_courthearing_dates[] = daystart + 9
+		elseif week = 7:
+			policeQW_courthearing_dates[] = daystart + 8
+		else
+			policeQW_courthearing_dates[] = daystart + 7
+		end
+
+		$policeQW_courthearing_subjects[] = $policeQW_courtletter_subjects[0]
+
+		if $policeQW['courtletter_hearing_counter'] < 10:
+			policeQW['courtletter_hearing_counter'] += 1
+			pcs_mood -= 100
+			gs 'stat'
+
+			'As you enter your home you notice an envelope from the court. You anxiously look at it and take a deep breath before opening the envelope.'
+
+			if week < 6:
+				'Going through the letter you read that you''ve been summoned to appear in court a week from now.'
+			else
+				'Going through the letter you read that you''ve been summoned to appear in court on Monday, a week from now.'
+			end
+
+			'<i>Failing to appear in court will have dire consequences for the accused.</i> Your heart drops as you read that line...'
+			'<i>The court is located in the city center. You should arrive at 9:00 as there are a lot of cases and we can''t say when your turn might come up.</i>'
+			'You put the letter back in the envelope and let out a loud sigh...'
+
+		else
+			'As you come home you see the familiar envelope from the court. You already know the gist of it, <i>failure to show up will have dire consequences,</i> yadda yadda...'
+			'You glance through the letter seeing the same information once again and as you finish you throw it to the side and continue further on inside your apartment...'
+		end
+	end
+
+	act 'Continue': gt $loc, $loc_arg
+	killvar 'temp_fine'
+	killvar 'policeQW_courtletter_subjects', 0
+end
+
+
+
+--- courtletter ---------------------------------

+ 1 - 1
locations/korr.qsrc

@@ -21,7 +21,7 @@ if ml_performance['max_perform_minutes'] = 0: ml_performance['max_perform_minute
 
 if sound = 0:PLAY 'sound/korr.mp3',30
 
-if arrsize('policeQW_courtletter_dates') > 0 and daystart >= policeQW_courtletter_dates[0]: gt 'sentence', 'letter'
+gs 'courtletter'
 
 if lesbiday + 14 <= daystart and lesbiQW >= 11 and hour >= 19 and santehnikDolg = 0:
 	if RAND(0,100) > 82 and husband = 0:

+ 1 - 1
locations/korr2x.qsrc

@@ -24,7 +24,7 @@ elektro = elektro + 1
 gs'stat'
 gs 'themes', 'indoors'
 
-if arrsize('policeQW_courtletter_dates') > 0 and daystart >= policeQW_courtletter_dates[0]: gt 'sentence', 'letter'
+gs 'courtletter'
 
 '<center><b><font color = maroon>Corridor</font></b></center>'
 '<center><img <<$set_imgh>> src="images/locations/pushkin/apartment/korr2x.jpg"></center>'

+ 1 - 1
locations/korrPar.qsrc

@@ -32,7 +32,7 @@ gs 'stat'
 
 if locat['Fam_inGad'] = 1:'With your parents away visiting your grandparents, the apartment seems quiet and empty.'
 
-if arrsize('policeQW_courtletter_dates') > 0 and daystart >= policeQW_courtletter_dates[0]: gt 'sentence', 'letter'
+gs 'courtletter'
 
 if (hour ! 16 or hour ! 17) and blockBedrPar = 1:blockBedrPar = 0
 

+ 1 - 1
locations/pav_shared_apt.qsrc

@@ -209,7 +209,7 @@ if $ARGS[0] = 'start':
 	minut += 2
 	gs 'stat'
 	
-	if arrsize('policeQW_courtletter_dates') > 0 and daystart >= policeQW_courtletter_dates[0]: gt 'sentence', 'letter'
+	gs 'courtletter'
 
 	! do this once a day
 	if daystart >= tomorrow:

+ 0 - 225
locations/sentence.qsrc

@@ -4,231 +4,6 @@
 !!shows up when courtletter_date = daystart
 !!adding a version if Sveta has gone to court and not paid the fine within 30 days
 
-if $ARGS[0] = 'letter':
-	*clr & cla
-	menu_off = 1
-	minut += 5
-
-	killvar 'policeQW_courtletter_dates', 0
-
-	if (policeQW['missed_court_dates'] + policeQW['missed_fine_deadlines']) > 1:
-		if (policeQW['tot_court_dates_missed'] + policeQW['tot_fines_deadlines_missed']) > 30 and policeQW['tot_arrested'] > 10:
-			killvar 'policeQW_courtletter_subjects', 0
-			policeQW['tot_arrested'] += 1
-			if policeQW['arrest_gameover_flag'] = 1:
-				gt 'sentence', 'police_arrest', 2
-			else
-				policeQW['arrest_gameover_flag'] = 1
-				gt 'sentence', 'police_arrest', 1
-			end
-		end
-
-		if (policeQW['missed_court_dates'] + policeQW['missed_fine_deadlines']) > 3:
-			killvar 'policeQW_courtletter_subjects', 0
-			policeQW['tot_arrested'] += 1
-			gt 'sentence', 'police_arrest', 0
-		end
-	end
-
-	'<center><img <<$set_imgh>> src="images/locations/city/shared/court/openletter.jpg"></center>'
-
-	!! Handling the various different letters.
-	if $policeQW_courtletter_subjects[0] = 'fine':
-
-		if policeQW['courtletter_fine_counter'] < 10:
-			policeQW['courtletter_fine_counter'] += 1
-			pcs_mood -= 100
-			gs 'stat'
-
-			'As you enter your home you notice an envelope from the court. You anxiously look at it and take a deep breath before opening the envelope.'
-
-			if week < 6:
-				'Going through the letter you read that you''ve a week to pay your fine in full.'
-			else
-				'Going through the letter you read that you''ve until Monday, a week from now, to pay your fine in full.'
-			end
-
-			'<i>Failure to pay the fine in full with in a week from now, will have dire consequences for the accused.</i> Your heart drops as you read that line...'
-			'<i>You should mail your fine payment using the enclosed envelope.</i>'
-			'You put the letter back in the envelope and let out a loud sigh...'
-
-			if policeQW['legal_fine'] <= 0:
-				pcs_mood += 90
-				gs 'stat'
-				'You realise that you''ve already paid off your fines and sigh with relief.'
-			else
-				'You put the letter back in the envelope and let out a loud sigh...'
-			end
-
-		else
-			'As you come home you see the familiar envelope from the court. You already know the gist of it, <i>failure to pay your fine will have dire consequences,</i> yadda yadda...'
-			'You glance through the letter seeing the same information once again and as you finish you throw it to the side and continue further on inside your apartment...'
-			if policeQW['legal_fine'] <= 0:
-				'You''ve already paid your fines, why are they even bothering you.'
-			end
-		end
-
-		if policeQW['legal_fine'] > 0:
-			if money < policeQW['legal_fine']:
-				act 'Mail the payment for your legal fine/s (<font color="red"><<policeQW[''legal_fine'']>> <b>₽</b></font>)': '<br><font color="red">You don''t have enough cash to use this action.</font>'
-			else
-				act 'Mail the payment for your legal fine/s (<<policeQW[''legal_fine'']>> <b>₽</b>)':
-					*clr & cla
-					money -= policeQW['legal_fine']
-					policeQW['legal_fine'] = 0
-					policeQW['missed_fine_deadlines'] = 0
-					policeQW['fine_deadline'] = 0
-					policeQW['arrest_gameover_flag'] = 0
-					minut += 5
-					gs 'stat'
-
-					!!Need an image of Sveta putting money in the envelope!!
-					!'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/counter.jpg"></center>'
-					'You put the full amount of your outstanding fine/s in the evelope and seal it. No more than 5 minutes later you''ve posted the letter and are back.'
-					act 'Done': gt $loc, $loc_arg
-				end
-			end
-		end
-
-	elseif $policeQW_courtletter_subjects[0] = 'missed_fine':
-		if policeQW['courtletter_fine_counter'] < 10:
-			policeQW['courtletter_fine_counter'] += 1
-			pcs_mood -= 100
-			gs 'stat'
-
-			'As you enter your home you notice an envelope from the court. You anxiously look at it and take a deep breath before opening the envelope.'
-
-			if policeQW['legal_fine'] <= 0:
-				pcs_mood += 90
-				gs 'stat'
-				'Going through the letter you read that you''ve a week to pay your fine in full, which you already did.'
-				'Happy that you''ve managed to avoid this worry, you put the letter away.'
-			else
-				temp_fine = 250 * rand(5, 10)
-				gs 'sentence', 'add_fine', temp_fine
-				if week < 6:
-					'Going through the letter you read that you''ve failed to pay your fine. The court given you another <<temp_rand>> <b>₽</b> fine and has graciously decided to give you a week to pay your fine in full.'
-				else
-					'Going through the letter you read that you''ve failed to pay your fine. The court given you another <<temp_rand>> <b>₽</b> fine and has graciously decided to give you until Monday, a week from now, to pay your fine in full.'
-				end
-
-				'<i>Failure to pay the fine in full with in a week from now, will have dire consequences for the accused.</i> Your heart drops as you read that line...'
-				'<i>You should mail your fine payment using the enclosed envelope.</i>'
-				'You put the letter back in the envelope and let out a loud sigh...'
-			end
-
-		else
-			if policeQW['legal_fine'] <= 0:
-				'As you come home you see the familiar envelope from the court. You already know the gist of it, <i>failed to pay your fine, failure to pay your fine will have dire consequences,</i> yadda yadda...'
-				'You already paid off your fines and as you finish you throw it to the side and continue further on inside your apartment...'
-
-			else
-				temp_fine = 250 * rand(10, 20)
-				gs 'sentence', 'add_fine', temp_fine
-				'As you come home you see the familiar envelope from the court. You already know the gist of it, <i>failed to pay your fine, additional <<temp_rand>> <b>₽</b> fine, failure to pay your fine will have dire consequences,</i> yadda yadda...'
-				'You glance through the letter seeing the same information once again and as you finish you throw it to the side and continue further on inside your apartment...'
-			end
-		end
-
-		if policeQW['legal_fine'] > 0:
-			if money < policeQW['legal_fine']:
-				act 'Mail the payment for your legal fine/s (<font color="red"><<policeQW[''legal_fine'']>> <b>₽</b></font>)': '<br><font color="red">You don''t have enough cash to use this action.</font>'
-			else
-				act 'Mail the payment for your legal fine/s (<<policeQW[''legal_fine'']>> <b>₽</b>)':
-					*clr & cla
-					money -= policeQW['legal_fine']
-					policeQW['legal_fine'] = 0
-					policeQW['missed_fine_deadlines'] = 0
-					policeQW['fine_deadline'] = 0
-					policeQW['arrest_gameover_flag'] = 0
-					minut += 5
-					gs 'stat'
-
-					!!Need an image of Sveta putting money in the envelope!!
-					!'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/counter.jpg"></center>'
-					'You put the full amount of your outstanding fine/s in the evelope and seal it. No more than 5 minutes later you''ve posted the letter and are back.'
-					act 'Done': gt $loc, $loc_arg
-				end
-			end
-		end
-
-
-	elseif mid('policeQW_courtletter_subjects', 1, 12) = 'missed_court':
-		if week = 6:
-			policeQW_courthearing_dates[] = daystart + 9
-		elseif week = 7:
-			policeQW_courthearing_dates[] = daystart + 8
-		else
-			policeQW_courthearing_dates[] = daystart + 7
-		end
-
-		$policeQW_courthearing_subjects[] = mid($policeQW_courtletter_subjects[0], 14)
-
-		if $policeQW['courtletter_hearing_counter'] < 10:
-			policeQW['courtletter_hearing_counter'] += 1
-			pcs_mood -= 100
-			gs 'stat'
-
-			'As you enter your home you notice an envelope from the court. You anxiously look at it and take a deep breath before opening the envelope.'
-
-			temp_fine = 500 * rand(5, 10)
-			gs 'sentence', 'letter_add_fine', 'missed_court', temp_fine
-			if week < 6:
-				'Going through the letter you read that you''ve missed your court hearing. A new court hearing has been scheduled a week from now and you''ve been fined <<temp_rand>> <b>₽</b>.'
-			else
-				'Going through the letter you read that you''ve missed your court hearing. A new court hearing has been scheduled on Monday, a week from now and you''ve been fined <<temp_rand>> <b>₽</b>.'
-			end
-
-			'<i>Failing to appear in court will have dire consequences for the accused.</i> Your heart drops as you read that line...'
-			'<i>The court is located in the city center. You should arrive at 9:00 as there are a lot of cases and we can''t say when your turn might come up.</i>'
-			'You put the letter back in the envelope and let out a loud sigh...'
-
-		else
-			temp_fine = 500 * rand(10, 20)
-			gs 'sentence', 'letter_add_fine', 'missed_court', temp_fine
-			'As you come home you see the familiar envelope from the court. You already know the gist of it, <i>missed court, <<temp_rand>> <b>₽</b> fine, failure to show up will have dire consequences,</i> yadda yadda...'
-			'You glance through the letter seeing the same information once again and as you finish you throw it to the side and continue further on inside your apartment...'
-		end
-
-	else
-		if week = 6:
-			policeQW_courthearing_dates[] = daystart + 9
-		elseif week = 7:
-			policeQW_courthearing_dates[] = daystart + 8
-		else
-			policeQW_courthearing_dates[] = daystart + 7
-		end
-
-		$policeQW_courthearing_subjects[] = $policeQW_courtletter_subjects[0]
-
-		if $policeQW['courtletter_hearing_counter'] < 10:
-			policeQW['courtletter_hearing_counter'] += 1
-			pcs_mood -= 100
-			gs 'stat'
-
-			'As you enter your home you notice an envelope from the court. You anxiously look at it and take a deep breath before opening the envelope.'
-
-			if week < 6:
-				'Going through the letter you read that you''ve been summoned to appear in court a week from now.'
-			else
-				'Going through the letter you read that you''ve been summoned to appear in court on Monday, a week from now.'
-			end
-
-			'<i>Failing to appear in court will have dire consequences for the accused.</i> Your heart drops as you read that line...'
-			'<i>The court is located in the city center. You should arrive at 9:00 as there are a lot of cases and we can''t say when your turn might come up.</i>'
-			'You put the letter back in the envelope and let out a loud sigh...'
-
-		else
-			'As you come home you see the familiar envelope from the court. You already know the gist of it, <i>failure to show up will have dire consequences,</i> yadda yadda...'
-			'You glance through the letter seeing the same information once again and as you finish you throw it to the side and continue further on inside your apartment...'
-		end
-	end
-
-	act 'Continue': gt $loc, $loc_arg
-	killvar 'temp_fine'
-	killvar 'policeQW_courtletter_subjects', 0
-end
-
 
 !! gs 'add_fine', fine
 if $ARGS[0] = 'add_fine':

+ 1 - 1
locations/uni_dorm.qsrc

@@ -473,7 +473,7 @@ if $ARGS[0] = 'tenth_floor':
 	act 'Elevator': gt 'uni_dorm', 'elevator'
 
 	if func('homes_properties', 'has_access', 'university_dorm'):
-		if arrsize('policeQW_courtletter_dates') > 0 and daystart >= policeQW_courtletter_dates[0]: gt 'sentence', 'letter'
+		gs 'courtletter'
 
 		act 'Your room': gt 'uni_dorm', 'dorm_room'
 		act 'Go to the shared kitchen': gt 'uni_dorm', 'dorm_kitchen'