Parcourir la source

[fixed] cleaned up hotelroom

julzor il y a 4 ans
Parent
commit
94750b8180
1 fichiers modifiés avec 62 ajouts et 69 suppressions
  1. 62 69
      locations/HotelRoom.qsrc

+ 62 - 69
locations/HotelRoom.qsrc

@@ -1,18 +1,17 @@
 # HotelRoom
+
 CLOSE ALL
 if $ARGS[0] = 'normal':
-$metkaM = 'normal'
-$locM = 'HotelRoom'
-$metka = 'normal'
-$loc = 'HotelRoom'
-$location_type = 'private'
-$menu_loc = 'HotelRoom'
-$menu_arg = 'normal'
-menu_off = 0
-clr
-gs 'stat'
-	cla
-	*clr
+	$metkaM = 'normal'
+	$locM = 'HotelRoom'
+	$metka = 'normal'
+	$loc = 'HotelRoom'
+	$location_type = 'private'
+	$menu_loc = 'HotelRoom'
+	$menu_arg = 'normal'
+	menu_off = 0
+	gs 'stat'
+	*clr & cla
 	gs 'themes', 'indoors'
 	'<center><b><font color = maroon>Your normal hotel room</font></b></center>'
 	'<center>You have paid to stay for <<hotelroom1day - daystart>> more nights in the room.</center>'
@@ -29,30 +28,24 @@ gs 'stat'
 			gt'HotelRoom','normal'
 		end
 	end
-	if money >= 100:
-		act'Order room service (0:30) (100 <b>₽</b>)':gs 'food', 'h_food'
-	end
-	act 'Drink some water (0:05)': gs 'beverage', 'bev_wat'
+	if money >= 100: act'Order room service (0:30) (100 <b>₽</b>)':gs 'food', 'h_food'
+	act 'Drink some water (0:01)': gs 'beverage', 'bev_wat'
 	dynamic $fatdel
 	dynamic $lekarstvo
 	dynamic $vitamin
 end
 
-
-
 if $ARGS[0] = 'better':
-$metkaM = 'better'
-$locM = 'HotelRoom'
-$metka = 'better'
-$loc = 'HotelRoom'
-$menu_loc = 'HotelRoom'
-$menu_arg = 'better'
-menu_off = 0
-$location_type = 'private'
-clr
-gs 'stat'
-	cla
-	*clr
+	$metkaM = 'better'
+	$locM = 'HotelRoom'
+	$metka = 'better'
+	$loc = 'HotelRoom'
+	$menu_loc = 'HotelRoom'
+	$menu_arg = 'better'
+	menu_off = 0
+	$location_type = 'private'
+	gs 'stat'
+	*clr & cla
 	gs 'themes', 'indoors'
 	'<center><b><font color = maroon>Your luxury room</font></b></center>'
 	'<center>You have paid to stay for <<hotelroom1day - daystart>> more nights in the room.</center>'
@@ -69,9 +62,7 @@ gs 'stat'
 			gt'HotelRoom','better'
 		end
 	end
-	if money >= 100:
-		act'Order room service (0:30) (100 <b>₽</b>)':gs 'food', 'h_food'
-	end
+	if money >= 100: act'Order room service (0:30) (100 <b>₽</b>)':gs 'food', 'h_food'
 	act 'Drink some water (0:05)': gs 'beverage', 'bev_wat'
 	act 'Have a coffee (0:05)': gs 'beverage', 'bev_cof'
 	dynamic $fatdel
@@ -80,18 +71,16 @@ gs 'stat'
 end
 
 if $ARGS[0] = 'best':
-$metkaM = 'best'
-$locM = 'HotelRoom'
-$metka = 'best'
-$loc = 'HotelRoom'
-$menu_loc = 'HotelRoom'
-$menu_arg = 'best'
-menu_off = 0
-$location_type = 'private'
-clr
-gs 'stat'
-	cla
-	*clr
+	$metkaM = 'best'
+	$locM = 'HotelRoom'
+	$metka = 'best'
+	$loc = 'HotelRoom'
+	$menu_loc = 'HotelRoom'
+	$menu_arg = 'best'
+	menu_off = 0
+	$location_type = 'private'
+	gs 'stat'
+	*clr & cla
 	gs 'themes', 'indoors'
 	'<center><b><font color = maroon>Your royal suite</font></b></center>'
 	'<center>You have paid to stay for <<hotelroom1day - daystart>> more nights in the room.</center>'
@@ -111,7 +100,7 @@ gs 'stat'
 	if money >= 100:
 		act'Order room service (0:30) (100 <b>₽</b>)':gs 'food', 'h_food'
 	end
-	act 'Drink some water (0:05)': gs 'beverage', 'bev_wat'
+	act 'Drink some water (0:01)': gs 'beverage', 'bev_wat'
 	act 'Have a coffee (0:05)': gs 'beverage', 'bev_cof'
 	act 'Make some tea (0:05)': gs 'beverage', 'bev_tea'
 	dynamic $fatdel
@@ -119,12 +108,16 @@ gs 'stat'
 	dynamic $vitamin
 end
 
-if $args[0] = 'shower1':
-$location_type = 'bathroom'
+if $ARGS[0] = 'shower1':
+	$location_type = 'bathroom'
 	act 'Return to your room':
-		if hotelroom = 1:gt'HotelRoom','normal'
-		if hotelroom = 2:gt'HotelRoom','better'
-		if hotelroom = 3:gt'HotelRoom','best'
+		if hotelroom = 1:
+			gt'HotelRoom','normal'
+		elseif hotelroom = 2:
+			gt'HotelRoom','better'
+		elseif hotelroom = 3:
+			gt'HotelRoom','best'
+		end
 	end
 
 	$metkaM = 'shower1'
@@ -139,43 +132,43 @@ $location_type = 'bathroom'
 	gs 'themes', 'indoors'
 
 	'<center><b><font color = maroon>The bathroom of your hotel room</font></b></center>'
-	if hotelroom = 1:'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.normal1.jpg"></center>'&'A small and unpretentious bathroom, that is nevertheless quite stylish and has everything you need.'
-	if hotelroom = 2:'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.better1.jpg"></center>'&'A nice looking and spacious bathroom, with separate bath tub.'
-	if hotelroom = 3:'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.best1.jpg"></center>'&'A very luxurious and spacious bathroom, fit for a king.'
+	if hotelroom = 1:
+		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.normal1.jpg"></center>'&'A small and unpretentious bathroom, that is nevertheless quite stylish and has everything you need.'
+	elseif hotelroom = 2:
+		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.better1.jpg"></center>'&'A nice looking and spacious bathroom, with separate bath tub.'
+	elseif hotelroom = 3:
+		'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/hotel.room.best1.jpg"></center>'&'A very luxurious and spacious bathroom, fit for a king.'
+	end
 	if hotshamday ! daystart:
 		'You take the little bottle of shampoo on the shelf and place it in your pocket'
 		shampoo += 1
 		hotshamday = daystart
 	end
 
-
 	gs 'din_van', 'private'
-
 end
 
 if $ARGS[0] = 'tv':
-gs'stat'
+	*clr & cla
+	gs'stat'
 
-if hotelroom=1:'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/tv1.jpg"></center>'
-if hotelroom=2:'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/tv2.jpg"></center>'
-if hotelroom=3:'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/tv3.jpg"></center>'
-'You turn on the TV and make yourself comfortable on the bed.'
+	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/tv<<hotelroom>>.jpg"></center>'
+	'You turn on the TV and make yourself comfortable on the bed.'
 
-$din_wath_tv_h2 = {
-	cls
+	act 'Get up from the bed':gt $locM, $metkaM
+	act 'Watch TV (1:00)': gt 'hotelroom', 'watch_tv'
+end
+
+if $ARGS[0] = 'watch_tv':
+	*clr & cla
 	minut += 60
 	pcs_mood += rand(10,20)
 	gs'stat'
-
 	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/hotel/tv0,'+rand(0,4)+'.jpg"></center>'
 	'You are watching the country''s main television channel. None of their programs are really worth watching, but the distraction is welcome anyway.'
 
-	act 'Watch TV (1:00)':dynamic $din_wath_tv_h2
 	act 'Get up from the bed':gt $locM, $metkaM
-}
-
-act 'Watch TV (1:00)':dynamic $din_wath_tv_h2
-act 'Get up from the bed':gt $locM, $metkaM
+	act 'Watch TV (1:00)': gt 'hotelroom', 'watch_tv'
 end
 
 --- HotelRoom ---------------------------------