|
| 1 | +-- Add radiation shielding to recipes |
| 2 | + |
| 3 | +for name, amount in pairs({ |
| 4 | + ['MOX-fuel-cell'] = 10, |
| 5 | + ['breeder-fuel-cell'] = 10, |
| 6 | + ['breeder-fuel-cell-from-uranium-cell'] = 10, |
| 7 | + ['breeder-fuel-cell-from-MOX-fuel-cell'] = 10 |
| 8 | +}) do |
| 9 | + for i, ingredient in pairs(data.raw['recipe'][name].ingredients) do |
| 10 | + if ingredient[0] == 'iron-plate' then |
| 11 | + table.remove(data.raw['recipe'][name].ingredients, i) |
| 12 | + end |
| 13 | + end |
| 14 | + table.insert(data.raw['recipe'][name].ingredients, { 'lead-plate-special', amount }) |
| 15 | +end |
| 16 | + |
| 17 | +data.raw['recipe']['MOX-reactor'].ingredients = { |
| 18 | + { "lead-plate-special", 80 }, |
| 19 | + { "computer-mk3", 4 }, |
| 20 | + { "heat-pipe", 4 }, |
| 21 | + { "graphite", 60 }, |
| 22 | +} |
| 23 | +data.raw['recipe']['breeder-reactor'].ingredients = { |
| 24 | + { "lead-plate-special", 200 }, |
| 25 | + { "computer-mk3", 6 }, |
| 26 | + { "heat-pipe", 12 }, |
| 27 | + { "graphite", 160 }, |
| 28 | +} |
| 29 | + |
| 30 | +local function subgroup_and_order(name, subgroup, order, item_type) |
| 31 | + if item_type == nil then |
| 32 | + item_type = 'item' |
| 33 | + end |
| 34 | + data.raw[item_type][name].subgroup = subgroup |
| 35 | + data.raw[item_type][name].order = order |
| 36 | +end |
| 37 | + |
| 38 | +subgroup_and_order('MOX-reactor', 'ir-nuclear-machines', 'f[nuclear-energy]-a[mox-reactor]', 'recipe') |
| 39 | + |
| 40 | +subgroup_and_order('breeder-reactor', 'ir-nuclear-machines', 'f[nuclear-energy]-a[breeder-reactor]', 'recipe') |
| 41 | + |
| 42 | +if settings.startup['enable-plutonium-ammo'].value then |
| 43 | + subgroup_and_order('plutonium-rounds-magazine', 'ir-ammo', 'c-q', 'recipe') |
| 44 | +end |
| 45 | + |
| 46 | +-- IR3 removes uranium-fuel, not a usable fuel for vehicles |
| 47 | +data.raw['recipe']['plutonium-fuel'].hidden = true |
| 48 | +data.raw['recipe']['plutonium-fuel'].enabled = false |
| 49 | + |
| 50 | + |
| 51 | +-- Add steel, lead, and concrete scrap to reprocessing recipes |
| 52 | +for name, items in pairs({ |
| 53 | + ['MOX-fuel-cell-reprocessing'] = { |
| 54 | + { name = "steel-scrap", amount_max = 3, amount_min = 1 }, |
| 55 | + { name = "lead-scrap", amount_max = 2, amount_min = 1 }, |
| 56 | + { name = "concrete-scrap", amount_max = 2, amount_min = 1 } |
| 57 | + }, |
| 58 | + |
| 59 | + ['breeder-fuel-cell-reprocessing'] = { |
| 60 | + { name = "steel-scrap", amount_max = 6, amount_min = 3 }, |
| 61 | + { name = "lead-scrap", amount_max = 4, amount_min = 2 }, |
| 62 | + { name = "concrete-scrap", amount_max = 4, amount_min = 2 } |
| 63 | + }, |
| 64 | + |
| 65 | + ['advanced-nuclear-fuel-reprocessing'] = { |
| 66 | + { name = "steel-scrap", amount_max = 3, amount_min = 1 }, |
| 67 | + { name = "lead-scrap", amount_max = 2, amount_min = 1 }, |
| 68 | + { name = "concrete-scrap", amount_max = 2, amount_min = 1 } |
| 69 | + } |
| 70 | + |
| 71 | +}) do |
| 72 | + for _, item in pairs(items) do |
| 73 | + table.insert(data.raw['recipe'][name].results, item) |
| 74 | + end |
| 75 | +end |
| 76 | + |
| 77 | +-- new subgroup, after uranium recipes |
| 78 | +data:extend({ { |
| 79 | + type = 'item-subgroup', |
| 80 | + name = 'pe', |
| 81 | + group = 'ir-processing', |
| 82 | + order = 'zzzz', |
| 83 | +} }) |
| 84 | +for _, name in pairs({ |
| 85 | + 'MOX-fuel-cell', |
| 86 | + 'breeder-fuel-cell', |
| 87 | + 'MOX-fuel-cell-reprocessing', |
| 88 | + 'breeder-fuel-cell-reprocessing', |
| 89 | + 'advanced-nuclear-fuel-reprocessing', |
| 90 | + 'breeder-fuel-cell-from-MOX-fuel-cell', |
| 91 | + 'breeder-fuel-cell-from-uranium-cell', |
| 92 | + 'used-up-uranium-fuel-cell-solution-centrifuging', |
| 93 | + 'used-up-breeder-fuel-cell-solution-centrifuging' |
| 94 | +}) do |
| 95 | + data.raw['recipe'][name].subgroup = 'pe' |
| 96 | +end |
0 commit comments