rewrite to python: add section about adding marker sets
This commit is contained in:
30
README.md
30
README.md
@@ -5,7 +5,7 @@ Mapping is my passionfruit!
|
||||
## What is this?
|
||||
|
||||
This project is meant to let PVV members contribute map data for PVV's minecraft server, like coordinates for bases, cities, and other points of interest.
|
||||
These markers are written in python so that we easily can do things like generating points in a loop, or other types of automation.
|
||||
These markers are written in python so that we easily can do things like generating points in a loop, calculating distances, and other types of automation.
|
||||
|
||||
There is also a cli tool that we use to export these points into the formats of several popular minecraft map implementations.
|
||||
|
||||
@@ -110,7 +110,33 @@ MARKERS = [
|
||||
|
||||
## How to add a new marker set
|
||||
|
||||
TODO: Write this section
|
||||
To add a new marker set, you need to:
|
||||
|
||||
1. Create a new directory alongside the other marker sets in `src/minecraft_kartverket/marker_sets/<world>`.
|
||||
2. Create an `__init__.py` file in this directory with the following content:
|
||||
|
||||
```python
|
||||
from minecraft_kartverket.lib_marker.marker_set import MarkerSet
|
||||
|
||||
MARKER_SET = MarkerSet(
|
||||
name="My Marker Set",
|
||||
markers=[
|
||||
],
|
||||
)
|
||||
```
|
||||
|
||||
3. Add the marker set to the `MARKER_SETS` list in `src/minecraft_kartverket/marker_sets/<world>/__init__.py`.
|
||||
|
||||
```python
|
||||
from .<marker_set_name> import MARKER_SET as <marker_set_name>_marker_set
|
||||
|
||||
MARKER_SETS = [
|
||||
...
|
||||
portals_marker_set,
|
||||
]
|
||||
```
|
||||
|
||||
See the other marker sets for inspiration.
|
||||
|
||||
## How to add icons
|
||||
|
||||
|
||||
Reference in New Issue
Block a user