# png-to-twmap
Takes a png and builds a teeworlds map out of it.
## Usage
Create a png and call the converter, passing the path as an argument.
It should also work to drag & drop the file onto the exe, if you're on windows.
## Default Colors
| Name | HTML-Color | preview |
| ---------- | ---------- | --------------------------------------------------------------------------- |
| Hookable | #B97A57 | |
| Unhookable | #FF7F27 | |
| Air | #000000 | |
| Freeze | #C3C3C3 | |
| Spawn | #3F48CC | |
| Start | #FFC90E | |
| Finish | #22B14C | |
## Configuration
To configure which color gets mapped to which entity id, first export the default config:
```sh
png-to-twmap --print-default-mappings > config.rsn
```
Then you edit the config file and add a mapping from an RGBA color to an entity id.
There are a few pre-defined entity types that are named:
- Empty
- Unookable
- Hookable
- Freeze
- Spawn
- Start
- Finish
If you need some other entity, you can use `Custom` with the appropriate id.
For instance:
```rs
Custom(123)
```