Skip to content

out-of-phaze/SpacemanDMM

 
 

Repository files navigation

SpacemanDMM

SpacemanDMM is a suite of tools for working with DreamMaker codebases and map files. It features a full-size fancy map renderer, a language server, and a documentation generator for DM codebases.

Language server updates are released to the editor extensions on a regular basis and binaries are occasionally posted to the releases page. Building from source is recommended to get the latest updates to the map renderer.

The documentation and static analysis tools can be run as part of a continuous integration build; see /tg/station's CI suite for an example.

Support is currently provided in /tg/station13's coderbus (ping SpaceManiac) and on the issue tracker. Pull requests are welcome.

The language server provides autocomplete, go-to-definition, and other code intelligence for the DreamMaker language. The preferred installation method is the Visual Studio Code extension (source). There is also a Sublime Text 3 package (source), and the implementation is compatible with most language server clients.

The map renderer produces full-scale PNGs of .dmm map files, including configurable emulation of in-game graphical enhancements not usually visible in the editor, specialized for /tg/station13 but likely to work on similar codebases.

$ cd path/to/tgstation/
$ dmm-tools minimap _maps/map_files/MetaStation/MetaStation.dmm

By default, output is saved to data/minimaps/, which can be changed with the -o flag. More detailed usage information is available in the --help output.

For examples of the maps produced, visit the SS13 WebMap.

dmdoc is a simple Doxygen-esque documentation generator for DreamMaker code. Files, macros, types, vars, and procs can be documented. Documentation comments start with /** or /// when preceding the documented item, or /*! or //! when contained within it.

The contents of code/README.md are rendered as the index page and other Markdown files within the code/ directory are included in the output. The generated documentation also includes GitHub links to item definitions.

For an example of the generated documentation, see /tg/station13's code docs.

DreamChecker is SpacemanDMM's static analysis tool. It can generate several type-safety diagnostics which DreamMaker does not, and extends the langauge with return-type annotations, described in its documentation. It is suitable for running in continuous integration environments.

Building

To build locally, begin by installing Rust or updating your existing installation. SpacemanDMM is tested against stable Rust.

Clone this repository and run cargo build --release to build the full suite in target/release/. List and build individual binaries with cargo build --release --bin. See the source readme for more information on the individual packages.

Docker

A dockerfile is provided for the map generator binary. To build the docker image, enter the SpacemanDMM directory and run:

docker build -t spacemandmm .

To use the image, switch to the codebase you want to generate maps for and invoke the container:

docker run -v "$PWD":/usr/src/codebase --rm -it spacemandmm -e /usr/src/codebase/tgstation.dme minimap /usr/src/codebase/_maps/map_files/BoxStation/BoxStation.dmm

License

SpacemanDMM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

SpacemanDMM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with SpacemanDMM. If not, see http://www.gnu.org/licenses/.

About

A BYOND language smartness provider, map renderer, and more.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.4%
  • Other 1.6%