added refinery [WIP] + overhaul cleanup

This commit is contained in:
PreLeyZero 2022-04-14 00:54:40 +02:00
parent 9db4042839
commit 4beb29c9d2
11 changed files with 273 additions and 63 deletions

View file

@ -326,6 +326,11 @@ data:extend({
name = 'fi_crushing',
type = 'recipe-category',
},
--fi refining
{
name = 'fi_refining',
type = 'recipe-category',
},
--fi_modules
--producticity
{

View file

@ -1204,7 +1204,23 @@ data:extend({
energy_required = 1,
order = 'a-b',
},
{
name = 'el_kerosene_basic_recipe',
type = 'recipe',
enabled = 'false',
category = 'oil-processing',
main_product = 'el_kerosene',
ingredients = {
{type="fluid", name="crude-oil", amount=200},
{type="fluid", name="steam", amount=100},
},
results = {
{type="fluid", name="el_kerosene", amount=140},
{type="fluid", name="water", amount=90},
},
result_count = 1,
energy_required = 5,
},

View file

@ -1204,4 +1204,32 @@ data:extend({
order = 'a-b',
always_show_made_in = true,
},
{
name = 'fi_refinery_recipe',
type = 'recipe',
enabled = 'false',
category = 'crafting',
ingredients = {
{type="item", name="el_materials_ALK", amount=1},
},
results = {
{type="item", name="fi_refinery_item", amount=1}
},
energy_required = 1,
order = 'a-b',
},
{
name = 'fi_refinery_blank_recipe',
type = 'recipe',
enabled = 'false',
category = 'fi_refining',
ingredients = {
{type="fluid", name="water", amount=100},
},
results = {
{type="fluid", name="steam", amount=100}
},
energy_required = 1,
order = 'a-b',
},
})

View file

@ -0,0 +1,201 @@
--local functions
local function config(name)
return settings.startup['fi_refinery_'..name].value
end
local function sprite(name)
return '__248k__/ressources/fission/fi_refinery/fi_refinery_'..name
end
--item
data:extend({
{
name = 'fi_refinery_item',
type = 'item',
icon = sprite('icon.png'),
icon_size = 64,
place_result = 'fi_refinery_entity',
stack_size = 20,
subgroup = 'fi_item_subgroup_c',
order = 'a-c',
},
})
--entity
data:extend({
--prototype
{
name = 'fi_refinery_entity',
type = 'assembling-machine',
icon = sprite('icon.png'),
icon_size = 64,
flags = {"player-creation","placeable-neutral"},
max_health = 300,
corpse = 'big-remnants',
collision_box = {{-3.4,-3.4},{3.4,3.4}},
selection_box = {{-3.5,-3.5},{3.5,3.5}},
map_color = {r=0, g=0, b=1, a=1},
minable = {
mining_time = 1,
result = 'fi_refinery_item',
},
crafting_categories = {'fi_refining'},
crafting_speed = 1,
energy_source = {
type = 'electric',
usage_priority = 'secondary-input',
--input_flow_limit = '4MW',
},
energy_usage = '1MW',
allowed_effects = {"speed", "productivity", "consumption", "pollution"},
module_specification = {
module_info_icon_shift = {
0,
0.8
},
module_slots = 2
},
fluid_boxes = {
{
base_area = 1,
height = 2,
base_level = -1,
pipe_covers = pipecoverspictures(),
pipe_picture = grey_south_pipe_picture,
pipe_connections =
{
{type = "input", position = {1, 4}},
},
production_type = "input"
},
{
base_area = 1,
height = 2,
base_level = -1,
pipe_covers = pipecoverspictures(),
pipe_picture = grey_south_pipe_picture,
pipe_connections =
{
{type = "input", position = {-1, 4}},
},
production_type = "input"
},
{
base_area = 1,
height = 2,
base_level = 1,
pipe_covers = pipecoverspictures(),
pipe_picture = grey_south_pipe_picture,
pipe_connections =
{
{type = "output", position = {1, -4}},
},
production_type = "output"
},
{
base_area = 1,
height = 2,
base_level = 1,
pipe_covers = pipecoverspictures(),
pipe_picture = grey_south_pipe_picture,
pipe_connections =
{
{type = "output", position = {-1, -4}},
},
production_type = "output"
},
{
base_area = 1,
height = 2,
base_level = -1,
pipe_covers = pipecoverspictures(),
pipe_picture = grey_south_pipe_picture,
pipe_connections =
{
{type = "input", position = {-4, -1}},
},
production_type = "input"
},
{
base_area = 1,
height = 2,
base_level = -1,
pipe_covers = pipecoverspictures(),
pipe_picture = grey_south_pipe_picture,
pipe_connections =
{
{type = "input", position = {-4, 1}},
},
production_type = "input"
},
{
base_area = 1,
height = 2,
base_level = 1,
pipe_covers = pipecoverspictures(),
pipe_picture = grey_south_pipe_picture,
pipe_connections =
{
{type = "output", position = {4, 1}},
},
production_type = "output"
},
{
base_area = 1,
height = 2,
base_level = 1,
pipe_covers = pipecoverspictures(),
pipe_picture = grey_south_pipe_picture,
pipe_connections =
{
{type = "output", position = {4, -1}},
},
production_type = "output"
},
},
--animation
animation = {
filename = sprite('base.png'),
size = {1024, 1024},
scale = 0.339,
shift = {1.31,-1.9},
line_length = 1,
lines_per_file = 1,
frame_count = 1,
animation_speed = 1,
},
working_visualisations = {
{
animation =
{
filename = sprite('animation.png'),
size = {1024, 1024},
scale = 0.339,
line_length = 3,
lines_per_file = 3,
frame_count = 9,
animation_speed = 0.3,
shift = {1.31,-1.9}
},
light = {
type = "basic",
intensity = 1,
size = 16,
color = {r=1 ,g=1 ,b=1 },
}
}
},
working_sound = {
sound = { filename ='__base__/sound/electric-mining-drill.ogg'},
apparent_volume = 2.7,
},
},
})