Skip to content
Snippets Groups Projects
Commit 708b02be authored by DarkGod's avatar DarkGod
Browse files

stuff

parent f4d613fa
No related branches found
No related tags found
No related merge requests found
Showing
with 10 additions and 4 deletions
game/modules/tome/data/gfx/shockbolt/terrain/malrok_wall/malrok_wall_wall33.png

6.48 KiB

game/modules/tome/data/gfx/shockbolt/terrain/malrok_wall/malrok_wall_wall34.png

6.71 KiB

game/modules/tome/data/gfx/shockbolt/terrain/malrok_wall/malrok_wall_wall35.png

7.43 KiB

game/modules/tome/data/gfx/shockbolt/terrain/malrok_wall/malrok_wall_wall36.png

7.39 KiB

game/modules/tome/data/gfx/shockbolt/terrain/malrok_wall/malrok_wall_wall4.png

5.66 KiB

game/modules/tome/data/gfx/shockbolt/terrain/malrok_wall/malrok_wall_wall5.png

3.26 KiB

game/modules/tome/data/gfx/shockbolt/terrain/malrok_wall/malrok_wall_wall6.png

3.31 KiB

game/modules/tome/data/gfx/shockbolt/terrain/malrok_wall/malrok_wall_wall7.png

6.49 KiB

game/modules/tome/data/gfx/shockbolt/terrain/malrok_wall/malrok_wall_wall8.png

7.12 KiB

game/modules/tome/data/gfx/shockbolt/terrain/malrok_wall/malrok_wall_wall9.png

6.44 KiB

game/modules/tome/data/gfx/shockbolt/terrain/planar_demon_portal_ground_down.png

27 KiB

game/modules/tome/data/gfx/shockbolt/terrain/planar_demon_portal_ground_up.png

5.62 KiB

game/modules/tome/data/gfx/shockbolt/terrain/planar_demon_vortex.png

123 KiB

......@@ -24,20 +24,26 @@ local MST = require "engine.algorithms.MST"
local max_links = args.max_links or 3
local map = args.map
local rooms = args.rooms
local orooms = args.rooms
if #rooms <= 1 then return true end -- Easy !
local mstrun = MST.new()
-- Extract usable rooms
local rooms = {}
for i, room in ipairs(orooms) do if not room.do_not_connect then
rooms[#rooms+1] = room
end end
if #rooms <= 1 then return true end -- Easy !
-- Generate all possible edges
for i, room in ipairs(rooms) do if not room.do_not_connect then
for i, room in ipairs(rooms) do
local c = room:centerPoint()
for j, proom in ipairs(rooms) do if proom ~= room then
local c1, c2 = room:centerPoint(), proom:centerPoint()
mstrun:edge(room, proom, core.fov.distance(c1.x, c1.y, c2.x, c2.y))
end end
end end
end
-- Compute!
mstrun:run()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment