Browse Source

allow update also the mod data

rachels 2 years ago
parent
commit
401e873e5b
2 changed files with 23 additions and 0 deletions
  1. 9 0
      isample_mod/locations/mod_isample_saveupdater.qsrc
  2. 14 0
      locations/saveupdater.qsrc

+ 9 - 0
isample_mod/locations/mod_isample_saveupdater.qsrc

@@ -0,0 +1,9 @@
+# mod_isample_saveupdater
+!! This file is for updating save game when one variable have been replaced by another.
+!! The code in this location will be processed by the main game saveupdater routine as a subroutine
+!! First will be processed the code in the main routine and then all the installed mods in the order of their installation
+
+
+--- mod_isample_saveupdater ---------------------------------
+
+

+ 14 - 0
locations/saveupdater.qsrc

@@ -1346,6 +1346,20 @@ if ((100*version_major +version_minor)*100+version_revision)*100+version_patch
 	if flag_start_parc > 0: katjaQW['school_kiss'] = flag_start_parc & killvar 'flag_start_parc'
 
 end
+if mod_list > 0:
+	mod_i=1
+	:mod_data_updater
+	if $mod_name[mod_i] ! '':
+		$mod_su_name = 'mod_<<$mod_name[mod_i]>>_saveupdater'
+		if LOC($mod_su_name): gs $mod_su_name
+	end
+	if mod_list > mod_i:
+		mod_i+=1
+		jump 'mod_data_updater'
+	end
+	killvar '$mod_su_name'
+	killvar 'mod_i'
+end
 
 gs 'saveg'
 --- saveupdater ---------------------------------