This commit is contained in:
shoopea 2020-04-18 11:51:35 +08:00
parent 01bee86335
commit eb7d74d601

View File

@ -293,9 +293,9 @@ func loadObjItem() error {
objItems = make([]ChatWarsItem, 0)
for _, a := range AssetNames() {
log.Printf("Trying loading from %s.\n", a)
m, err := regexp.MatchString("data/obj_item/.*\\.json", a)
logOnError(err, "loadObjItem : MatchString")
itemsBefore := len(objItems)
if m {
b, err := Asset(a)
logOnError(err, "loadObjItem : load Asset("+a+")")
@ -410,7 +410,7 @@ func loadObjItem() error {
}
}
log.Printf("items loaded for %s.\n", a)
log.Printf("%d items loaded for %s.\n", len(objItems)-itemsBefore, a)
}
}