dc5a401d8b
* Add For Sale Sings for Unified Money * Change popup and icon size * Revert icon size * Add For Sale Sign into searches * Fix syntax * Minor display change * Skip unconfigured for sale signs --------- Co-authored-by: 1F616EMO <root@1f616emo.xyz>
27 lines
635 B
Go
27 lines
635 B
Go
package mapobject
|
|
|
|
import (
|
|
"mapserver/mapobjectdb"
|
|
"mapserver/types"
|
|
|
|
"github.com/minetest-go/mapparser"
|
|
)
|
|
|
|
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
|
|
o.Attributes["price"] = md["price"]
|
|
o.Attributes["description"] = md["description"]
|
|
|
|
return o
|
|
}
|