Iterator<civquest.parser.ruleset.Field> fieldIterator = section.getFieldIterator();
while (fieldIterator.hasNext()) {
civquest.parser.ruleset.Field field = fieldIterator.next();
String resourceName = field.getName();
String amountString = field.getStringValue();
PhysicalAmount amount = getAmount(amountString);
if (!(mapConfig.resourceExists(resourceName))) {
throw new ConfigurationException(resourceName + " is not a valid "
+ "resource name!");
} else {
ResourceDefinition resourceDef = mapConfig.getResourceDefinition(resourceName);
PhysicalAmount.PhysicalUnit standardUnit = resourceDef.getStandardUnit();
if ((!amount.getUnit().canTransform(standardUnit))) {
String msg = "Can't transform unit " + amount.getUnit() +
" into standard unit for resource " + resourceName +
", which is " + standardUnit;
throw new ConfigurationException(msg);
} else {
resourceSet.addToThis(resourceName, amount);