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 = colors.midbrown
local aqueous_raffinate_flow_color = colors.highbrown
local raffinate_base_color = colors.darkbrown
local raffinate_flow_color = 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"
}
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({
	nuclear_group,
	prod_mach_group,
	products_subgroup,
	oxide_subgroup,
	enrichment_group,
	processing_subgroup,
	spent_fuel_group,
	hex_subgroup,
	raffinate_subgroup
})

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 aqueous_raffinate_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 raffinate_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",
}
data:extend({
	natural_hex_fluid,
	Pu_hex_fluid,
	LEU_PUREX_hex_fluid,
	HEU_PUREX_hex_fluid,
	aqueous_raffinate_fluid,
	raffinate_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 = 25
}
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,
	LEU_fuel_item,
	MOX_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 = colors.hf_base,
		tertiary = 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 = 30,
	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 = colors.hf_base,
		tertiary = colors.hf_flow,
		quaternary = oxide_color_table.NU
	},
}
local LEU_enrichment_recipe = {
	type = "recipe",
	category = "centrifuging",
	name = "adamo-nuclear-LEU-enrichment",
	energy_required = 7.75,
	subgroup = "adamo-nuclear-enrichment-group",
	order = "m1",
	enabled = false,
	ingredients = {{
			type = "fluid",
			name = "adamo-nuclear-natural-uranium-hex",
			amount = 7.75
	}},
	results = {{
			type = "fluid",
			name = "adamo-nuclear-DU-hex",
			amount = 6.75
		},{
			type = "fluid",
			name = "adamo-nuclear-LEU-hex",
			amount = 1
	}},
	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 = 37.5,
	subgroup = "adamo-nuclear-enrichment-group",
	order = "m2",
	enabled = false,
	ingredients = {{
			type = "fluid",
			name = "adamo-nuclear-natural-uranium-hex",
			amount = 37.5
	}},
	results = {{
			type = "fluid",
			name = "adamo-nuclear-DU-hex",
			amount = 36.5
		},{
			type = "fluid",
			name = "adamo-nuclear-HEU-hex",
			amount = 1
	}},
	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 = 150,
	subgroup = "adamo-nuclear-enrichment-group",
	order = "m3",
	enabled = false,
	ingredients = {{
			type = "fluid",
			name = "adamo-nuclear-natural-uranium-hex",
			amount = 150
	}},
	results = {{
			type = "fluid",
			name = "adamo-nuclear-DU-hex",
			amount = 149
		},{
			type = "fluid",
			name = "adamo-nuclear-WGU-hex",
			amount = 1
	}},
	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 = 2,
	subgroup = "adamo-nuclear-enrichment-group",
	order = "n1",
	enabled = false,
	ingredients = {{
			type = "fluid",
			name = "adamo-nuclear-Pu-hex",
			amount = 2
	}},
	results = {{
			type = "fluid",
			name = "adamo-nuclear-RGPu-hex",
			amount = 1
		},{
			type = "fluid",
			name = "adamo-nuclear-WGPu-hex",
			amount = 1
	}},
	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 = 150,
	subgroup = "adamo-nuclear-enrichment-group",
	order = "o1",
	enabled = false,
	ingredients = {{
			type = "fluid",
			name = "adamo-nuclear-LEU-PUREX-hex",
			amount = 150
	}},
	results = {{
			type = "fluid",
			name = "adamo-nuclear-LEU-hex",
			amount = 135
		},{
			type = "fluid",
			name = "adamo-nuclear-Pu-hex",
			amount = 1
		},{
			type = "fluid",
			name = "adamo-nuclear-DU-hex",
			amount = 14
	}},
	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 = 70,
	subgroup = "adamo-nuclear-enrichment-group",
	order = "o2",
	enabled = false,
	ingredients = {{
			type = "fluid",
			name = "adamo-nuclear-HEU-PUREX-hex",
			amount = 70
	}},
	results = {{
			type = "fluid",
			name = "adamo-nuclear-HEU-hex",
			amount = 67
		},{
			type = "fluid",
			name = "adamo-nuclear-Pu-hex",
			amount = 1
		},{
			type = "fluid",
			name = "adamo-nuclear-DU-hex",
			amount = 2
	}},
	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 = 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_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",
			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",
			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 = 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",
			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",
			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 = 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
		},{
			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 = 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
	}},
	icon_size = 64,
	icon = "__adamo-nuclear__/graphics/icons/MOX-REMIX.png",
	crafting_machine_tint = {
		primary = raffinate_base_color,
		secondary = 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 = 30,
		},{
			type = "fluid",
			name = "water",
			amount = 30,
		},{
			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 = 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 = {
		{"concrete", 150},
		{"steel-plate", 75},
		{"advanced-circuit", 120},
		{"iron-gear-wheel", 120}
	},
	result = "adamo-nuclear-production-reactor",
}
data:extend({
	urania_recipe_sulfuric,
	urania_recipe_hydrofluoric,
	urania_hex_recipe,
	LEU_enrichment_recipe,
	HEU_enrichment_recipe,
	WGU_enrichment_recipe,
	Pu_enrichment_recipe,
	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,
	thermal_reactor_recipe,
	prod_reactor_recipe,
})
add_recipe_to_tech("uranium-processing",
	"adamo-nuclear-urania-by-H2SO4"
)
add_recipe_to_tech("uranium-processing",
	"adamo-nuclear-urania-by-HF"
)
add_recipe_to_tech("uranium-processing",
	"adamo-nuclear-natural-uranium-hex"
)
add_recipe_to_tech("uranium-processing",
	"adamo-nuclear-LEU-enrichment"
)
add_recipe_to_tech("uranium-processing",
	"adamo-nuclear-LEU-fuel-cell"
)
add_recipe_to_tech("uranium-processing",
	"adamo-nuclear-thermal-reactor"
)
add_recipe_to_tech("nuclear-power",
	"adamo-nuclear-HEU-enrichment"
)
add_recipe_to_tech("nuclear-power",
	"adamo-nuclear-WGU-enrichment"
)
move_recipe_to_tech("nuclear-power",
	"atomic-bomb"
)
add_recipe_to_tech("nuclear-fuel-reprocessing",
	"adamo-nuclear-LEU-PUREX-by-HF"
)
add_recipe_to_tech("nuclear-fuel-reprocessing",
	"adamo-nuclear-LEU-PUREX-by-H2SO4"
)
add_recipe_to_tech("nuclear-fuel-reprocessing",
	"adamo-nuclear-LEU-REMIX"
)
add_recipe_to_tech("nuclear-fuel-reprocessing",
	"adamo-nuclear-HEU-PUREX-by-HF"
)
add_recipe_to_tech("nuclear-fuel-reprocessing",
	"adamo-nuclear-HEU-PUREX-by-H2SO4"
)
add_recipe_to_tech("nuclear-fuel-reprocessing",
	"adamo-nuclear-LEU-PUREX-enrichment"
)
add_recipe_to_tech("nuclear-fuel-reprocessing",
	"adamo-nuclear-HEU-PUREX-enrichment"
)
add_recipe_to_tech("nuclear-fuel-reprocessing",
	"adamo-nuclear-transmute-Pu238-oxide"
)
add_recipe_to_tech("nuclear-fuel-reprocessing",
	"adamo-nuclear-highgrade-RGPu-oxide"
)
add_recipe_to_tech("nuclear-fuel-reprocessing",
	"adamo-nuclear-raffinate-processing"
)
add_recipe_to_tech("kovarex-enrichment-process",
	"adamo-nuclear-aqueous-raffinate-processing"
)
add_recipe_to_tech("kovarex-enrichment-process",
	"adamo-nuclear-production-reactor"
)
add_recipe_to_tech("kovarex-enrichment-process",
	"adamo-nuclear-MOX-fuel-cell"
)
add_recipe_to_tech("kovarex-enrichment-process",
	"adamo-nuclear-MOX-REMIX"
)
add_recipe_to_tech("atomic-bomb",
	"adamo-nuclear-WGPu-enrichment"
)
add_recipe_to_tech("atomic-bomb",
	"adamo-nuclear-thermonuclear-rocket"
)
for _,table_name in pairs({
	"productivity-module",
	"productivity-module-2",
	"productivity-module-3"
}) do
	table.insert(data.raw.module[table_name].limitation,
		"adamo-nuclear-urania-by-H2SO4"
	)
	table.insert(data.raw.module[table_name].limitation,
		"adamo-nuclear-urania-by-HF"
	)
	table.insert(data.raw.module[table_name].limitation,
		"adamo-nuclear-raffinate-processing"
	)
	table.insert(data.raw.module[table_name].limitation,
		"adamo-nuclear-transmute-Pu238-oxide"
	)
	table.insert(data.raw.module[table_name].limitation,
		"adamo-nuclear-natural-uranium-hex"
	)
	table.insert(data.raw.module[table_name].limitation,
		"adamo-nuclear-highgrade-RGPu-oxide"
	)
end
-- 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 = colors.hf_base,
			tertiary = 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 = 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("kovarex-enrichment-process",
			"adamo-nuclear-"..grade.."-oxide"
		)
		add_recipe_to_tech("kovarex-enrichment-process",
			"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_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 = 3
	},
	allowed_effects = {
		"consumption",
		"speed",
		"productivity",
		"pollution"
	},
	corpse = "big-remnants",
	dying_explosion = "medium-explosion",
	resistances = {{
			type = "fire",
			percent = 70
	}},
	collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
	selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
	drawing_box = {{-1.5, -2.2}, {1.5, 1.5}},
	always_draw_idle_animation = true,
	idle_animation = {layers = centrifuge_idle_layers(1,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,
				shift = util.by_pixel(0, -27),
				hr_version = {
					filename = 
						"__adamo-nuclear__/graphics/entity/"
						.."hr-production-reactor-C-light.png",
					priority = "high",
					scale = 0.5,
					blend_mode = "additive", -- centrifuge
					line_length = 8,
					width = 190,
					height = 207,
					frame_count = 64,
					animation_speed = prod_anim_speed,
					shift = util.by_pixel(0, -27.25)
				}
			},{
				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,
				shift = util.by_pixel(16.5, 0.5),
				hr_version = {
					filename = 
						"__adamo-nuclear__/graphics/entity/"
						.."hr-production-reactor-B-light.png",
					priority = "high",
					scale = 0.5,
					blend_mode = "additive", -- centrifuge
					line_length = 8,
					width = 131,
					height = 206,
					frame_count = 64,
					animation_speed = prod_anim_speed,
					shift = util.by_pixel(16.75, 0.5)
				}
			},{
				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,
				shift = util.by_pixel(-23.5, -2),
				hr_version = {
					filename = 
						"__adamo-nuclear__/graphics/entity/"
						.."hr-production-reactor-A-light.png",
					priority = "high",
					scale = 0.5,
					blend_mode = "additive", -- centrifuge
					line_length = 8,
					width = 108,
					height = 197,
					frame_count = 64,
					animation_speed = prod_anim_speed,
					shift = util.by_pixel(-23.5, -1.75)
				}
		}}
	},
	working_visualisations = {{
			effect = "uranium-glow",
			light = {
				intensity = 0.35,
				size = 7,
				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 = centrifuge_fluid_boxes()
}

data:extend({
	thermal_reactor_entity,
	prod_reactor_entity,
})

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"
				}
			}
		}
	}
}
data:extend({
	plutonium_explosion_wave,
	plutonium_rocket_projectile,
	plutonium_rocket_ammo
})