Factorio: add option "Tech Cost Distribution" (#1404)

* Factorio: add option "Tech Cost Distribution"

* TextClient: None out game on disconnect

* TextClient: disconnect is async
This commit is contained in:
Fabian Dill
2023-01-28 00:38:12 +01:00
committed by GitHub
parent dfdcad28e5
commit cf2204a861
2 changed files with 26 additions and 3 deletions

View File

@@ -61,6 +61,19 @@ class MaxTechCost(TechCost):
default = 500
class TechCostDistribution(Choice):
"""Random distribution of costs of the Science Packs.
Even: any number between min and max is equally likely.
Low: low costs, near the minimum, are more likely.
Middle: medium costs, near the average, are more likely.
High: high costs, near the maximum, are more likely."""
display_name = "Tech Cost Distribution"
option_even = 0
option_low = 1
option_middle = 2
option_high = 3
class TechCostMix(Range):
"""Percent chance that a preceding Science Pack is also required.
Chance is rolled per preceding pack."""
@@ -379,6 +392,7 @@ factorio_options: typing.Dict[str, type(Option)] = {
"tech_tree_layout": TechTreeLayout,
"min_tech_cost": MinTechCost,
"max_tech_cost": MaxTechCost,
"tech_cost_distribution": TechCostDistribution,
"tech_cost_mix": TechCostMix,
"ramping_tech_costs": RampingTechCosts,
"silo": Silo,