API Primitives¶
Several parts of Avulto are useful with all of its APIs.
- class avulto.TypePath¶
A DM typepath.
TypePathwraps type paths and provides several useful methods and properties for manipulating and comparing paths.- property abs: str¶
Returns the absolute representation of the path, rooted at
/datum.>>> p('/obj/foo').abs '/datum/atom/movable/obj/foo' >>> p('/foo').abs '/datum/foo'
- property rel: str¶
Returns the relative or declared representation of the path.
>>> p('/obj/foo').rel '/obj/foo' >>> p('/datum/foo').rel '/datum/foo' >>> p('/foo').rel '/foo'
- class avulto.SourceLoc¶
Information about the location of a source token in the tree.
SourceLoccontains source file information about types, procs, and vars. This is useful for tasks like linters which want to show line and column-level information about a finding.- property file_path: pathlib.Path | None¶
The file path of the source location.
- class avulto.Coord3¶
A three-dimensional integer coordinate. These are currently only returned by certain DMM properties, and are not constructable.
- class avulto.Dmlist¶
A primitive, read-only representation of a DM list. This is used when returning constant values of lists from the AST walker, and prefab values from the DMM reader. They are not constructable.
Dmlists only support iterating over keys, and indexing with keys.
- keys() collections.abc.Iterator[Any]¶
Returns an iterator over the keys in the list.
- class avulto.Dir(*args, **kwds)¶
The directions BYOND uses for atoms and icon states. Each member has the same integer value as the matching BYOND constant, so
Dir.NORTH == 1isTrue.- property NORTH¶
- property SOUTH¶
- property EAST¶
- property WEST¶
- property NORTHEAST¶
- property NORTHWEST¶
- property SOUTHEAST¶
- property SOUTHWEST¶