mirror of
https://asciireactor.com/factorio/adamo-chemical.git
synced 2024-11-22 02:55:08 +00:00
414 lines
9.5 KiB
Lua
414 lines
9.5 KiB
Lua
local vesselpipecovers = function()
|
|
return {
|
|
east = {
|
|
filename = "__adamo-chemical__/graphics/connections/pipe-cover-east-medium.png",
|
|
priority = "extra-high",
|
|
width = 128,
|
|
height = 128,
|
|
scale = 0.5
|
|
},
|
|
west = {
|
|
filename = "__adamo-chemical__/graphics/connections/pipe-cover-west-medium.png",
|
|
priority = "extra-high",
|
|
width = 128,
|
|
height = 128,
|
|
scale = 0.5
|
|
},
|
|
north = {
|
|
filename = "__adamo-chemical__/graphics/connections/pipe-cover-north-medium.png",
|
|
priority = "extra-high",
|
|
width = 128,
|
|
height = 128,
|
|
scale = 0.5,
|
|
},
|
|
south = {
|
|
filename = "__adamo-chemical__/graphics/connections/pipe-cover-south-medium.png",
|
|
priority = "extra-high",
|
|
width = 128,
|
|
height = 128,
|
|
scale = 0.5,
|
|
},
|
|
}
|
|
end
|
|
|
|
local vessel_layers = function()
|
|
return {{
|
|
filename = "__adamo-chemical__/graphics/entity/process-vessel.png",
|
|
width = 160,
|
|
height = 220,
|
|
frame_count = 1,
|
|
shift = util.by_pixel(0, -23)
|
|
},{
|
|
filename = "__adamo-chemical__/graphics/entity/process-vessel-shadow.png",
|
|
width = 274,
|
|
height = 220,
|
|
frame_count = 1,
|
|
draw_as_shadow = true,
|
|
shift = util.by_pixel(58, -26)
|
|
}}
|
|
end
|
|
|
|
local vessel_escaping_pressure_layer = function ()
|
|
return {
|
|
north_position = util.by_pixel(16, 11),
|
|
west_position = util.by_pixel(16, 11),
|
|
south_position = util.by_pixel(16, 11),
|
|
east_position = util.by_pixel(16, 11),
|
|
constant_speed = true,
|
|
animation = {
|
|
filename = "__adamo-chemical__/graphics/entity/process-vessel-anim.png",
|
|
frame_count = 40,
|
|
line_length = 10,
|
|
width = 128,
|
|
height = 96,
|
|
animation_speed = 0.8
|
|
}
|
|
}
|
|
end
|
|
|
|
local blast_furnace_layers = function(size,speed)
|
|
local size = number_or_one(size)
|
|
local speed = number_or_one(speed)
|
|
return {{
|
|
filename = "__adamo-chemical__/graphics/entity/hr-blast-furnace.png",
|
|
priority = "extra-high",
|
|
width = 200,
|
|
height = 221,
|
|
scale = 0.5*size,
|
|
shift = util.by_pixel(
|
|
size*0,
|
|
size*0
|
|
),
|
|
},{
|
|
filename = "__base__/graphics/entity/stone-furnace/hr-stone-furnace-shadow.png",
|
|
priority = "extra-high",
|
|
line_length = 8,
|
|
width = 164,
|
|
height = 74,
|
|
scale = 0.5*size,
|
|
frame_count = 1,
|
|
shift = util.by_pixel(
|
|
size*42,
|
|
size*16
|
|
),
|
|
draw_as_shadow = true,
|
|
},{
|
|
filename = "__base__/graphics/entity/boiler/hr-boiler-N-shadow.png",
|
|
priority = "extra-high",
|
|
width = 274,
|
|
height = 164,
|
|
scale = 0.3*size,
|
|
shift = util.by_pixel(
|
|
size*26,
|
|
size*6
|
|
),
|
|
draw_as_shadow = true
|
|
}}
|
|
end
|
|
|
|
local blast_furnace_fire = function(size,speed)
|
|
local size = number_or_one(size)
|
|
local speed = number_or_one(speed)
|
|
local depth_scale = 0.85
|
|
return {
|
|
filename = "__base__/graphics/entity/stone-furnace/hr-stone-furnace-fire.png",
|
|
priority = "extra-high",
|
|
animation_speed = speed,
|
|
scale = 0.5*depth_scale*size,
|
|
line_length = 8,
|
|
width = 41,
|
|
height = 100,
|
|
frame_count = 48,
|
|
axially_symmetrical = false,
|
|
direction_count = 1,
|
|
shift = util.by_pixel(
|
|
0/size,
|
|
-10/size
|
|
),
|
|
}
|
|
end
|
|
local furnace_recipe = {
|
|
type = "recipe",
|
|
name = "adamo-blast-furnace",
|
|
energy_required = 2,
|
|
enabled = false,
|
|
ingredients = {
|
|
{"stone-furnace", 1},
|
|
{"steel-plate", 3},
|
|
{"pipe", 1},
|
|
},
|
|
results = {
|
|
{"adamo-blast-furnace", 1}
|
|
}
|
|
}
|
|
local furnace_item = {
|
|
type = "item",
|
|
name = "adamo-blast-furnace",
|
|
icon = "__adamo-chemical__/graphics/icons/blast-furnace.png",
|
|
icon_size = 32,
|
|
flags = {},
|
|
subgroup = "adamo-chemical-production-machine",
|
|
order = "c[adamo-blast-furnace]",
|
|
place_result = "adamo-blast-furnace",
|
|
stack_size = 25
|
|
}
|
|
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",
|
|
icon_size = 32,
|
|
flags = {"placeable-neutral", "player-creation"},
|
|
minable = {
|
|
hardness = 0.2,
|
|
mining_time = 1,
|
|
result = "adamo-blast-furnace"
|
|
},
|
|
module_specification = {
|
|
module_slots = 3
|
|
},
|
|
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,
|
|
energy_source = {
|
|
type = "burner",
|
|
fuel_category = "chemical",
|
|
fuel_inventory_size = 1,
|
|
emissions_per_minute = data.raw.furnace["steel-furnace"].energy_source.emissions_per_minute,
|
|
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",
|
|
"adamo-blast-furnace"
|
|
)
|
|
|
|
local process_vessel_recipe = {
|
|
type = "recipe",
|
|
name = "adamo-chemical-process-vessel",
|
|
energy_required = 5,
|
|
enabled = false,
|
|
ingredients = {
|
|
{"concrete", 50},
|
|
{"pump",10},
|
|
{"electronic-circuit",20},
|
|
{"advanced-circuit",20},
|
|
{"pipe", 20},
|
|
{"steel-plate", 50}
|
|
},
|
|
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
|
|
}
|
|
local chemplant = data.raw["assembling-machine"]["chemical-plant"]
|
|
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 = 3,
|
|
result = "adamo-chemical-process-vessel"
|
|
},
|
|
fast_replaceable_group = "assembling-machine",
|
|
max_health = chemplant.max_health*2.5,
|
|
corpse = "medium-remnants",
|
|
dying_explosion = "big-explosion",
|
|
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
|
|
},
|
|
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"
|
|
},
|
|
result_inventory_size = 0,
|
|
crafting_speed = chemplant.crafting_speed*3,
|
|
energy_source = {
|
|
type = "electric",
|
|
usage_priority = "secondary-input",
|
|
emissions_per_minute = chemplant.energy_source.emissions_per_minute*2,
|
|
},
|
|
energy_usage = energy_mult(chemplant.energy_usage,3.5),
|
|
ingredient_count = 4,
|
|
animation = {
|
|
layers = vessel_layers()
|
|
},
|
|
working_visualisations = {
|
|
vessel_escaping_pressure_layer()
|
|
},
|
|
fluid_boxes = {{
|
|
production_type = "input",
|
|
base_level = -1,
|
|
height = 1,
|
|
pipe_covers = vesselpipecovers(),
|
|
pipe_connections = {{
|
|
type = "input",
|
|
base_area = 10,
|
|
position = {-1.0,3.0}
|
|
}}
|
|
},{
|
|
production_type = "input",
|
|
base_level = -1,
|
|
height = 1,
|
|
pipe_covers = vesselpipecovers(),
|
|
pipe_connections = {{
|
|
type = "input",
|
|
base_area = 10,
|
|
position = {1.0,-3.0}
|
|
}}
|
|
},{
|
|
production_type = "input",
|
|
base_level = -1,
|
|
height = 1,
|
|
pipe_covers = vesselpipecovers(),
|
|
pipe_connections = {{
|
|
type = "input",
|
|
base_area = 10,
|
|
position = {3.0, 1.0}
|
|
}}
|
|
},{
|
|
production_type = "input",
|
|
base_level = -1,
|
|
height = 1,
|
|
pipe_covers = vesselpipecovers(),
|
|
pipe_connections = {{
|
|
type = "input",
|
|
base_area = 10,
|
|
position = {-3.0,-1.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 = {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(
|
|
"logistics-3",
|
|
"adamo-chemical-process-vessel"
|
|
)
|
|
end
|