Skip to content

Commit 7dc7632

Browse files
Merge branch 'mox-fuel-split'
2 parents 4091c3a + a79ed0e commit 7dc7632

File tree

80 files changed

+814
-592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+814
-592
lines changed

changelog.txt

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
---------------------------------------------------------------------------------------------------
2-
Version: 1.6.5
3-
Date: 2024-08-18
4-
Balancing:
2+
Version: 1.7.0
3+
Date: 2024-09-29
4+
Major Changes:
55
- Replaced Plutonium Atomic bomb by Plutonium Atomic Artillery shell.
66
Also significantly increased the damage and range of the Plutoinium
77
atomic explosion. The recipe is a combination of both Artillery Shell
88
and Atomic Bomb.
9+
- The MOX fuel cell as a concept has been split into two:
10+
Plutonium fuel cell is a fuel cell made with plutonium which can be used in a regular reactor
11+
MOX fuel cell is made from a combination of Pu-238 and U-238 and can be used in a MOX reactor
12+
Minor changes:
13+
- Rearranged nuclear cells, reprocessing and enrichment recipes in the recipe menu.
14+
Graphics:
15+
- Added a new custom icon for the MOX fuel cell, previous icon reused for Plutonium fuel cell
16+
- Uranium Waste solution and Plutonium-rich Nuclear Waste solution icons have been updated.
17+
They now appear much more distinct and won't be mistaken for lubricant.
18+
Also updated colors for flow and barrells, they appear distinctly bright now.
19+
- Changed style of the reprocessing recipe icons for improved clarity.
20+
Balancing:
921
- Decreased Plutonium-239 output from advanced uranium fuel cell
1022
reprocessing from 0.25 to 0.02
1123
- Increased amount of Plutonium-239 from breeder fuel cell reprocessing
@@ -20,12 +32,6 @@ Date: 2024-08-18
2032
cell instead of varying in alternative recipes
2133
- Increased time, resource usage and output of Breeder fuel cell
2234
reprocessing recipes by a factor of 2.5 except for amount of cells
23-
- Removed Uranium-235 from MOX fuel recipe
24-
- Increased Plutonium-239 requirement for MOX fuel from 3 to 4
25-
- Increased Plutonium-238 requirement for MOX fuel from 15 to 16
26-
- Decreased Plutonium-239 output from MOX fuel reprocessing from 0.15 to
27-
0.01
28-
- Decreased Plutonium-238 output from Mox fuel reprocessing from 5 to 4
2935
---------------------------------------------------------------------------------------------------
3036
Version: 1.6.4
3137
Date: 2024-08-15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
-- IR3 uses a barrelling technology and special barrelling machines, so hide the "convenience" recipes and add additional prerequisites
2+
3+
data.raw['technology']['plutonium-processing'].prerequisites = {
4+
"uranium-processing",
5+
"nuclear-fuel-reprocessing",
6+
"ir-barrelling"
7+
}
8+
9+
-- Hide a recipe and remove it from technologies
10+
local function hide_recipe(name, technology_name)
11+
data.raw['recipe'][name].hidden = true
12+
data.raw['recipe'][name].enabled = false
13+
if technology_name ~= nil then
14+
for index, effect in pairs(data.raw['technology'][technology_name].effects) do
15+
if effect.recipe == name then
16+
table.remove(data.raw['technology'][technology_name].effects, index)
17+
end
18+
end
19+
end
20+
end
21+
22+
hide_recipe('advanced-nuclear-fuel-reprocessing-with-barrelling', 'plutonium-processing')
23+
hide_recipe('breeder-fuel-cell-reprocessing-with-barrelling', 'nuclear-breeding')

compat/IndustrialRevolution3/main.lua

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
log("Applying Industrial Revolution 3 compatibility tweaks")
2+
3+
-- Tweak Plutonium Ammo technology cost
4+
if data.raw['technology']['plutonium-ammo'] then
5+
data.raw['technology']['plutonium-ammo'].unit.count = 2000
6+
data.raw['technology']['plutonium-ammo'].unit.time = 60
7+
end
8+
9+
-- Tweak the shell icon to be consistent with IR3
10+
data.raw['ammo']['plutonium-atomic-artillery-shell'].icon =
11+
'__PlutoniumEnergy__/graphics/icons/plutonium-atomic-artillery-shell-IR3.png'
12+
13+
require('barrelling')
14+
require('subgroup-and-order')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-- Set subgroup and order to an item
2+
local function subgroup_and_order(name, subgroup, order, item_type)
3+
if item_type == nil then
4+
item_type = 'item'
5+
end
6+
data.raw[item_type][name].subgroup = subgroup
7+
data.raw[item_type][name].order = order
8+
end
9+
10+
-- assign IR3 subgroups to items
11+
subgroup_and_order('MOX-reactor', 'ir-nuclear-machines', 'f[nuclear-energy]-a[mox-reactor]')
12+
subgroup_and_order('breeder-reactor', 'ir-nuclear-machines', 'f[nuclear-energy]-a[breeder-reactor]')
13+
subgroup_and_order('MOX-fuel-cell', 'ir-fuels', 'zz[mox-fuel]')
14+
subgroup_and_order('used-up-MOX-fuel-cell', 'ir-fuels', 'zz[mox-fuel-used]')
15+
subgroup_and_order('breeder-fuel-cell', 'ir-fuels', 'zz[breeder-fuel-cell]')
16+
subgroup_and_order('used-up-breeder-fuel-cell', 'ir-fuels', 'zz[breeder-fuel-cell-used]')
17+
subgroup_and_order('plutonium-238', 'ir-fuels', 'cc[plutonium-238]')
18+
subgroup_and_order('plutonium-239', 'ir-fuels', 'cc[plutonium-239]')
19+
20+
if settings.startup['enable-plutonium-ammo'].value then
21+
subgroup_and_order('plutonium-rounds-magazine', 'ir-ammo', 'c-q', 'ammo')
22+
end

compat/RealisticReactors.lua

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- big TODO
2+
-- Basically need a rewrite
3+
4+
log("Realistic Reactors no-op compat loaded")

compat/SchallRadioactiveWaste.lua

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
log("SchallRadioactiveWaste compat tweaks")
2+
3+
---@diagnostic disable: undefined-global
4+
SchallRadioactiveWaste_add_incineration_recipe('used-up-MOX-fuel', 22.3, 0.9)
5+
SchallRadioactiveWaste_add_incineration_recipe('used-up-breeder-fuel-cell', 45.0, 1.5)
6+
SchallRadioactiveWaste_add_incineration_recipe('plutonium-238', 3, 0.85)
7+
SchallRadioactiveWaste_add_incineration_recipe('plutonium-239', 700, 0.85)
8+
9+
SchallRadioactiveWaste_add_radioactive_effects('plutonium-atomic-rocket', 84, 2.8, 70)
10+
11+
if data.raw['artillery-projectile']['plutonium-atomic-artillery-projectile'] then
12+
SchallRadioactiveWaste_add_radioactive_effects('plutonium-atomic-artillery-projectile', 84, 2.8, 70)
13+
end

compat/attack-parameters.lua

Whitespace-only changes.

compat/nuclear-artillery.lua

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
log("Nuclear artillery tweaks")
2+
3+
-- Add nuclear artillery to artillery guns
4+
5+
local function contains(table_to_search, item)
6+
for _, v in pairs(table_to_search) do
7+
if v == item then
8+
return true
9+
end
10+
end
11+
return false
12+
end
13+
14+
for _, gun in pairs(data.raw['gun']) do
15+
if gun.attack_parameters.ammo_categories and not gun.attack_parameters.ammo_category then
16+
if contains(gun.attack_parameters.ammo_categories, 'artillery-shell') then
17+
table.insert(gun.attack_parameters.ammo_categories, 'artillery-shell')
18+
end
19+
end
20+
if gun.attack_parameters.ammo_category == 'artillery-shell' then
21+
gun.attack_parameters.ammo_categories = { 'artillery-shell', 'nuclear-artillery' }
22+
gun.attack_parameters.ammo_category = nil
23+
end
24+
end
25+
26+
-- Add nuclear artillery damage bonus
27+
28+
local function affects_ammotype(effects, ammotype)
29+
for _, effect in pairs(effects) do
30+
if effect.type == "ammo-damage" and effect.ammo_category == ammotype then
31+
return effect.modifier
32+
end
33+
end
34+
return nil
35+
end
36+
37+
for name, tech in pairs(data.raw['technology']) do
38+
if tech.effects ~= nil then
39+
local ammotype_effect = affects_ammotype(tech.effects, 'rocket')
40+
if ammotype_effect then
41+
table.insert(data.raw['technology'][name].effects,
42+
{ type = "ammo-damage", ammo_category = "nuclear-artillery", modifier = ammotype_effect })
43+
end
44+
end
45+
end

compat/productivity.lua

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
log("Tweaking productivity restrictions")
2+
3+
-- Add some recipes to productivty modules limitation (which is whitelist for some reason)
4+
local limitation_to_add = {
5+
'advanced-nuclear-fuel-reprocessing',
6+
'MOX-fuel-cell', 'MOX-fuel-cell-reprocessing',
7+
'plutonium-fuel',
8+
'breeder-fuel-cell-reprocessing',
9+
'used-up-uranium-fuel-cell-solution-centrifuging',
10+
'used-up-breeder-fuel-cell-solution-centrifuging',
11+
'breeder-fuel-cell',
12+
}
13+
for _, module in pairs(data.raw['module']) do
14+
if module.limitation and module.effect.productivity then
15+
for _, recipe in pairs(limitation_to_add) do
16+
table.insert(module.limitation, recipe)
17+
end
18+
end
19+
end

0 commit comments

Comments
 (0)