2014-10-05 01:37:10 +02:00
|
|
|
|
|
|
|
minetest.register_abm({
|
2021-07-02 05:58:54 +01:00
|
|
|
nodenames = { "travelnet:travelnet" },
|
2021-01-15 08:26:42 +01:00
|
|
|
interval = 20,
|
|
|
|
chance = 1,
|
|
|
|
action = function(pos)
|
2021-07-02 05:58:54 +01:00
|
|
|
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")
|
2014-10-05 01:37:10 +02:00
|
|
|
|
2021-07-03 18:41:00 +01:00
|
|
|
if owner_name and station_name and station_network
|
|
|
|
and not travelnet.get_station(owner_name, station_network, station_name) then
|
2021-07-02 05:58:54 +01:00
|
|
|
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))
|
2014-10-05 01:37:10 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|