plan: rename calculate_rates as required_rates

This commit is contained in:
Danny Robson 2019-07-14 11:50:44 +10:00
parent 07a37a4240
commit a6a7594eda

View File

@ -21,7 +21,7 @@ def basic_rate(recipe: Dict) -> Fraction:
) )
def calculate_rates( def required_rates(
recipes: satisfactory.Cookbook, recipes: satisfactory.Cookbook,
remain: List[Dict[str, Fraction]] remain: List[Dict[str, Fraction]]
) -> Dict[str, Fraction]: ) -> Dict[str, Fraction]:
@ -78,7 +78,7 @@ def main():
# Create an initial name:rate request for all of the target items, then # Create an initial name:rate request for all of the target items, then
# create a plan for their creation. # create a plan for their creation.
remain = [{n: basic_rate(recipes[n]['recipes'][0]) for n in targets}] remain = [{n: basic_rate(recipes[n]['recipes'][0]) for n in targets}]
required_items = calculate_rates(recipes, remain) required_items = required_rates(recipes, remain)
# Note if any particular item is (in aggregate) going to exceed the # Note if any particular item is (in aggregate) going to exceed the
# highest conveyor belt capacity. # highest conveyor belt capacity.