-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(cli): add worldgen to new docs (#1883)
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,34 @@ | ||
# mud worldgen | ||
|
||
Autogenerate the MUD World interface based on Systems registered in the World. | ||
|
||
Use the `System`s under `src`<sup>1</sup> to generate the Solidity interface definitions for those `Systems` and put them in `src/codegen/world`. | ||
Also, create `src/codegen/world/IWorld.sol` which imports all the `System` interfaces. | ||
|
||
(1) By default this is any file that ends with `...System.sol`, for example `IncrementSystem.sol`. | ||
However, in the config file you can specify additional `System`s, under `systems`, as well as exclude files that end in `..System.sol`, by putting them under `excludeSystems`. | ||
|
||
## Sample usage | ||
|
||
```sh copy | ||
pnpm mud worldgen | ||
``` | ||
|
||
## Options | ||
|
||
These are the command line options you can specify on `mud worldgen`: | ||
|
||
| Option | Meaning | Type | Default value | | ||
| -------------- | ------------------------------------------------------------- | ------- | --------------- | | ||
| `--version` | Show version number | boolean | `false` | | ||
| `--configPath` | Path to the config file | string | `mud.config.ts` | | ||
| `--clean` | Clear the worldgen directory before generating new interfaces | boolean | `true` | | ||
| `--help` | Show help | boolean | `false` | | ||
|
||
## Debugging | ||
|
||
To generate debug messages, use this command: | ||
|
||
```sh copy | ||
export DEBUG=mud:common:codegen | ||
``` |