mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-10-15 06:33:46 -04:00
77c358ed67
* d2loader refactor - export sources - asset and source both have a Path method - make asset and source implement fmt.Stringer, which just calls Path method - Loader.AddSource now returns the source and an error * Update loader.go
15 lines
288 B
Go
15 lines
288 B
Go
package asset
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2loader/asset/types"
|
|
)
|
|
|
|
// Source is an abstraction for something that can load and list assets
|
|
type Source interface {
|
|
fmt.Stringer
|
|
Type() types.SourceType
|
|
Open(name string) (Asset, error)
|
|
Path() string
|
|
}
|