-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
80 changed files
with
814 additions
and
592 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-- IR3 uses a barrelling technology and special barrelling machines, so hide the "convenience" recipes and add additional prerequisites | ||
|
||
data.raw['technology']['plutonium-processing'].prerequisites = { | ||
"uranium-processing", | ||
"nuclear-fuel-reprocessing", | ||
"ir-barrelling" | ||
} | ||
|
||
-- Hide a recipe and remove it from technologies | ||
local function hide_recipe(name, technology_name) | ||
data.raw['recipe'][name].hidden = true | ||
data.raw['recipe'][name].enabled = false | ||
if technology_name ~= nil then | ||
for index, effect in pairs(data.raw['technology'][technology_name].effects) do | ||
if effect.recipe == name then | ||
table.remove(data.raw['technology'][technology_name].effects, index) | ||
end | ||
end | ||
end | ||
end | ||
|
||
hide_recipe('advanced-nuclear-fuel-reprocessing-with-barrelling', 'plutonium-processing') | ||
hide_recipe('breeder-fuel-cell-reprocessing-with-barrelling', 'nuclear-breeding') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
log("Applying Industrial Revolution 3 compatibility tweaks") | ||
|
||
-- Tweak Plutonium Ammo technology cost | ||
if data.raw['technology']['plutonium-ammo'] then | ||
data.raw['technology']['plutonium-ammo'].unit.count = 2000 | ||
data.raw['technology']['plutonium-ammo'].unit.time = 60 | ||
end | ||
|
||
-- Tweak the shell icon to be consistent with IR3 | ||
data.raw['ammo']['plutonium-atomic-artillery-shell'].icon = | ||
'__PlutoniumEnergy__/graphics/icons/plutonium-atomic-artillery-shell-IR3.png' | ||
|
||
require('barrelling') | ||
require('subgroup-and-order') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
-- Add radiation shielding to recipes | ||
|
||
for name, amount in pairs({ | ||
['MOX-fuel-cell'] = 10, | ||
['breeder-fuel-cell'] = 10, | ||
['breeder-fuel-cell-from-uranium-cell'] = 10, | ||
['breeder-fuel-cell-from-MOX-fuel-cell'] = 10 | ||
}) do | ||
for i, ingredient in pairs(data.raw['recipe'][name].ingredients) do | ||
if ingredient[0] == 'iron-plate' then | ||
table.remove(data.raw['recipe'][name].ingredients, i) | ||
end | ||
end | ||
table.insert(data.raw['recipe'][name].ingredients, { 'lead-plate-special', amount }) | ||
end | ||
|
||
data.raw['recipe']['MOX-reactor'].ingredients = { | ||
{ "lead-plate-special", 80 }, | ||
{ "computer-mk3", 4 }, | ||
{ "heat-pipe", 4 }, | ||
{ "graphite", 60 }, | ||
} | ||
data.raw['recipe']['breeder-reactor'].ingredients = { | ||
{ "lead-plate-special", 200 }, | ||
{ "computer-mk3", 6 }, | ||
{ "heat-pipe", 12 }, | ||
{ "graphite", 160 }, | ||
} | ||
|
||
local function subgroup_and_order(name, subgroup, order, item_type) | ||
if item_type == nil then | ||
item_type = 'item' | ||
end | ||
data.raw[item_type][name].subgroup = subgroup | ||
data.raw[item_type][name].order = order | ||
end | ||
|
||
subgroup_and_order('MOX-reactor', 'ir-nuclear-machines', 'f[nuclear-energy]-a[mox-reactor]', 'recipe') | ||
|
||
subgroup_and_order('breeder-reactor', 'ir-nuclear-machines', 'f[nuclear-energy]-a[breeder-reactor]', 'recipe') | ||
|
||
if settings.startup['enable-plutonium-ammo'].value then | ||
subgroup_and_order('plutonium-rounds-magazine', 'ir-ammo', 'c-q', 'recipe') | ||
end | ||
|
||
-- IR3 removes uranium-fuel, not a usable fuel for vehicles | ||
data.raw['recipe']['plutonium-fuel'].hidden = true | ||
data.raw['recipe']['plutonium-fuel'].enabled = false | ||
|
||
|
||
-- Add steel, lead, and concrete scrap to reprocessing recipes | ||
for name, items in pairs({ | ||
['MOX-fuel-cell-reprocessing'] = { | ||
{ name = "steel-scrap", amount_max = 3, amount_min = 1 }, | ||
{ name = "lead-scrap", amount_max = 2, amount_min = 1 }, | ||
{ name = "concrete-scrap", amount_max = 2, amount_min = 1 } | ||
}, | ||
|
||
['breeder-fuel-cell-reprocessing'] = { | ||
{ name = "steel-scrap", amount_max = 6, amount_min = 3 }, | ||
{ name = "lead-scrap", amount_max = 4, amount_min = 2 }, | ||
{ name = "concrete-scrap", amount_max = 4, amount_min = 2 } | ||
}, | ||
|
||
['advanced-nuclear-fuel-reprocessing'] = { | ||
{ name = "steel-scrap", amount_max = 3, amount_min = 1 }, | ||
{ name = "lead-scrap", amount_max = 2, amount_min = 1 }, | ||
{ name = "concrete-scrap", amount_max = 2, amount_min = 1 } | ||
} | ||
|
||
}) do | ||
for _, item in pairs(items) do | ||
table.insert(data.raw['recipe'][name].results, item) | ||
end | ||
end | ||
|
||
-- new subgroup, after uranium recipes | ||
data:extend({ { | ||
type = 'item-subgroup', | ||
name = 'pe', | ||
group = 'ir-processing', | ||
order = 'zzzz', | ||
} }) | ||
for _, name in pairs({ | ||
'MOX-fuel-cell', | ||
'breeder-fuel-cell', | ||
'MOX-fuel-cell-reprocessing', | ||
'breeder-fuel-cell-reprocessing', | ||
'advanced-nuclear-fuel-reprocessing', | ||
'breeder-fuel-cell-from-MOX-fuel-cell', | ||
'breeder-fuel-cell-from-uranium-cell', | ||
'used-up-uranium-fuel-cell-solution-centrifuging', | ||
'used-up-breeder-fuel-cell-solution-centrifuging' | ||
}) do | ||
data.raw['recipe'][name].subgroup = 'pe' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- Set subgroup and order to an item | ||
local function subgroup_and_order(name, subgroup, order, item_type) | ||
if item_type == nil then | ||
item_type = 'item' | ||
end | ||
data.raw[item_type][name].subgroup = subgroup | ||
data.raw[item_type][name].order = order | ||
end | ||
|
||
-- assign IR3 subgroups to items | ||
subgroup_and_order('MOX-reactor', 'ir-nuclear-machines', 'f[nuclear-energy]-a[mox-reactor]') | ||
subgroup_and_order('breeder-reactor', 'ir-nuclear-machines', 'f[nuclear-energy]-a[breeder-reactor]') | ||
subgroup_and_order('MOX-fuel-cell', 'ir-fuels', 'zz[mox-fuel]') | ||
subgroup_and_order('used-up-MOX-fuel-cell', 'ir-fuels', 'zz[mox-fuel-used]') | ||
subgroup_and_order('breeder-fuel-cell', 'ir-fuels', 'zz[breeder-fuel-cell]') | ||
subgroup_and_order('used-up-breeder-fuel-cell', 'ir-fuels', 'zz[breeder-fuel-cell-used]') | ||
subgroup_and_order('plutonium-238', 'ir-fuels', 'cc[plutonium-238]') | ||
subgroup_and_order('plutonium-239', 'ir-fuels', 'cc[plutonium-239]') | ||
|
||
if settings.startup['enable-plutonium-ammo'].value then | ||
subgroup_and_order('plutonium-rounds-magazine', 'ir-ammo', 'c-q', 'ammo') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- big TODO | ||
-- Basically need a rewrite | ||
|
||
log("Realistic Reactors no-op compat loaded") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
log("SchallRadioactiveWaste compat tweaks") | ||
|
||
---@diagnostic disable: undefined-global | ||
SchallRadioactiveWaste_add_incineration_recipe('used-up-MOX-fuel', 22.3, 0.9) | ||
SchallRadioactiveWaste_add_incineration_recipe('used-up-breeder-fuel-cell', 45.0, 1.5) | ||
SchallRadioactiveWaste_add_incineration_recipe('plutonium-238', 3, 0.85) | ||
SchallRadioactiveWaste_add_incineration_recipe('plutonium-239', 700, 0.85) | ||
|
||
SchallRadioactiveWaste_add_radioactive_effects('plutonium-atomic-rocket', 84, 2.8, 70) | ||
|
||
if data.raw['artillery-projectile']['plutonium-atomic-artillery-projectile'] then | ||
SchallRadioactiveWaste_add_radioactive_effects('plutonium-atomic-artillery-projectile', 84, 2.8, 70) | ||
end |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
log("Nuclear artillery tweaks") | ||
|
||
-- Add nuclear artillery to artillery guns | ||
|
||
local function contains(table_to_search, item) | ||
for _, v in pairs(table_to_search) do | ||
if v == item then | ||
return true | ||
end | ||
end | ||
return false | ||
end | ||
|
||
for _, gun in pairs(data.raw['gun']) do | ||
if gun.attack_parameters.ammo_categories and not gun.attack_parameters.ammo_category then | ||
if contains(gun.attack_parameters.ammo_categories, 'artillery-shell') then | ||
table.insert(gun.attack_parameters.ammo_categories, 'artillery-shell') | ||
end | ||
end | ||
if gun.attack_parameters.ammo_category == 'artillery-shell' then | ||
gun.attack_parameters.ammo_categories = { 'artillery-shell', 'nuclear-artillery' } | ||
gun.attack_parameters.ammo_category = nil | ||
end | ||
end | ||
|
||
-- Add nuclear artillery damage bonus | ||
|
||
local function affects_ammotype(effects, ammotype) | ||
for _, effect in pairs(effects) do | ||
if effect.type == "ammo-damage" and effect.ammo_category == ammotype then | ||
return effect.modifier | ||
end | ||
end | ||
return nil | ||
end | ||
|
||
for name, tech in pairs(data.raw['technology']) do | ||
if tech.effects ~= nil then | ||
local ammotype_effect = affects_ammotype(tech.effects, 'rocket') | ||
if ammotype_effect then | ||
table.insert(data.raw['technology'][name].effects, | ||
{ type = "ammo-damage", ammo_category = "nuclear-artillery", modifier = ammotype_effect }) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
log("Tweaking productivity restrictions") | ||
|
||
-- Add some recipes to productivty modules limitation (which is whitelist for some reason) | ||
local limitation_to_add = { | ||
'advanced-nuclear-fuel-reprocessing', | ||
'MOX-fuel-cell', 'MOX-fuel-cell-reprocessing', | ||
'plutonium-fuel', | ||
'breeder-fuel-cell-reprocessing', | ||
'used-up-uranium-fuel-cell-solution-centrifuging', | ||
'used-up-breeder-fuel-cell-solution-centrifuging', | ||
'breeder-fuel-cell', | ||
} | ||
for _, module in pairs(data.raw['module']) do | ||
if module.limitation and module.effect.productivity then | ||
for _, recipe in pairs(limitation_to_add) do | ||
table.insert(module.limitation, recipe) | ||
end | ||
end | ||
end |
Oops, something went wrong.