mapserver/mapobject/atm.go
2019-06-13 08:04:32 +02:00

31 lines
567 B
Go

package mapobject
import (
"mapserver/mapblockparser"
"mapserver/mapobjectdb"
)
type ATM struct{}
func (this *ATM) onMapObject(x, y, z int, block *mapblockparser.MapBlock) *mapobjectdb.MapObject {
nodename := block.GetNodeName(x, y, z)
o := mapobjectdb.NewMapObject(block.Pos, x, y, z, "atm")
if nodename == "atm:wtt" {
o.Attributes["type"] = "wiretransfer"
} else if nodename == "atm:atm2" {
o.Attributes["type"] = "atm2"
} else if nodename == "atm:atm3" {
o.Attributes["type"] = "atm3"
} else {
o.Attributes["type"] = "atm"
}
return o
}