Integrate view-map into ordoor

Now we can view scenario maps from the main game interface. We can't
cancel out of a scenario yet, though.
This commit is contained in:
2020-04-11 00:13:28 +01:00
parent 0025daf8dd
commit 5f8606377a
10 changed files with 289 additions and 233 deletions

View File

@@ -1,6 +1,9 @@
package assetstore
import (
"path/filepath"
"strings"
"code.ur.gs/lupine/ordoor/internal/config"
"code.ur.gs/lupine/ordoor/internal/data"
)
@@ -22,6 +25,12 @@ func (a *AssetStore) Generic() (*data.Generic, error) {
return nil, err
}
// These changes are made so data in generic plays nicer with assetstore
for i, filename := range generic.CampaignMaps {
generic.CampaignMaps[i] =
strings.TrimSuffix(filename, filepath.Ext(filename))
}
a.generic = generic
return generic, nil