Support ATMs and WTT from Unified Money (#372)
* Support ATMs and WTT from Unified Money * Return L.icon(...)
This commit is contained in:
parent
e667ca580a
commit
fcd321448f
@ -14,18 +14,15 @@ func (this *ATM) onMapObject(mbpos *types.MapBlockCoords, x, y, z int, block *ma
|
||||
|
||||
o := mapobjectdb.NewMapObject(mbpos, 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"
|
||||
|
||||
switch nodename {
|
||||
case "atm:wtt", "um_wtt:wtt":
|
||||
o.Attributes["type"] = "wiretransfer"
|
||||
case "atm:atm2", "um_atm:atm_2":
|
||||
o.Attributes["type"] = "atm2"
|
||||
case "atm:atm3", "um_atm:atm_3":
|
||||
o.Attributes["type"] = "atm3"
|
||||
default:
|
||||
o.Attributes["type"] = "atm"
|
||||
}
|
||||
|
||||
return o
|
||||
|
@ -164,10 +164,18 @@ func Setup(ctx *app.App) {
|
||||
|
||||
if ctx.Config.MapObjects.ATM {
|
||||
atm := &ATM{}
|
||||
|
||||
// ATMs and WTT of gpcf's mod
|
||||
l.AddMapObject("atm:atm", atm)
|
||||
l.AddMapObject("atm:atm2", atm)
|
||||
l.AddMapObject("atm:atm3", atm)
|
||||
l.AddMapObject("atm:wtt", atm)
|
||||
|
||||
// ATMs and WTT of Unified Money
|
||||
l.AddMapObject("um_atm:atm_1", atm)
|
||||
l.AddMapObject("um_atm:atm_2", atm)
|
||||
l.AddMapObject("um_atm:atm_3", atm)
|
||||
l.AddMapObject("um_wtt:wtt", atm)
|
||||
}
|
||||
|
||||
//locator
|
||||
|
@ -19,7 +19,7 @@ export default AbstractIconOverlay.extend({
|
||||
else if (obj.attributes.type == "atm3")
|
||||
img = "pics/atm3_front.png";
|
||||
|
||||
L.icon({
|
||||
return L.icon({
|
||||
iconUrl: img,
|
||||
iconSize: [16, 16],
|
||||
iconAnchor: [8, 8],
|
||||
|
Loading…
Reference in New Issue
Block a user