public Construction(BuildingType type, Settlement location, Date today) { _type = type; _location = location; _startDate = today; //_resourceRequirements = _type.RequirementsFor(location); }
internal ConstructionStep(BuildingType buildingType, XElement element) { _resourceRequirements = element.Descendants("resource") .Select(e => new { Resource = ResourceTypes.Types.Single(t => t.Id.Equals(e.MandatoryAttribute("type", "A construction step has a resource with no type ("+buildingType.Id+").").Value)), Value = new DynamicValue<Settlement>(e) }) .ToDictionary(e => e.Resource, e => e.Value); _manpowerRequirement = new DynamicValue<Settlement>(element.MandatoryElement("manpower", "A construction step has no manpower requirement (" + buildingType.Id + ").")); }
public NewConstructionCommand(BuildingType buildingtype, Settlement settlement) { _buildingtype = buildingtype; _settlement = settlement; }
internal void StartConstruction(BuildingType building) { Constructions.Add(new Construction(building, this, World.Calendar.Today)); }