Added initial work on a structure to allow map annocations
The spawn point is automatically added to the gmap as a marker. Adding other markers (signs, mob spawners, etc) should be fairly easy. Note: the math that converts from in-game block coordinates to pixel coordinates is iffy. it requires a careful codereview
This commit is contained in:
@@ -22,6 +22,7 @@ import functools
|
||||
import re
|
||||
import shutil
|
||||
import collections
|
||||
import json
|
||||
|
||||
from PIL import Image
|
||||
|
||||
@@ -119,6 +120,11 @@ class QuadtreeGen(object):
|
||||
with open(os.path.join(self.destdir, "index.html"), 'w') as output:
|
||||
output.write(html)
|
||||
|
||||
|
||||
|
||||
with open(os.path.join(self.destdir, "markers.js"), 'w') as output:
|
||||
output.write("var markerData=%s" % json.dumps(self.world.POI))
|
||||
|
||||
def _get_cur_depth(self):
|
||||
"""How deep is the quadtree currently in the destdir? This glances in
|
||||
index.html to see what maxZoom is set to.
|
||||
|
||||
Reference in New Issue
Block a user