C# Class XCOM2Launcher.XCOM.XcomEnvironment

Show file Open project: coralfox/xcom2-launcher-CN

Public Methods

Method Description
DetectGameDir ( ) : string

Tries to find the directory of the game and the mod folders, both workshop and default

DetectModDirs ( ) : IEnumerable

Reads the mod directories from the XComEngine.ini file.

GetActiveMods ( ) : string[]

Returns all mods, that are currently listed as "ActiveMods" in the XComModOptions.ini and the DefaultModOptions.ini files.

RunGame ( string gameDir, string args ) : void

Runs the game with the selected arguments

SaveChanges ( Settings settings, bool disableMods ) : void

Updates the XComModOptions.ini and XComEngine.ini according to currently enabled mods and configured mod directories.

Protected Methods

Method Description
GetConfigFile ( string file, bool load = true ) : XCOM2Launcher.XCOM.DefaultConfigFile
XcomEnvironment ( GameId game ) : System

Private Methods

Method Description
ImportActiveMods ( Settings settings ) : void

Method Details

DetectGameDir() public method

Tries to find the directory of the game and the mod folders, both workshop and default
public DetectGameDir ( ) : string
return string

DetectModDirs() public method

Reads the mod directories from the XComEngine.ini file.
public DetectModDirs ( ) : IEnumerable
return IEnumerable

GetActiveMods() public method

Returns all mods, that are currently listed as "ActiveMods" in the XComModOptions.ini and the DefaultModOptions.ini files.
public GetActiveMods ( ) : string[]
return string[]

GetConfigFile() protected abstract method

protected abstract GetConfigFile ( string file, bool load = true ) : XCOM2Launcher.XCOM.DefaultConfigFile
file string
load bool
return XCOM2Launcher.XCOM.DefaultConfigFile

RunGame() public abstract method

Runs the game with the selected arguments
public abstract RunGame ( string gameDir, string args ) : void
gameDir string
args string
return void

SaveChanges() public method

Updates the XComModOptions.ini and XComEngine.ini according to currently enabled mods and configured mod directories.
public SaveChanges ( Settings settings, bool disableMods ) : void
settings Settings
disableMods bool
return void

XcomEnvironment() protected method

protected XcomEnvironment ( GameId game ) : System
game GameId
return System