You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now actually let's use the imported data in a graph:
(set v1 (mg:add-vertex rm1)) ; we'll store the vertex's ID in a variable so we can look it up latter
(mg:add-vertex rm2)
(set e1 (mg:add-edge rm1 rm2 #m(type transit direction east size normal))) ; again, for later look-up
(mg:add-edge rm2 rm1 #m(type transit direction west size normal))
(mg:add-vertex obj1)
(mg:add-vertex obj2)
(mg:add-vertex per1)
(mg:add-edge obj1 rm1 #m(type contains))
(mg:add-edge obj2 rm1 #m(type contains))
(mg:add-edge per1 rm1 #m(type contains))
(mg:in-edges rm1)
(mg:in-neighbours rm1)
(mg:out-neighbours rm1)
(mg:in-neighbours rm1 'contains) ; get all objects in the room
(mg:out-neighbours rm1 'transit) ; get all exits out of the room
(mg:vertex v1)
(mg:edge e1)
This functionality will essentially only be used once: to upgrade game data to the in-memory graph db (see #46). Still useful, though ...
Tasks:
mg-import:from-fs
Some notes: we did this in ticket #68 ...
Load data from files:
We'll want to be more specific with this, though ... maybe indicating the source format?
Then we convert that data to maps for use as "labels" (arbitrary data storage) on the nodes:
We'll probably just include this in the above functions ...
The text was updated successfully, but these errors were encountered: