0

make create info window optional parameter

This commit is contained in:
alexan
2012-05-06 16:06:04 +03:00
committed by Andrew Chin
parent 4ae77a9f47
commit e0a4976e6a
3 changed files with 21 additions and 8 deletions

View File

@@ -153,15 +153,15 @@ def main():
return 1
for f in render['markers']:
d = dict(icon="signpost_icon.png")
d = dict(icon="signpost_icon.png", createInfoWindow=True)
d.update(f)
markersets.add(((d['name'], d['filterFunction']), rset))
name = f['name'].replace(" ","_") + hex(hash(f['filterFunction']))[-4:] + "_" + hex(hash(rset))[-4:]
try:
l = markers[rname]
l.append(dict(groupName=name, displayName = f['name'], icon=d['icon']))
l.append(dict(groupName=name, displayName = f['name'], icon=d['icon'], createInfoWindow=d['createInfoWindow']))
except KeyError:
markers[rname] = [dict(groupName=name, displayName=f['name'], icon=d['icon']),]
markers[rname] = [dict(groupName=name, displayName=f['name'], icon=d['icon'], createInfoWindow=d['createInfoWindow']),]
handleSigns(rset, os.path.join(destdir, rname), render, rname)
handlePlayers(rset, render, worldpath)
@@ -179,16 +179,20 @@ def main():
for poi in rset._pois['TileEntities']:
result = filter_function(poi)
if result:
d = dict(x=poi['x'], y=poi['y'], z=poi['z'], text=result, createInfoWindow=True)
d = dict(x=poi['x'], y=poi['y'], z=poi['z'], text=result)
if "icon" in poi:
d.update({"icon": poi['icon']})
if "createInfoWindow" in poi:
d.update({"createInfoWindow": poi['createInfoWindow']})
markerSetDict[name]['raw'].append(d)
for poi in rset._pois['Players']:
result = filter_function(poi)
if result:
d = dict(x=poi['x'], y=poi['y'], z=poi['z'], text=result, createInfoWindow=True)
d = dict(x=poi['x'], y=poi['y'], z=poi['z'], text=result)
if "icon" in poi:
d.update({"icon": poi['icon']})
if "createInfoWindow" in poi:
d.update({"createInfoWindow": poi['createInfoWindow']})
markerSetDict[name]['raw'].append(d)
#print markerSetDict