Browse Source

[fixed] autosave bug

anjuna krokus 7 tháng trước cách đây
mục cha
commit
686c992dea
3 tập tin đã thay đổi với 16 bổ sung12 xóa
  1. 2 2
      locations/bed2.qsrc
  2. 0 10
      locations/pre_sleep.qsrc
  3. 14 0
      locations/shortgs.qsrc

+ 2 - 2
locations/bed2.qsrc

@@ -39,9 +39,9 @@ if $ARGS[0] = 'bed2' or $ARGS[0] = 'start' or $ARGS[0] = '':
 
 	if pcs_sleep <= 80:
 		if $clothingworntype = 'nude':
-			act 'Go to bed': gt 'pre_sleep_events'
+			act 'Go to bed': gs 'shortgs', 'auto_save' & gt 'pre_sleep_events'
 		else
-			act 'Undress and go to bed': gt 'pre_sleep_events'
+			act 'Undress and go to bed': gs 'shortgs', 'auto_save' & gt 'pre_sleep_events'
 		end
 	end
 

+ 0 - 10
locations/pre_sleep.qsrc

@@ -33,16 +33,6 @@ if $ARGS[0] = 'pre_sleep2':
 		gs 'clothing', 'strip'
 	end
 
-	if disable_autosave = 0:
-		if mid($start_type,1,4) = 'city':
-			savegame 'autosave_city.sav'
-		elseif mid($start_type,1,3) = 'uni':
-			savegame 'autosave_uni.sav'
-		else
-			savegame 'autosave_sg.sav'
-		end
-	end
-
 	gt 'pre_sleep', 'prepare_sleep'
 end
 

+ 14 - 0
locations/shortgs.qsrc

@@ -1,5 +1,19 @@
 # shortgs
 
+!! make an autosave unless it is disabled
+if $ARGS[0] = 'autosave':
+	if disable_autosave = 0:
+		if mid($start_type, 1, 4) = 'city':
+			savegame 'autosave_city.sav'
+		elseif mid($start_type, 1, 3) = 'uni':
+			savegame 'autosave_uni.sav'
+		else
+			savegame 'autosave_sg.sav'
+		end
+	end
+end
+
+
 !! following function counts the number of guys which PC slept with.
 !! use func('shortgs','guy') or func('shortgs','guy',X) for subset (X can be 'A','B','C','AB','AC','BC')
 if $ARGS[0] = 'guy':