plan: document 'basic_rate'
This commit is contained in:
parent
5c4393b999
commit
0f0e281db8
10
plan.py
10
plan.py
@ -4,8 +4,11 @@ import math
|
||||
import fractions
|
||||
import collections
|
||||
|
||||
from typing import Dict
|
||||
|
||||
import satisfactory
|
||||
|
||||
|
||||
def calculate_rates(recipes, remain):
|
||||
required_items = collections.defaultdict(fractions.Fraction)
|
||||
|
||||
@ -37,7 +40,12 @@ def calculate_rates(recipes, remain):
|
||||
return required_items
|
||||
|
||||
|
||||
def basic_rate(recipe):
|
||||
def basic_rate(recipe: Dict) -> fractions.Fraction:
|
||||
"""
|
||||
Calculate the rate at which the item is crafted with the default recipe.
|
||||
:param recipe:
|
||||
:return:
|
||||
"""
|
||||
for output, count in recipe['output'].items():
|
||||
return fractions.Fraction(
|
||||
count, recipe['crafting_time']
|
||||
|
Loading…
Reference in New Issue
Block a user