adamo-chemical/machines.lua

279 lines
6.6 KiB
Lua
Raw Permalink Normal View History

require("animations")
2020-05-21 11:36:04 +00:00
local furnace_recipe = {
type = "recipe",
name = "adamo-blast-furnace",
energy_required = 3,
2020-05-21 11:36:04 +00:00
enabled = false,
ingredients = {
{"stone-furnace", 1},
{"steel-plate", 4},
2023-11-29 07:53:46 +00:00
{"pipe", 1},
2020-05-21 11:36:04 +00:00
},
results = {
{"adamo-blast-furnace", 1}
}
}
local furnace_item = {
type = "item",
name = "adamo-blast-furnace",
icon = "__adamo-chemical__/graphics/icons/blast-furnace.png",
2020-05-21 11:36:04 +00:00
icon_size = 32,
flags = {},
subgroup = "adamo-chemical-production-machine",
order = "c[adamo-blast-furnace]",
place_result = "adamo-blast-furnace",
2023-11-29 08:12:27 +00:00
stack_size = 50
2020-05-21 11:36:04 +00:00
}
local furnace_entity = {
type = "assembling-machine",
name = "adamo-blast-furnace",
gui_title_key = "adamo-blast-furnace",
has_backer_name = true,
icon = "__adamo-chemical__/graphics/icons/blast-furnace.png",
2020-05-21 11:36:04 +00:00
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
minable = {
hardness = 0.2,
mining_time = 0.2,
2020-05-21 11:36:04 +00:00
result = "adamo-blast-furnace"
},
fast_replaceable_group = "furnace",
2020-05-21 11:36:04 +00:00
module_specification = {
module_slots = 2
2020-05-21 11:36:04 +00:00
},
allowed_effects = {
"consumption",
"speed",
"productivity",
"pollution"
},
max_health = 250,
corpse = "medium-remnants",
vehicle_impact_sound = {
filename = "__base__/sound/car-metal-impact.ogg",
volume = 0.65
},
resistances = {
{ type = "fire", percent = 100 },
{ type = "explosion", percent = 30 },
{ type = "impact", percent = 50 }
},
selection_box = {{-1,-1}, {1,1}},
collision_box = {{-0.99, -0.99}, {0.99, 0.99}},
crafting_speed = data.raw.furnace["steel-furnace"].crafting_speed,
crafting_categories = {"smelting", "adamo-chemical-firing"},
energy_usage = data.raw.furnace["steel-furnace"].energy_usage,
2020-05-21 11:36:04 +00:00
energy_source = {
type = "burner",
fuel_category = "chemical",
fuel_inventory_size = 1,
emissions_per_minute = data.raw.furnace["steel-furnace"].energy_source.emissions_per_minute,
2020-05-21 11:36:04 +00:00
smoke = {{
name = "smoke",
position = {-0.725,-1.275},
frequency = 10,
starting_vertical_speed = 0.12,
deviation = {0.025,0.05}
}}
},
animation = {
layers = blast_furnace_layers()
},
working_visualisations = {{
animation = blast_furnace_fire()
}},
working_sound = {
sound = {
filename = "__base__/sound/furnace.ogg",
volume = 1.6
},
max_sounds_per_type = 3
}
}
data:extend({
furnace_recipe,
furnace_item,
furnace_entity
})
add_recipe_to_tech(
"advanced-material-processing",
2020-05-21 11:36:04 +00:00
"adamo-blast-furnace"
)
local process_vessel_recipe = {
type = "recipe",
name = "adamo-chemical-process-vessel",
energy_required = 8,
2020-05-21 11:36:04 +00:00
enabled = false,
ingredients = {
{"refined-concrete", 200},
{"steel-plate", 200},
{"advanced-circuit",100},
{"pipe", 100},
{"pump",10}
2020-05-21 11:36:04 +00:00
},
results = {{"adamo-chemical-process-vessel", 1}},
}
local process_vessel_item = {
type = "item",
name = "adamo-chemical-process-vessel",
icon = "__adamo-chemical__/graphics/icons/process-vessel.png",
icon_size = 32,
flags = {},
subgroup = "adamo-chemical-production-machine",
order = "g[adamo-chemical-process-vessel]",
place_result = "adamo-chemical-process-vessel",
stack_size = 10
}
2023-11-29 08:09:11 +00:00
local chemplant = data.raw["assembling-machine"]["chemical-plant"]
2020-05-21 11:36:04 +00:00
local process_vessel_entity = {
type = "assembling-machine",
name = "adamo-chemical-process-vessel",
gui_title_key = "adamo-chemical-process-vessel",
has_backer_name = true,
scale_entity_info_icon = true,
icon = "__adamo-chemical__/graphics/icons/process-vessel.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
minable = {
mining_time = 0.5,
2020-05-21 11:36:04 +00:00
result = "adamo-chemical-process-vessel"
},
fast_replaceable_group = "process-vessel",
2023-11-29 08:09:11 +00:00
max_health = chemplant.max_health*2.5,
corpse = "big-scorchmark",
dying_explosion = "massive-explosion",
2020-05-21 11:36:04 +00:00
collision_box = {{-2.4, -2.4}, {2.4, 2.4}},
selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
module_specification = {module_slots = 5},
2020-05-21 11:36:04 +00:00
allowed_effects = {
"consumption",
"speed",
"productivity",
"pollution"
},
crafting_categories = {
"adamo-chemical-hydrolysis",
"adamo-chemical-displacement",
"adamo-chemical-heating",
"adamo-chemical-deposition",
"adamo-chemical-decomposition",
"adamo-chemical-recovery",
"adamo-chemical-activation",
"adamo-chemical-disassociation"
},
2023-11-29 08:09:11 +00:00
crafting_speed = chemplant.crafting_speed*3,
2020-05-21 11:36:04 +00:00
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = chemplant.energy_source.emissions_per_minute*3,
2020-05-21 11:36:04 +00:00
},
energy_usage = energy_mult(chemplant.energy_usage,4),
2020-05-21 11:36:04 +00:00
ingredient_count = 4,
animation = {layers = vessel_layers()},
working_visualisations = {vessel_escaping_pressure_layer()},
2020-05-21 11:36:04 +00:00
fluid_boxes = {{
production_type = "input",
base_level = -1,
height = 1,
pipe_covers = vesselpipecovers(),
2020-11-17 01:13:48 +00:00
pipe_connections = {{
type = "input",
base_area = 10,
position = {-1.0,3.0}
}}
2020-05-21 11:36:04 +00:00
},{
production_type = "input",
base_level = -1,
height = 1,
pipe_covers = vesselpipecovers(),
2020-11-17 01:13:48 +00:00
pipe_connections = {{
type = "input",
base_area = 10,
position = {1.0,-3.0}
}}
2020-05-21 11:36:04 +00:00
},{
production_type = "input",
base_level = -1,
height = 1,
pipe_covers = vesselpipecovers(),
2020-11-17 01:13:48 +00:00
pipe_connections = {{
type = "input",
base_area = 10,
position = {3.0, 1.0}
}}
2020-05-21 11:36:04 +00:00
},{
production_type = "input",
base_level = -1,
height = 1,
pipe_covers = vesselpipecovers(),
2020-11-17 01:13:48 +00:00
pipe_connections = {{
type = "input",
base_area = 10,
position = {-3.0,-1.0}
}}
2020-05-21 11:36:04 +00:00
},{
production_type = "output",
base_level = 1,
pipe_covers = vesselpipecovers(),
pipe_connections = {
{position = {-3.0, 2.0}},
}
},{
production_type = "output",
base_level = 1,
pipe_covers = vesselpipecovers(),
pipe_connections = {
{position = {3.0, -2.0}},
}
},{
production_type = "output",
base_level = 1,
pipe_covers = vesselpipecovers(),
pipe_connections = {
{position = {2.0, 3.0}},
}
},{
production_type = "output",
base_level = 1,
pipe_covers = vesselpipecovers(),
pipe_connections = {
{position = {-2.0, -3.0}},
}
}
},
vehicle_impact_sound = {
filename = "__base__/sound/car-metal-impact.ogg",
volume = 0.65
},
working_sound = {
sound = {
filename =
"__adamo-chemical__/sounds/process-vessel.ogg",
volume = 0.6
},
idle_sound = {
filename =
"__adamo-chemical__/sounds/process-vessel.ogg",
volume = 0.1
},
apparent_volume = 2.5
}
}
data:extend({
process_vessel_recipe,
process_vessel_item,
process_vessel_entity
})
if data.raw.technology["advanced-material-processing-3"] then
add_recipe_to_tech(
"advanced-material-processing-3",
"adamo-chemical-process-vessel"
)
else
add_recipe_to_tech(
"automation-3",
2020-05-21 11:36:04 +00:00
"adamo-chemical-process-vessel"
)
end