Browse Source

fixed hunters scheduler

rachels 3 years ago
parent
commit
b8772f5977
3 changed files with 49 additions and 28 deletions
  1. 12 6
      locations/hunter_ambient.qsrc
  2. 34 19
      locations/swamp_yard.qsrc
  3. 3 3
      locations/swamphouse.qsrc

+ 12 - 6
locations/hunter_ambient.qsrc

@@ -241,6 +241,7 @@ end
 if $ARGS[0] = 'schedule':
 	killvar 'hunters_breakfast'
 	killvar 'hunters_lunch'
+	killvar 'hunters_dinner'
 	killvar 'hunters_evening'
 	killvar 'hunters_drink'
 	killvar 'hunters_inside'
@@ -253,33 +254,38 @@ if $ARGS[0] = 'schedule':
 		if hour = 7:
 			hunters_breakfast = 1
 			hunters_available = 1
+			if campfire = 0: hunters_inside  = 1
 		elseif hour = 8:
 			hunters_available = 1
+			if (sunWeather = 0 or temper <  15) and (campfire = 0): hunters_inside  = 1 
 		elseif hour > 8 and hour < 12:
 			hunters_hunting = 1
 		elseif hour >=12 and hour < 14:
 			hunters_lunch = 1
 			hunters_available = 1
+			if campfire = 0: hunters_inside  = 1
 		elseif hour >= 14 and hour < 18:
 			hunters_hunting = 1
-		elseif hour = 18:
-			hunters_available = 1
-		elseif hour = 19:
+		elseif hour = 18 or hour = 19:
 			hunters_evening = 1
 			hunters_available = 1
+			if (sunWeather = 0 or temper <  15) and (campfire = 0): hunters_inside  = 1 
 		elseif hour = 20:
+			hunters_dinner = 1
 			hunters_available = 1
+			hunters_inside  = 1
 		elseif hour > 20 and hour < 23:
 			hunters_drink = 1
 			hunters_available = 1
+			if (sunWeather = 0 or temper <  15) and (campfire = 0): hunters_inside  = 1 
 		elseif hour >= 23 or hour < 7:
 			hunters_sleep = 1
-			hunters_available = 1
+			hunters_inside  = 1
 		end
 	end
+!! if the hunter_inside is not set, it is set to zero by default.
 
-	if (sunWeather = 1 or temper >= 15) and (hunters_sleep = 0) and (hunters_breakfast = 0) and (hunters_lunch = 0) and (hunters_evening = 0): hunters_outside = 1
-	if (sunWeather = 0 or temper <  15) or  (hunters_sleep = 1) or  (hunters_breakfast = 1) or  (hunters_lunch = 1) or  (hunters_evening = 1): hunters_inside  = 1
+    hunters_outside = iif(hunters_inside = 1,0,1)
 end
 
 if $ARGS[0] = 'bring_food':

+ 34 - 19
locations/swamp_yard.qsrc

@@ -39,30 +39,45 @@ if $ARGS[0] = 'start':
 	*nl
 	'Behind the hut there is a <a href="exec: gt ''swampspring'' ">spring</a>, if you continue a little further down there is a small <a href="exec: gt ''backwater'' ">creek</a> with relatively clean water.'
 
-	if hunters_available = 1 and hunters_outside = 1 and hunters_were_met = 0:
-		*nl
-		'You spot some unfamiliar <a href="exec: gt ''hunters'', ''start'' ">people</a> standing in front of the hut.'
-	elseif hunters_available = 1 and hunters_outside = 1:
-		*nl
-		'You notice the <a href="exec: gt ''hunters'', ''start'' ">hunters</a> standing in the front yard.'
-	elseif hunters_evening = 1 and hunters_outside = 1:
-		*nl
-		'You hear some gunshots and see <a href="exec: gt ''swamp_woods'', ''shooting_practice'' ">Andrei</a> not too far in the distance shooting some bottles.'
-	elseif hunters_hunting = 1 and hunters_outside = 1:
-		*nl
-		'The hunters are most likely out hunting for a couple hours. You have the camp to yourself!'
-	elseif (hunters_breakfast = 1 or hunters_lunch = 1 or hunters_drink = 1) and hunters_outside = 1:
-		*nl
-		'You see hunters are sitting by the <a href="exec: gt ''swamp_yard'', ''campfire''">campfire</a>'
+	if hunters_available = 1:
+		if hunters_were_met = 0:
+			if hunters_outside = 1:		
+				*nl
+				'You spot some unfamiliar <a href="exec: gt ''hunters'', ''start'' ">people</a> standing in front of the hut.'		
+			end if
+		else
+			if hunters_outside = 1:
+				if hunters_evening = 1:
+					*nl
+					'You hear some gunshots and see <a href="exec: gt ''swamp_woods'', ''shooting_practice'' ">Andrei</a> not too far in the distance shooting some bottles.'
+				else
+					if campfire = 1 :
+						*nl
+						'You see hunters are sitting by the <a href="exec: gt ''swamp_yard'', ''campfire''">campfire</a>'
+					else
+						*nl
+						'You notice the <a href="exec: gt ''hunters'', ''start'' ">hunters</a> standing in the front yard.'
+					end if
+				end if
+			end if
+		end if
 	else
 		if hunters_were_met = 0:
 			*nl
 			'The camp is quiet. There''s nobody here right now, but the camp looks like it is likely in use and not abandoned.'
 		else
-			*nl
-			'The camp is quiet. The hunters aren''t here right now, where could they be.'
-		end
-	end
+			if hunters_hunting = 1:
+				*nl
+				'The hunters are most likely out hunting for a couple hours. You have the camp to yourself!'
+			else
+				*nl
+				'The camp is quiet. The hunters aren''t here right now, where could they be.'
+			end if
+		end if
+	end if
+	
+	
+	
 	
 	act '<b>Go to the swamp</b>': gt 'swamp_yard', 'swamp_escape'
 	gs 'bicycle', 'swamp_yard'

+ 3 - 3
locations/swamphouse.qsrc

@@ -55,7 +55,7 @@ if $ARGS[0] = 'start' or $ARGS[0] = '':
 		elseif hunters_sleep = 1:
 			*nl
 			'The hunters are sleeping on the couch.'
-		elseif hunters_breakfast = 1 or hunters_lunch = 1 or hunters_evening = 1:
+		elseif hunters_breakfast = 1 or hunters_lunch = 1 or hunters_dinner = 1:
 			*nl
 			'The <a href="exec: gs ''swamphouse'', ''hunterstable''">hunters</a> are sitting around the table talking.'
 		end
@@ -864,7 +864,7 @@ end
 if $ARGS[0] = 'hunterstable':
 	*clr & cla
 	gs 'hunter_ambient', 'schedule'
-	if (hunters_available = 0 and hunters_breakfast = 0 and hunters_lunch = 0 and hunters_evening = 0): gt 'swamphouse', 'hunterstable_end'
+	if (hunters_available = 0 and hunters_breakfast = 0 and hunters_lunch = 0 and hunters_dinner = 0): gt 'swamphouse', 'hunterstable_end'
 	
 	
 	menu_off = 1
@@ -1673,7 +1673,7 @@ if $ARGS[0] = 'hunterstable':
 				end
 			end
 		end
-	elseif hunters_lunch = 1 or hunters_breakfast = 1 or hunters_evening = 1:
+	elseif hunters_lunch = 1 or hunters_breakfast = 1 or hunters_dinner = 1:
 		act 'Eat a meal (0:15)':
 			gs 'food', 'm_meal'
 			*clr & cla