Procházet zdrojové kódy

Merge remote-tracking branch 'netuttki/master'

Kevin_Smarts před 1 rokem
rodič
revize
4fc0dcbf31
3 změnil soubory, kde provedl 82 přidání a 76 odebrání
  1. 6 4
      locations/bank.qsrc
  2. 67 63
      locations/bed2.qsrc
  3. 9 9
      locations/homes_properties.qsrc

+ 6 - 4
locations/bank.qsrc

@@ -365,7 +365,7 @@ if $ARGS[0] = 'cikl':
 
 	!!MJ: Add some (daily) interest to the bank account.
 	!!Not very realistic but won''t make anyone too rich.
-
+	
 	if bankAccount = 1:
 		kartatotal = karta
 		:kartaloop
@@ -410,6 +410,7 @@ if $ARGS[0] = 'cikl':
 			atmDeposit = 0
 		end
 
+
 		! Daily Internet and mobile checks
 		$internet_action_messages = func('internet_mobile', 'check_subscription_actions')
 		count = ARRSIZE('$internet_action_messages')
@@ -586,10 +587,9 @@ if $ARGS[0] = 'cikl':
 	!!----------------------------------------
 	!! Rent
 	!!----------------------------------------
-
 	!! property_rent, property_days, $property_name, $property_display $property_code
 	gs 'homes_properties', 'get_rented_properties'
-	count = ARRSIZE('$property_name')
+	count = ARRSIZE('property_name')
 	if count > 0:
 		i = 0
 		:loop_rent_payments
@@ -612,8 +612,10 @@ if $ARGS[0] = 'cikl':
 					'<b><b><font color="red">Your card was declined during automatic rent deduction of <<property_rent[i]>> <b>₽</b> for your <<$property_name[i]>>. To avoid eviction, please rectify as soon as possible.</font></b>'
 				end
 			end
+			i += 1
 		if i < count: jump 'loop_rent_payments'
-		gs 'homes_properties', 'clean_up_property_data'  & killvar 'i'
+		gs 'homes_properties', 'clean_up_property_data'
+		killvar 'i'
 	end
 	!!------------------------------------------------------------------------------------------------------------
 

+ 67 - 63
locations/bed2.qsrc

@@ -306,7 +306,7 @@ if $ARGS[0] = 'dream':
 	InSleep = 1
 	gs 'stat'
 	gs 'dreams', 'start'
-
+	wake_up = 0
 !! to avoid sleeping the whole day I decide to calcululate the duration of the sleep in advance
 !! the quality of the sleep depends on many factors, so the time of sleep can be modify later, especially the part when the time of sleep is shortened
 
@@ -328,80 +328,82 @@ if $ARGS[0] = 'dream':
 		varsleep['minutes to wakeup'] = varsleep['time_to_full']
 		varsleep['minutes to wakeup end'] = varsleep['time_to_full']
 	end
-
 	:loopson_bed
-	minut += 1
-	stime += 1
-	if recuperation = 0:pcs_health += 5
-
-	if vibratorIN = 1:
-		vtime += 1
-		if vtime >= 5:
-			pcs_horny +=1
-			vtime = 0
-		end
-
-		if pcs_horny = 100:
-			*clr & cla
-			pcs_horny = 0
-			orgasm += 1
-			minut += 5
-			gs 'stat'
-			'<center><img <<$set_imgh>> src="images/shared/sex/oface/o_face.jpg"></center>'
-			*nl
-			'You abruptly wake up in the throes of an orgasm. As you recover, you check the time, <b><<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>></b>.'
-
-			act 'Go back to sleep':
-				*clr & cla
-				gt 'bed2', 'dream'
+		minut += 1
+		stime += 1
+		if recuperation = 0:pcs_health += 5
+
+		if vibratorIN = 1:
+			vtime += 1
+			if vtime >= 5:
+				pcs_horny +=1
+				vtime = 0
 			end
 
-			act 'Give up trying to sleep':
+			if pcs_horny = 100:
 				*clr & cla
-				'<center><img <<$set_imgh>> src="images/shared/sex/oface/kotovfirst1.jpg"></center>'
+				pcs_horny = 0
+				orgasm += 1
+				minut += 5
+				gs 'stat'
+				'<center><img <<$set_imgh>> src="images/shared/sex/oface/o_face.jpg"></center>'
 				*nl
-				'Maybe trying to sleep with a vibrator in your pussy wasn''t such a good idea.'
-				gs 'bed2', 'wake'
+				'You abruptly wake up in the throes of an orgasm. As you recover, you check the time, <b><<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>></b>.'
+
+				act 'Go back to sleep':
+					*clr & cla
+					gt 'bed2', 'dream'
+				end
+
+				act 'Give up trying to sleep':
+					*clr & cla
+					'<center><img <<$set_imgh>> src="images/shared/sex/oface/kotovfirst1.jpg"></center>'
+					*nl
+					'Maybe trying to sleep with a vibrator in your pussy wasn''t such a good idea.'
+					gs 'bed2', 'wake'
+				end
+
+				exit
 			end
+		!! Exclusions for succubus dreams as they set horny to 100 and will always get overridden otherwise
+		elseif pcs_horny > 80 and pcs_sleep >= 30 and rand (1,300) = 300 and succubusQW ! 1 and succubusQW ! 2:
+			gs 'stat'
+			$waketext = 'You glance at your alarm clock. It reads <b><<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>></b>.'
+			gt 'bed2', 'wake_horny'
+		end
 
-			exit
+		if stime >= 60:
+			stime = 0
+			pcs_sleep += 15
+			if pcs_sleep >= 100:
+				pcs_condition['lack_of_sleep'] = 0
+			elseif pcs_condition['lack_of_sleep'] > 0:
+				pcs_condition['lack_of_sleep'] -= 1
+			end
+			gs 'stat'
 		end
-	!! Exclusions for succubus dreams as they set horny to 100 and will always get overridden otherwise
-	elseif pcs_horny > 80 and pcs_sleep >= 30 and rand (1,300) = 300 and succubusQW ! 1 and succubusQW ! 2:
-		gs 'stat'
-		$waketext = 'You glance at your alarm clock. It reads <b><<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>></b>.'
-		gt 'bed2', 'wake_horny'
-	end
 
-	if stime >= 60:
-		stime = 0
-		pcs_sleep += 15
-		if pcs_sleep >= 100:
-			pcs_condition['lack_of_sleep'] = 0
-		elseif pcs_condition['lack_of_sleep'] > 0:
-			pcs_condition['lack_of_sleep'] -= 1
+		
+		varsleep['minutes to wakeup'] -= 1
+		varsleep['minutes to wakeup end'] -= 1
+
+		if alarm_holiday = 1 and kanikuli > 0:
+		!! use weekend time alarm
+			varsleep['alarm_time'] = daystart*1440 + timerEnd * 60 + timerEndM
+			if varsleep['minutes to wakeup end'] = 0: wake_up = 1
+		elseif week > 5:
+		!! use weeken time alarm 
+			varsleep['alarm_time'] = daystart*1440 + timerEnd * 60 + timerEndM
+			if varsleep['minutes to wakeup end'] = 0: wake_up = 1
+		else 
+			varsleep['alarm_time'] = daystart*1440 + timer * 60 + timerM
+			if varsleep['minutes to wakeup'] = 0: wake_up = 1
 		end
-		gs 'stat'
-	end
 
-	
-	varsleep['minutes to wakeup'] -= 1
-	varsleep['minutes to wakeup end'] -= 1
-
-	if alarm_holiday = 1 and kanikuli > 0:
-	!! use weekend time alarm
-		varsleep['alarm_time'] = daystart*1440 + timerEnd * 60 + timerEndM
-		if varsleep['minutes to wakeup end'] > 0:jump 'loopson_bed'
-	elseif week > 5:
-	!! use weeken time alarm 
-		varsleep['alarm_time'] = daystart*1440 + timerEnd * 60 + timerEndM
-		if varsleep['minutes to wakeup end'] > 0:jump 'loopson_bed'
-	else 
-		varsleep['alarm_time'] = daystart*1440 + timer * 60 + timerM
-		if varsleep['minutes to wakeup'] > 0:jump 'loopson_bed'
-	end
+		varsleep['time_now'] = daystart*1440 + hour * 60 + minut
 
-	varsleep['time_now'] = daystart*1440 + hour * 60 + minut
+	!! Ensuring single exit point instead of multiple ones.
+	if wake_up = 0: jump 'loopson_bed'
 
 	if stime < 300:
 	!!Worsening of skin quality if you do not sleep enough.
@@ -433,6 +435,8 @@ if $ARGS[0] = 'dream':
 	gs 'bed2', 'wake'
 	*nl
 	'<<$waketext>>'
+
+	killvar 'wake_up'
 end
 
 if $ARGS[0] = 'wake_horny':

+ 9 - 9
locations/homes_properties.qsrc

@@ -273,7 +273,7 @@ end
 !!			- A number as str -> '1', '2' - this should be the id of the property 
 !!			  					NOTE: only added in case someone really want to use the old ids
 if $ARGS[0] = 'is_property_of_status':
-	$propstatcode = iif($ARGS[2] = '', $loc, $ARGS[2])	
+	$propstatcode = iif($ARGS[2] = '', $home_name[$loc], $home_name[$ARGS[2]])	
 
 	if $ARGS[1] = 'rented':
 		result = accessible_property[$propstatcode] = 1
@@ -985,25 +985,25 @@ end
 !! Call: `func('homes_properties', 'get_property_construction_status', $ARGS[1])`
 !! $ARGS[1] - the property code or location, if empty it will use $loc
 if $ARGS[0] = 'get_property_construction_status':
-	result = iif($ARGS[1] = '', accessible_property['<<$loc>>-construction-status'], accessible_property['<<$ARGS[1]>>-construction-status'])
+	$constrstatcheckpropcode = iif($ARGS[1] = '', $home_name[$loc], $home_name[$ARGS[1]])
+	result = accessible_property['<<$constrstatcheckpropcode>>-construction-status']
+	killvar 'constrstatcheckpropcode'
 end
 
 !! Call: `func('homes_properties', 'progress_construction_status', $ARGS[1])`
 !! $ARGS[1] - the property code or location, if empty it will use $loc
 if $ARGS[0] = 'progress_construction_status':
-	'$ARGS[1]: <<$ARGS[1]>>'
-	$constrstatpropcode = iif($ARGS[1] = '', $loc, $ARGS[1])
-	'$constrstatpropcode: <<$constrstatpropcode>>'
-	'accessible_property[''<<$constrstatpropcode>>-construction-status'']: <<accessible_property[''<<$constrstatpropcode>>-construction-status'']>>'
+	$constrstatpropcode = iif($ARGS[1] = '', $home_name[$loc], $home_name[$ARGS[1]])
 	if accessible_property['<<$constrstatpropcode>>-construction-status'] < 2: accessible_property['<<$constrstatpropcode>>-construction-status'] += 1
-	'accessible_property[''<<$constrstatpropcode>>-construction-status'']: <<accessible_property[''<<$constrstatpropcode>>-construction-status'']>>'
 	killvar 'constrstatpropcode'
 end
 
 !! Call: `func('homes_properties', 'is_property_renovated', $ARGS[1])`
 !! $ARGS[1] - the property code or location, if empty it will use $loc
 if $ARGS[0] = 'is_property_renovated':
-	result = iif($ARGS[1] = '', accessible_property['<<$loc>>-renovated'], accessible_property['<<$ARGS[1]>>-renovated'])
+	$checkrenpropcode = iif($ARGS[1] = '', $home_name[$loc], $home_name[$ARGS[1]])
+	result = accessible_property['<<$checkrenpropcode>>-renovated']
+	killvar 'checkrenpropcode'
 end
 
 !! Call: `gs 'homes_properties', 'renovate_property', $ARGS[1], ARGS[2], $ARGS[3]
@@ -1012,7 +1012,7 @@ end
 !!  ARGS[2] - the value of the renovation
 !! $ARGS[3] - the part of the property that was renovated - 'bedroom', 'living room', etc.  Optional
 if $ARGS[0] = 'renovate_property':
-	$renovatepropcode = iif($ARGS[1] = '', $loc, $ARGS[1])
+	$renovatepropcode = iif($ARGS[1] = '', $home_name[$loc], $home_name[$ARGS[1]])
 	accessible_property['<<$renovatepropcode>>-renovated'] = 1
 	accessible_property['<<$renovatepropcode>>-renovation-value'] += ARGS[2]
 	if $ARGS[3] ! '' : $accessible_property['<<$renovatepropcode>>-renovations'] += ';<<$ARGS[3]>>'