Commit 28d47391 authored by Milan's avatar Milan

add restore abm as temporally workaround for broken/missed savefile

parent d7545bc7
dofile(minetest.get_modpath("ctravelnet").."/nodes.lua")
dofile(minetest.get_modpath("ctravelnet").."/restore.lua")
dofile(minetest.get_modpath("ctravelnet").."/aliases.lua")
-- copied from sokomine/travelnet
minetest.register_abm({
nodenames = {"travelnet:travelnet_blue"},
interval = 20,
chance = 1,
action = function(pos, node)
local meta = minetest.get_meta( pos );
local owner_name = meta:get_string( "owner" );
local station_name = meta:get_string( "station_name" );
local station_network = meta:get_string( "station_network" );
if( owner_name and station_name and station_network
and ( not( travelnet.targets )
or not( travelnet.targets[ owner_name ] )
or not( travelnet.targets[ owner_name ][ station_network ] )
or not( travelnet.targets[ owner_name ][ station_network ][ station_name ] ))) then
travelnet.add_target( station_name, station_network, pos, owner_name, meta, owner_name );
print( 'TRAVELNET: re-adding '..tostring( station_name )..' to '..tostring( station_network )..' owned by '..tostring( owner_name ));
end
end
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment