Documentation
¶
Overview ¶
Methods for working specifically with Battlefield 2 configuration files (.con)
Index ¶
- func GetDefaultProfileKey(h game.Handler) (string, error)
- func GetDefaultProfileProfileCon(h game.Handler) (*config.Config, error)
- func GetEncryptedLogin(profileCon *config.Config) (string, string, error)
- func GetProfiles(h game.Handler) ([]game.Profile, error)
- func MarkAllVoiceOverHelpAsPlayed(generalCon *config.Config)
- func PurgeServerHistory(generalCon *config.Config)
- func ReadProfileConfigFile(h game.Handler, profileKey string, configFile ProfileConfigFile) (*config.Config, error)
- func SetDefaultProfile(globalCon *config.Config, profileKey string)
- type ProfileConfigFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultProfileKey ¶ added in v0.1.0
Get the default profile's key by reading and parsing the Battlefield 2 Global.con file
func GetDefaultProfileProfileCon ¶ added in v0.1.0
Read and parse the Battlefield 2 Profile.con file for the current default profile
func GetEncryptedLogin ¶ added in v0.1.0
Extract profile name and encrypted password from a parsed Battlefield 2 Profile.con file
func MarkAllVoiceOverHelpAsPlayed ¶ added in v0.1.0
Add all voice over help lines as played (GeneralSettings.setPlayedVOHelp) in given General.con config
func PurgeServerHistory ¶ added in v0.1.0
Remove all server history entries (GeneralSettings.addServerHistory) from given General.con config
func ReadProfileConfigFile ¶ added in v0.1.0
func ReadProfileConfigFile(h game.Handler, profileKey string, configFile ProfileConfigFile) (*config.Config, error)
Read a config file from the given Battlefield 2 profile
func SetDefaultProfile ¶ added in v0.1.0
Types ¶
type ProfileConfigFile ¶ added in v0.1.0
type ProfileConfigFile string
const ( ProfileConfigFileAudioCon ProfileConfigFile = "Audio.con" ProfileConfigFileControlsCon ProfileConfigFile = "Controls.con" ProfileConfigFileDemoBookmarksCon ProfileConfigFile = "DemoBookmarks.con" ProfileConfigFileGeneralCon ProfileConfigFile = "General.con" ProfileConfigFileHapticCon ProfileConfigFile = "Haptic.con" ProfileConfigFileMapListCon ProfileConfigFile = "mapList.con" ProfileConfigFileProfileCon ProfileConfigFile = "Profile.con" ProfileConfigFileServerSettingsCon ProfileConfigFile = "ServerSettings.con" ProfileConfigFileVideoCon ProfileConfigFile = "Video.con" )
Click to show internal directories.
Click to hide internal directories.