diff --git a/combat.lua b/combat.lua new file mode 100644 index 0000000..fc06e8e --- /dev/null +++ b/combat.lua @@ -0,0 +1,404 @@ +plutonium_rocket_recipe = { + type = "recipe", + name = "adamo-nuclear-thermonuclear-rocket", + energy_required = 50, + order = "d[rocket-launcher]-n[adamo-nuclear-thermonuclear-rocket]", + enabled = false, + -- main_product = "adamo-nuclear-thermonuclear-rocket", + ingredients = { + {"rocket",1}, + {"explosives",1}, + {"rocket-control-unit",1}, + {WGPu_fuel_item.name,1} + }, + result = "atomic-bomb", +} +plutonium_explosion_wave = { + type = "projectile", + name = "adamo-nuclear-atomic-explosion-wave", + flags = {"not-on-map"}, + acceleration = 0, + action = + { + { + type = "direct", + action_delivery = + { + type = "instant", + target_effects = + { + { + type = "create-entity", + entity_name = "explosion" + } + } + } + }, + { + type = "area", + radius = 3, + action_delivery = + { + type = "instant", + target_effects = + { + type = "damage", + damage = {amount = 1000, type = "explosion"} + } + } + } + }, + animation = + { + filename = "__core__/graphics/empty.png", + frame_count = 1, + width = 1, + height = 1, + priority = "high" + }, + shadow = + { + filename = "__core__/graphics/empty.png", + frame_count = 1, + width = 1, + height = 1, + priority = "high" + } +} +plutonium_rocket_projectile = { + type = "projectile", + name = "adamo-nuclear-thermonuclear-rocket-projectile", + flags = {"not-on-map"}, + acceleration = 0.005, + action = + { + type = "direct", + action_delivery = + { + type = "instant", + target_effects = + { + { + type = "set-tile", + tile_name = "nuclear-ground", + radius = 20, + apply_projection = true, + tile_collision_mask = { "water-tile" } + }, + { + type = "destroy-cliffs", + radius = 16, + explosion = "explosion" + }, + { + type = "create-entity", + entity_name = "nuke-explosion" + }, + { + type = "camera-effect", + effect = "screen-burn", + duration = 60, + ease_in_duration = 5, + ease_out_duration = 60, + delay = 0, + strength = 6, + full_strength_max_distance = 200, + max_distance = 800 + }, + { + type = "play-sound", + sound = require("__base__/prototypes/entity/sounds").nuclear_explosion(0.9), + play_on_target_position = false, + -- min_distance = 200, + max_distance = 1000, + -- volume_modifier = 1, + audible_distance_modifier = 3 + }, + { + type = "play-sound", + sound = require("__base__/prototypes/entity/sounds").nuclear_explosion_aftershock(0.4), + play_on_target_position = false, + -- min_distance = 200, + max_distance = 1000, + -- volume_modifier = 1, + audible_distance_modifier = 3 + }, + { + type = "create-entity", + entity_name = "huge-scorchmark", + offsets = {{ 0, -0.5 }}, + check_buildability = true + }, + { + type = "invoke-tile-trigger", + repeat_count = 1 + }, + { + type = "destroy-decoratives", + include_soft_decoratives = true, -- soft decoratives are decoratives with grows_through_rail_path = true + include_decals = true, + invoke_decorative_trigger = true, + decoratives_with_trigger_only = false, -- if true, destroys only decoratives that have trigger_effect set + radius = 14 -- large radius for demostrative purposes + }, + { + type = "create-decorative", + decorative = "nuclear-ground-patch", + spawn_min_radius = 11.5, + spawn_max_radius = 12.5, + spawn_min = 30, + spawn_max = 40, + apply_projection = true, + spread_evenly = true + }, + { + type = "nested-result", + action = + { + type = "area", + target_entities = false, + trigger_from_target = true, + repeat_count = 1000, + radius = 7, + action_delivery = + { + type = "projectile", + projectile = "atomic-bomb-ground-zero-projectile", + starting_speed = 0.6 * 0.8, + starting_speed_deviation = nuke_shockwave_starting_speed_deviation + } + } + }, + { + type = "nested-result", + action = + { + type = "area", + target_entities = false, + trigger_from_target = true, + repeat_count = 1000, + radius = 35, + action_delivery = + { + type = "projectile", + projectile = "atomic-bomb-wave", + starting_speed = 0.5 * 0.7, + starting_speed_deviation = nuke_shockwave_starting_speed_deviation + } + } + }, + { + type = "nested-result", + action = + { + type = "area", + show_in_tooltip = false, + target_entities = false, + trigger_from_target = true, + repeat_count = 1000, + radius = 26, + action_delivery = + { + type = "projectile", + projectile = "atomic-bomb-wave-spawns-cluster-nuke-explosion", + starting_speed = 0.5 * 0.7, + starting_speed_deviation = nuke_shockwave_starting_speed_deviation + } + } + }, + { + type = "nested-result", + action = + { + type = "area", + show_in_tooltip = false, + target_entities = false, + trigger_from_target = true, + repeat_count = 700, + radius = 4, + action_delivery = + { + type = "projectile", + projectile = "atomic-bomb-wave-spawns-fire-smoke-explosion", + starting_speed = 0.5 * 0.65, + starting_speed_deviation = nuke_shockwave_starting_speed_deviation + } + } + }, + { + type = "nested-result", + action = + { + type = "area", + show_in_tooltip = false, + target_entities = false, + trigger_from_target = true, + repeat_count = 1000, + radius = 8, + action_delivery = + { + type = "projectile", + projectile = "atomic-bomb-wave-spawns-nuke-shockwave-explosion", + starting_speed = 0.5 * 0.65, + starting_speed_deviation = nuke_shockwave_starting_speed_deviation + } + } + }, + { + type = "nested-result", + action = + { + type = "area", + show_in_tooltip = false, + target_entities = false, + trigger_from_target = true, + repeat_count = 300, + radius = 26, + action_delivery = + { + type = "projectile", + projectile = "atomic-bomb-wave-spawns-nuclear-smoke", + starting_speed = 0.5 * 0.65, + starting_speed_deviation = nuke_shockwave_starting_speed_deviation + } + } + }, + { + type = "nested-result", + action = + { + type = "area", + show_in_tooltip = false, + target_entities = false, + trigger_from_target = true, + repeat_count = 10, + radius = 8, + action_delivery = + { + type = "instant", + target_effects = + { + { + type = "create-entity", + entity_name = "nuclear-smouldering-smoke-source", + tile_collision_mask = { "water-tile" } + } + } + } + } + }, + { + repeat_count = 150, + type = "create-trivial-smoke", + smoke_name = "nuclear-smoke", + offset_deviation = {{-1, -1}, {1, 1}}, + starting_frame = 3, + starting_frame_deviation = 5, + starting_frame_speed = 0, + starting_frame_speed_deviation = 5, + speed_from_center = 0.5 + }, + -- { + -- type = "create-entity", + -- entity_name = "explosion" + -- }, + { + type = "damage", + damage = {amount = 1000, type = "explosion"} + }, + { + type = "create-entity", + entity_name = "small-scorchmark", + check_buildability = true + }, + { + type = "nested-result", + action = + { + type = "area", + target_entities = false, + trigger_from_target = true, + repeat_count = 2000, + radius = 35, + action_delivery = + { + type = "projectile", + projectile = "adamo-nuclear-atomic-explosion-wave", + starting_speed = 0.5 + } + } + } + } + } + }, + light = {intensity = 0.8, size = 15}, + animation = + { + filename = + "__base__/graphics/entity/" + .."rocket/rocket.png", + frame_count = 8, + line_length = 8, + width = 9, + height = 35, + shift = {0, 0}, + priority = "high" + }, + shadow = + { + filename = + "__base__/graphics/entity/" + .."rocket/rocket-shadow.png", + frame_count = 1, + width = 7, + height = 24, + priority = "high", + shift = {0, 0} + }, + smoke = + { + { + name = "smoke-fast", + deviation = {0.15, 0.15}, + frequency = 1, + position = {0, 1}, + slow_down_factor = 1, + starting_frame = 3, + starting_frame_deviation = 5, + starting_frame_speed = 0, + starting_frame_speed_deviation = 5 + } + } +} +plutonium_rocket_ammo = { + type = "ammo", + name = "adamo-nuclear-thermonuclear-rocket", + subgroup = "ammo", + order = "d[rocket-launcher]-r[adamo-nuclear-thermonuclear-rocket]", + stack_size = 10, + icon = "__base__/graphics/icons/atomic-bomb.png", + icon_size = 64, + icon_mipmaps = 4, + ammo_type = + { + range_modifier = 3, + cooldown_modifier = 3, + target_type = "position", + category = "rocket", + action = + { + type = "direct", + action_delivery = + { + type = "projectile", + projectile = "adamo-nuclear-thermonuclear-rocket-projectile", + starting_speed = 0.05, + source_effects = + { + type = "create-entity", + entity_name = "explosion-hit" + } + } + } + } +} diff --git a/data-updates.lua b/data-updates.lua index a509bf1..a37804f 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -1,12 +1,12 @@ require("factsheet") -replace_recipe_io( +adamo.recipe.replace.resource( data.raw.recipe["textplate-small-uranium"], "uranium-238", "adamo-nuclear-DU-oxide" ) -replace_recipe_io( +adamo.recipe.replace.resource( data.raw.recipe["textplate-large-uranium"], "uranium-238", "adamo-nuclear-DU-oxide" @@ -20,27 +20,6 @@ if appmod and type(appmod) == "table" then appmod.blacklist["adamo-nuclear-production-reactor"] = true end -data.raw.item["centrifuge"].subgroup = "adamo-nuclear-production-machine" -data.raw.item["centrifuge"].order = "n[centrifuge]" -data.raw["assembling-machine"].centrifuge.fluid_boxes = adamo.centrifuge.fluid_boxes() - -local reactor_coolant_color = {r = 1,g = 0.9,b = 0.8,a = 1} - --- Hide vanilla items. -data.raw.item["uranium-235"].hidden = true -data.raw.item["uranium-238"].hidden = true -if not data.raw.item["uranium-235"].flags then - data.raw.item["uranium-235"].flags = {} -end -if not data.raw.item["uranium-238"].flags then - data.raw.item["uranium-238"].flags = {} -end -table.insert(data.raw.item["uranium-235"].flags,"hidden") -table.insert(data.raw.item["uranium-238"].flags,"hidden") -data.raw.recipe["kovarex-enrichment-process"].hidden = true -data.raw.recipe["nuclear-fuel-reprocessing"].hidden = true -data.raw.recipe["uranium-processing"].hidden = true - -- Hide some mod recipes if data.raw.recipe["MOX-fuel"] then data.raw.recipe["MOX-fuel"].hidden = true @@ -61,112 +40,194 @@ if data.raw.recipe["plutonium-239-alpha-decay"] then data.raw.recipe["plutonium-239-alpha-decay"].hidden = true end -local ore = data.raw.item["uranium-ore"] -local heu_fuel_recipe = data.raw.recipe["uranium-fuel-cell"] -local heu_fuel_item = data.raw.item["uranium-fuel-cell"] -local heu_used_fuel_item = data.raw.item["used-up-uranium-fuel-cell"] -local nuclear_fuel_recipe = data.raw.recipe["nuclear-fuel"] -local nuclear_fuel_item = data.raw.item["nuclear-fuel"] -local ammo = data.raw.recipe["uranium-rounds-magazine"] -local shell = data.raw.recipe["uranium-cannon-shell"] -local explosive_shell = data.raw.recipe["explosive-uranium-cannon-shell"] -local atomic_bomb = data.raw.recipe["atomic-bomb"] -local reactor_item = data.raw.item["nuclear-reactor"] -local reactor = data.raw.reactor["nuclear-reactor"] +local vanilla_uranium_235 = data.raw.item["uranium-235"] +local vanilla_uranium_238 = data.raw.item["uranium-238"] +local kovarex_recipe = data.raw.recipe["kovarex-enrichment-process"] +local kovarex_tech = data.raw.technology["kovarex-enrichment-process"] +local reprocessing_recipe = data.raw.recipe["nuclear-fuel-reprocessing"] +local reprocessing_tech = data.raw.technology["nuclear-fuel-reprocessing"] +local vanilla_processing = data.raw.recipe["uranium-processing"] +local centrifuge_item = data.raw.item["centrifuge"] +local centrifuge_entity = data.raw["assembling-machine"].centrifuge +local ore = data.raw.item["uranium-ore"] +local heu_fuel_recipe = data.raw.recipe["uranium-fuel-cell"] +local heu_fuel_item = data.raw.item["uranium-fuel-cell"] +local heu_used_fuel_item = data.raw.item["used-up-uranium-fuel-cell"] +local nuclear_fuel_recipe = data.raw.recipe["nuclear-fuel"] +local nuclear_fuel_item = data.raw.item["nuclear-fuel"] +local ammo = data.raw.recipe["uranium-rounds-magazine"] +local shell = data.raw.recipe["uranium-cannon-shell"] +local explosive_shell = data.raw.recipe["explosive-uranium-cannon-shell"] +local atomic_bomb = data.raw.ammo["atomic-bomb"] +local atomic_bomb_recipe = data.raw.recipe["atomic-bomb"] +local nuclear_power_tech = data.raw.technology["nuclear-power"] +local uranium_tech = data.raw.technology["uranium-processing"] +local reactor_item = data.raw.item["nuclear-reactor"] +local reactor_recipe = data.raw.recipe["nuclear-reactor"] +local reactor = data.raw.reactor["nuclear-reactor"] +local hf_fluid = data.raw.fluid["adamo-chemical-hydrofluoric-acid"] +local FeU_recipe = table.deepcopy(data.raw.recipe["steel-plate"]) +local fe_name,fe_count = adamo.recipe.get.ingredient(FeU_recipe,'iron-plate') +local reactor_heat_layer = reactor.heat_buffer.heat_picture +local reactor_glow_layer = reactor.heat_buffer.heat_glow +local reactor_coolant_color = {r = 1,g = 0.9,b = 0.8,a = 1} + +adamo.recipe.set.tech(nuclear_power_tech.name,heu_fuel_recipe.name) + +if not hf_fluid then adamo.apply.hf_from_stone("adamo-nuclear",uranium_tech.name) end + +FeU_recipe.name = "adamo-nuclear-steel-plate" +FeU_recipe.subgroup = products_group.name +adamo.recipe.add.ingredient(FeU_recipe,'adamo-nuclear-DU-oxide',fe_count) +adamo.recipe.replace.resource(FeU_recipe,'iron-plate','iron-ore') +adamo.recipe.scale.resources(FeU_recipe,2,'steel-plate') +adamo.recipe.set.productivity(FeU_recipe) +data:extend({FeU_recipe}) + +adamo.tech.add.recipe("uranium-processing","adamo-nuclear-steel-plate") +adamo.tech.add.prereq(kovarex_tech.name,reprocessing_tech.name) + +kovarex_recipe.hidden = true +reprocessing_recipe.hidden = true +vanilla_processing.hidden = true +vanilla_uranium_235.hidden = true +vanilla_uranium_238.hidden = true + +if not vanilla_uranium_235.flags then vanilla_uranium_235.flags = {} end +if not vanilla_uranium_238.flags then vanilla_uranium_238.flags = {} end +table.insert(vanilla_uranium_235.flags,"hidden") +table.insert(vanilla_uranium_238.flags,"hidden") + +centrifuge_item.subgroup = machine_group.name +centrifuge_item.order = "n[centrifuge]" +centrifuge_entity.fluid_boxes = adamo.centrifuge.fluid_boxes() ore.icon = "__adamo-nuclear__/graphics/icons/yellowcake.png" ore.icon_size = 32 ore.icon_mipmaps = nil ore.pictures = nil -ore.group = "adamo-nuclear-group" -ore.subgroup = "adamo-nuclear-processing-group" +ore.group = nuclear_group.name +ore.subgroup = processing_group.name ore.order = "m" - heu_fuel_recipe.ingredients = { {"adamo-nuclear-HEU-oxide",1}, {"iron-plate",1} } heu_fuel_recipe.category = "advanced-crafting" -heu_fuel_recipe.result = "uranium-fuel-cell" +heu_fuel_recipe.result = heu_fuel_item.name heu_fuel_recipe.result_count = nil heu_fuel_recipe.results = nil heu_fuel_recipe.group = nil heu_fuel_recipe.subgroup = nil heu_fuel_recipe.order = nil -table.insert( - data.raw.technology["nuclear-power"].effects, - { - type = "unlock-recipe", - recipe = "uranium-fuel-cell" - } -) - -for _,effect in pairs( - data.raw.technology["uranium-processing"].effects -) do - if effect.recipe:match "uranium-fuel-cell" then - data.raw.technology["uranium-processing"].effects[_] = nil - end -end - -heu_fuel_item.fuel_value = "164GJ" +heu_fuel_item.fuel_value = "122GJ" heu_fuel_item.icon_size = 32 -heu_fuel_item.icon = - "__adamo-nuclear__/graphics/icons/HEU-fuel-cell.png" -heu_fuel_item.group = "nuclear-group" -heu_fuel_item.subgroup = "adamo-nuclear-products-group" +heu_fuel_item.icon = "__adamo-nuclear__/graphics/icons/yellow-fuel-cell.png" +heu_fuel_item.group = nuclear_group.name +heu_fuel_item.subgroup = fuel_group.name heu_fuel_item.order = "n" heu_fuel_item.fuel_glow_color = reactor_coolant_color heu_used_fuel_item.icon_size = 32 -heu_used_fuel_item.icon = - "__adamo-nuclear__/graphics/icons/used-up-HEU-fuel-cell.png" -heu_used_fuel_item.group = "nuclear-group" -heu_used_fuel_item.subgroup = - "adamo-nuclear-spent-fuel-group" +heu_used_fuel_item.icon = "__adamo-nuclear__/graphics/icons/red-fuel-cell.png" +heu_used_fuel_item.group = nuclear_group.name +heu_used_fuel_item.subgroup = spent_fuel_group.name heu_used_fuel_item.order = "m2" nuclear_fuel_recipe.ingredients = { - {type = "item",name = "adamo-nuclear-HEU-oxide",amount = 1}, - {type = "item",name = "rocket-fuel",amount = 1} + {type = "item",name = "adamo-nuclear-DU-oxide",amount = 1}, + {type = "item",name = "rocket-fuel",amount = 1}, + {type = "fluid",name = "water",amount = 1000} } -nuclear_fuel_recipe.category = "advanced-crafting" -nuclear_fuel_recipe.subgroup = "adamo-nuclear-products-group" -nuclear_fuel_recipe.order = "q" ---nuclear_fuel_item.subgroup = "adamo-nuclear-products-group" ---nuclear_fuel_item.order = "q" +nuclear_fuel_recipe.category="neutron-bombardment" +nuclear_fuel_recipe.energy_required=60 +nuclear_fuel_item.subgroup = products_group.name +nuclear_fuel_item.order = "n" ammo.ingredients = { {"piercing-rounds-magazine", 1}, {"adamo-nuclear-DU-oxide",1} } ammo.result_count = 1 - shell.ingredients = { {"cannon-shell", 1}, {"adamo-nuclear-DU-oxide",1} } shell.result_count = 1 - explosive_shell.ingredients = { {"explosive-cannon-shell", 1}, {"adamo-nuclear-DU-oxide",1} } explosive_shell.result_count = 1 - -atomic_bomb.ingredients = { +atomic_bomb_recipe.ingredients = { {"rocket",1}, - {"explosives",1}, + {"explosives",2}, {"rocket-control-unit",1}, - {"adamo-nuclear-DU-oxide",1}, - {"adamo-nuclear-WGU-oxide",1} + {"adamo-nuclear-DU-oxide",2}, + {"adamo-nuclear-WGU-oxide",2} } -atomic_bomb.icon = - "__adamo-nuclear__/graphics/icons/fission-rocket.png" -atomic_bomb.icon_size = 32 +-- atomic_bomb_recipe.icon = "__adamo-nuclear__/graphics/icons/fission-rocket.png" +-- atomic_bomb_recipe.icon_size = 32 +-- atomic_bomb.icon = "__adamo-nuclear__/graphics/icons/fission-rocket.png" +-- atomic_bomb.icon_size = 32 +reactor_item.icon = "__adamo-nuclear__/graphics/icons/nuclear-reactor.png" +reactor_item.icon_size = 32 +adamo.recipe.add.ingredient(reactor_recipe,"adamo-nuclear-DU-oxide",200) +reactor.default_fuel_glow_color = reactor_coolant_color +reactor.use_fuel_glow_color = true +-- Not necessary as long as Factorio base data +-- includes no light on nuclear-reactor. +-- reactor.light.intensity = 0 +reactor.energy_source.light_flicker = {} +reactor.energy_source.light_flicker.minimum_intensity = 0.5 +reactor.energy_source.light_flicker.maximum_intensity = 0.5 +reactor.energy_source.light_flicker.minimum_light_size = 0 +reactor.energy_source.light_flicker.light_intensity_to_size_coefficient = 0 +reactor.working_light_picture = adamo.sprite.empty() +reactor.heat_buffer.heat_picture = { + layers = { + reactor_heat_layer, + { + filename = + "__adamo-nuclear__/graphics/entity/" + .."reactor-lights-color.png", + width = 160, + height = 160, + shift = { -0.03125, -0.1875 }, + blend_mode = "additive", + hr_version = + { + filename = + "__adamo-nuclear__/graphics/entity/" + .."hr-reactor-lights-color.png", + width = 320, + height = 320, + scale = 0.5, + shift = { -0.03125, -0.1875 }, + blend_mode = "additive" + } + } + } +} +reactor.heat_buffer.heat_glow = { + layers = { + reactor_glow_layer, + { + filename = + "__adamo-nuclear__/graphics/entity/" + .."reactor-lights-glow.png", + flags = {"light"}, + width = 160, + height = 160, + blend_mode = "additive", + tint = heat_glow_tint, + shift = { -0.03125, -0.1875 } + } + } +} if settings.startup["adamo-nuclear-uranium-belt-recipe-override"].value then if data.raw.recipe["uranium-transport-belt"] then @@ -218,173 +279,15 @@ if settings.startup["adamo-nuclear-uranium-belt-recipe-override"].value then end end -reactor_item.icon = - "__adamo-nuclear__/graphics/icons/nuclear-reactor.png" -reactor_item.icon_size = 32 - -table.insert(data.raw.recipe["nuclear-reactor"].ingredients, - {type = "item",name="adamo-nuclear-DU-oxide",amount=200}) - - - - -reactor.default_fuel_glow_color = reactor_coolant_color -reactor.use_fuel_glow_color = true --- Not necessary as long as Factorio base data --- includes no light on nuclear-reactor. --- reactor.light.intensity = 0 -reactor.energy_source.light_flicker = {} -reactor.energy_source.light_flicker.minimum_intensity = 0.5 -reactor.energy_source.light_flicker.maximum_intensity = 0.5 -reactor.energy_source.light_flicker.minimum_light_size = 0 -reactor.energy_source.light_flicker.light_intensity_to_size_coefficient = 0 -reactor.working_light_picture = emptysprite() -local heat_picture_layer = reactor.heat_buffer.heat_picture -reactor.heat_buffer.heat_picture = { - layers = { - heat_picture_layer, - { - filename = - "__adamo-nuclear__/graphics/entity/" - .."reactor-lights-color.png", - width = 160, - height = 160, - shift = { -0.03125, -0.1875 }, - blend_mode = "additive", - hr_version = - { - filename = - "__adamo-nuclear__/graphics/entity/" - .."hr-reactor-lights-color.png", - width = 320, - height = 320, - scale = 0.5, - shift = { -0.03125, -0.1875 }, - blend_mode = "additive" - } - } - } -} -local heat_glow_layer = reactor.heat_buffer.heat_glow -reactor.heat_buffer.heat_glow = { - layers = { - heat_glow_layer, - { - filename = - "__adamo-nuclear__/graphics/entity/" - .."reactor-lights-glow.png", - flags = {"light"}, - width = 160, - height = 160, - blend_mode = "additive", - tint = heat_glow_tint, - shift = { -0.03125, -0.1875 } - } - } -} - --- adamo.logging = true - -if not data.raw.fluid["adamo-chemical-hydrofluoric-acid"] then - if data.raw.fluid["liquid-hydrofluoric-acid"] then - for _,recipe in pairs(data.raw.recipe) do - if recipe_uses(recipe,"adamo-chemical-hydrofluoric-acid") - then - replace_recipe_io( - recipe, - "adamo-chemical-hydrofluoric-acid", - "liquid-hydrofluoric-acid" - ) - end - end - else - local hydrofluoric_acid_fluid = { - type = "fluid", - name = "adamo-chemical-hydrofluoric-acid", - order = "a[fluid]-g[adamo-chemical-hydrofluoric-acid]", - icon = "__adamo-nuclear__/graphics/icons/hydrofluoride.png", - icon_size = 32, - base_color = colors.hf_base, - flow_color = colors.hf_flow, - default_temperature = 25, - max_temperature = 100, - heat_capacity = "0.1KJ", - } - local hydrofluoric_acid_recipe = { - type = "recipe", - name = "adamo-chemical-hydrofluoric-acid", - category = "chemistry", - subgroup = "fluid-recipes", - enabled = false, - energy_required = 1, -- same as sulfuric-acid - ingredients = {{ - type = "item", - name = "stone", - amount = 50 - },{ - type = "fluid", - name = "sulfuric-acid", - amount = 50 - },{ - type = "fluid", - name = "water", - amount = 50 - }}, - results = {{ - type='fluid', - name = "adamo-chemical-hydrofluoric-acid", - amount = 50 - }}, - main_product = "adamo-chemical-hydrofluoric-acid", - requester_paste_multiplier = 4, - crafting_machine_tint = { - primary = data.raw.fluid["sulfuric-acid"].flow_color, - secondary = colors.hf_base, - tertiary = data.raw.fluid["sulfuric-acid"].base_color, - }, - } - data:extend({ - hydrofluoric_acid_fluid, - hydrofluoric_acid_recipe - }) - table.insert( - data.raw.technology["uranium-processing"].effects, - { - type = "unlock-recipe", - recipe = "adamo-chemical-hydrofluoric-acid" - } - ) - end -end - if settings.startup["adamo-nuclear-recipe-trolling"].value then for _,recipe in pairs(data.raw.recipe) do - if recipe_uses(recipe,"uranium-238") then - replace_recipe_io( - recipe, - "uranium-238", - "adamo-nuclear-DU-oxide" - ) + if adamo.recipe.test.uses(recipe,"uranium-238") then + adamo.recipe.replace.resource(recipe,"uranium-238","adamo-nuclear-DU-oxide") end if recipe_uses(recipe,"uranium-235") then - replace_recipe_io( - recipe, - "uranium-235", - "adamo-nuclear-HEU-oxide" - ) + adamo.recipe.replace.resource(recipe,"uranium-235","adamo-nuclear-HEU-oxide") end end end -local FeU_recipe = table.deepcopy(data.raw.recipe["steel-plate"]) -FeU_recipe.name = "adamo-nuclear-steel-plate" -local fe_name,fe_count = get_ingredient(FeU_recipe,'iron-plate') -add_ingredient(FeU_recipe,'adamo-nuclear-DU-oxide',fe_count) -replace_recipe_io(FeU_recipe,'iron-plate','iron-ore') -mult_recipe_io(FeU_recipe,2,'steel-plate') -adamo.recipe.set.productivity(FeU_recipe) -data:extend({FeU_recipe}) -add_recipe_to_tech("uranium-processing","adamo-nuclear-steel-plate") -add_prereq_to_tech("kovarex-enrichment-process","nuclear-fuel-reprocessing") -data.raw.recipe["nuclear-fuel"].category="neutron-bombardment" diff --git a/data.lua b/data.lua index a129694..e4c5250 100644 --- a/data.lua +++ b/data.lua @@ -1,1937 +1,108 @@ require("factsheet") - -local MOX_glow_color = {r = 1,g = 1,b = 1,a = 1} -local pg_base_color = data.raw.fluid["petroleum-gas"].base_color -local sulfuric_base_color = data.raw.fluid["sulfuric-acid"].base_color -local sulfuric_flow_color = data.raw.fluid["sulfuric-acid"].flow_color -local uranium_hex_base_color = {r = 0.5,g = 0.5,b = 0.5,a = 0.5} -local uranium_hex_flow_color = {r = 0.5,g = 0.5,b = 0.5,a = 0.1} -local plutonium_hex_base_color = {r= 100,g = 10,b = 10,a = 150} -local plutonium_hex_flow_color = {r= 100,g = 10,b = 10,a = 25} -local aqueous_raffinate_base_color = adamo.colors.midbrown -local aqueous_raffinate_flow_color = adamo.colors.highbrown -local raffinate_base_color = adamo.colors.darkbrown -local raffinate_flow_color = adamo.colors.midbrown -local oxide_color_table = { - NU = {r=139,g=69,b=19}, - DU = {r = 32, g = 32, b = 32}, - LEU = {r = 96, g = 96, b = 96}, - HEU = {r = 160, g = 160, b = 160}, - WGU = {r = 224, g = 224, b = 224}, - RGPu = {r = 0, g = 153, b = 0}, - WGPu = {r = 0, g = 255, b = 0}, -} - --- Code uses "nuclear" as fast-reaction fuel category. -local bombardment_category = { - type = "recipe-category", - name = "neutron-bombardment" -} -local thermal_fuel_category = { - type = "fuel-category", - name = "adamo-nuclear-thermal-reaction" -} +require("groups") data:extend({ bombardment_category, - thermal_fuel_category -}) - -local nuclear_group = { - type = "item-group", - name = "adamo-nuclear-group", - order = "n", - icon = "__adamo-nuclear__/graphics/icons/nuclear_group.png", - icon_size = 64 -} -local prod_mach_group = { - type = "item-subgroup", - group = "adamo-nuclear-group", - name = "adamo-nuclear-production-machine", - order = "a" -} -local processing_subgroup = { - type = "item-subgroup", - group = "adamo-nuclear-group", - name = "adamo-nuclear-processing-group", - order = "c" -} -local enrichment_group = { - type = "item-subgroup", - group = "adamo-nuclear-group", - name = "adamo-nuclear-enrichment-group", - order = "h" -} -local oxide_subgroup = { - type = "item-subgroup", - group = "adamo-nuclear-group", - name = "adamo-nuclear-oxide-group", - order = "j" -} -local products_subgroup = { - type = "item-subgroup", - group = "adamo-nuclear-group", - name = "adamo-nuclear-products-group", - order = "l" -} -local spent_fuel_group = { - type = "item-subgroup", - group = "adamo-nuclear-group", - name = "adamo-nuclear-spent-fuel-group", - order = "n" -} -local hex_subgroup = { - type = "item-subgroup", - group = "fluids", - name = "adamo-nuclear-hex-group", - order = "n" -} -local raffinate_subgroup = { - type = "item-subgroup", - group = "fluids", - name = "adamo-nuclear-raffinate-group", - order = "o" -} - -data:extend({ + thermal_fuel_category, nuclear_group, - prod_mach_group, - products_subgroup, - oxide_subgroup, + machine_group, + fuel_group, + recovery_group, enrichment_group, - processing_subgroup, + processing_group, spent_fuel_group, + reprocessing_group, + products_group, hex_subgroup, - raffinate_subgroup + slurry_group }) - -local natural_hex_fluid = { - type = "fluid", - name = "adamo-nuclear-natural-uranium-hex", - subgroup = "adamo-nuclear-hex-group", - order = "n0", - icon = "__adamo-nuclear__/graphics/icons/hex.png", - icon_size = 32, - base_color = uranium_hex_base_color, - flow_color = uranium_hex_flow_color, - default_temperature = 25, - max_temperature = 100, - heat_capacity = "0.1KJ", -} -local Pu_hex_fluid = { - type = "fluid", - name = "adamo-nuclear-Pu-hex", - subgroup = "adamo-nuclear-hex-group", - order = "n1", - icon = "__adamo-nuclear__/graphics/icons/Pu-hex.png", - icon_size = 32, - base_color = plutonium_hex_base_color, - flow_color = plutonium_hex_flow_color, - default_temperature = 25, - max_temperature = 100, - heat_capacity = "0.1KJ", -} -local LEU_PUREX_hex_fluid = { - type = "fluid", - name = "adamo-nuclear-LEU-PUREX-hex", - subgroup = "adamo-nuclear-hex-group", - order = "n2", - icon = "__adamo-nuclear__/graphics/icons/LEU-PUREX-hex.png", - icon_size = 32, - base_color = uranium_hex_base_color, - flow_color = uranium_hex_flow_color, - default_temperature = 25, - max_temperature = 100, - heat_capacity = "0.1KJ", -} -local HEU_PUREX_hex_fluid = { - type = "fluid", - name = "adamo-nuclear-HEU-PUREX-hex", - subgroup = "adamo-nuclear-hex-group", - order = "n3", - icon = "__adamo-nuclear__/graphics/icons/HEU-PUREX-hex.png", - icon_size = 32, - base_color = uranium_hex_base_color, - flow_color = uranium_hex_flow_color, - default_temperature = 25, - max_temperature = 100, - heat_capacity = "0.1KJ", -} -local weak_fissile_fluid = { - type = "fluid", - name = "adamo-nuclear-aqueous-raffinate", - subgroup = "adamo-nuclear-raffinate-group", - order = "o1", - icon = "__adamo-nuclear__/graphics/icons/aqueous-raffinate.png", - icon_size = 32, - base_color = aqueous_raffinate_base_color, - flow_color = aqueous_raffinate_flow_color, - default_temperature = 25, - max_temperature = 100, - heat_capacity = "0.01KJ", -} -local strong_fissile_fluid = { - type = "fluid", - name = "adamo-nuclear-raffinate", - subgroup = "adamo-nuclear-raffinate-group", - order = "o2", - icon = "__adamo-nuclear__/graphics/icons/raffinate.png", - icon_size = 32, - base_color = raffinate_base_color, - flow_color = raffinate_flow_color, - default_temperature = 25, - max_temperature = 100, - heat_capacity = "0.1KJ", -} +require("materials") data:extend({ - natural_hex_fluid, - Pu_hex_fluid, - LEU_PUREX_hex_fluid, - HEU_PUREX_hex_fluid, - weak_fissile_fluid, - strong_fissile_fluid -}) - -local urania_item = { - type = "item", - name = "adamo-nuclear-urania", - subgroup = "adamo-nuclear-processing-group", - order = "n", - stack_size = 50, - icon = "__adamo-nuclear__/graphics/icons/urania.png", - icon_size = 32, -} -local LEU_fuel_item = { - type = "item", - name = "adamo-nuclear-LEU-fuel-cell", - subgroup = "adamo-nuclear-products-group", - order = "m", - stack_size = 50, - icon = "__adamo-nuclear__/graphics/icons/LEU-fuel-cell.png", - icon_size = 32, - fuel_category = "adamo-nuclear-thermal-reaction", - fuel_value = "82GJ", - burnt_result = "adamo-nuclear-used-up-LEU-fuel-cell", -} -local MOX_fuel_item = { - type = "item", - name = "adamo-nuclear-MOX-fuel-cell", - subgroup = "adamo-nuclear-products-group", - order = "o", - stack_size = 50, - icon = "__adamo-nuclear__/graphics/icons/MOX-fuel-cell.png", - icon_size = 32, - fuel_category = "nuclear", - fuel_value = "162GJ", - burnt_result = "adamo-nuclear-used-up-MOX-fuel-cell", - fuel_glow_color = MOX_glow_color -} -local used_LEU_item = { - type = "item", - name = "adamo-nuclear-used-up-LEU-fuel-cell", - subgroup = "adamo-nuclear-spent-fuel-group", - order = "m1", - stack_size = 50, - icon = "__adamo-nuclear__/graphics/icons/used-up-LEU-fuel-cell.png", - icon_size = 32, -} -local used_MOX_item = { - type = "item", - name = "adamo-nuclear-used-up-MOX-fuel-cell", - subgroup = "adamo-nuclear-spent-fuel-group", - order = "m3", - stack_size = 50, - icon = "__adamo-nuclear__/graphics/icons/used-up-MOX-fuel-cell.png", - icon_size = 32, -} -local actinides_item = { - type = "item", - name = "adamo-nuclear-actinides", - subgroup = "adamo-nuclear-products-group", - order = "p1", - stack_size = 50, - icon = "__adamo-nuclear__/graphics/icons/actinides.png", - icon_size = 32, -} -local waste_item = { - type = "item", - name = "adamo-nuclear-ceramic-waste", - subgroup = "adamo-nuclear-products-group", - order = "p2", - stack_size = 50, - icon = "__adamo-nuclear__/graphics/icons/ceramic-waste.png", - icon_size = 64, -} -local thermal_reactor_item = { - type = "item", - name = "adamo-nuclear-thermal-reactor", - icon = "__adamo-nuclear__/graphics/icons/thermal-reactor.png", - icon_size = 32, - subgroup = "energy", - order = "b[steam-power]-b[adamo-nuclear-thermal-reactor]", - place_result = "adamo-nuclear-thermal-reactor", - stack_size = 50 -} -local prod_reactor_item = { - type = "item", - name = "adamo-nuclear-production-reactor", - icon = "__adamo-nuclear__/graphics/icons/production-reactor.png", - icon_size = 32, - subgroup = "adamo-nuclear-production-machine", - order = "n[production-reactor]", - place_result = "adamo-nuclear-production-reactor", - stack_size = 10 -} -data:extend({ - urania_item, + natural_hex_fluid, + LEU_slurry, + HEU_slurry, + urania_item, LEU_fuel_item, MOX_fuel_item, + WGPu_fuel_item, used_LEU_item, used_MOX_item, actinides_item, waste_item, - thermal_reactor_item, - prod_reactor_item, }) - -local urania_recipe_sulfuric = { - type = "recipe", - name = "adamo-nuclear-urania-by-H2SO4", - category = "chemistry", - enabled = false, - energy_required = 10, -- same as explosives - main_product = "adamo-nuclear-urania", - ingredients = {{ - type = "item", - name = "uranium-ore", - amount = 50 - },{ - type = "fluid", - name = "sulfuric-acid", - amount = 160 - },{ - type = "fluid", - name = "water", - amount = 40 - }}, - results = {{ - type = "item", - name = "adamo-nuclear-urania", - amount = 1 - }}, - show_amount_in_title = false, - always_show_products = false, - always_show_made_in = true, - crafting_machine_tint = { - primary = oxide_color_table.NU, - secondary = sulfuric_base_color, - tertiary = sulfuric_flow_color, - quaternary = data.raw.fluid.water.flow_color - }, -} -local urania_recipe_hydrofluoric = { - type = "recipe", - name = "adamo-nuclear-urania-by-HF", - category = "chemistry", - enabled = false, - energy_required = 10, - ingredients = {{ - type = "item", - name = "uranium-ore", - amount = 50 - },{ - type = "fluid", - name = "adamo-chemical-hydrofluoric-acid", - amount = 80 - },{ - type = "fluid", - name = "water", - amount = 120 - }}, - results = {{ - type = "item", - name = "adamo-nuclear-urania", - amount = 1 - }}, - show_amount_in_title = false, - always_show_products = false, - always_show_made_in = true, - crafting_machine_tint = { - primary = oxide_color_table.NU, - secondary = adamo.colors.hf_base, - tertiary = adamo.colors.hf_flow, - quaternary = data.raw.fluid.water.flow_color - }, -} -local urania_hex_recipe = { - type = "recipe", - name = "adamo-nuclear-natural-uranium-hex", - category = "chemistry", - enabled = false, - subgroup = "adamo-nuclear-processing-group", - main_product = "adamo-nuclear-natural-uranium-hex", - energy_required = 10, - ingredients = {{ - type = "item", - name = "adamo-nuclear-urania", - amount = 1 - },{ - type = "fluid", - name = "adamo-chemical-hydrofluoric-acid", - amount = 60 - },{ - type = "fluid", - name = "water", - amount = 30 - }}, - results = {{ - type = "fluid", - name = "adamo-nuclear-natural-uranium-hex", - amount = 10, - fluidbox_index = 1, - }}, - always_show_made_in = true, - crafting_machine_tint = { - primary = uranium_hex_base_color, - secondary = adamo.colors.hf_base, - tertiary = adamo.colors.hf_flow, - quaternary = oxide_color_table.NU - }, -} -local LEU_enrichment_recipe = { - type = "recipe", - category = "centrifuging", - name = "adamo-nuclear-LEU-enrichment", - energy_required = 10, - subgroup = "adamo-nuclear-enrichment-group", - order = "m1", - enabled = false, - ingredients = {{ - type = "fluid", - name = "adamo-nuclear-natural-uranium-hex", - amount = 10 - }}, - results = {{ - type = "fluid", - name = "adamo-nuclear-DU-hex", - amount = 10, - probability = 6.75/7.75 - },{ - type = "fluid", - name = "adamo-nuclear-LEU-hex", - amount = 10, - probability = 1/7.75 - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/LEU-enrichment.png", -} -local HEU_enrichment_recipe = { - type = "recipe", - category = "centrifuging", - name = "adamo-nuclear-HEU-enrichment", - energy_required = 10, - subgroup = "adamo-nuclear-enrichment-group", - order = "m2", - enabled = false, - ingredients = {{ - type = "fluid", - name = "adamo-nuclear-natural-uranium-hex", - amount = 10 - }}, - results = {{ - type = "fluid", - name = "adamo-nuclear-DU-hex", - amount = 10, - probability = 36.5/37.5 - },{ - type = "fluid", - name = "adamo-nuclear-HEU-hex", - amount = 10, - probability = 1/37.5 - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/HEU-enrichment.png", -} -local WGU_enrichment_recipe = { - type = "recipe", - category = "centrifuging", - name = "adamo-nuclear-WGU-enrichment", - energy_required = 10, - subgroup = "adamo-nuclear-enrichment-group", - order = "m3", - enabled = false, - ingredients = {{ - type = "fluid", - name = "adamo-nuclear-natural-uranium-hex", - amount = 10 - }}, - results = {{ - type = "fluid", - name = "adamo-nuclear-DU-hex", - amount = 10, - probability = 149/150 - },{ - type = "fluid", - name = "adamo-nuclear-WGU-hex", - amount = 10, - probability = 1/150 - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/WGU-enrichment.png", -} -local Pu_enrichment_recipe = { - type = "recipe", - category = "centrifuging", - name = "adamo-nuclear-WGPu-enrichment", - energy_required = 20, - subgroup = "adamo-nuclear-enrichment-group", - order = "n1", - enabled = false, - ingredients = {{ - type = "fluid", - name = "adamo-nuclear-Pu-hex", - amount = 20 - }}, - results = {{ - type = "fluid", - name = "adamo-nuclear-RGPu-hex", - amount = 10, - },{ - type = "fluid", - name = "adamo-nuclear-WGPu-hex", - amount = 10, - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/WGPu-enrichment.png", -} -local LEU_PUREX_enrichment_recipe = { - type = "recipe", - category = "centrifuging", - name = "adamo-nuclear-LEU-PUREX-enrichment", - energy_required = 10, - subgroup = "adamo-nuclear-enrichment-group", - order = "o1", - enabled = false, - ingredients = {{ - type = "fluid", - name = "adamo-nuclear-LEU-PUREX-hex", - amount = 10 - }}, - results = {{ - type = "fluid", - name = "adamo-nuclear-LEU-hex", - amount = 10, - probability = 135/150 - },{ - type = "fluid", - name = "adamo-nuclear-Pu-hex", - amount = 10, - probability = 1/150 - },{ - type = "fluid", - name = "adamo-nuclear-DU-hex", - amount = 10, - probability = 14/150 - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/LEU-PUREX-enrichment.png", -} -local HEU_PUREX_enrichment_recipe = { - type = "recipe", - category = "centrifuging", - name = "adamo-nuclear-HEU-PUREX-enrichment", - energy_required = 10, - subgroup = "adamo-nuclear-enrichment-group", - order = "o2", - enabled = false, - ingredients = {{ - type = "fluid", - name = "adamo-nuclear-HEU-PUREX-hex", - amount = 10 - }}, - results = {{ - type = "fluid", - name = "adamo-nuclear-HEU-hex", - amount = 10, - probability = 67/70 - },{ - type = "fluid", - name = "adamo-nuclear-Pu-hex", - amount = 10, - probability = 1/70 - },{ - type = "fluid", - name = "adamo-nuclear-DU-hex", - amount = 10, - probability = 2/70 - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/HEU-PUREX-enrichment.png", -} -local RGPu_recipe = { - type = "recipe", - category = "chemistry", - name = "adamo-nuclear-highgrade-RGPu-oxide", - main_product = "adamo-nuclear-RGPu-oxide", - enabled = false, - energy_required = 10, - always_show_made_in = true, - subgroup = "adamo-nuclear-processing-group", - order = "o1", - ingredients = {{ - type = "fluid", - name = "adamo-nuclear-Pu-hex", - amount = 10 - },{ - type = "fluid", - name = "water", - amount = 30 - }}, - results = {{ - type = "fluid", - name = "adamo-chemical-hydrofluoric-acid", - amount = 60, - },{ - type = "item", - name = "adamo-nuclear-RGPu-oxide", - amount = 1 - }}, - crafting_machine_tint = { - primary = oxide_color_table.RGPu, - secondary = adamo.colors.hf_base, - tertiary = plutonium_hex_flow_color, - quaternary = data.raw.fluid.water.flow_color - }, -} -local plutonia_238_recipe = { - type = "recipe", - category = "neutron-bombardment", - name = "adamo-nuclear-transmute-Pu238-oxide", - energy_required = 600, - enabled = false, - subgroup = "adamo-nuclear-products-group", - order = "p", - ingredients = {{ - amount = 1, - name = "adamo-nuclear-actinides", - type = "item", - },{ - amount = 1, - name = "adamo-nuclear-DU-oxide", - type = "item", - },{ - amount = 600, - name = "water", - type = "fluid", - }}, - result = "adamo-nuclear-Pu238-oxide", -} -local LEU_PUREX_stage_1 = { - type = "recipe", - category = "chemistry", - name = "adamo-nuclear-LEU-PUREX-stage-1", - subgroup = "adamo-nuclear-spent-fuel-group", - order = "m1", - energy_required = 10, - emissions_multiplier = 3, - enabled = false, - ingredients = { - {"adamo-nuclear-used-up-LEU-fuel-cell", 1}, - { - type = "fluid", - name = "petroleum-gas", - amount = 10 - }, - { - type = "fluid", - name = "water", - amount = 10 - }, - }, - results = { - {waste_item.name, 1}, - {actinides_item.name, 1}, - { - type = "fluid", - name = weak_fissile_fluid.name, - amount = 10 - } - }, - crafting_machine_tint = { - primary = weak_fissile_fluid.base_color, - secondary = aqueous_raffinate_base_color, - tertiary = sulfuric_flow_color, - quaternary = oxide_color_table.LEU - } -} -local LEU_PUREX_stage_2 = { - type = "recipe", - category = "chemistry", - name = "adamo-nuclear-LEU-PUREX-stage-2", - subgroup = "adamo-nuclear-spent-fuel-group", - order = "m2", - energy_required -} -local LEU_PUREX_recipe_sulfuric = { - type = "recipe", - category = "chemistry", - name = "adamo-nuclear-LEU-PUREX-by-H2SO4", - subgroup = "adamo-nuclear-spent-fuel-group", - order = "m1", - energy_required = 150, - emissions_multiplier = 3, - enabled = false, - ingredients = {{ - type = "fluid", - name = "sulfuric-acid", - amount = 150 - },{ - type = "fluid", - name = "petroleum-gas", - amount = 150 - },{ - type = "fluid", - name = "adamo-chemical-hydrofluoric-acid", - amount = 900 - },{ - type = "item", - name = "adamo-nuclear-used-up-LEU-fuel-cell", - amount = 15 - }}, - results = {{ - type = "fluid", - name = "adamo-nuclear-LEU-PUREX-hex", - amount = 150 - },{ - type = "fluid", - -- name = "adamo-nuclear-aqueous-raffinate", - name = "adamo-nuclear-raffinate", - amount = 209 - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/LEU-PUREX.png", - crafting_machine_tint = { - primary = uranium_hex_base_color, - secondary = aqueous_raffinate_base_color, - tertiary = sulfuric_flow_color, - quaternary = oxide_color_table.LEU - }, -} -local LEU_PUREX_recipe_hydrofluoric = { - type = "recipe", - category = "chemistry", - name = "adamo-nuclear-LEU-PUREX-by-HF", - subgroup = "adamo-nuclear-spent-fuel-group", - order = "m2", - energy_required = 150, - emissions_multiplier = 3, - enabled = false, - ingredients = {{ - type = "fluid", - name = "petroleum-gas", - amount = 150 - },{ - type = "fluid", - name = "adamo-chemical-hydrofluoric-acid", - amount = 1050 - },{ - type = "item", - name = "adamo-nuclear-used-up-LEU-fuel-cell", - amount = 15 - }}, - results = {{ - type = "fluid", - -- name = "adamo-nuclear-aqueous-raffinate", - name = "adamo-nuclear-raffinate", - amount = 209 - },{ - type = "fluid", - name = "adamo-nuclear-LEU-PUREX-hex", - amount = 150 - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/LEU-PUREX.png", - crafting_machine_tint = { - primary = uranium_hex_base_color, - secondary = aqueous_raffinate_base_color, - tertiary = adamo.colors.hf_flow, - quaternary = oxide_color_table.LEU - }, -} -local HEU_PUREX_recipe_sulfuric = { - type = "recipe", - category = "chemistry", - name = "adamo-nuclear-HEU-PUREX-by-H2SO4", - subgroup = "adamo-nuclear-spent-fuel-group", - order = "m3", - energy_required = 70, - emissions_multiplier = 3, - enabled = false, - ingredients = {{ - type = "fluid", - name = "sulfuric-acid", - amount = 70 - },{ - type = "fluid", - name = "petroleum-gas", - amount = 70 - },{ - type = "fluid", - name = "adamo-chemical-hydrofluoric-acid", - amount = 420 - },{ - type = "item", - name = "used-up-uranium-fuel-cell", - amount = 7 - }}, - results = {{ - type = "fluid", - -- name = "adamo-nuclear-aqueous-raffinate", - name = "adamo-nuclear-raffinate", - amount = 231 - },{ - type = "fluid", - name = "adamo-nuclear-HEU-PUREX-hex", - amount = 70 - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/HEU-PUREX.png", - crafting_machine_tint = { - primary = uranium_hex_base_color, - secondary = aqueous_raffinate_base_color, - tertiary = sulfuric_flow_color, - quaternary = oxide_color_table.HEU - }, -} -local HEU_PUREX_recipe_hydrofluoric = { - type = "recipe", - category = "chemistry", - name = "adamo-nuclear-HEU-PUREX-by-HF", - subgroup = "adamo-nuclear-spent-fuel-group", - order = "m4", - energy_required = 70, - emissions_multiplier = 3, - enabled = false, - ingredients = {{ - type = "fluid", - name = "petroleum-gas", - amount = 70 - },{ - type = "fluid", - name = "adamo-chemical-hydrofluoric-acid", - amount = 490 - },{ - type = "item", - name = "used-up-uranium-fuel-cell", - amount = 7 - }}, - results = {{ - type = "fluid", - -- name = "adamo-nuclear-aqueous-raffinate", - name = "adamo-nuclear-raffinate", - amount = 231 - },{ - type = "fluid", - name = "adamo-nuclear-HEU-PUREX-hex", - amount = 70 - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/HEU-PUREX.png", - crafting_machine_tint = { - primary = uranium_hex_base_color, - secondary = aqueous_raffinate_base_color, - tertiary = adamo.colors.hf_flow, - quaternary = oxide_color_table.HEU - }, -} -local LEU_REMIX_recipe = { - type = "recipe", - category = "crafting-with-fluid", - name = "adamo-nuclear-LEU-REMIX", - subgroup = "adamo-nuclear-spent-fuel-group", - order = "n1", - energy_required = 270, - emissions_multiplier = 5, - enabled = false, - ingredients = {{ - type = "item", - name = "adamo-nuclear-HEU-oxide", - amount = 1 - },{ - type = "item", - name = "adamo-nuclear-used-up-LEU-fuel-cell", - amount = 27 - },{ - type = "fluid", - name = "petroleum-gas", - amount = 270 - },{ - type = "item", - name = "iron-plate", - amount = 27 - }}, - results = {{ - type = "fluid", - name = "adamo-nuclear-raffinate", - -- amount = 10 - amount = 100 - },{ - type = "item", - name = "adamo-nuclear-LEU-fuel-cell", - amount = 27 - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/LEU-REMIX.png", - crafting_machine_tint = { - primary = raffinate_base_color, - secondary = adamo.colors.highgrey, - tertiary = pg_flow_color, - quaternary = oxide_color_table.LEU - }, -} -local MOX_REMIX_recipe = { - type = "recipe", - category = "crafting-with-fluid", - name = "adamo-nuclear-MOX-REMIX", - subgroup = "adamo-nuclear-spent-fuel-group", - order = "n2", - energy_required = 340, - emissions_multiplier = 5, - enabled = false, - ingredients = {{ - type = "item", - name = "adamo-nuclear-RGPu-oxide", - amount = 1 - },{ - type = "item", - name = "adamo-nuclear-used-up-MOX-fuel-cell", - amount = 34 - },{ - type = "fluid", - name = "petroleum-gas", - amount = 340 - },{ - type = "item", - name = "iron-plate", - amount = 33 - }}, - results = {{ - type = "item", - name = "adamo-nuclear-MOX-fuel-cell", - amount = 33 - },{ - type = "fluid", - name = "adamo-nuclear-raffinate", - -- amount = 20 - amount = 200 - }}, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/MOX-REMIX.png", - crafting_machine_tint = { - primary = raffinate_base_color, - secondary = adamo.colors.highgrey, - tertiary = pg_flow_color, - quaternary = oxide_color_table.RGPu - }, -} -local LEU_fuel_recipe = { - type = "recipe", - name = "adamo-nuclear-LEU-fuel-cell", - energy_required = 10, - category = "advanced-crafting", - enabled = false, - ingredients = {{ - "adamo-nuclear-LEU-oxide",1 - },{ - "iron-plate",1 - }}, - result = "adamo-nuclear-LEU-fuel-cell" -} -local MOX_fuel_recipe = { - type = "recipe", - name = "adamo-nuclear-MOX-fuel-cell", - subgroup = "adamo-nuclear-products-group", - order = "p", - energy_required = 100, - category = "advanced-crafting", - enabled = false, - ingredients = { - {type = "item", name = "adamo-nuclear-DU-oxide", amount = 93}, - {type = "item", name = "adamo-nuclear-RGPu-oxide", amount = 7}, - {type = "item", name = "iron-plate", amount = 100}, - }, - results = {{"adamo-nuclear-MOX-fuel-cell",100}}, -} --- local aqueous_raffinate_processing_recipe = { --- type = "recipe", --- category = "chemistry", --- name = "adamo-nuclear-aqueous-raffinate-processing", --- subgroup = "adamo-nuclear-processing-group", --- order = "p1", --- energy_required = 30, --- category = "chemistry", --- enabled = false, --- ingredients = {{ --- type = "fluid", --- name = "adamo-nuclear-aqueous-raffinate", --- amount = 300 --- }}, --- results = {{ --- type = "fluid", --- name = "adamo-nuclear-raffinate", --- amount = 1, --- }}, --- crafting_machine_tint = { --- primary = raffinate_base_color, --- secondary = aqueous_raffinate_base_color, --- tertiary = aqueous_raffinate_flow_color, --- quaternary = raffinate_flow_color --- }, --- } -local raffinate_processing_recipe = { - type = "recipe", - name = "adamo-nuclear-raffinate-processing", - subgroup = "adamo-nuclear-processing-group", - order = "p2", - energy_required = 10, - category = "chemistry", - enabled = false, - icon_size = 64, - icon = "__adamo-nuclear__/graphics/icons/raffinate-processing.png", - ingredients = {{ - type = "fluid", - name = "adamo-nuclear-raffinate", - amount = 300, - },{ - type = "fluid", - name = "water", - amount = 300, - },{ - type = "item", - name = "stone", - amount = 30, - }}, - results = {{ - type = "item", - name = "adamo-nuclear-actinides", - amount = 1 - },{ - type = "item", - name = "adamo-nuclear-ceramic-waste", - amount = 2 - }}, - crafting_machine_tint = { - primary = raffinate_base_color, - secondary = {r = 227, g = 124, b = 14}, - tertiary = raffinate_flow_color, - quaternary = adamo.colors.highbrown - }, -} -local plutonium_rocket_recipe = { - type = "recipe", - name = "adamo-nuclear-thermonuclear-rocket", - energy_required = 50, - order = "d[rocket-launcher]-n[adamo-nuclear-thermonuclear-rocket]", - enabled = false, - main_product = "adamo-nuclear-thermonuclear-rocket", - category = "crafting-with-fluid", - ingredients = {{ - type = "item", - name = "rocket", - amount = 1 - },{ - type = "item", - name = "explosives", - amount = 1 - },{ - type = "item", - name = "rocket-control-unit", - amount = 1 - },{ - type = "item", - name = "adamo-nuclear-WGPu-oxide", - amount = 1 - },{ - type = "item", - name = "adamo-nuclear-DU-oxide", - amount = 1 - },{ - type = "fluid", - name = "water", - amount = 100 - }}, - result = "adamo-nuclear-thermonuclear-rocket", -} -local thermal_reactor_recipe = { - type = "recipe", - name = "adamo-nuclear-thermal-reactor", - energy_required = 2, - enabled = false, - ingredients = { - {"concrete", 40}, - {"steel-plate", 20}, - {"adamo-nuclear-DU-oxide",20}, - {"advanced-circuit", 50}, - {"pipe", 10} - }, - result = "adamo-nuclear-thermal-reactor", -} -local prod_reactor_recipe = { - type = "recipe", - name = "adamo-nuclear-production-reactor", - energy_required = 4, - enabled = false, - ingredients = { - {"centrifuge", 1}, - {"adamo-nuclear-DU-oxide", 100}, - {"refined-concrete", 100}, - {"filter-inserter",5}, - {"steel-chest",5} - -- processing unit? - }, - result = "adamo-nuclear-production-reactor", -} +require("processing") data:extend({ urania_recipe_sulfuric, - urania_recipe_hydrofluoric, urania_hex_recipe, + LEU_PUREX_stage_1, + LEU_PUREX_stage_2, + HEU_PUREX_stage_1, + HEU_PUREX_stage_2, LEU_enrichment_recipe, HEU_enrichment_recipe, WGU_enrichment_recipe, - Pu_enrichment_recipe, + WGPu_from_LEU, + WGPu_from_DU, LEU_PUREX_enrichment_recipe, HEU_PUREX_enrichment_recipe, plutonia_238_recipe, - RGPu_recipe, - LEU_PUREX_recipe_sulfuric, - LEU_PUREX_recipe_hydrofluoric, - HEU_PUREX_recipe_sulfuric, - HEU_PUREX_recipe_hydrofluoric, LEU_REMIX_recipe, MOX_REMIX_recipe, LEU_fuel_recipe, MOX_fuel_recipe, - -- aqueous_raffinate_processing_recipe, - raffinate_processing_recipe, - plutonium_rocket_recipe, +}) +require("machines") +data:extend({ + thermal_reactor_item, + prod_reactor_item, thermal_reactor_recipe, prod_reactor_recipe, -}) -add_recipes_to_tech("uranium-processing", { - "adamo-nuclear-urania-by-H2SO4", - "adamo-nuclear-urania-by-HF", - "adamo-nuclear-natural-uranium-hex", - "adamo-nuclear-LEU-enrichment", - "adamo-nuclear-LEU-fuel-cell", - "adamo-nuclear-thermal-reactor" -}) -add_recipes_to_tech("nuclear-power", { - "adamo-nuclear-HEU-enrichment", - "adamo-nuclear-WGU-enrichment" -}) -move_recipe_to_tech("nuclear-power","atomic-bomb") -add_recipes_to_tech("nuclear-fuel-reprocessing", { - "adamo-nuclear-production-reactor", - "adamo-nuclear-LEU-PUREX-by-HF", - "adamo-nuclear-LEU-PUREX-by-H2SO4", - "adamo-nuclear-LEU-REMIX", - "adamo-nuclear-HEU-PUREX-by-HF", - "adamo-nuclear-HEU-PUREX-by-H2SO4", - "adamo-nuclear-LEU-PUREX-enrichment", - "adamo-nuclear-HEU-PUREX-enrichment", - "adamo-nuclear-transmute-Pu238-oxide", - "adamo-nuclear-highgrade-RGPu-oxide", - -- "adamo-nuclear-aqueous-raffinate-processing", - "adamo-nuclear-raffinate-processing" -}) -add_recipes_to_tech("kovarex-enrichment-process", { - "adamo-nuclear-MOX-fuel-cell", - "adamo-nuclear-MOX-REMIX" -}) -add_recipes_to_tech("atomic-bomb", { - "adamo-nuclear-WGPu-enrichment", - "adamo-nuclear-thermonuclear-rocket" -}) -adamo.recipes.set.productivity({ - "adamo-nuclear-urania-by-H2SO4", - "adamo-nuclear-urania-by-HF", - "adamo-nuclear-raffinate-processing", - "adamo-nuclear-transmute-Pu238-oxide", - "adamo-nuclear-natural-uranium-hex", - "adamo-nuclear-highgrade-RGPu-oxide" -}) - --- Oxides and hexes. -local order_number = 1 -data:extend({{ - type = "item", - name = "adamo-nuclear-Pu238-oxide", - subgroup = "adamo-nuclear-products-group", - order = "p", - stack_size = 50, - icon = "__adamo-nuclear__/graphics/icons/Pu238.png", - icon_size = 32, -}}) -for _,grade in pairs({ - "DU","LEU","HEU","WGU","RGPu","WGPu" -}) do - local oxide_color = oxide_color_table[grade] - local hex_color = uranium_hex_base_color - local hex_flow_color = uranium_hex_flow_color - if grade:match "Pu" then - hex_color = plutonium_hex_base_color - hex_flow_color = plutonium_hex_flow_color - end - local hex_recipe = { - type = "recipe", - name = "adamo-nuclear-"..grade.."-hex", - category = "chemistry", - enabled = false, - energy_required = 30, - always_show_made_in = true, - main_product = "adamo-nuclear-"..grade.."-hex", - ingredients = {{ - type = "item", - name = "adamo-nuclear-"..grade.."-oxide", - amount = 1 - },{ - type = "fluid", - name = "adamo-chemical-hydrofluoric-acid", - amount = 60 - },{ - type = "fluid", - name = "water", - amount = 30 - }}, - results = {{ - type = "fluid", - name = "adamo-nuclear-"..grade.."-hex", - amount = 10 - }}, - hide_from_player_crafting = true, - crafting_machine_tint = { - primary = hex_color, - secondary = adamo.colors.hf_base, - tertiary = adamo.colors.hf_flow, - quaternary = oxide_color - }, - } - local oxide_recipe = { - type = "recipe", - category = "chemistry", - name = "adamo-nuclear-"..grade.."-oxide", - main_product = "adamo-nuclear-"..grade.."-oxide", - enabled = false, - energy_required = 10, - always_show_made_in = true, - ingredients = {{ - type = "fluid", - name = "adamo-nuclear-"..grade.."-hex", - amount = 10 - },{ - type = "fluid", - name = "water", - amount = 30 - }}, - results = {{ - type = "fluid", - name = "adamo-chemical-hydrofluoric-acid", - amount = 60, - },{ - type = "item", - name = "adamo-nuclear-"..grade.."-oxide", - amount = 1 - }}, - crafting_machine_tint = { - primary = adamo.colors.hf_base, - secondary = oxide_color, - tertiary = hex_flow_color, - quaternary = data.raw.fluid.water.flow_color - }, - } - local item = { - type = "item", - name = "adamo-nuclear-"..grade.."-oxide", - subgroup = "adamo-nuclear-oxide-group", - order = "nz"..order_number, - stack_size = 50, - icon = "__adamo-nuclear__/graphics/icons/"..grade..".png", - icon_size = 32, - } - local fluid = { - type = "fluid", - name = "adamo-nuclear-"..grade.."-hex", - group = "fluid", - subgroup = "adamo-nuclear-hex-group", - order = "nz"..order_number, - icon = "__adamo-nuclear__/graphics/icons/"..grade.."-hex.png", - icon_size = 32, - base_color = hex_color, - flow_color = hex_flow_color, - default_temperature = 25, - max_temperature = 100, - heat_capacity = "0.1KJ", - - } - data:extend({hex_recipe,oxide_recipe,item,fluid}) - if grade:match "Pu" then - add_recipe_to_tech("atomic-bomb", - "adamo-nuclear-"..grade.."-oxide" - ) - add_recipe_to_tech("atomic-bomb", - "adamo-nuclear-"..grade.."-hex" - ) - elseif grade:match "LEU" or grade:match "DU" then - add_recipe_to_tech("uranium-processing", - "adamo-nuclear-"..grade.."-oxide" - ) - add_recipe_to_tech("uranium-processing", - "adamo-nuclear-"..grade.."-hex" - ) - else - add_recipe_to_tech("nuclear-power", - "adamo-nuclear-"..grade.."-oxide" - ) - add_recipe_to_tech("nuclear-power", - "adamo-nuclear-"..grade.."-hex" - ) - end - order_number = order_number + 1 -end - -local grade = "DU" -data.raw.recipe["adamo-nuclear-"..grade.."-oxide"].ingredients = {{ - type = "fluid", - name = "water", - amount = 30 - },{ - type = "fluid", - name = "adamo-nuclear-"..grade.."-hex", - amount = 10 -}} - -local grade = "RGPu" -data.raw.recipe["adamo-nuclear-"..grade.."-oxide"].ingredients = {{ - type = "fluid", - name = "water", - amount = 30 - },{ - type = "fluid", - name = "adamo-nuclear-"..grade.."-hex", - amount = 10 -}} - -local thermal_reactor_entity = { - type = "boiler", - name = "adamo-nuclear-thermal-reactor", - icon = "__adamo-nuclear__/graphics/icons/thermal-reactor.png", - icon_size = 32, - flags = {"placeable-neutral", "player-creation"}, - minable = { - mining_time = 0.2, - result = "adamo-nuclear-thermal-reactor" - }, - fast_replaceable_group = "boiler", - max_health = 200, - corpse = "boiler-remnants", - vehicle_impact_sound = { - filename = "__base__/sound/car-metal-impact.ogg", - volume = 0.65 - }, - mode = "output-to-separate-pipe", - resistances = {{ - type = "fire", - percent = 90 - },{ - type = "explosion", - percent = 30 - },{ - type = "impact", - percent = 30 - }}, - collision_box = {{-1.29, -0.79}, {1.29, 0.79}}, - selection_box = {{-1.5, -1}, {1.5, 1}}, - target_temperature = 165, - fluid_box = { - base_area = 2, - height = 2, - base_level = -1, - pipe_covers = pipecoverspictures(), - pipe_connections = {{ - type = "input-output", - position = {-2, 0.5} - },{ - type = "input-output", - position = {2, 0.5}} - }, - production_type = "input-output", - filter = "water" - }, - output_fluid_box = { - base_area = 2, - height = 2, - base_level = 1, - pipe_covers = pipecoverspictures(), - pipe_connections = {{ - type = "output", - position = {0, -1.5} - }}, - production_type = "output", - filter = "steam" - }, - energy_consumption = "3600kW", - energy_source = { - type = "burner", - fuel_category = "adamo-nuclear-thermal-reaction", - effectivity = 1, - fuel_inventory_size = 1, - burnt_inventory_size =1, - emissions_per_minute = 0, - smoke = nil, - light_flicker = { - color = {r = 0,g = 0,b = 1,a = 0.3}, - minimum_intensity = 0.3, - maximum_intensity = 0.3, - minimum_light_size = 0.1, - light_intensity_to_size_coefficient = 1 - } - }, - working_sound = data.raw.boiler["boiler"].working_sound, - structure = data.raw.boiler["boiler"].structure, - patch = data.raw.boiler["boiler"].patch, - fire_flicker_enabled = false, - fire_glow_flicker_enabled = false, - fire = { - north = { - filename = "__adamo-nuclear__/graphics/entity/" - .."thermal-reactor-N-fire.png", - priority = "extra-high", - frame_count = 1, - width = 12, - height = 13, - shift = util.by_pixel(0, -8.5), - hr_version = { - filename = "__adamo-nuclear__/graphics/entity/" - .."hr-thermal-reactor-N-fire.png", - priority = "extra-high", - frame_count = 1, - width = 26, - height = 26, - shift = util.by_pixel(0, -8.5), - scale = 0.5 - } - }, - east = { - filename = "__adamo-nuclear__/graphics/entity/" - .."thermal-reactor-E-fire.png", - priority = "extra-high", - frame_count = 1, - width = 14, - height = 14, - shift = util.by_pixel(-10, -22), - hr_version = { - filename = "__adamo-nuclear__/graphics/entity/" - .."hr-thermal-reactor-E-fire.png", - priority = "extra-high", - frame_count = 1, - width = 28, - height = 28, - shift = util.by_pixel(-9.5, -22), - scale = 0.5 - } - }, - south = { - filename = "__adamo-nuclear__/graphics/entity/" - .."thermal-reactor-S-fire.png", - priority = "extra-high", - frame_count = 1, - width = 12, - height = 9, - shift = util.by_pixel(-1, -26.5), - hr_version = { - filename = "__adamo-nuclear__/graphics/entity/" - .."hr-thermal-reactor-S-fire.png", - priority = "extra-high", - frame_count = 1, - width = 26, - height = 16, - shift = util.by_pixel(-1, -26.5), - scale = 0.5 - } - }, - west = { - filename = "__adamo-nuclear__/graphics/entity/" - .."thermal-reactor-W-fire.png", - priority = "extra-high", - frame_count = 1, - width = 14, - height = 14, - shift = util.by_pixel(13, -23), - hr_version = { - filename = "__adamo-nuclear__/graphics/entity/" - .."hr-thermal-reactor-W-fire.png", - priority = "extra-high", - frame_count = 1, - width = 30, - height = 29, - shift = util.by_pixel(13, -23.25), - scale = 0.5 - } - } - }, - fire_glow = { - north = { - filename = "__adamo-nuclear__/graphics/entity/" - .."thermal-reactor-N-light.png", - priority = "extra-high", - frame_count = 1, - width = 100, - height = 87, - shift = util.by_pixel(-1, -6.5), - blend_mode = "additive-soft", - hr_version = { - filename = "__adamo-nuclear__/graphics/entity/" - .."hr-thermal-reactor-N-light.png", - priority = "extra-high", - frame_count = 1, - width = 200, - height = 173, - shift = util.by_pixel(-1, -6.75), - blend_mode = "additive-soft", - scale = 0.5 - } - }, - east = { - filename = "__adamo-nuclear__/graphics/entity/" - .."thermal-reactor-E-light.png", - priority = "extra-high", - frame_count = 1, - width = 70, - height = 122, - shift = util.by_pixel(0, -13), - blend_mode = "additive-soft", - hr_version = { - filename = "__adamo-nuclear__/graphics/entity/" - .."hr-thermal-reactor-E-light.png", - priority = "extra-high", - frame_count = 1, - width = 139, - height = 244, - shift = util.by_pixel(0.25, -13), - blend_mode = "additive-soft", - scale = 0.5 - } - }, - south = { - filename = "__adamo-nuclear__/graphics/entity/" - .."thermal-reactor-S-light.png", - priority = "extra-high", - frame_count = 1, - width = 100, - height = 81, - shift = util.by_pixel(1, 5.5), - blend_mode = "additive-soft", - hr_version = { - filename = "__adamo-nuclear__/graphics/entity/" - .."hr-thermal-reactor-S-light.png", - priority = "extra-high", - frame_count = 1, - width = 200, - height = 162, - shift = util.by_pixel(1, 5.5), - blend_mode = "additive-soft", - scale = 0.5 - } - }, - west = { - filename = "__adamo-nuclear__/graphics/entity/" - .."thermal-reactor-W-light.png", - priority = "extra-high", - frame_count = 1, - width = 68, - height = 109, - shift = util.by_pixel(2, -6.5), - blend_mode = "additive-soft", - hr_version = { - filename = "__adamo-nuclear__/graphics/entity/" - .."hr-thermal-reactor-W-light.png", - priority = "extra-high", - frame_count = 1, - width = 136, - height = 217, - shift = util.by_pixel(2, -6.25), - blend_mode = "additive-soft", - scale = 0.5 - } - } - }, - burning_cooldown = 20 -} -local prod_anim_speed = 0.5 -local prod_reactor_corpse = adamo.centrifuge.remnants(5/3) -prod_reactor_corpse.name = "adamo-nuyclear-production-reactor-remnants" -local prod_reactor_explosion = adamo.centrifuge.explosion(5/3) -prod_reactor_explosion.name = "adamo-nuclear-production-reactor-explosion" -local prod_reactor_entity = { - type = "assembling-machine", - name = "adamo-nuclear-production-reactor", - icon = - "__adamo-nuclear__/graphics/icons/" - .."production-reactor.png", - icon_size = 32, - flags = { - "placeable-neutral", - "placeable-player", - "player-creation" - }, - minable = { - mining_time = 1, - result = "adamo-nuclear-production-reactor" - }, - max_health = 350, - crafting_speed = 1, - crafting_categories = {"neutron-bombardment"}, - energy_source = { - type = "electric", - usage_priority = "secondary-input" - }, - energy_usage = "750kW", - module_specification = { - module_slots = 4 - }, - allowed_effects = { - "consumption", - "speed", - "productivity", - "pollution" - }, - corpse = "adamo-nuyclear-production-reactor-remnants", - dying_explosion = "adamo-nuclear-production-reactor-explosion", - resistances = {{ - type = "fire", - percent = 70 - }}, - collision_box = adamo.centrifuge.collision_box(5/3), - selection_box = adamo.centrifuge.selection_box(5/3), - drawing_box = adamo.centrifuge.drawing_box(5/3), - always_draw_idle_animation = true, - idle_animation = {layers = adamo.centrifuge.idle_layers(3/2,prod_anim_speed)}, - animation = { - layers = {{ - filename = "__adamo-nuclear__/graphics/entity/production-reactor-C-light.png", - priority = "high", - blend_mode = "additive", -- centrifuge - line_length = 8, - width = 96, - height = 104, - frame_count = 64, - animation_speed = prod_anim_speed, - draw_as_glow = true, - shift = util.by_pixel(0*3/2, -27*3/2), - scale = 3/2, - hr_version = { - filename = - "__adamo-nuclear__/graphics/entity/" - .."hr-production-reactor-C-light.png", - priority = "high", - scale = 0.5*3/2, - blend_mode = "additive", -- centrifuge - line_length = 8, - width = 190, - height = 207, - frame_count = 64, - animation_speed = prod_anim_speed, - draw_as_glow = true, - shift = util.by_pixel(0*3/2, -27.25*3/2) - } - },{ - filename = - "__adamo-nuclear__/graphics/entity/" - .."production-reactor-B-light.png", - priority = "high", - blend_mode = "additive", -- centrifuge - line_length = 8, - width = 65, - height = 103, - frame_count = 64, - animation_speed = prod_anim_speed, - draw_as_glow = true, - shift = util.by_pixel(16.5*3/2, 0.5*3/2), - scale = 3/2, - hr_version = { - filename = - "__adamo-nuclear__/graphics/entity/" - .."hr-production-reactor-B-light.png", - priority = "high", - scale = 0.5*3/2, - blend_mode = "additive", -- centrifuge - line_length = 8, - width = 131, - height = 206, - frame_count = 64, - animation_speed = prod_anim_speed, - draw_as_glow = true, - shift = util.by_pixel(16.75*3/2, 0.5*3/2) - } - },{ - filename = - "__adamo-nuclear__/graphics/entity/" - .."production-reactor-A-light.png", - priority = "high", - blend_mode = "additive", -- centrifuge - line_length = 8, - width = 55, - height = 98, - frame_count = 64, - animation_speed = prod_anim_speed, - draw_as_glow = true, - shift = util.by_pixel(-23.5*3/2, -2*3/2), - scale = 3/2, - hr_version = { - filename = - "__adamo-nuclear__/graphics/entity/" - .."hr-production-reactor-A-light.png", - priority = "high", - scale = 0.5*3/2, - blend_mode = "additive", -- centrifuge - line_length = 8, - width = 108, - height = 197, - frame_count = 64, - animation_speed = prod_anim_speed, - draw_as_glow = true, - shift = util.by_pixel(-23.5*3/2, -1.75*3/2) - } - }} - }, - working_visualisations = {{ - effect = "uranium-glow", - fadeout = true, - light = { - intensity = 0.55, - size = 9.9*3/2, - shift = {0.0, 0.0}, - color = { - r = 0.0, - g = 0.15, - b = 1.0 - } - } - }}, - open_sound = { - filename = "__base__/sound/machine-open.ogg", - volume = 0.85 - }, - close_sound = { - filename = "__base__/sound/machine-close.ogg", - volume = 0.75 - }, - vehicle_impact_sound = { - filename = "__base__/sound/car-metal-impact.ogg", - volume = 0.65 - }, - working_sound = { - sound = {{ - filename = "__base__/sound/assembling-machine-t2-1.ogg", - volume = 0.8 - },{ - filename = "__base__/sound/assembling-machine-t2-2.ogg", - volume = 0.8 - }}, - idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 }, - apparent_volume = 1.5 - }, - fluid_boxes = adamo.centrifuge.fluid_boxes(5/3) -} - -data:extend({ thermal_reactor_entity, prod_reactor_entity, prod_reactor_corpse, prod_reactor_explosion, }) - -local plutonium_explosion_wave = { - type = "projectile", - name = "adamo-nuclear-atomic-explosion-wave", - flags = {"not-on-map"}, - acceleration = 0, - action = - { - { - type = "direct", - action_delivery = - { - type = "instant", - target_effects = - { - { - type = "create-entity", - entity_name = "explosion" - } - } - } - }, - { - type = "area", - radius = 3, - action_delivery = - { - type = "instant", - target_effects = - { - type = "damage", - damage = {amount = 1000, type = "explosion"} - } - } - } - }, - animation = - { - filename = "__core__/graphics/empty.png", - frame_count = 1, - width = 1, - height = 1, - priority = "high" - }, - shadow = - { - filename = "__core__/graphics/empty.png", - frame_count = 1, - width = 1, - height = 1, - priority = "high" - } -} -local plutonium_rocket_projectile = { - type = "projectile", - name = "adamo-nuclear-thermonuclear-rocket-projectile", - flags = {"not-on-map"}, - acceleration = 0.005, - action = - { - type = "direct", - action_delivery = - { - type = "instant", - target_effects = - { - { - repeat_count = 150, - type = "create-trivial-smoke", - smoke_name = "nuclear-smoke", - offset_deviation = {{-1, -1}, {1, 1}}, - starting_frame = 3, - starting_frame_deviation = 5, - starting_frame_speed = 0, - starting_frame_speed_deviation = 5, - speed_from_center = 0.5 - }, - { - type = "create-entity", - entity_name = "explosion" - }, - { - type = "damage", - damage = {amount = 1000, type = "explosion"} - }, - { - type = "create-entity", - entity_name = "small-scorchmark", - check_buildability = true - }, - { - type = "nested-result", - action = - { - type = "area", - target_entities = false, - trigger_from_target = true, - repeat_count = 2000, - radius = 35, - action_delivery = - { - type = "projectile", - projectile = "adamo-nuclear-atomic-explosion-wave", - starting_speed = 0.5 - } - } - } - } - } - }, - light = {intensity = 0.8, size = 15}, - animation = - { - filename = - "__base__/graphics/entity/" - .."rocket/rocket.png", - frame_count = 8, - line_length = 8, - width = 9, - height = 35, - shift = {0, 0}, - priority = "high" - }, - shadow = - { - filename = - "__base__/graphics/entity/" - .."rocket/rocket-shadow.png", - frame_count = 1, - width = 7, - height = 24, - priority = "high", - shift = {0, 0} - }, - smoke = - { - { - name = "smoke-fast", - deviation = {0.15, 0.15}, - frequency = 1, - position = {0, 1}, - slow_down_factor = 1, - starting_frame = 3, - starting_frame_deviation = 5, - starting_frame_speed = 0, - starting_frame_speed_deviation = 5 - } - } -} -local plutonium_rocket_ammo = { - type = "ammo", - name = "adamo-nuclear-thermonuclear-rocket", - subgroup = "ammo", - order = "d[rocket-launcher]-r[adamo-nuclear-thermonuclear-rocket]", - stack_size = 10, - icon = "__base__/graphics/icons/atomic-bomb.png", - icon_size = 64, - icon_mipmaps = 4, - ammo_type = - { - range_modifier = 3, - cooldown_modifier = 3, - target_type = "position", - category = "rocket", - action = - { - type = "direct", - action_delivery = - { - type = "projectile", - projectile = "adamo-nuclear-thermonuclear-rocket-projectile", - starting_speed = 0.05, - source_effects = - { - type = "create-entity", - entity_name = "explosion-hit" - } - } - } - } -} +require("combat") data:extend({ - plutonium_explosion_wave, - plutonium_rocket_projectile, - plutonium_rocket_ammo + plutonium_rocket_recipe, + -- plutonium_explosion_wave, + -- plutonium_rocket_projectile, + -- plutonium_rocket_ammo +}) + +adamo.tech.add.recipes("uranium-processing", { + urania_recipe_sulfuric.name, + urania_hex_recipe.name, + LEU_enrichment_recipe.name, + LEU_fuel_item.name, + thermal_reactor_item.name +}) +adamo.tech.add.recipes("nuclear-power", { + HEU_enrichment_recipe.name, + WGU_enrichment_recipe.name +}) +adamo.recipe.set.tech("nuclear-power","atomic-bomb") +adamo.tech.add.recipes("nuclear-fuel-reprocessing", { + prod_reactor_recipe.name, + LEU_REMIX_recipe.name, + HEU_PUREX_stage_1.name, + HEU_PUREX_stage_2.name, + LEU_PUREX_stage_1.name, + LEU_PUREX_stage_2.name, + LEU_PUREX_enrichment_recipe.name, + HEU_PUREX_enrichment_recipe.name, + plutonia_238_recipe.name, +}) +adamo.tech.add.recipes("kovarex-enrichment-process", { + MOX_fuel_recipe.name, + MOX_REMIX_recipe.name +}) +adamo.tech.add.recipes("atomic-bomb", { + WGPu_from_LEU.name, + WGPu_from_DU.name, + plutonium_rocket_recipe.name +}) +adamo.recipes.set.productivity({ + urania_recipe_sulfuric.name, + plutonia_238_recipe.name, + -- urania_hex_recipe.name }) diff --git a/graphics/icons/HEU-PUREX.png b/graphics/icons/HEU-PUREX.png index afe9f1c..52265b2 100644 Binary files a/graphics/icons/HEU-PUREX.png and b/graphics/icons/HEU-PUREX.png differ diff --git a/graphics/icons/HEU-sludge.png b/graphics/icons/HEU-sludge.png new file mode 100644 index 0000000..8153541 Binary files /dev/null and b/graphics/icons/HEU-sludge.png differ diff --git a/graphics/icons/HEU-spent.png b/graphics/icons/HEU-spent.png new file mode 100644 index 0000000..66da991 Binary files /dev/null and b/graphics/icons/HEU-spent.png differ diff --git a/graphics/icons/LEU-PUREX.png b/graphics/icons/LEU-PUREX.png index 7b02c59..89fea8c 100644 Binary files a/graphics/icons/LEU-PUREX.png and b/graphics/icons/LEU-PUREX.png differ diff --git a/graphics/icons/LEU-sludge.png b/graphics/icons/LEU-sludge.png new file mode 100644 index 0000000..7a5fba8 Binary files /dev/null and b/graphics/icons/LEU-sludge.png differ diff --git a/graphics/icons/RGHEU-hex.png b/graphics/icons/RGHEU-hex.png new file mode 100644 index 0000000..66b8d19 Binary files /dev/null and b/graphics/icons/RGHEU-hex.png differ diff --git a/graphics/icons/RGHEU.png b/graphics/icons/RGHEU.png new file mode 100644 index 0000000..891bed4 Binary files /dev/null and b/graphics/icons/RGHEU.png differ diff --git a/graphics/icons/RGLEU-hex.png b/graphics/icons/RGLEU-hex.png new file mode 100644 index 0000000..c37af58 Binary files /dev/null and b/graphics/icons/RGLEU-hex.png differ diff --git a/graphics/icons/RGLEU.png b/graphics/icons/RGLEU.png new file mode 100644 index 0000000..11b3553 Binary files /dev/null and b/graphics/icons/RGLEU.png differ diff --git a/graphics/icons/WGPu-fuel-cell.png b/graphics/icons/WGPu-fuel-cell.png new file mode 100644 index 0000000..3173227 Binary files /dev/null and b/graphics/icons/WGPu-fuel-cell.png differ diff --git a/graphics/icons/WGU-hex.png b/graphics/icons/WGU-hex.png index 36c885b..ee7edcd 100644 Binary files a/graphics/icons/WGU-hex.png and b/graphics/icons/WGU-hex.png differ diff --git a/graphics/icons/WGU.png b/graphics/icons/WGU.png index e81b38b..1ba674c 100644 Binary files a/graphics/icons/WGU.png and b/graphics/icons/WGU.png differ diff --git a/graphics/icons/activated-green-fuel-cell.png b/graphics/icons/activated-green-fuel-cell.png new file mode 100644 index 0000000..226d827 Binary files /dev/null and b/graphics/icons/activated-green-fuel-cell.png differ diff --git a/graphics/icons/activated-green-oxide.png b/graphics/icons/activated-green-oxide.png new file mode 100644 index 0000000..1ba674c Binary files /dev/null and b/graphics/icons/activated-green-oxide.png differ diff --git a/graphics/icons/activated-grey-hex.png b/graphics/icons/activated-grey-hex.png new file mode 100644 index 0000000..36c885b Binary files /dev/null and b/graphics/icons/activated-grey-hex.png differ diff --git a/graphics/icons/activated-grey-oxide.png b/graphics/icons/activated-grey-oxide.png new file mode 100644 index 0000000..e81b38b Binary files /dev/null and b/graphics/icons/activated-grey-oxide.png differ diff --git a/graphics/icons/LEU-fuel-cell.png b/graphics/icons/blue-fuel-cell.png similarity index 100% rename from graphics/icons/LEU-fuel-cell.png rename to graphics/icons/blue-fuel-cell.png diff --git a/graphics/icons/used-up-MOX-fuel-cell.png b/graphics/icons/brown-fuel-cell.png similarity index 100% rename from graphics/icons/used-up-MOX-fuel-cell.png rename to graphics/icons/brown-fuel-cell.png diff --git a/graphics/icons/HEU-fuel-cell.png b/graphics/icons/cyan-fuel-cell.png similarity index 100% rename from graphics/icons/HEU-fuel-cell.png rename to graphics/icons/cyan-fuel-cell.png diff --git a/graphics/icons/MOX-fuel-cell.png b/graphics/icons/green-fuel-cell.png similarity index 100% rename from graphics/icons/MOX-fuel-cell.png rename to graphics/icons/green-fuel-cell.png diff --git a/graphics/icons/oxide-green.png b/graphics/icons/oxide-green.png new file mode 100644 index 0000000..1ba674c Binary files /dev/null and b/graphics/icons/oxide-green.png differ diff --git a/graphics/icons/used-up-LEU-fuel-cell.png b/graphics/icons/purple-fuel-cell.png similarity index 100% rename from graphics/icons/used-up-LEU-fuel-cell.png rename to graphics/icons/purple-fuel-cell.png diff --git a/graphics/icons/used-up-HEU-fuel-cell.png b/graphics/icons/red-fuel-cell.png similarity index 100% rename from graphics/icons/used-up-HEU-fuel-cell.png rename to graphics/icons/red-fuel-cell.png diff --git a/graphics/icons/yellow-fuel-cell.png b/graphics/icons/yellow-fuel-cell.png new file mode 100644 index 0000000..69e0eb6 Binary files /dev/null and b/graphics/icons/yellow-fuel-cell.png differ diff --git a/groups.lua b/groups.lua new file mode 100644 index 0000000..f199dc3 --- /dev/null +++ b/groups.lua @@ -0,0 +1,76 @@ +-- Code uses "nuclear" as fast-reaction fuel category. +bombardment_category = { + type = "recipe-category", + name = "neutron-bombardment" +} +thermal_fuel_category = { + type = "fuel-category", + name = "adamo-nuclear-thermal-reaction" +} +nuclear_group = { + type = "item-group", + name = "adamo-nuclear", + order = "n", + icon = "__adamo-nuclear__/graphics/icons/nuclear_group.png", + icon_size = 64 +} +machine_group = { + type = "item-subgroup", + group = nuclear_group.name, + name = "adamo-nuclear-machine", + order = "a" +} +products_group = { + type = "item-subgroup", + group = nuclear_group.name, + name = "adamo-nuclear-products", + order = "b" +} +processing_group = { + type = "item-subgroup", + group = nuclear_group.name, + name = "adamo-nuclear-processing", + order = "c" +} +enrichment_group = { + type = "item-subgroup", + group = nuclear_group.name, + name = "adamo-nuclear-enrichment", + order = "h" +} +recovery_group = { + type = "item-subgroup", + group = nuclear_group.name, + name = "adamo-nuclear-recovery", + order = "j" +} +fuel_group = { + type = "item-subgroup", + group = nuclear_group.name, + name = "adamo-nuclear-fuel", + order = "l" +} +spent_fuel_group = { + type = "item-subgroup", + group = nuclear_group.name, + name = "adamo-nuclear-spent-fuel", + order = "n" +} +reprocessing_group = { + type = "item-subgroup", + group = nuclear_group.name, + name = "adamo-nuclear-reprocessing", + order = "o" +} +hex_subgroup = { + type = "item-subgroup", + group = "fluids", + name = "adamo-nuclear-hex", + order = "q" +} +slurry_group = { + type = "item-subgroup", + group = "fluids", + name = "adamo-nuclear-slurry", + order = "r" +} diff --git a/locale/en/base.cfg b/locale/en/base.cfg index cc8fa43..1f6b13c 100644 --- a/locale/en/base.cfg +++ b/locale/en/base.cfg @@ -1,9 +1,8 @@ [item-group-name] -adamo-nuclear-group=Nuclear engineering +adamo-nuclear=Nuclear engineering [technology-name] -atomic-bomb=Thermonuclear rocketry -adamo-nuclear-fast-reactor=Fast nuclear reactor +atomic-bomb=Plutonium warhead nuclear-fuel-reprocessing=Nuclear fuel processing kovarex-enrichment-process=Advanced nuclear fuel processing nuclear-power=Nuclear engineering @@ -12,93 +11,87 @@ nuclear-power=Nuclear engineering adamo-nuclear-thermal-reaction=Thermal nuclear fuel [fluid-name] -adamo-nuclear-natural-uranium-hex=Natural uranium hex -adamo-nuclear-raffinate=Nuclear sludge -adamo-nuclear-aqueous-raffinate=Nuclear water -adamo-nuclear-HEU-hex=High-enriched uranium hex -adamo-nuclear-LEU-hex=Low-enriched uranium hex -adamo-nuclear-DU-hex=Depleted uranium hex +adamo-nuclear-natural-uranium-hex=Uranium hex +adamo-nuclear-LEU-hex=LEU hex +adamo-nuclear-LEU-slurry=Spent LEU slurry +adamo-nuclear-LEU-PUREX-hex=Spent LEU hex +adamo-nuclear-HEU-hex=HEU hex +adamo-nuclear-HEU-slurry=Spent HEU slurry +adamo-nuclear-HEU-PUREX-hex=Spent HEU hex +adamo-nuclear-DU-hex=DU hex adamo-nuclear-WGU-hex=Weapons-grade uranium hex -adamo-nuclear-Pu-hex=Mixed-grade plutonium hex -adamo-nuclear-RGPu-hex=Reactor-grade plutonium hex -adamo-nuclear-WGPu-hex=Weapons-grade plutonium hex -adamo-nuclear-Pu238-hex=Plutonium-238 hex -adamo-nuclear-LEU-PUREX-hex=Reprocessed LEU hex -adamo-nuclear-HEU-PUREX-hex=Reprocessed HEU hex -adamo-chemical-hydrofluoric-acid=Hydrofluoric acid [item-name] uranium-ore=Yellowcake -adamo-nuclear-yellowcake=Yellowcake -adamo-nuclear-urania=Natural urania -adamo-nuclear-DU-oxide=Depleted urania -adamo-nuclear-LEU-oxide=Low-enriched urania -adamo-nuclear-HEU-oxide=High-enriched urania -adamo-nuclear-WGU-oxide=Weapons-grade urania -adamo-nuclear-RGPu-oxide=Reactor-grade plutonia -adamo-nuclear-WGPu-oxide=Weapons-grade plutonia -adamo-nuclear-Pu238-oxide=Plutonia-238 -adamo-nuclear-actinides=Minor actinides -adamo-nuclear-ceramic-waste=Radioactive glass -uranium-fuel-cell=HEU fuel cell +adamo-nuclear-uranium-oxide=Uranium oxide +adamo-nuclear-LEU-oxide=LEU oxide +adamo-nuclear-HEU-oxide=HEU oxide adamo-nuclear-LEU-fuel-cell=LEU fuel cell +uranium-fuel-cell=HEU fuel cell adamo-nuclear-MOX-fuel-cell=MOX fuel cell -used-up-uranium-fuel-cell=Spent HEU fuel cell adamo-nuclear-used-up-LEU-fuel-cell=Spent LEU fuel cell +used-up-uranium-fuel-cell=Spent HEU fuel cell adamo-nuclear-used-up-MOX-fuel-cell=Spent MOX fuel cell -atomic-bomb=Nuclear rocket +adamo-nuclear-LEU-PUREX-oxide=Spent LEU oxide +adamo-nuclear-HEU-PUREX-oxide=Spent HEU oxide +adamo-nuclear-RGPu-oxide=Reactor-grade plutonium +adamo-nuclear-ceramic-waste=Radioactive glass +adamo-nuclear-actinides=Minor actinides +adamo-nuclear-DU-oxide=DU oxide +adamo-nuclear-Pu238-oxide=Plutonium-238 +adamo-nuclear-WGU-oxide=Weapons-grade uranium +adamo-nuclear-WGPu-fuel-cell=Plutonium warhead fuel cell +atomic-bomb=Fission rocket adamo-nuclear-thermonuclear-rocket=Thermonuclear rocket [recipe-name] adamo-nuclear-LEU-enrichment=Low uranium enrichment adamo-nuclear-HEU-enrichment=High uranium enrichment adamo-nuclear-WGU-enrichment=Weapons-grade uranium enrichment -adamo-nuclear-WGPu-enrichment=Weapons-grade plutonium enrichment -adamo-nuclear-LEU-PUREX-enrichment=Reprocessed low uranium enrichment -adamo-nuclear-HEU-PUREX-enrichment=Reprocessed high uranium enrichment -adamo-nuclear-LEU-PUREX-by-HF=LEU PUREX -adamo-nuclear-LEU-PUREX-by-H2SO4=LEU PUREX -adamo-nuclear-HEU-PUREX-by-HF=HEU PUREX -adamo-nuclear-HEU-PUREX-by-H2SO4=HEU PUREX +adamo-nuclear-LEU-PUREX-enrichment=Spent low uranium enrichment +adamo-nuclear-HEU-PUREX-enrichment=Spent high uranium enrichment adamo-nuclear-LEU-REMIX=LEU REMIX adamo-nuclear-MOX-REMIX=MOX REMIX -adamo-nuclear-raffinate-processing=Nuclear sludge processing -adamo-nuclear-aqueous-raffinate-processing=Nuclear water reduction +kovarex-enrichment-process=Stupid vanilla fail reprocessing [entity-name] adamo-nuclear-production-reactor=Production reactor -nuclear-reactor=Unmoderated reactor -adamo-nuclear-thermal-reactor=Thermal nuclear boiler +nuclear-reactor=Nuclear reactor +adamo-nuclear-thermal-reactor=Nuclear boiler [technology-description] -uranium-processing=Process uranium ore to fissile fuel. -uranium-ammo=Ammunition made with depleted urania. -nuclear-fuel-reprocessing=Process spent urania fuel by separating fissile products. -kovarex-enrichment-process=Process plutonium and MOX fuels. +uranium-processing=Process uranium ore into low-enriched uranium fuel cells. +nuclear-fuel-reprocessing=Process spent uranium fuel cells into reconstituted fuel cells by separating fission products. +kovarex-enrichment-process=Process uranium and plutonium into MOX fuel cell. +uranium-ammo=Ammunition made with depleted uranium. [fluid-description] -adamo-nuclear-natural-uranium-hex=Uranium hexafluoride. +adamo-nuclear-natural-uranium-hex=Natural uranium is the base of the nuclear production chain. +adamo-nuclear-LEU-hex=Low-enriched uranium hexafluoride. +adamo-nuclear-LEU-PUREX-hex=Spent low-enriched uranium hexafluoride. +adamo-nuclear-HEU-hex=High-enriched uranium hexafluoride. +adamo-nuclear-HEU-PUREX-hex=Spent high-enriched uranium hexafluoride. +adamo-nuclear-DU-hex=Depleted uranium hexafluoride. [item-description] -adamo-nuclear-urania=Natural uranium dioxide is the base of the nuclear production chain. +adamo-nuclear-uranium-oxide=Natural uranium is the base of the nuclear production chain. +adamo-nuclear-ceramic-waste=Who dares win mushrooms? +adamo-nuclear-LEU-oxide=Low-enriched uranium. +adamo-nuclear-LEU-PUREX-oxide=Spent low-enriched uranium. +adamo-nuclear-HEU-oxide=High-enriched uranium. +adamo-nuclear-HEU-PUREX-oxide=Spent high-enriched uranium. +adamo-nuclear-RGPu-oxide=Unsuitable as an explosive. +adamo-nuclear-DU-oxide=Depleted uranium. adamo-nuclear-Pu238-oxide=Warm to the touch. -adamo-nuclear-ceramic-waste=These have no use other than to give to tsen. Ask him about pretty radioactive windows. [recipe-description] -adamo-nuclear-LEU-PUREX-by-HF=Chemical reprocessing of spent low-enriched urania fuel. -adamo-nuclear-LEU-PUREX-by-H2SO4=Chemical reprocessing of spent low-enriched urania fuel. -adamo-nuclear-HEU-PUREX-by-HF=Chemical reprocessing of spent high-enriched urania fuel. -adamo-nuclear-HEU-PUREX-by-H2SO4=Chemical reprocessing of spent high-enriched urania fuel. -adamo-nuclear-LEU-REMIX=Chemical regeneration of spent LEU fuel. -adamo-nuclear-MOX-REMIX=Chemical regeneration of spent MOX fuel. -adamo-nuclear-Pu238-oxide=Neutron irradiation of actinides by spallation to generate plutonia-238. -adamo-nuclear-thermonuclear-rocket=Thermonuclear Rocket with depleted uranium reflection. +kovarex-enrichment-process=Should be hidden from crafting menues. Not removed from game because it will break references. [entity-description] centrifuge=Sorts particles by mass. -nuclear-reactor=Reacts by a fast neutron spectrum. -adamo-nuclear-thermal-reactor=Reacts by a moderated neutron spectrum. -adamo-nuclear-production-reactor=Sorts and irradiates material using a pool reactor. Has a water-based particle accelerator. +nuclear-reactor=Maintains a fast neutron spectrum. +adamo-nuclear-thermal-reactor=Maintains a moderated neutron spectrum. +adamo-nuclear-production-reactor=Filters and irradiates materials. [mod-setting-name] adamo-nuclear-recipe-trolling=Replace vanilla uranium in recipes. @@ -106,4 +99,4 @@ adamo-nuclear-uranium-belt-recipe-override=Override uranium belt recipes. [mod-setting-description] adamo-nuclear-recipe-trolling=Search all recipes, replacing vanilla uranium ingredients and results with equivalent Adamo Nuclear materials. -adamo-nuclear-uranium-belt-recipe-override=Alter ingredients in uranium belt recipes to be consistent with nuclear materials calculations. \ No newline at end of file +adamo-nuclear-uranium-belt-recipe-override=Alter ingredients in uranium belt recipes to be consistent with nuclear materials calculations. diff --git a/machines.lua b/machines.lua new file mode 100644 index 0000000..951ba07 --- /dev/null +++ b/machines.lua @@ -0,0 +1,491 @@ +thermal_reactor_item = { + type = "item", + name = "adamo-nuclear-thermal-reactor", + icon = "__adamo-nuclear__/graphics/icons/thermal-reactor.png", + icon_size = 32, + subgroup = "energy", + order = "b[steam-power]-b[adamo-nuclear-thermal-reactor]", + place_result = "adamo-nuclear-thermal-reactor", + stack_size = 50 +} +prod_reactor_item = { + type = "item", + name = "adamo-nuclear-production-reactor", + icon = "__adamo-nuclear__/graphics/icons/production-reactor.png", + icon_size = 32, + subgroup = machine_group.name, + order = "n[production-reactor]", + place_result = "adamo-nuclear-production-reactor", + stack_size = 10 +} +thermal_reactor_recipe = { + type = "recipe", + name = thermal_reactor_item.name, + energy_required = 5, + enabled = false, + ingredients = { + {"concrete", 40}, + {"steel-plate", 20}, + {"adamo-nuclear-DU-oxide",20}, + {"advanced-circuit", 50}, + {"pipe", 10} + }, + result = thermal_reactor_item.name, +} +prod_reactor_recipe = { + type = "recipe", + name = "adamo-nuclear-production-reactor", + energy_required = 8, + enabled = false, + ingredients = { + {"centrifuge", 1}, + {"adamo-nuclear-DU-oxide", 100}, + {"refined-concrete", 100}, + {"filter-inserter",5}, + {"steel-chest",5} + -- processing unit? + }, + result = "adamo-nuclear-production-reactor", +} +thermal_reactor_entity = { + type = "boiler", + name = thermal_reactor_item.name, + icon = "__adamo-nuclear__/graphics/icons/thermal-reactor.png", + icon_size = 32, + flags = {"placeable-neutral", "player-creation"}, + minable = { + mining_time = 0.2, + result = thermal_reactor_item.name + }, + fast_replaceable_group = "boiler", + max_health = 200, + corpse = "boiler-remnants", + vehicle_impact_sound = { + filename = "__base__/sound/car-metal-impact.ogg", + volume = 0.65 + }, + mode = "output-to-separate-pipe", + resistances = {{ + type = "fire", + percent = 90 + },{ + type = "explosion", + percent = 30 + },{ + type = "impact", + percent = 30 + }}, + collision_box = {{-1.29, -0.79}, {1.29, 0.79}}, + selection_box = {{-1.5, -1}, {1.5, 1}}, + target_temperature = 165, + fluid_box = { + base_area = 2, + height = 2, + base_level = -1, + pipe_covers = pipecoverspictures(), + pipe_connections = {{ + type = "input-output", + position = {-2, 0.5} + },{ + type = "input-output", + position = {2, 0.5}} + }, + production_type = "input-output", + filter = "water" + }, + output_fluid_box = { + base_area = 2, + height = 2, + base_level = 1, + pipe_covers = pipecoverspictures(), + pipe_connections = {{ + type = "output", + position = {0, -1.5} + }}, + production_type = "output", + filter = "steam" + }, + energy_consumption = "3600kW", + energy_source = { + type = "burner", + fuel_category = thermal_fuel_category.name, + effectivity = 1, + fuel_inventory_size = 1, + burnt_inventory_size =1, + emissions_per_minute = 0, + smoke = nil, + light_flicker = { + color = {r = 0,g = 0,b = 1,a = 0.3}, + minimum_intensity = 0.3, + maximum_intensity = 0.3, + minimum_light_size = 0.1, + light_intensity_to_size_coefficient = 1 + } + }, + working_sound = data.raw.boiler["boiler"].working_sound, + structure = data.raw.boiler["boiler"].structure, + patch = data.raw.boiler["boiler"].patch, + fire_flicker_enabled = false, + fire_glow_flicker_enabled = false, + fire = { + north = { + filename = "__adamo-nuclear__/graphics/entity/" + .."thermal-reactor-N-fire.png", + priority = "extra-high", + frame_count = 1, + width = 12, + height = 13, + shift = util.by_pixel(0, -8.5), + hr_version = { + filename = "__adamo-nuclear__/graphics/entity/" + .."hr-thermal-reactor-N-fire.png", + priority = "extra-high", + frame_count = 1, + width = 26, + height = 26, + shift = util.by_pixel(0, -8.5), + scale = 0.5 + } + }, + east = { + filename = "__adamo-nuclear__/graphics/entity/" + .."thermal-reactor-E-fire.png", + priority = "extra-high", + frame_count = 1, + width = 14, + height = 14, + shift = util.by_pixel(-10, -22), + hr_version = { + filename = "__adamo-nuclear__/graphics/entity/" + .."hr-thermal-reactor-E-fire.png", + priority = "extra-high", + frame_count = 1, + width = 28, + height = 28, + shift = util.by_pixel(-9.5, -22), + scale = 0.5 + } + }, + south = { + filename = "__adamo-nuclear__/graphics/entity/" + .."thermal-reactor-S-fire.png", + priority = "extra-high", + frame_count = 1, + width = 12, + height = 9, + shift = util.by_pixel(-1, -26.5), + hr_version = { + filename = "__adamo-nuclear__/graphics/entity/" + .."hr-thermal-reactor-S-fire.png", + priority = "extra-high", + frame_count = 1, + width = 26, + height = 16, + shift = util.by_pixel(-1, -26.5), + scale = 0.5 + } + }, + west = { + filename = "__adamo-nuclear__/graphics/entity/" + .."thermal-reactor-W-fire.png", + priority = "extra-high", + frame_count = 1, + width = 14, + height = 14, + shift = util.by_pixel(13, -23), + hr_version = { + filename = "__adamo-nuclear__/graphics/entity/" + .."hr-thermal-reactor-W-fire.png", + priority = "extra-high", + frame_count = 1, + width = 30, + height = 29, + shift = util.by_pixel(13, -23.25), + scale = 0.5 + } + } + }, + fire_glow = { + north = { + filename = "__adamo-nuclear__/graphics/entity/" + .."thermal-reactor-N-light.png", + priority = "extra-high", + frame_count = 1, + width = 100, + height = 87, + shift = util.by_pixel(-1, -6.5), + blend_mode = "additive-soft", + hr_version = { + filename = "__adamo-nuclear__/graphics/entity/" + .."hr-thermal-reactor-N-light.png", + priority = "extra-high", + frame_count = 1, + width = 200, + height = 173, + shift = util.by_pixel(-1, -6.75), + blend_mode = "additive-soft", + scale = 0.5 + } + }, + east = { + filename = "__adamo-nuclear__/graphics/entity/" + .."thermal-reactor-E-light.png", + priority = "extra-high", + frame_count = 1, + width = 70, + height = 122, + shift = util.by_pixel(0, -13), + blend_mode = "additive-soft", + hr_version = { + filename = "__adamo-nuclear__/graphics/entity/" + .."hr-thermal-reactor-E-light.png", + priority = "extra-high", + frame_count = 1, + width = 139, + height = 244, + shift = util.by_pixel(0.25, -13), + blend_mode = "additive-soft", + scale = 0.5 + } + }, + south = { + filename = "__adamo-nuclear__/graphics/entity/" + .."thermal-reactor-S-light.png", + priority = "extra-high", + frame_count = 1, + width = 100, + height = 81, + shift = util.by_pixel(1, 5.5), + blend_mode = "additive-soft", + hr_version = { + filename = "__adamo-nuclear__/graphics/entity/" + .."hr-thermal-reactor-S-light.png", + priority = "extra-high", + frame_count = 1, + width = 200, + height = 162, + shift = util.by_pixel(1, 5.5), + blend_mode = "additive-soft", + scale = 0.5 + } + }, + west = { + filename = "__adamo-nuclear__/graphics/entity/" + .."thermal-reactor-W-light.png", + priority = "extra-high", + frame_count = 1, + width = 68, + height = 109, + shift = util.by_pixel(2, -6.5), + blend_mode = "additive-soft", + hr_version = { + filename = "__adamo-nuclear__/graphics/entity/" + .."hr-thermal-reactor-W-light.png", + priority = "extra-high", + frame_count = 1, + width = 136, + height = 217, + shift = util.by_pixel(2, -6.25), + blend_mode = "additive-soft", + scale = 0.5 + } + } + }, + burning_cooldown = 20 +} +prod_anim_speed = 0.5 +prod_reactor_corpse = adamo.centrifuge.remnants(5/3) +prod_reactor_corpse.name = "adamo-nuyclear-production-reactor-remnants" +prod_reactor_explosion = adamo.centrifuge.explosion(5/3) +prod_reactor_explosion.name = "adamo-nuclear-production-reactor-explosion" +prod_reactor_entity = { + type = "assembling-machine", + name = "adamo-nuclear-production-reactor", + icon = + "__adamo-nuclear__/graphics/icons/" + .."production-reactor.png", + icon_size = 32, + flags = { + "placeable-neutral", + "placeable-player", + "player-creation" + }, + minable = { + mining_time = 1, + result = "adamo-nuclear-production-reactor" + }, + max_health = 350, + crafting_speed = 1, + crafting_categories = {"neutron-bombardment"}, + return_ingredients_on_change = false, + match_animation_speed_to_activity = false, + energy_source = + { + type = "burner", + fuel_categories = { + MOX_fuel_item.fuel_category, + LEU_fuel_item.fuel_category + }, + effectivity = 0.125, + fuel_inventory_size = 1, + burnt_inventory_size = 1, + light_flicker = {} + }, + energy_usage = data.raw.reactor["nuclear-reactor"].consumption, + module_specification = { + module_slots = 4 + }, + allowed_effects = { + "consumption", + "productivity", + "pollution" + }, + corpse = "adamo-nuyclear-production-reactor-remnants", + dying_explosion = "adamo-nuclear-production-reactor-explosion", + resistances = {{ + type = "fire", + percent = 70 + }}, + collision_box = adamo.centrifuge.collision_box(5/3), + selection_box = adamo.centrifuge.selection_box(5/3), + drawing_box = adamo.centrifuge.drawing_box(5/3), + always_draw_idle_animation = true, + idle_animation = {layers = adamo.centrifuge.idle_layers(3/2,prod_anim_speed)}, + animation = { + layers = {{ + filename = "__adamo-nuclear__/graphics/entity/production-reactor-C-light.png", + priority = "high", + blend_mode = "additive", -- centrifuge + line_length = 8, + width = 96, + height = 104, + frame_count = 64, + animation_speed = prod_anim_speed, + draw_as_glow = true, + shift = util.by_pixel(0*3/2, -27*3/2), + scale = 3/2, + hr_version = { + filename = + "__adamo-nuclear__/graphics/entity/" + .."hr-production-reactor-C-light.png", + priority = "high", + scale = 0.5*3/2, + blend_mode = "additive", -- centrifuge + line_length = 8, + width = 190, + height = 207, + frame_count = 64, + animation_speed = prod_anim_speed, + draw_as_glow = true, + shift = util.by_pixel(0*3/2, -27.25*3/2) + } + },{ + filename = + "__adamo-nuclear__/graphics/entity/" + .."production-reactor-B-light.png", + priority = "high", + blend_mode = "additive", -- centrifuge + line_length = 8, + width = 65, + height = 103, + frame_count = 64, + animation_speed = prod_anim_speed, + draw_as_glow = true, + shift = util.by_pixel(16.5*3/2, 0.5*3/2), + scale = 3/2, + hr_version = { + filename = + "__adamo-nuclear__/graphics/entity/" + .."hr-production-reactor-B-light.png", + priority = "high", + scale = 0.5*3/2, + blend_mode = "additive", -- centrifuge + line_length = 8, + width = 131, + height = 206, + frame_count = 64, + animation_speed = prod_anim_speed, + draw_as_glow = true, + shift = util.by_pixel(16.75*3/2, 0.5*3/2) + } + },{ + filename = + "__adamo-nuclear__/graphics/entity/" + .."production-reactor-A-light.png", + priority = "high", + blend_mode = "additive", -- centrifuge + line_length = 8, + width = 55, + height = 98, + frame_count = 64, + animation_speed = prod_anim_speed, + draw_as_glow = true, + shift = util.by_pixel(-23.5*3/2, -2*3/2), + scale = 3/2, + hr_version = { + filename = + "__adamo-nuclear__/graphics/entity/" + .."hr-production-reactor-A-light.png", + priority = "high", + scale = 0.5*3/2, + blend_mode = "additive", -- centrifuge + line_length = 8, + width = 108, + height = 197, + frame_count = 64, + animation_speed = prod_anim_speed, + draw_as_glow = true, + shift = util.by_pixel(-23.5*3/2, -1.75*3/2) + } + }} + }, + working_visualisations = {{ + effect = "uranium-glow", + fadeout = true, + light = { + intensity = 0.55, + size = 9.9*3/2, + shift = {0.0, 0.0}, + color = { + r = 0.0, + g = 0.15, + b = 1.0 + } + } + }}, + open_sound = { + filename = "__base__/sound/machine-open.ogg", + volume = 0.85 + }, + close_sound = { + filename = "__base__/sound/machine-close.ogg", + volume = 0.75 + }, + vehicle_impact_sound = { + filename = "__base__/sound/car-metal-impact.ogg", + volume = 0.65 + }, + working_sound = { + sound = { + { + filename = "__base__/sound/centrifuge-1.ogg", + volume = 0.3, + speed = prod_anim_speed + }, + { + filename = "__base__/sound/centrifuge-2.ogg", + volume = 0.3, + speed = prod_anim_speed + }, + { + filename = "__base__/sound/centrifuge-6.ogg", + volume = 0.3, + speed = prod_anim_speed + } + }, + idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 }, + apparent_volume = 1.5 + }, + fluid_boxes = adamo.centrifuge.fluid_boxes(5/3) +} + diff --git a/materials.lua b/materials.lua new file mode 100644 index 0000000..cb19365 --- /dev/null +++ b/materials.lua @@ -0,0 +1,307 @@ +MOX_glow_color = {r = 1,g = 1,b = 1,a = 1} +sulfuric_base_color = data.raw.fluid["sulfuric-acid"].base_color +sulfuric_flow_color = data.raw.fluid["sulfuric-acid"].flow_color +uranium_hex_base_color = {r = 0.5,g = 0.5,b = 0.5} +uranium_hex_flow_color = {r = 0.5,g = 0.5,b = 0.5} +plutonium_hex_base_color = {r= 100,g = 10,b = 10,a = 150} +plutonium_hex_flow_color = {r= 100,g = 10,b = 10,a = 25} +oxide_color_table = { + -- NU = {r=139,g=69,b=19}, + NU = {r = 0,g = 200,b = 255}, + DU = {r = 16, g = 16, b = 16}, + LEU = {r = 210, g = 210, b = 210}, + HEU = {r = 255, g = 255, b = 255}, + -- WGU = {r = 224, g = 224, b = 224}, + -- RGPu = {r = 0, g = 153, b = 0}, + RGPu = {r = 0, g = 153, b = 0}, + WGU = {r = 0, g = 255, b = 0}, +} +oxide_color_table["LEU-PUREX"] = {r=150,g=0,b=150} +oxide_color_table["HEU-PUREX"] = {r=200,g=0,b=0} +LEU_slurry_base_color = adamo.colors.darkbrown +LEU_slurry_flow_color = oxide_color_table["LEU-PUREX"] +HEU_slurry_base_color = adamo.colors.darkbrown +HEU_slurry_flow_color = oxide_color_table["HEU-PUREX"] +pg_flow_color = data.raw.fluid["petroleum-gas"].flow_color +pg_base_color = data.raw.fluid["petroleum-gas"].base_color + +natural_hex_fluid = { + type = "fluid", + name = "adamo-nuclear-natural-uranium-hex", + subgroup = hex_subgroup.name, + order = "n0", + icon = "__adamo-nuclear__/graphics/icons/hex.png", + icon_size = 32, + base_color = uranium_hex_base_color, + flow_color = oxide_color_table.NU, + default_temperature = 25, + max_temperature = 100, + heat_capacity = "0.1KJ", +} +LEU_slurry = { +type = "fluid", +name = "adamo-nuclear-LEU-slurry", +subgroup = slurry_group.name, +order = "o1", +icon = "__adamo-nuclear__/graphics/icons/LEU-sludge.png", +icon_size = 32, +base_color = LEU_slurry_base_color, +flow_color = LEU_slurry_flow_color, +default_temperature = 25, +max_temperature = 100, +heat_capacity = "0.01KJ", +} +HEU_slurry = { + type = "fluid", + name = "adamo-nuclear-HEU-slurry", + subgroup = slurry_group.name, + order = "o2", + icon = "__adamo-nuclear__/graphics/icons/HEU-sludge.png", + icon_size = 32, + base_color = HEU_slurry_base_color, + flow_color = HEU_slurry_flow_color, + default_temperature = 25, + max_temperature = 100, + heat_capacity = "0.1KJ", +} +urania_item = { + type = "item", + name = "adamo-nuclear-uranium-oxide", + subgroup = processing_group.name, + order = "n", + stack_size = 50, + icon = "__adamo-nuclear__/graphics/icons/urania.png", + icon_size = 32, +} +LEU_fuel_item = { + type = "item", + name = "adamo-nuclear-LEU-fuel-cell", + subgroup = fuel_group.name, + order = "m", + stack_size = 50, + icon = "__adamo-nuclear__/graphics/icons/blue-fuel-cell.png", + icon_size = 32, + fuel_category = thermal_fuel_category.name, + fuel_value = "62GJ", + burnt_result = "adamo-nuclear-used-up-LEU-fuel-cell", +} +HEU_fuel_item = data.raw.item["uranium-fuel-cell"] +MOX_fuel_item = { + type = "item", + name = "adamo-nuclear-MOX-fuel-cell", + subgroup = fuel_group.name, + order = "o", + stack_size = 50, + icon = "__adamo-nuclear__/graphics/icons/cyan-fuel-cell.png", + icon_size = 32, + fuel_category = "nuclear", + fuel_value = "162GJ", + burnt_result = "adamo-nuclear-used-up-MOX-fuel-cell", + fuel_glow_color = MOX_glow_color +} +WGPu_fuel_item = { + type = "item", + name = "adamo-nuclear-WGPu-fuel-cell", + subgroup = products_group.name, + order = "w", + stack_size = 50, + icon = "__adamo-nuclear__/graphics/icons/activated-green-fuel-cell.png", + icon_size = 32, +} +used_LEU_item = { + type = "item", + name = LEU_fuel_item.burnt_result, + subgroup = spent_fuel_group.name, + order = "m1", + stack_size = 50, + icon = "__adamo-nuclear__/graphics/icons/purple-fuel-cell.png", + icon_size = 32, +} +used_HEU_item = data.raw.item["used-up-uranium-fuel-cell"] +used_MOX_item = { + type = "item", + name = MOX_fuel_item.burnt_result, + subgroup = spent_fuel_group.name, + order = "m3", + stack_size = 50, + icon = "__adamo-nuclear__/graphics/icons/brown-fuel-cell.png", + icon_size = 32, +} +actinides_item = { + type = "item", + name = "adamo-nuclear-actinides", + subgroup = reprocessing_group.name, + order = "p", + stack_size = 50, + icon = "__adamo-nuclear__/graphics/icons/actinides.png", + icon_size = 32, +} +waste_item = { + type = "item", + name = "adamo-nuclear-ceramic-waste", + subgroup = reprocessing_group.name, + order = "w", + stack_size = 50, + icon = "__adamo-nuclear__/graphics/icons/ceramic-waste.png", + icon_size = 64, +} + +local order_number = 1 +for _,grade in pairs({ + "LEU","HEU","WGU","DU","LEU-PUREX","HEU-PUREX" +}) do + local oxide_color = oxide_color_table[grade] + local hex_color = uranium_hex_base_color + local item = { + type = "item", + name = "adamo-nuclear-"..grade.."-oxide", + subgroup = recovery_group.name, + order = "nz"..order_number.."a", + stack_size = 50, + icon = "__adamo-nuclear__/graphics/icons/"..grade..".png", + icon_size = 32, + } + local fluid = { + type = "fluid", + name = "adamo-nuclear-"..grade.."-hex", + subgroup = enrichment_group.name, + order = "nz"..order_number.."b", + icon = "__adamo-nuclear__/graphics/icons/"..grade.."-hex.png", + icon_size = 32, + base_color = hex_color, + flow_color = oxide_color, + default_temperature = 25, + max_temperature = 100, + heat_capacity = "0.1KJ", + + } + if grade:match "PUREX" then + item.subgroup = processing_group.name + fluid.subgroup = processing_group.name + end + data:extend({item,fluid}) + order_number = order_number + 1 +end + + +for _,grade in pairs({ + "LEU","HEU","WGU","DU","LEU-PUREX","HEU-PUREX" +}) do + local oxide_color = oxide_color_table[grade] + local hex_color = uranium_hex_base_color + local hex_flow_color = uranium_hex_flow_color + local oxide_recipe = { + type = "recipe", + category = "chemistry", + name = "adamo-nuclear-"..grade.."-oxide", + main_product = "adamo-nuclear-"..grade.."-oxide", + enabled = false, + energy_required = 10, + always_show_made_in = true, + ingredients = {{ + type = "fluid", + name = "adamo-nuclear-"..grade.."-hex", + amount = 10 + },{ + type = "fluid", + name = "water", + amount = 100 + }}, + results = {{ + type = "fluid", + name = "adamo-chemical-hydrofluoric-acid", + amount = 60, + },{ + type = "item", + name = "adamo-nuclear-"..grade.."-oxide", + amount = 1 + }}, + crafting_machine_tint = { + primary = hex_color, + secondary = oxide_color, + tertiary = hex_flow_color, + quaternary = oxide_color + }, + } + local hex_recipe = { + type = "recipe", + name = "adamo-nuclear-"..grade.."-hex", + category = "chemistry", + enabled = false, + energy_required = 10, + always_show_made_in = true, + main_product = "adamo-nuclear-"..grade.."-hex", + ingredients = {{ + type = "item", + name = "adamo-nuclear-"..grade.."-oxide", + amount = 1 + },{ + type = "fluid", + name = "adamo-chemical-hydrofluoric-acid", + amount = 60 + },{ + type = "fluid", + name = "water", + amount = 100 + }}, + results = {{ + type = "fluid", + name = "adamo-nuclear-"..grade.."-hex", + amount = 10 + }}, + hide_from_player_crafting = true, + crafting_machine_tint = { + primary = hex_color, + secondary = oxide_color, + tertiary = adamo.colors.hf_flow, + quaternary = oxide_color + }, + } + if grade:match "PUREX" then + hex_recipe.hide_from_player_crafting = false + oxide_recipe.hide_from_player_crafting = true + adamo.tech.add.recipe("nuclear-fuel-reprocessing",hex_recipe) + adamo.tech.add.recipe("nuclear-fuel-reprocessing",oxide_recipe) + elseif grade:match "LEU" or grade:match "DU" then + adamo.tech.add.recipe("uranium-processing",oxide_recipe) + adamo.tech.add.recipe("uranium-processing",hex_recipe) + else + adamo.tech.add.recipe("nuclear-power",oxide_recipe) + adamo.tech.add.recipe("nuclear-power",hex_recipe) + end + data:extend({hex_recipe,oxide_recipe}) +end + + +data:extend({ + { + type = "item", + name = "adamo-nuclear-RGPu-oxide", + subgroup = processing_group.name, + order = "nz"..order_number, + stack_size = 50, + icon = "__adamo-nuclear__/graphics/icons/RGPu.png", + icon_size = 32, + }, + { + type = "item", + name = "adamo-nuclear-Pu238-oxide", + subgroup = products_group.name, + order = "m", + stack_size = 50, + icon = "__adamo-nuclear__/graphics/icons/Pu238.png", + icon_size = 32, + } +}) +order_number = order_number + 1 + +local grade = "DU" +data.raw.recipe["adamo-nuclear-"..grade.."-oxide"].ingredients = {{ + type = "fluid", + name = "water", + amount = 30 + },{ + type = "fluid", + name = "adamo-nuclear-"..grade.."-hex", + amount = 10 +}} diff --git a/migrations/overhaul.json b/migrations/overhaul.json new file mode 100644 index 0000000..b579719 --- /dev/null +++ b/migrations/overhaul.json @@ -0,0 +1,17 @@ +{ + "fluid": + [ + ], + "item": + [ + ["adamo-nuclear-natural-urania","adamo-nuclear-uranium-oxide"] + ], + "ammo": + [ + ["adamo-nuclear-thermonuclear-rocket","atomic-bomb"] + ], + "recipe": + [ + ["adamo-nuclear-uranium-oxide-by-H2SO4","adamo-nuclear-uranium-oxide"] + ] +} diff --git a/processing.lua b/processing.lua new file mode 100644 index 0000000..feb4611 --- /dev/null +++ b/processing.lua @@ -0,0 +1,486 @@ +urania_recipe_sulfuric = { + type = "recipe", + name = urania_item.name, + category = "chemistry", + enabled = false, + energy_required = 10, + ingredients = {{ + type = "item", + name = "uranium-ore", + amount = 50 + },{ + type = "fluid", + name = "sulfuric-acid", + amount = 100 + },{ + type = "fluid", + name = "water", + amount = 100 + }}, + result = urania_item.name, + show_amount_in_title = false, + always_show_products = false, + always_show_made_in = true, + crafting_machine_tint = { + primary = sulfuric_base_color, + secondary = oxide_color_table.NU, + tertiary = sulfuric_flow_color, + quaternary = oxide_color_table.NU + }, +} +urania_hex_recipe = { + type = "recipe", + name = natural_hex_fluid.name, + category = "chemistry", + enabled = false, + subgroup = processing_group.name, + main_product = natural_hex_fluid.name, + energy_required = 10, + ingredients = { + {urania_item.name,1}, + { + type = "fluid", + name = "adamo-chemical-hydrofluoric-acid", + amount = 60 + }, + { + type = "fluid", + name = "water", + amount = 30 + } + }, + results = {{ + type = "fluid", + name = natural_hex_fluid.name, + amount = 10, + }}, + crafting_machine_tint = { + primary = uranium_hex_base_color, + secondary = oxide_color_table.NU, + tertiary = adamo.colors.hf_flow, + quaternary = oxide_color_table.NU + }, +} +LEU_enrichment_recipe = { + type = "recipe", + category = "centrifuging", + name = "adamo-nuclear-LEU-enrichment", + energy_required = 10, + subgroup = enrichment_group.name, + order = "m1", + enabled = false, + ingredients = {{ + type = "fluid", + name = natural_hex_fluid.name, + amount = 75 + }}, + results = {{ + type = "fluid", + name = "adamo-nuclear-DU-hex", + amount = 65 + },{ + type = "fluid", + name = "adamo-nuclear-LEU-hex", + amount = 10 + }}, + main_product = "adamo-nuclear-LEU-hex" +} +HEU_enrichment_recipe = { + type = "recipe", + category = "centrifuging", + name = "adamo-nuclear-HEU-enrichment", + energy_required = 10, + subgroup = enrichment_group.name, + order = "m2", + enabled = false, + ingredients = {{ + type = "fluid", + name = natural_hex_fluid.name, + amount = 75 + }}, + results = {{ + type = "fluid", + name = "adamo-nuclear-DU-hex", + amount = 73 + },{ + type = "fluid", + name = "adamo-nuclear-HEU-hex", + amount = 2 + }}, + main_product = "adamo-nuclear-HEU-hex" +} +WGU_enrichment_recipe = { + type = "recipe", + category = "centrifuging", + name = "adamo-nuclear-WGU-enrichment", + energy_required = 10, + subgroup = enrichment_group.name, + order = "m3", + enabled = false, + ingredients = {{ + type = "fluid", + name = natural_hex_fluid.name, + amount = 150 + }}, + results = {{ + type = "fluid", + name = "adamo-nuclear-DU-hex", + amount = 149 + },{ + type = "fluid", + name = "adamo-nuclear-WGU-hex", + amount = 1 + }}, + main_product = "adamo-nuclear-WGU-hex" +} +LEU_PUREX_stage_1 = { + type = "recipe", + category = "chemistry", + name = "adamo-nuclear-LEU-PUREX-stage-1", + subgroup = spent_fuel_group.name, + order = "m1", + energy_required = 60, + enabled = true, + ingredients = { + {used_LEU_item.name, 100}, + {"stone",4}, + { + type = "fluid", + name = "petroleum-gas", + amount = 100 + }, + { + type = "fluid", + name = "water", + amount = 100 + }, + }, + results = { + {actinides_item.name,2}, + {waste_item.name, 4}, + { + type = LEU_slurry.type, + name = LEU_slurry.name, + amount = 94 + }, + }, + main_product = LEU_slurry.name, + crafting_machine_tint = { + primary = pg_base_color, + secondary = LEU_slurry.base_color, + tertiary = pg_flow_color, + quaternary = LEU_slurry.flow_color, + } +} +LEU_PUREX_stage_2 = { + type = "recipe", + category = "chemistry", + name = "adamo-nuclear-LEU-PUREX-stage-2", + -- subgroup = reprocessing_group.name, + -- order = "m2", + energy_required = 60, + enabled = true, + ingredients = { + { + type = LEU_slurry.type, + name = LEU_slurry.name, + amount = 94 + }, + { + type = "fluid", + name = "sulfuric-acid", + amount = 100 + } + }, + results = { + {"adamo-nuclear-LEU-PUREX-oxide",93}, + {"adamo-nuclear-RGPu-oxide",1}, + }, + main_product = "adamo-nuclear-LEU-PUREX-oxide", + crafting_machine_tint = { + primary = sulfuric_base_color, + secondary = oxide_color_table["LEU-PUREX"], + tertiary = sulfuric_flow_color, + quaternary = LEU_slurry.flow_color + } +} +LEU_PUREX_enrichment_recipe = { + type = "recipe", + category = "centrifuging", + name = "adamo-nuclear-LEU-PUREX-enrichment", + energy_required = 10, + subgroup = enrichment_group.name, + order = "n1", + enabled = false, + ingredients = { + { + type = "fluid", + name = "adamo-nuclear-LEU-PUREX-hex", + amount = 93 + } + }, + results = { + { + type = "fluid", + name = "adamo-nuclear-LEU-hex", + amount = 84 + }, + { + type = "fluid", + name = "adamo-nuclear-DU-hex", + amount = 9 + } + }, + main_product = "adamo-nuclear-LEU-hex" +} +HEU_PUREX_stage_1 = { + type = "recipe", + category = "chemistry", + name = "adamo-nuclear-HEU-PUREX-stage-1", + subgroup = spent_fuel_group.name, + order = "m1a", + energy_required = 60, + enabled = true, + ingredients = { + {used_HEU_item.name, 50}, + {"stone",3}, + { + type = "fluid", + name = "petroleum-gas", + amount = 50 + }, + { + type = "fluid", + name = "water", + amount = 50 + }, + }, + results = { + {waste_item.name,3}, + {actinides_item.name,3}, + { + type = HEU_slurry.type, + name = HEU_slurry.name, + amount = 44 + }, + }, + main_product = HEU_slurry.name, + crafting_machine_tint = { + primary = pg_base_color, + secondary = HEU_slurry.base_color, + tertiary = pg_flow_color, + quaternary = HEU_slurry.flow_color + } +} +HEU_PUREX_stage_2 = { + type = "recipe", + category = "chemistry", + name = "adamo-nuclear-HEU-PUREX-stage-2", + -- subgroup = reprocessing_group.name, + -- order = "m2a", + energy_required = 60, + enabled = true, + ingredients = { + { + type = HEU_slurry.type, + name = HEU_slurry.name, + amount = 44 + }, + { + type = "fluid", + name = "sulfuric-acid", + amount = 50 + } + }, + results = { + {"adamo-nuclear-HEU-PUREX-oxide",43}, + {"adamo-nuclear-RGPu-oxide",1}, + }, + main_product = "adamo-nuclear-HEU-PUREX-oxide", + crafting_machine_tint = { + primary = sulfuric_base_color, + secondary = oxide_color_table["HEU-PUREX"], + tertiary = sulfuric_flow_color, + quaternary = HEU_slurry.flow_color + } +} +HEU_PUREX_enrichment_recipe = { + type = "recipe", + category = "centrifuging", + name = "adamo-nuclear-HEU-PUREX-enrichment", + energy_required = 10, + subgroup = enrichment_group.name, + order = "n2", + enabled = false, + ingredients = {{ + type = "fluid", + name = "adamo-nuclear-HEU-PUREX-hex", + -- amount = 69 + amount = 43 + }}, + results = {{ + type = "fluid", + name = "adamo-nuclear-HEU-hex", + -- amount = 67 + amount = 41 + },{ + type = "fluid", + name = "adamo-nuclear-DU-hex", + amount = 2 + }}, + main_product = "adamo-nuclear-HEU-hex" +} +WGPu_from_LEU = { + type = "recipe", + category = "neutron-bombardment", + order = "w1", + name = "adamo-nuclear-WGPu-from-LEU", + energy_required = 120, + enabled = false, + ingredients = { + {LEU_fuel_item.name,1}, + { + type = "fluid", + name = "water", + amount = 1000 + } + }, + result = WGPu_fuel_item.name +} +WGPu_from_DU = { + type = "recipe", + category = "neutron-bombardment", + order = "w2", + name = "adamo-nuclear-WGPu-from-DU", + energy_required = 120, + enabled = false, + ingredients = { + {"adamo-nuclear-DU-oxide",1}, + {"iron-plate",1}, + { + type = "fluid", + name = "water", + amount = 1000 + } + }, + result = WGPu_fuel_item.name +} +plutonia_238_recipe = { + type = "recipe", + category = "neutron-bombardment", + name = "adamo-nuclear-transmute-Pu238-oxide", + energy_required = 60, + enabled = false, + ingredients = { + {actinides_item.name,1}, + { + amount = 1000, + name = "water", + type = "fluid", + } + }, + result = "adamo-nuclear-Pu238-oxide", +} +LEU_REMIX_recipe = { + type = "recipe", + category = "chemistry", + name = "adamo-nuclear-LEU-REMIX", + subgroup = reprocessing_group.name, + order = "t1", + energy_required = 60, + enabled = false, + ingredients = { + {"adamo-nuclear-HEU-oxide",2}, + {used_LEU_item.name,50}, + {"iron-plate",49}, + {"stone",2}, + { + type = "fluid", + name = "petroleum-gas", + amount = 100 + }, + { + type = "fluid", + name = "sulfuric-acid", + amount = 100 + } + }, + results = { + {actinides_item.name,1}, + {waste_item.name,2}, + {LEU_fuel_item.name,50} + }, + main_product = LEU_fuel_item.name, + crafting_machine_tint = { + primary = sulfuric_base_color, + secondary = oxide_color_table["HEU"], + tertiary = pg_base_color, + quaternary = sulfuric_flow_color + }, +} +MOX_REMIX_recipe = { + type = "recipe", + category = "chemistry", + name = "adamo-nuclear-MOX-REMIX", + subgroup = reprocessing_group.name, + order = "t2", + energy_required = 60, + enabled = false, + ingredients = { + {"adamo-nuclear-RGPu-oxide",1}, + {used_MOX_item.name,50}, + {"iron-plate",43}, + {"stone",4}, + { + type = "fluid", + name = "petroleum-gas", + amount = 100 + }, + { + type = "fluid", + name = "sulfuric-acid", + amount = 100 + } + }, + results = { + {actinides_item.name,4}, + {waste_item.name,4}, + {MOX_fuel_item.name,43} + }, + main_product = MOX_fuel_item.name, + crafting_machine_tint = { + primary = sulfuric_base_color, + secondary = oxide_color_table.RGPu, + tertiary = pg_base_color, + quaternary = sulfuric_flow_color + }, +} +LEU_fuel_recipe = { + type = "recipe", + name = LEU_fuel_item.name, + energy_required = 10, + category = "advanced-crafting", + enabled = false, + ingredients = {{ + "adamo-nuclear-LEU-oxide",1 + },{ + "iron-plate",1 + }}, + result = LEU_fuel_item.name +} +MOX_fuel_recipe = { + type = "recipe", + name = MOX_fuel_item.name, + subgroup = fuel_group.name, + order = "p", + energy_required = 100, + category = "advanced-crafting", + enabled = false, + ingredients = { + {type = "item", name = "adamo-nuclear-DU-oxide", amount = 93}, + {type = "item", name = "adamo-nuclear-RGPu-oxide", amount = 7}, + {type = "item", name = "iron-plate", amount = 100}, + }, + result = MOX_fuel_item.name, + result_count = 100 +}