Skip to content

5.6.0: the draw skill reads the graph through the onlyworlds package

Choose a tag to compare

@tmoosting tmoosting released this 02 Nov 01:42
· 202 commits to main since this release

The draw skill's graph.py now reads a world's graph through the onlyworlds package (pip install "onlyworlds>=0.101.0"), the same reader the SDKs and the platform use (the lens profile's graph section in schema-dist), instead of its own scan of link fields. map.py still runs on the standard library alone.

What changes on a drawing:

  • A Zone is a node. Map, Pin and Marker stay out as map space.
  • A link from an element to itself is an edge, drawn as a small loop at its dot; a target listed twice is two edges.
  • The two extension links a profile declares, x_lens_leads_to and x_spine_depends_on, are drawn; no other x_ field is.
  • A link to an element of another type than its field's target, or to an id not in the world, draws nothing.
  • The left-out counts are the reader's own (map space, reading aid, room, proposed, hidden), plus one line for what is not one of the 22 types.
  • --focus, --depth and --type cut the reader's graph after the read and never add an edge.

A new test builds a world folder with every one of those cases and holds the script's graph equal to the reader's; eight of its nine checks fail on the previous script. The Hyperion example in the skill's page is re-measured: 27 elements and 38 links drawn, 8 left out as map space.

Known gap: the read skill's count.py still counts a Zone as placement, so its split and the draw skill's differ on Zones until it follows.