Merge pull request #1060 from OpenDiablo2/revert-1059-hotfix2

Revert "hotfix: ds1: method setupLayerTypes is now exported + circleci build job bugfix"

These are two separate PR's. You can make a PR for the circl-ci bugfix, but exporting this ds1 method is a bad idea. This is a state manegement method that should only be called internally. By exporting this, we would be placing the responsibility of calling this method on users of `d2ds1`, which may not always be just od2 developers.
This commit is contained in:
gravestench 2021-02-16 10:05:43 -08:00 committed by GitHub
commit a80851f6f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -9,7 +9,7 @@ jobs:
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
steps:
- checkout
- run: sudo apt-get --allow-releaseinfo-change update && sudo apt-get install -y libgtk-3-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libgl1-mesa-dev libsdl2-dev libasound2-dev > /dev/null 2>&1
- run: sudo apt-get install -y libgtk-3-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libgl1-mesa-dev libsdl2-dev libasound2-dev > /dev/null 2>&1
- run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
- run: go get -v -t -d ./...
- run: go build .

View File

@ -102,7 +102,7 @@ func LoadDS1(fileData []byte) (*DS1, error) {
}
}
ds1.LayerStreamTypes = ds1.SetupStreamLayerTypes()
ds1.LayerStreamTypes = ds1.setupStreamLayerTypes()
ds1.Tiles = make([][]TileRecord, ds1.Height)
@ -328,8 +328,7 @@ func (ds1 *DS1) loadSubstitutions(br *d2datautils.StreamReader) error {
return err
}
// SetupStreamLayerTypes creates slice of layers types
func (ds1 *DS1) SetupStreamLayerTypes() []d2enum.LayerStreamType {
func (ds1 *DS1) setupStreamLayerTypes() []d2enum.LayerStreamType {
var layerStream []d2enum.LayerStreamType
if ds1.Version < v4 {