import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main
from util import *
from dungeon import makeFloor, Room, TemplateRoom
import dungeon

template = \
"""
                     
                     
 +-+   +-+           
 | T T T | ^ ^ ^ ^ ^ 
 |T T T T| ^ ^ ^ ^ ^ 
 | T T T | ^ ^ ^ ^ ^ 
 +-+   +-+ ^ ^ @     
                     
                     
"""[1:]

legend = {
     '+':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('wrought iron fence', 10, parole.map.AsciiTile('+',
                colors['Black']),
                blockMove=True, massNoun=False, startsVowel=False),
            clearFirst=False),
    
     '-':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('wrought iron fence', 10, parole.map.AsciiTile('-',
                colors['Black']),
                blockMove=True, massNoun=False, startsVowel=False),
            clearFirst=False),
    
     '|':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('wrought iron fence', 10, parole.map.AsciiTile('|',
                colors['Black']),
                blockMove=True, massNoun=False, startsVowel=False),
            clearFirst=False),
    
     'T':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('weathered tombstone', 10, parole.map.AsciiTile('T',
                colors['Silver'], bg_rgb=colors['DimGray']),
                blockMove=False, massNoun=False, startsVowel=False),
            clearFirst=False),
    
     '^':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('hastily dug grave', 10, parole.map.AsciiTile('^',
                colors['SandyBrown'], bg_rgb=colors['Sienna']),
                blockMove=False, massNoun=False, startsVowel=False),
            clearFirst=False),

     '@':    dungeon.thingGenerator('npcs', 'gravedigger'),
}

floorColor1 = colors['Olive']
floorColor2 = colors['DarkGreen']
floorName = None
mixture = 0.3

diggable = None # means perimeter

class cemetary(TemplateRoom):
    def __init__(self, pos):
        TemplateRoom.__init__(self, template, legend, diggable, pos,
                floorColor1, floorColor2, mixture, floorName)


roomClass = cemetary



