Skip unconfigured for sale signs

This commit is contained in:
1F616EMO 2024-06-05 23:34:41 +08:00
parent 181d62639f
commit afd71ffcfd
No known key found for this signature in database
GPG Key ID: EF52EFA8E05859B2

View File

@ -12,6 +12,10 @@ type UnifiefMoneyAreaForSale struct{}
func (this *UnifiefMoneyAreaForSale) onMapObject(mbpos *types.MapBlockCoords, x, y, z int, block *mapparser.MapBlock) *mapobjectdb.MapObject {
md := block.Metadata.GetMetadata(x, y, z)
if _, ok := md["id"]; !ok {
return nil
}
o := mapobjectdb.NewMapObject(mbpos, x, y, z, "um_area_forsale")
o.Attributes["owner"] = md["owner"]
o.Attributes["id"] = md["id"] // ", " seperated