Browse Source

[fixed] A few places where hotel stay variables were outdated and potential issues with check out morning and saveupdater relating to it

Kevin_Smarts 1 year ago
parent
commit
719dea0a91

+ 1 - 1
locations/city_hotel.qsrc

@@ -98,7 +98,7 @@ if $ARGS[0] = 'reception':
 			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/hotel/receptionist.jpg"></center>'
 			'She looks in the computer: "I see you already have a room here. As it is already booked and paid for the only way to change it to a different room, would be to cancel your existing booking. To do so without notice would forfeit your payment, I would advise against this, but you may do so if you wish."'
-			act'Yes, cancel your booking':hotelroom=0 & gt'city_hotel'
+			act'Yes, cancel your booking':hotelRoom['city_hotel'] = 0 & gt'city_hotel'
 			act'No':gt'city_hotel'
 		elseif hotelRoom['city_hotel'] = 0:
 			act 'Yes':

+ 1 - 1
locations/pav_hotel.qsrc

@@ -15,7 +15,7 @@ gs'stat'
 if $ARGS[0] = 'skip_resepevent': jump 'skipresepevent'
 
 if hour = 0 and hotresepQW_day ! daystart and (hotresepQW < 3 or (hotresepQW = 3 and rand(1,10) = 10)):
-	if hotelroom = 0:
+	if hotelRoom['pav_hotel'] = 0:
 		*clr
 		'When you want to enter the hotel you notice the doors are closed.'
 		'You try knocking on the door but nobody comes to open them.'

+ 1 - 1
locations/pav_hotelReception.qsrc

@@ -121,7 +121,7 @@ if $ARGS[0] = '':
 			*clr & cla
 			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/resep.girl0,'+rand(0,10)+'.jpg"></center>'
 			'She looks in the computer: "I see you already have a room here. As it is already booked and paid for the only way to change it to a different room, would be to cancel your existing booking. To do so without notice would forfeit your payment, I would advise against this, but you may do so if you wish."'
-			act'Yes, cancel your booking':hotelroom=0 & gt'pav_hotel'
+			act'Yes, cancel your booking':hotelRoom['pav_hotel'] = 0 & gt'pav_hotel'
 			act'No':gt'pav_hotel'
 		elseif hotelRoom['pav_hotel'] = 0:
 			act 'Yes':

+ 1 - 1
locations/pav_park.qsrc

@@ -293,7 +293,7 @@ if $ARGS[0] = 'start':
 	if joint > 0 and jointhigh = 0: act 'Smoke a joint': gs 'drugs', 'joint' & gt $loc, $loc_arg
 
 	if (hour >= 20 or hour < 6) and (pcs_sleep <= 30 or cheatNoSleep ! 0):
-		if home_owned[2] = 0 and workPTU <= 2 and HotelRoom < 1:
+		if home_owned[2] = 0 and workPTU <= 2 and hotelRoom['pav_hotel'] < 1 and hotelRoom['city_hotel'] < 0:
 			!nowhere to live in town
 			'It''s quite dark now, and you have no where to stay nearby. Maybe you should try to sleep on a bench?'
 			if mid($start_type,1,2) = 'sg': 'Or try your luck and go to Uncle Shulgin''s Apartment?'

+ 6 - 2
locations/saveupdater.qsrc

@@ -1082,8 +1082,12 @@ if ((100*version_major +version_minor)*100+version_revision)*100+version_patch
 	i += 1
 	if i < 250: jump 'saveupdaterloop853_1'
 
-	hotelRoomDays['pav_hotel'] = hotelroom1day
-	hotelRoom['pav_hotel'] = hotelroom
+	if hotelroom1day ! 0:
+		hotelRoomDays['pav_hotel'] = hotelroom1day
+		killvar'hotelroom1day'
+		hotelRoom['pav_hotel'] = hotelroom
+		hotelroom = 0
+	end
 end
 
 if ((100*version_major +version_minor)*100+version_revision)*100+version_patch  < 00080504:

+ 14 - 6
locations/stat.qsrc

@@ -1142,15 +1142,23 @@ if workFabrika = 1 and week => 1 and week <= 5 and hour > 8 and age => 16 and ag
 end
 
 if hotelRoom['pav_hotel'] > 0:
-	if hotelRoomDays['pav_hotel'] = daystart: $stat_msg += '<BR>You have 1 night left on your pav hotel booking.'
-	if hotelRoomDays['pav_hotel'] < daystart and hour < 11: $stat_msg += '<BR>Your pav hotel booking has expired, and you cannot return to your room after 11:00'
-	if hotelRoomDays['pav_hotel'] < daystart and hour >= 11: hotelRoom['pav_hotel'] = 0
+	if hotelRoomDays['pav_hotel'] = daystart:
+		$stat_msg += '<BR>You have 1 night left on your pav hotel booking.'
+	elseif hotelRoomDays['pav_hotel'] + 1 = daystart and hour < 11:
+		$stat_msg += '<BR>Your room at the Pavlosk hotel has check out today at 11:00'
+	elseif hotelRoomDays['pav_hotel'] < daystart:
+		hotelRoom['pav_hotel'] = 0
+	end
 end
 
 if hotelRoom['city_hotel'] > 0:
-	if hotelRoomDays['city_hotel'] = daystart: $stat_msg += '<BR>You have 1 night left on your city center hotel booking.'
-	if hotelRoomDays['city_hotel'] < daystart and hour < 11: $stat_msg += '<BR>Your city center hotel booking has expired, and you cannot return to your room after 11:00'
-	if hotelRoomDays['city_hotel'] < daystart and hour >= 11: hotelRoom['city_hotel'] = 0
+	if hotelRoomDays['city_hotel'] = daystart:
+		$stat_msg += '<BR>You have 1 night left on your pav hotel booking.'
+	elseif hotelRoomDays['city_hotel'] + 1 = daystart and hour < 11:
+		$stat_msg += '<BR>Your room at the St Petersburg hotel has check out today at 11:00'
+	elseif hotelRoomDays['city_hotel'] < daystart:
+		hotelRoom['city_hotel'] = 0
+	end
 end
 
 if hour >= 8 and hour < 14 and week < 6 and mid($start_type,1,2) = 'sg' and SchoolAtestat = 0 and kanikuli = 0 and schoolProgulDay ! daystart: