2019-02-15 13:25:49 +03:00
|
|
|
package mapobject
|
|
|
|
|
|
|
|
import (
|
|
|
|
"mapserver/mapblockparser"
|
|
|
|
"mapserver/mapobjectdb"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ATM struct{}
|
|
|
|
|
|
|
|
func (this *ATM) onMapObject(x, y, z int, block *mapblockparser.MapBlock) *mapobjectdb.MapObject {
|
2019-05-14 10:01:52 +03:00
|
|
|
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
|
2019-02-15 13:25:49 +03:00
|
|
|
}
|