worlds["survival"] = "/home/minecraft/minecraftia/world"
customwebassets = "/home/brian/websites/mc/grey/assets/"

def ruin_filter(poi):
	type = "ruin"
	icon = "icons/marker-ruin.png"

	if poi["id"] != 'minecraft:sign':
		return
	header = poi["Text1"]
	if not (header[-1:] == header[:1] == '~'):
		return
	
	header = poi["Text1"][1:-1]
	if header != type:
		return

	poi['icon'] = icon
	return poi["Text2"]

def castle_filter(poi):
	type = "base"
	icon = "icons/marker-castle.png"
	
	if poi["id"] != 'minecraft:sign':
		return
	header = poi["Text1"]
	if not (header[-1:] == header[:1] == '~'):
		return
	
	header = poi["Text1"][1:-1]
	if header != type:
		return

	poi['icon'] = icon
	return poi["Text2"]

def tower_filter(poi):
	type = "tower"
	icon = "icons/marker-tower.png"
	
	if poi["id"] != 'minecraft:sign':
		return
	header = poi["Text1"]
	if not (header[-1:] == header[:1] == '~'):
		return
	
	header = poi["Text1"][1:-1]
	if header != type:
		return

	poi['icon'] = icon
	return poi["Text2"]

def farm_filter(poi):
	type = "farm"
	icon = "icons/marker-hoe.png"
	
	if poi["id"] != 'minecraft:sign':
		return
	header = poi["Text1"]
	if not (header[-1:] == header[:1] == '~'):
		return
	
	header = poi["Text1"][1:-1]
	if header != type:
		return

	poi['icon'] = icon
	return poi["Text2"]

def village_filter(poi):
	type = "village"
	icon = "icons/marker-town.png"
	
	if poi["id"] != 'minecraft:sign':
		return
	header = poi["Text1"]
	if not (header[-1:] == header[:1] == '~'):
		return
	
	header = poi["Text1"][1:-1]
	if header != type:
		return

	poi['icon'] = icon
	return poi["Text2"]

markers = [
	dict(name="Bases", filterFunction=castle_filter),
	dict(name="Outposts", filterFunction=tower_filter),
	dict(name="Farms", filterFunction=farm_filter),
	dict(name="Villages", filterFunction=village_filter),
	dict(name="Ruins", filterFunction=ruin_filter)
]

renders["day"] = {
	"world": "survival",
	"title": "Day",
	"markers": markers,
	"rendermode": smooth_lighting,
	"dimension": "overworld",
	"crop": (-4096, -4096, 4096, 4096)
}

renders["night"] = {
	"world": "survival",
	"title": "Night",
	"markers": markers,
	"rendermode": smooth_night,
	"dimension": "overworld",
	"crop": (-4096, -4096, 4096, 4096)
}

outputdir = "~/websites/mc/grey/map"


