import cleanup

This commit is contained in:
Thomas Rudin 2019-01-07 08:59:06 +01:00
parent d916f0e03c
commit db6e436b14
3 changed files with 18 additions and 17 deletions

View File

@ -6,4 +6,21 @@ type MapBlock struct {
Underground bool
Mapdata []byte
Metadata Metadata
}
type Metadata struct {
Inventories map[int]map[string]Inventory
Pairs map[int]map[string]string
}
type Item struct {
Name string
Count int
Wear int
}
type Inventory struct {
Size int
Items []Item
}

View File

@ -9,21 +9,6 @@ import (
log "github.com/sirupsen/logrus"
)
type Metadata struct {
Inventories map[int]map[string]Inventory
Pairs map[int]map[string]string
}
type Item struct {
Name string
Count int
Wear int
}
type Inventory struct {
Size int
Items []Item
}
func readU16(data []byte, offset int) int {
return (int(data[offset]) << 8) | int(data[offset + 1])

View File

@ -4,7 +4,6 @@ import (
"testing"
"io/ioutil"
"strconv"
mapblockparser "mapserver/mapblockparser"
log "github.com/sirupsen/logrus"
)
@ -16,7 +15,7 @@ func TestParse(t *testing.T){
t.Error(err)
}
mapblock, err := mapblockparser.Parse(data)
mapblock, err := Parse(data)
if err != nil {
t.Error(err)