0

renders are now ordered according to their order in the config file

This commit is contained in:
Aaron Griffith
2012-03-05 13:37:05 -05:00
parent 626129394a
commit fde63ec221
4 changed files with 273 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import os.path
from collections import namedtuple
import rendermodes
import util
from world import UPPER_LEFT, UPPER_RIGHT, LOWER_LEFT, LOWER_RIGHT
class ValidationException(Exception):
@@ -183,7 +184,7 @@ def make_dictValidator(keyvalidator, valuevalidator):
"""
def v(d):
newd = {}
newd = util.OrderedDict()
for key, value in d.iteritems():
newd[keyvalidator(key)] = valuevalidator(value)
return newd
@@ -211,7 +212,7 @@ def make_configDictValidator(config, ignore_undefined=False):
"""
def configDictValidator(d):
newdict = {}
newdict = util.OrderedDict()
# values are config keys that the user specified that don't match any
# valid key