rewrite to python: add section about adding marker sets

This commit is contained in:
2025-03-22 00:01:12 +01:00
parent 025475f554
commit 65c7fe2371

View File

@@ -5,7 +5,7 @@ Map markers for PVV's minecraft server
## 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 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 minecraft map implementations.
@@ -109,7 +109,34 @@ 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/marker_sets/<world>`.
2. Create an `__init__.py` file in this directory with the following content:
```python
from 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/marker_sets/<world>/__init__.py`.
4. Add the marker set with a description to this README file.
```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