Browse Source

[Fixed] some bugs reported on TFGS with stepfather schedule

Alaratt 3 years ago
parent
commit
60bc4a4f80
2 changed files with 15 additions and 29 deletions
  1. 4 4
      locations/family_schedule.qsrc
  2. 11 25
      locations/father.qsrc

+ 4 - 4
locations/family_schedule.qsrc

@@ -357,7 +357,7 @@ if indorf = 0:
 			!! shave/get dressed
 			sdadloc = 5 
 			sdadloc['athome'] = 1
-		elseif hour = 17 and minut < 45:
+		elseif hour < 17 or (hour = 17 and minut < 45):
 			!! Work (includes lunch time)
 			sdadloc = 6	
 			sdadloc['athome'] = 0
@@ -369,11 +369,11 @@ if indorf = 0:
 			!! Family dinner
 			sdadloc = 8
 			sdadloc['athome'] = 1
-		elseif hour = 19 and minut < 45:
-			!! In garage or spending time with Misha
+		elseif hour < 19 or (hour = 19 and minut < 45):
+			!! In garage
 			sdadloc = 9
 			sdadloc['athome'] = 1
-		elseif hour = 21 and minut < 45:
+		elseif hour < 21 or (hour = 21 and minut < 45):
 			!! Watch tv in living room
 			sdadloc = 10
 			sdadloc['athome'] = 1

+ 11 - 25
locations/father.qsrc

@@ -145,32 +145,18 @@ end
 
 !!----------------------------------------end reaction block---------------------------------------------
 
-if week < 6:
-    if (hour = 8 and minut > 30 or hour >= 9) and hour < 17:
-        '"Alright <<$pcs_nickname>>. I need to leave for work now or i''ll be late. See you later."'
-        cla
-        act '<B>Continue</B>':gt $loc, $loc_arg
-        exit
-    end
+if week < 6 and ((hour = 8 and minut > 30) or hour >= 9) and hour < 17:
+	'"Alright <<$pcs_nickname>>. I need to leave for work now or i''ll be late. See you later."'
+	cla
+	act '<B>Continue</B>':gt $loc, $loc_arg
+	exit
+end
 
-    if hour >= 21:
-        '"Alright <<$pcs_nickname>>. It''s getting late, I need to get to bed. See you tomorrow."'
-        cla
-        act '<B>Continue</B>':gt $loc, $loc_arg
-        exit
-    end
-else
-	if hour >= 22:
-        '"Alright <<$pcs_nickname>>. It''s getting late, I need to get to bed. See you tomorrow."'
-        cla
-        act '<B>Continue</B>':gt $loc, $loc_arg
-        exit
-    elseif hour >= 16:
-        'Sorry <<$pcs_nickname>>, I have to go to the garage, got to get some more work done on the truck.'
-        cla
-        act '<B>Continue</B>':gt $loc, $loc_arg
-        exit
-    end
+if hour >= 22:
+    '"Alright <<$pcs_nickname>>. It''s getting late, I need to get to bed. See you tomorrow."'
+    cla
+    act '<B>Continue</B>':gt $loc, $loc_arg
+    exit
 end
 
 act 'Chat':