adamo-nuclear/machines.lua
2023-12-19 23:27:07 -05:00

492 lines
12 KiB
Lua

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)
}