Factorio: add chaos recipe time and use random.triangular distribution

This commit is contained in:
Fabian Dill
2021-06-06 21:38:53 +02:00
parent 403ddd603f
commit 46bb2d1367
4 changed files with 15 additions and 4 deletions

View File

@@ -85,8 +85,8 @@ table.insert(new_tree_copy.prerequisites, "ap-{{ tech_table[prerequesite] }}-")
{#- add new Technology to game #}
data:extend{new_tree_copy}
{% endfor %}
{% if recipe_time %}
{% if recipe_time_scale %}
{%- for recipe in recipes %}
adjust_energy("{{ recipe }}", {{ 0.01 * random.randint(recipe_time*25, recipe_time*100) }})
adjust_energy("{{ recipe }}", {{ random.triangular(*recipe_time_scale) }})
{%- endfor -%}
{% endif %}