From afd71ffcfd9a204a0d76bdd6aadb85bd06a49391 Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Wed, 5 Jun 2024 23:34:41 +0800 Subject: [PATCH] Skip unconfigured for sale signs --- mapobject/um_area_forsale.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mapobject/um_area_forsale.go b/mapobject/um_area_forsale.go index 95f5ad3..328f0a0 100644 --- a/mapobject/um_area_forsale.go +++ b/mapobject/um_area_forsale.go @@ -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