1
0
forked from MTSR/mapserver

check bones owner's fields

fixes #72
This commit is contained in:
BuckarooBanzay 2020-04-13 20:07:56 +02:00
parent 2d50399b47
commit 06cc766986

View File

@ -20,7 +20,15 @@ func (this *BonesBlock) onMapObject(x, y, z int, block *mapblockparser.MapBlock)
o := mapobjectdb.NewMapObject(block.Pos, x, y, z, "bones") o := mapobjectdb.NewMapObject(block.Pos, x, y, z, "bones")
o.Attributes["time"] = md["time"] o.Attributes["time"] = md["time"]
if _, ok := md["owner"]; ok {
o.Attributes["owner"] = md["owner"] o.Attributes["owner"] = md["owner"]
} else if _, ok := md["_owner"]; ok {
o.Attributes["owner"] = md["_owner"]
} else {
o.Attributes["owner"] = "unknown"
}
o.Attributes["info"] = md["infotext"] o.Attributes["info"] = md["infotext"]
itemCount := 0 itemCount := 0