bf2

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Methods for working specifically with Battlefield 2 configuration files (.con)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultProfileKey added in v0.1.0

func GetDefaultProfileKey(h game.Handler) (string, error)

Get the default profile's key by reading and parsing the Battlefield 2 Global.con file

func GetDefaultProfileProfileCon added in v0.1.0

func GetDefaultProfileProfileCon(h game.Handler) (*config.Config, error)

Read and parse the Battlefield 2 Profile.con file for the current default profile

func GetEncryptedLogin added in v0.1.0

func GetEncryptedLogin(profileCon *config.Config) (string, string, error)

Extract profile name and encrypted password from a parsed Battlefield 2 Profile.con file

func GetProfiles added in v0.1.0

func GetProfiles(h game.Handler) ([]game.Profile, error)

func MarkAllVoiceOverHelpAsPlayed added in v0.1.0

func MarkAllVoiceOverHelpAsPlayed(generalCon *config.Config)

Add all voice over help lines as played (GeneralSettings.setPlayedVOHelp) in given General.con config

func PurgeServerHistory added in v0.1.0

func PurgeServerHistory(generalCon *config.Config)

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

func SetDefaultProfile(globalCon *config.Config, profileKey string)

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL