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.."/label.lua")
|
||||
dofile(MP.."/border.lua")
|
||||
dofile(MP.."/legacy.lua")
|
||||
|
||||
|
||||
-- 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 {
|
||||
Areas bool `json:"areas"`
|
||||
Bones bool `json:"bones"`
|
||||
Protector bool `json:"protector"`
|
||||
XPProtector bool `json:"xpprotector"`
|
||||
PrivProtector bool `json:"privprotector"`
|
||||
Technic bool `json:"technic"`
|
||||
LuaController bool `json:"luacontroller"`
|
||||
Digiterms bool `json:"digiterms"`
|
||||
Digilines bool `json:"digilines"`
|
||||
Travelnet bool `json:"travelnet"`
|
||||
Mapserver bool `json:"mapserver"`
|
||||
Mission bool `json:"mission"`
|
||||
Jumpdrive bool `json:"jumpdrive"`
|
||||
Smartshop bool `json:"smartshop"`
|
||||
Fancyvend bool `json:"fancyvend"`
|
||||
ATM bool `json:"atm"`
|
||||
Train bool `json:"train"`
|
||||
Areas bool `json:"areas"`
|
||||
Bones bool `json:"bones"`
|
||||
Protector bool `json:"protector"`
|
||||
XPProtector bool `json:"xpprotector"`
|
||||
PrivProtector bool `json:"privprotector"`
|
||||
Technic bool `json:"technic"`
|
||||
LuaController bool `json:"luacontroller"`
|
||||
Digiterms bool `json:"digiterms"`
|
||||
Digilines bool `json:"digilines"`
|
||||
Travelnet bool `json:"travelnet"`
|
||||
Mapserver bool `json:"mapserver"`
|
||||
TileServerLegacy bool `json:"tileserverlegacy"`
|
||||
Mission bool `json:"mission"`
|
||||
Jumpdrive bool `json:"jumpdrive"`
|
||||
Smartshop bool `json:"smartshop"`
|
||||
Fancyvend bool `json:"fancyvend"`
|
||||
ATM bool `json:"atm"`
|
||||
Train bool `json:"train"`
|
||||
}
|
||||
|
||||
type WebApiConfig struct {
|
||||
@ -109,23 +110,24 @@ func ParseConfig(filename string) (*Config, error) {
|
||||
}
|
||||
|
||||
mapobjs := MapObjectConfig{
|
||||
Areas: true,
|
||||
Bones: true,
|
||||
Protector: true,
|
||||
XPProtector: true,
|
||||
PrivProtector: true,
|
||||
Technic: true,
|
||||
LuaController: true,
|
||||
Digiterms: true,
|
||||
Digilines: true,
|
||||
Travelnet: true,
|
||||
Mapserver: true,
|
||||
Mission: true,
|
||||
Jumpdrive: true,
|
||||
Smartshop: true,
|
||||
Fancyvend: true,
|
||||
ATM: true,
|
||||
Train: true,
|
||||
Areas: true,
|
||||
Bones: true,
|
||||
Protector: true,
|
||||
XPProtector: true,
|
||||
PrivProtector: true,
|
||||
Technic: true,
|
||||
LuaController: true,
|
||||
Digiterms: true,
|
||||
Digilines: true,
|
||||
Travelnet: true,
|
||||
Mapserver: true,
|
||||
TileServerLegacy: true,
|
||||
Mission: true,
|
||||
Jumpdrive: true,
|
||||
Smartshop: true,
|
||||
Fancyvend: true,
|
||||
ATM: true,
|
||||
Train: true,
|
||||
}
|
||||
|
||||
mapblockaccessor := MapBlockAccessorConfig{
|
||||
|
@ -19,6 +19,12 @@ func Setup(ctx *app.App) {
|
||||
l.AddMapObject("mapserver:label", &LabelBlock{})
|
||||
}
|
||||
|
||||
//old tileserver stuff
|
||||
if ctx.Config.MapObjects.TileServerLegacy {
|
||||
l.AddMapObject("tileserver:poi", &PoiBlock{})
|
||||
l.AddMapObject("tileserver:train", &TrainBlock{})
|
||||
}
|
||||
|
||||
//travelnet
|
||||
if ctx.Config.MapObjects.Travelnet {
|
||||
l.AddMapObject("travelnet:travelnet", &TravelnetBlock{})
|
||||
|
Loading…
Reference in New Issue
Block a user