Browse Source

[fixed] proper way to set time in stwork3. Reported by Skylah

anjuna krokus 1 month ago
parent
commit
89188dbb7f
1 changed files with 9 additions and 2 deletions
  1. 9 2
      locations/stwork3.qsrc

+ 9 - 2
locations/stwork3.qsrc

@@ -60,7 +60,10 @@ if $ARGS[0] = 'first_shift':
 
 
 		act 'Get to work':
 		act 'Get to work':
 			*clr & cla
 			*clr & cla
-			if hour < 3: hour = 3 and minut = 0
+			temp_time_change = (3 - hour) * 60 - minut
+			if temp_time_change < 0: temp_time_change += 1440
+			minut += temp_time_change
+			killvar 'temp_time_change'
 			gs 'stat'
 			gs 'stat'
 			'<center><img <<$set_imgh>> src="images/locations/city/redlight/stripclub/serve.jpg"></center>'
 			'<center><img <<$set_imgh>> src="images/locations/city/redlight/stripclub/serve.jpg"></center>'
 			'The patrons are all in good moods and being busy like this makes time go by rather quickly. If every night were like this, then you''d have no complaints.'
 			'The patrons are all in good moods and being busy like this makes time go by rather quickly. If every night were like this, then you''d have no complaints.'
@@ -68,6 +71,7 @@ if $ARGS[0] = 'first_shift':
 
 
 			act 'Speak with Ivanna':
 			act 'Speak with Ivanna':
 				*clr & cla
 				*clr & cla
+				minut += 5
 				gs 'stat'
 				gs 'stat'
 				'<center><img <<$set_imgh>> src="images/locations/city/redlight/stripclub/ivanna.jpg"></center>'
 				'<center><img <<$set_imgh>> src="images/locations/city/redlight/stripclub/ivanna.jpg"></center>'
 				'Ivanna beckons you over. "So how was your night?"'
 				'Ivanna beckons you over. "So how was your night?"'
@@ -130,7 +134,10 @@ end
 
 
 if $ARGS[0] = 'events':
 if $ARGS[0] = 'events':
 	!!set time to 22:00
 	!!set time to 22:00
-	if hour < 22: hour = 22 & minut = 0
+	temp_time_change = (22 - hour) * 60 - minut
+	minut += temp_time_change
+	killvar 'temp_time_change'
+	gs 'stat'
 
 
 	if rand (0,2) = 0:
 	if rand (0,2) = 0:
 		gt 'stwork3', 'manager_chat'
 		gt 'stwork3', 'manager_chat'