Documentation
¶
Index ¶
- func DetectGameDir() (string, error)
- func FileMetadataTypeName(fieldName string) string
- func LoadPaintSchemes(dataDir *stingray.DataDir, languageMap map[uint32]string) ([]datalib.WeaponCustomizableItem, error)
- func LoadSkinOverrides(dataDir *stingray.DataDir, languageMap map[uint32]string) ([]datalib.UnitSkinOverrideGroup, error)
- func MetadataFilterExprMatches(prog *FilterExprProgram, meta FileMetadata) (bool, error)
- func NewConsolePrinter(colorOutput bool, stdout io.Writer, stderr io.Writer) *printer
- func ParseHashes(str string) []string
- func VerifyGameDir(path string) error
- type App
- func (a *App) ExtractFile(ctx context.Context, id stingray.FileID, outDir string, ...) ([]string, error)
- func (a *App) LookupHash(hash stingray.Hash) string
- func (a *App) LookupString(stringId uint32) string
- func (a *App) LookupThinHash(hash stingray.ThinHash) string
- func (a *App) MatchingFiles(includeGlob string, excludeGlob string, includeOnlyTypes []string, ...) (map[stingray.FileID]struct{}, error)
- type FileMetadata
- type FilterExprProgram
- type Printer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectGameDir ¶ added in v0.3.1
Returns error if steam path couldn't be found.
func FileMetadataTypeName ¶ added in v0.7.0
String representation for metadata types that should be used in help texts
func LoadPaintSchemes ¶ added in v0.7.2
func LoadSkinOverrides ¶ added in v0.7.2
func MetadataFilterExprMatches ¶ added in v0.7.0
func MetadataFilterExprMatches(prog *FilterExprProgram, meta FileMetadata) (bool, error)
func NewConsolePrinter ¶ added in v0.5.17
func ParseHashes ¶ added in v0.3.1
func VerifyGameDir ¶ added in v0.3.1
Types ¶
type App ¶
type App struct {
Hashes map[stingray.Hash]string
ThinHashes map[stingray.ThinHash]string
ArmorSets map[stingray.Hash]datalib.ArmorSet
SkinOverrideGroups []datalib.UnitSkinOverrideGroup
WeaponPaintSchemes []datalib.WeaponCustomizableItem
DataDir *stingray.DataDir
LanguageMap map[uint32]string
Metadata map[stingray.FileID]FileMetadata
GameBuildInfo *ah_bin.BuildInfo
}
func OpenGameDir ¶ added in v0.3.1
func OpenGameDir(ctx context.Context, gameDir string, hashStrings []string, thinhashes []string, language stingray.ThinHash, onProgress func(curr, total int)) (*App, error)
Open game dir and read metadata.
func (*App) ExtractFile ¶
func (a *App) ExtractFile(ctx context.Context, id stingray.FileID, outDir string, extrCfg appconfig.Config, runner *exec.Runner, gltfDoc *gltf.Document, archiveIDs []stingray.Hash, printer Printer) ([]string, error)
Returns path to extracted file/directory.
func (*App) LookupHash ¶ added in v0.4.2
Prints hash if human-readable name is unknown.
func (*App) LookupString ¶ added in v0.7.13
Prints string if string id is known.
func (*App) LookupThinHash ¶ added in v0.6.0
Prints hash if human-readable name is unknown.
type FileMetadata ¶ added in v0.7.0
type FileMetadata struct {
// Meta-info about which fields should be considered
// as having an assigned value.
AvailableFields map[string]bool `meta:"true"`
Type stingray.Hash `help:"File type" example:"\"unit\""`
Archives []stingray.Hash `help:"Archives the file is contained in"`
Width int `help:"Texture width"`
Height int `help:"Texture height"`
Format string `help:"Texture format" example:"\"BC1UNorm\""`
Language stingray.ThinHash `help:"Strings language" example:"\"us\""`
}
Searchable metadata
type FilterExprProgram ¶ added in v0.7.0
type FilterExprProgram struct {
// contains filtered or unexported fields
}
func CompileMetadataFilterExpr ¶ added in v0.7.0
func CompileMetadataFilterExpr(src string) (*FilterExprProgram, error)
Click to show internal directories.
Click to hide internal directories.