2023-04-28 17:35:52 +00:00
|
|
|
--Manage the pathfinding nodes used by DEFCON.
|
|
|
|
--This is important for a mapping tool because the DEFCON client will not load a map unless
|
|
|
|
--the pathfinding nodes form a connected graph.
|
2023-07-28 05:17:00 +00:00
|
|
|
local t = {}
|
|
|
|
local bmp = require 'bmp'
|
2023-04-28 17:35:52 +00:00
|
|
|
|
2023-07-28 05:17:00 +00:00
|
|
|
function t.load( filename )
|
|
|
|
local nodes = { points = {}, connections = {}, img = bmp.load( filename ) }
|
|
|
|
|
|
|
|
return setmetatable( nodes, {__index = t } )
|
|
|
|
end
|
2023-04-28 17:35:52 +00:00
|
|
|
|
2023-07-28 05:17:00 +00:00
|
|
|
function t.isConnected( nodes )
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
function t.draw( nodes )
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
function t.drawConnections( nodes )
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
function t.save( nodes, filename )
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
return t
|