|
| 1 | +local prototype_defines = require("prototypes.defines") |
| 2 | + |
| 3 | +local main = {} |
| 4 | + |
| 5 | +function main.register_recycle_recipes_for_destroyed_rolling_stock() |
| 6 | + ---@param se_recycling_facility_technology TechnologyPrototype |
| 7 | + local se_recycling_facility_technology = data.raw.technology["se-recycling-facility"] |
| 8 | + local recipe = nil |
| 9 | + |
| 10 | + -- Destroyed Locomotive Recycling |
| 11 | + |
| 12 | + recipe = { |
| 13 | + type = "recipe", |
| 14 | + name = "atd-se-recycle-destroyed-locomotive", |
| 15 | + icon = "__StrongTrainsPlatform__/graphics/recipe/se-recycle/recycle-locomotive.png", |
| 16 | + icon_size = 64, |
| 17 | + enabled = se_recycling_facility_technology.enabled, |
| 18 | + category = "hard-recycling", |
| 19 | + subgroup = "recycling", |
| 20 | + energy_required = 10, |
| 21 | + ingredients = {{prototype_defines.item.destroyed_locomotive, 1}}, |
| 22 | + results = {{type="item", name="se-scrap", amount=30}} |
| 23 | + } |
| 24 | + |
| 25 | + data:extend{recipe} |
| 26 | + table.insert(se_recycling_facility_technology.effects, { type = "unlock-recipe", recipe = recipe.name }) |
| 27 | + |
| 28 | + -- Destroyed Cargo Wagon Recycling |
| 29 | + |
| 30 | + recipe = { |
| 31 | + type = "recipe", |
| 32 | + name = "atd-se-recycle-destroyed-cargo-wagon", |
| 33 | + icon = "__StrongTrainsPlatform__/graphics/recipe/se-recycle/recycle-cargo-wagon.png", |
| 34 | + icon_size = 64, |
| 35 | + enabled = se_recycling_facility_technology.enabled, |
| 36 | + category = "hard-recycling", |
| 37 | + subgroup = "recycling", |
| 38 | + energy_required = 5, |
| 39 | + ingredients = {{prototype_defines.item.destroyed_cargo_wagon, 1}}, |
| 40 | + results = {{type="item", name="se-scrap", amount=10}} |
| 41 | + } |
| 42 | + |
| 43 | + data.raw.recipe["atd-se-recycle-destroyed-cargo-wagon"] = recipe |
| 44 | + table.insert(se_recycling_facility_technology.effects, { type = "unlock-recipe", recipe = recipe.name }) |
| 45 | + |
| 46 | + -- Destroyed Fluid Wagon Recycling |
| 47 | + |
| 48 | + recipe = { |
| 49 | + type = "recipe", |
| 50 | + name = "atd-se-recycle-destroyed-fluid-wagon", |
| 51 | + icon = "__StrongTrainsPlatform__/graphics/recipe/se-recycle/recycle-fluid-wagon.png", |
| 52 | + icon_size = 64, |
| 53 | + enabled = se_recycling_facility_technology.enabled, |
| 54 | + category = "hard-recycling", |
| 55 | + subgroup = "recycling", |
| 56 | + energy_required = 5, |
| 57 | + ingredients = {{prototype_defines.item.destroyed_fluid_wagon, 1}}, |
| 58 | + results = {{type="item", name="se-scrap", amount=10}} |
| 59 | + } |
| 60 | + |
| 61 | + data.raw.recipe["atd-se-recycle-destroyed-fluid-wagon"] = recipe |
| 62 | + table.insert(se_recycling_facility_technology.effects, { type = "unlock-recipe", recipe = recipe.name }) |
| 63 | + |
| 64 | + -- Destroyed Artillery Wagon Recycling |
| 65 | + |
| 66 | + recipe = { |
| 67 | + type = "recipe", |
| 68 | + name = "atd-se-recycle-destroyed-artillery-wagon", |
| 69 | + icon = "__StrongTrainsPlatform__/graphics/recipe/se-recycle/recycle-artillery-wagon.png", |
| 70 | + icon_size = 64, |
| 71 | + enabled = se_recycling_facility_technology.enabled, |
| 72 | + category = "hard-recycling", |
| 73 | + subgroup = "recycling", |
| 74 | + energy_required = 5, |
| 75 | + ingredients = {{prototype_defines.item.destroyed_artillery_wagon, 1}}, |
| 76 | + results = {{type="item", name="se-scrap", amount=20}} |
| 77 | + } |
| 78 | + |
| 79 | + data.raw.recipe["atd-se-recycle-destroyed-artillery-wagon"] = recipe |
| 80 | + table.insert(se_recycling_facility_technology.effects, { type = "unlock-recipe", recipe = recipe.name }) |
| 81 | +end |
| 82 | + |
| 83 | +return main |
0 commit comments