Browse Source

Merge branch 'master' of https://git.catrenelle.com/Kevin_Smarts/glife

KevinSmarts 5 years ago
parent
commit
50bd7e8633
1 changed files with 13 additions and 8 deletions
  1. 13 8
      locations/obj_din.qsrc

+ 13 - 8
locations/obj_din.qsrc

@@ -1899,7 +1899,7 @@ if $ARGS[0] = 'body':
 	'<center><img <<$set_imgh>> src="<<$img_temp>>"></a></center>'
 	if $modApi_body_image_msg = '':
 		'<<$body_image_msg>>'
-	else 
+	else
 		'<<$modApi_body_image_msg>>'
 	end
 	killvar 'img_temp'
@@ -1955,7 +1955,7 @@ if $ARGS[0] = 'panties':
 	if $modApi_panties_image ! '':
 		$img_temp = $modApi_panties_image
 	end
-	
+
 	'<center><img <<$set_imgh>> src="<<$img_temp>>"></a></center>'
 	if $modApi_panties_image_msg = '':
 		'<<$body_image_msg>>'
@@ -2437,13 +2437,19 @@ end
 
 if $ARGS[0] = 'wait':
 	cla
-	waiting = input ("How long would you like to wait?<br>(maximum 120 minutes, leave blank or press cancel to wait 15 minutes)")
+	$waitStr = input ("How long would you like to wait?<br>(maximum 120 minutes, leave blank or press cancel to wait 15 minutes)<br>Alternatively, input a time to wait until (hh::mm). It is <<$mid(100+hour,2,2)>>:<<$mid(100+minut,2,2)>> now.")
 
-	if waiting = '':
-		minut += 15
-	elseif waiting > 0 and waiting <= 120:
+	waiting = 0
+	if $waitStr = '':
+		waiting = 15
+	else if strcomp($waitStr, '\d\d:\d\d'):
+		waiting = val(strfind($waitStr, '(\d\d):\d\d', 1)) * 60 + val(strfind($waitStr, '\d\d:(\d\d)', 1)) - minut - hour * 60
+	else
+		waiting = val($waitStr)
+	end
+	if waiting > 0 and waiting <= 120:
 		minut += waiting
-	elseif waiting <= 0 or waiting > 120:
+	else
 		'Invalid time.'
 	end
 	gs 'stat'
@@ -2470,4 +2476,3 @@ if $ARGS[0] = 'rest':
 end
 
 --- obj_din ---------------------------------
-