Config: Add 'preloadScript' entry to run raw scripts before the game scripts
Useful to insert common code, wrappers etc. without touching Scripts.rxdata.
This commit is contained in:
		
							parent
							
								
									d2fd692041
								
							
						
					
					
						commit
						117ddeee5c
					
				
					 4 changed files with 19 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -177,6 +177,7 @@ void Config::read(int argc, char *argv[])
 | 
			
		|||
	po::options_description podesc;
 | 
			
		||||
	podesc.add_options()
 | 
			
		||||
	        PO_DESC_ALL
 | 
			
		||||
	        ("preloadScript", po::value<StringVec>()->composing())
 | 
			
		||||
	        ("RTP", po::value<StringVec>()->composing())
 | 
			
		||||
	        ("fontSub", po::value<StringVec>()->composing())
 | 
			
		||||
	        ("rubyLoadpath", po::value<StringVec>()->composing())
 | 
			
		||||
| 
						 | 
				
			
			@ -210,6 +211,8 @@ void Config::read(int argc, char *argv[])
 | 
			
		|||
 | 
			
		||||
	PO_DESC_ALL;
 | 
			
		||||
 | 
			
		||||
	GUARD_ALL( preloadScripts = vm["preloadScript"].as<StringVec>(); );
 | 
			
		||||
 | 
			
		||||
	GUARD_ALL( rtps = vm["RTP"].as<StringVec>(); );
 | 
			
		||||
 | 
			
		||||
	GUARD_ALL( fontSubs = vm["fontSub"].as<StringVec>(); );
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -69,6 +69,7 @@ struct Config
 | 
			
		|||
	bool useScriptNames;
 | 
			
		||||
 | 
			
		||||
	std::string customScript;
 | 
			
		||||
	std::vector<std::string> preloadScripts;
 | 
			
		||||
	std::vector<std::string> rtps;
 | 
			
		||||
 | 
			
		||||
	std::vector<std::string> fontSubs;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue