tileserver legacy upgrade and compat
This commit is contained in:
parent
783fdc2ef8
commit
70e859ca07
@ -6,6 +6,7 @@ dofile(MP.."/poi.lua")
|
|||||||
dofile(MP.."/train.lua")
|
dofile(MP.."/train.lua")
|
||||||
dofile(MP.."/label.lua")
|
dofile(MP.."/label.lua")
|
||||||
dofile(MP.."/border.lua")
|
dofile(MP.."/border.lua")
|
||||||
|
dofile(MP.."/legacy.lua")
|
||||||
|
|
||||||
|
|
||||||
-- optional mapserver-bridge stuff below
|
-- optional mapserver-bridge stuff below
|
||||||
|
20
mapserver_mod/mapserver/legacy.lua
Normal file
20
mapserver_mod/mapserver/legacy.lua
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
minetest.register_lbm({
|
||||||
|
label = "Tileserver->Mapserver poi upgrade",
|
||||||
|
name = "tileserver:poi",
|
||||||
|
nodenames = {"tileserver:poi"},
|
||||||
|
run_at_every_load = true,
|
||||||
|
action = function(pos, node)
|
||||||
|
minetest.swap_node(pos, { name="mapserver:poi" })
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_lbm({
|
||||||
|
label = "Tileserver->Mapserver train upgrade",
|
||||||
|
name = "tileserver:train",
|
||||||
|
nodenames = {"tileserver:train"},
|
||||||
|
run_at_every_load = true,
|
||||||
|
action = function(pos, node)
|
||||||
|
minetest.swap_node(pos, { name="mapserver:train" })
|
||||||
|
end
|
||||||
|
})
|
@ -31,23 +31,24 @@ type MapBlockAccessorConfig struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type MapObjectConfig struct {
|
type MapObjectConfig struct {
|
||||||
Areas bool `json:"areas"`
|
Areas bool `json:"areas"`
|
||||||
Bones bool `json:"bones"`
|
Bones bool `json:"bones"`
|
||||||
Protector bool `json:"protector"`
|
Protector bool `json:"protector"`
|
||||||
XPProtector bool `json:"xpprotector"`
|
XPProtector bool `json:"xpprotector"`
|
||||||
PrivProtector bool `json:"privprotector"`
|
PrivProtector bool `json:"privprotector"`
|
||||||
Technic bool `json:"technic"`
|
Technic bool `json:"technic"`
|
||||||
LuaController bool `json:"luacontroller"`
|
LuaController bool `json:"luacontroller"`
|
||||||
Digiterms bool `json:"digiterms"`
|
Digiterms bool `json:"digiterms"`
|
||||||
Digilines bool `json:"digilines"`
|
Digilines bool `json:"digilines"`
|
||||||
Travelnet bool `json:"travelnet"`
|
Travelnet bool `json:"travelnet"`
|
||||||
Mapserver bool `json:"mapserver"`
|
Mapserver bool `json:"mapserver"`
|
||||||
Mission bool `json:"mission"`
|
TileServerLegacy bool `json:"tileserverlegacy"`
|
||||||
Jumpdrive bool `json:"jumpdrive"`
|
Mission bool `json:"mission"`
|
||||||
Smartshop bool `json:"smartshop"`
|
Jumpdrive bool `json:"jumpdrive"`
|
||||||
Fancyvend bool `json:"fancyvend"`
|
Smartshop bool `json:"smartshop"`
|
||||||
ATM bool `json:"atm"`
|
Fancyvend bool `json:"fancyvend"`
|
||||||
Train bool `json:"train"`
|
ATM bool `json:"atm"`
|
||||||
|
Train bool `json:"train"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type WebApiConfig struct {
|
type WebApiConfig struct {
|
||||||
@ -109,23 +110,24 @@ func ParseConfig(filename string) (*Config, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mapobjs := MapObjectConfig{
|
mapobjs := MapObjectConfig{
|
||||||
Areas: true,
|
Areas: true,
|
||||||
Bones: true,
|
Bones: true,
|
||||||
Protector: true,
|
Protector: true,
|
||||||
XPProtector: true,
|
XPProtector: true,
|
||||||
PrivProtector: true,
|
PrivProtector: true,
|
||||||
Technic: true,
|
Technic: true,
|
||||||
LuaController: true,
|
LuaController: true,
|
||||||
Digiterms: true,
|
Digiterms: true,
|
||||||
Digilines: true,
|
Digilines: true,
|
||||||
Travelnet: true,
|
Travelnet: true,
|
||||||
Mapserver: true,
|
Mapserver: true,
|
||||||
Mission: true,
|
TileServerLegacy: true,
|
||||||
Jumpdrive: true,
|
Mission: true,
|
||||||
Smartshop: true,
|
Jumpdrive: true,
|
||||||
Fancyvend: true,
|
Smartshop: true,
|
||||||
ATM: true,
|
Fancyvend: true,
|
||||||
Train: true,
|
ATM: true,
|
||||||
|
Train: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
mapblockaccessor := MapBlockAccessorConfig{
|
mapblockaccessor := MapBlockAccessorConfig{
|
||||||
|
@ -19,6 +19,12 @@ func Setup(ctx *app.App) {
|
|||||||
l.AddMapObject("mapserver:label", &LabelBlock{})
|
l.AddMapObject("mapserver:label", &LabelBlock{})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//old tileserver stuff
|
||||||
|
if ctx.Config.MapObjects.TileServerLegacy {
|
||||||
|
l.AddMapObject("tileserver:poi", &PoiBlock{})
|
||||||
|
l.AddMapObject("tileserver:train", &TrainBlock{})
|
||||||
|
}
|
||||||
|
|
||||||
//travelnet
|
//travelnet
|
||||||
if ctx.Config.MapObjects.Travelnet {
|
if ctx.Config.MapObjects.Travelnet {
|
||||||
l.AddMapObject("travelnet:travelnet", &TravelnetBlock{})
|
l.AddMapObject("travelnet:travelnet", &TravelnetBlock{})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user