Allow potentially all rocket-part ingredients to be fluids. (#753)

This commit is contained in:
CaitSith2 2022-07-09 03:35:38 -07:00 committed by GitHub
parent 2f53972c85
commit 17db0805a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 3 deletions

View File

@ -329,10 +329,8 @@ class Factorio(World):
def set_custom_recipes(self):
original_rocket_part = recipes["rocket-part"]
science_pack_pools = get_science_pack_pools()
valid_pool = sorted(science_pack_pools[self.world.max_science_pack[self.player].get_max_pack()] & stacking_items)
valid_pool = sorted(science_pack_pools[self.world.max_science_pack[self.player].get_max_pack()] & valid_ingredients)
self.world.random.shuffle(valid_pool)
while any([valid_pool[x] in fluids for x in range(3)]):
self.world.random.shuffle(valid_pool)
self.custom_recipes = {"rocket-part": Recipe("rocket-part", original_rocket_part.category,
{valid_pool[x]: 10 for x in range(3)},
original_rocket_part.products,

View File

@ -1,6 +1,48 @@
{% from "macros.lua" import dict_to_recipe %}
-- this file gets written automatically by the Archipelago Randomizer and is in its raw form a Jinja2 Template
require('lib')
data.raw["rocket-silo"]["rocket-silo"].fluid_boxes = {
{
production_type = "input",
pipe_picture = assembler2pipepictures(),
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {
{ type = "input", position = { 0, 5 } },
{ type = "input", position = { 0, -5 } },
{ type = "input", position = { 5, 0 } },
{ type = "input", position = { -5, 0 } }
}
},
{
production_type = "input",
pipe_picture = assembler2pipepictures(),
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {
{ type = "input", position = { -3, 5 } },
{ type = "input", position = { -3, -5 } },
{ type = "input", position = { 5, -3 } },
{ type = "input", position = { -5, -3 } }
}
},
{
production_type = "input",
pipe_picture = assembler2pipepictures(),
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {
{ type = "input", position = { 3, 5 } },
{ type = "input", position = { 3, -5 } },
{ type = "input", position = { 5, 3 } },
{ type = "input", position = { -5, 3 } }
}
},
off_when_no_fluid_recipe = true
}
{%- for recipe_name, recipe in custom_recipes.items() %}
data.raw["recipe"]["{{recipe_name}}"].category = "{{recipe.category}}"