diff --git a/data-final-fixes.lua b/data-final-fixes.lua index 5ba1baf..1803424 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -9,7 +9,7 @@ local separation_time_mult = 1/2 local separation_prod_mult = 2 local vapor_time_mult = 2 local vapor_prod_mult = 5 -local screening_efficiency = 0.8 +local screening_efficiency = 0.5 chem_category_list = { "crafting-with-fluid", @@ -533,8 +533,18 @@ for _,recipe in pairs(data.raw.recipe) do mult_in_recipe(new_recipe,vapor_prod_mult) end adamo.recipe.tint.apply(new_recipe) - new_recipe.always_show_products = true - new_recipe.show_amount_in_title = true + if new_recipe.normal then + new_recipe.normal.always_show_products = true + new_recipe.normal.show_amount_in_title = false + if new_recipe.expensive then + new_recipe.expensive.always_show_products = true + new_recipe.expensive.show_amount_in_title = false + end + else + new_recipe.always_show_products = true + new_recipe.show_amount_in_title = false + end + new_recipe.localised_name = string.gsub(new_category,"adamo%-chemical%-","Chemical ") data:extend({new_recipe}) if is_productivity_recipe(recipe) then set_productivity_recipe(new_recipe) @@ -583,4 +593,4 @@ if data.raw["recipe-category"]["screening"] then end end end -end \ No newline at end of file +end diff --git a/data-updates.lua b/data-updates.lua index e8f2955..1ca4898 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -3,25 +3,18 @@ require("factsheet") apply_sulfur_fuel_stats(data.raw.item.sulfur) if appmod and type(appmod) == "table" then - appmod - .blacklist["assembling-machine-3"] = true + appmod.blacklist["assembling-machine-3"] = true end if appmod and type(appmod) == "table" then - appmod - .blacklist["centrifuge"] = true + appmod.blacklist["centrifuge"] = true end -local still_name = - settings.startup["adamo-chemical-still"].value -local reactor_name = - settings.startup["adamo-chemical-reactor"].value -local mixer_name = - settings.startup["adamo-chemical-mixer"].value -local kiln_name = - settings.startup["adamo-chemical-kiln"].value -local screener_name = - settings.startup["adamo-chemical-screener"].value +local still_name = settings.startup["adamo-chemical-still"].value +local reactor_name = settings.startup["adamo-chemical-reactor"].value +local mixer_name = settings.startup["adamo-chemical-mixer"].value +local kiln_name = settings.startup["adamo-chemical-kiln"].value +local screener_name = settings.startup["adamo-chemical-screener"].value add_string_to_table( data.raw["assembling-machine"]["oil-refinery"] @@ -32,23 +25,23 @@ add_string_to_table( data.raw["assembling-machine"]["assembling-machine-3"] .fluid_boxes = chem_assembling_machine_fluid_boxes() table.insert( - data.raw["assembling-machine"]["assembling-machine-3"] - .crafting_categories, + data.raw["assembling-machine"]["assembling-machine-3"].crafting_categories, + "adamo-chemical-manufacturing" +) +table.insert( + data.raw["assembling-machine"]["assembling-machine-2"].crafting_categories, "adamo-chemical-manufacturing" ) -data.raw["assembling-machine"].centrifuge.fluid_boxes = - centrifuge_fluid_boxes() +data.raw["assembling-machine"].centrifuge.fluid_boxes = centrifuge_fluid_boxes() add_string_to_table( - data.raw["assembling-machine"].centrifuge - .crafting_categories, + data.raw["assembling-machine"].centrifuge.crafting_categories, "adamo-chemical-separation" ) if data.raw["assembling-machine"][still_name] then add_string_to_table( - data.raw["assembling-machine"][still_name] - .crafting_categories, + data.raw["assembling-machine"][still_name].crafting_categories, "adamo-chemical-vaporworks" ) end @@ -100,4 +93,7 @@ if data.raw["assembling-machine"][kiln_name] then .crafting_categories, "adamo-chemical-firing" ) -end \ No newline at end of file +end + +move_recipe_to_tech("advanced-material-processing-2","centrifuge") +add_prereq_to_tech("uranium-processing","advanced-material-processing-2") diff --git a/data.lua b/data.lua index a188ff1..fd12911 100644 --- a/data.lua +++ b/data.lua @@ -1,14 +1,16 @@ require("factsheet") -require("facilities") +require("machines") adamochemical = {} adamochemical.mixer = false -informatron_make_image ( - "adamo-chemical-image", - "__adamo-chemical__/thumbnail.png", - 64,64 -) +if informatron_make_image then + informatron_make_image ( + "adamo-chemical-image", + "__adamo-chemical__/thumbnail.png", + 64,64 + ) +end data:extend({{ type = "item-group", @@ -195,10 +197,8 @@ data:extend({ }) local found_sisiquartz = false if data.raw.item["SiSi-quartz"] then - data.raw.item["SiSi-quartz"] - .order = "g[adamo-chemical-quartz]" - data.raw.item["SiSi-quartz"] - .subgroup = "raw-material" + data.raw.item["SiSi-quartz"].order = "g[adamo-chemical-quartz]" + data.raw.item["SiSi-quartz"].subgroup = "raw-material" --data.raw.item["SiSi-quartz"] --.icon = "__adamo-chemical__/graphics/icons/quartz.png" --data.raw.item["SiSi-quartz"] @@ -417,14 +417,16 @@ local clinker_recipe_with_fluorite = { {"adamo-chemical-clinker",100} } } -local brick_recipe = util.table.deepcopy( - data.raw.recipe["stone-brick"] -) -if brick_recipe then - replace_in_recipe_io( - brick_recipe,"stone","adamo-chemical-calcite" - ) - brick_recipe.name = "adamo-chemical-limestone-brick" +local limestone_brick_recipe = util.table.deepcopy(data.raw.recipe["stone-brick"]) +if limestone_brick_recipe then + replace_in_recipe_io(limestone_brick_recipe,"stone","adamo-chemical-calcite") + limestone_brick_recipe.name = "adamo-chemical-limestone-brick" +end +local mixed_brick_recipe = util.table.deepcopy(data.raw.recipe["stone-brick"]) +if mixed_brick_recipe then + add_ingredient(mixed_brick_recipe,"adamo-chemical-calcite",1) + scale_recipe(mixed_brick_recipe,1/2,"stone") + mixed_brick_recipe.name = "adamo-chemical-mixed-brick" end local cement_recipe = { type = "recipe", @@ -548,11 +550,6 @@ local advanced_froth_flotation_recipe = { } if found_sisiquartz then basic_froth_flotation_recipe.results = {{ - type = "item", - name = "SiSi-quartz", - probability = adamo.geo.abundance.quartz, - amount = mineral_output_count*recover_ratio - },{ type = "item", name = "adamo-chemical-calcite", probability = adamo.geo.abundance.calcite, @@ -564,13 +561,19 @@ if found_sisiquartz then amount = mineral_output_count*recover_ratio },{ type = "item", - name = "sulfur", - probability = adamo.geo.abundance.sulfur, - amount = mineral_output_count*recover_ratio + name = "iron-ore", + probability = adamo.geo.abundance.iron, + amount = mineral_output_count*adv_recover_ratio },{ type = "item", - name = "landfill", - amount = landfill_output_count + name = "copper-ore", + probability = adamo.geo.abundance.copper, + amount = mineral_output_count*adv_recover_ratio + },{ + type = "item", + name = "coal", + probability = adamo.geo.abundance.coal, + amount = mineral_output_count*adv_recover_ratio }} advanced_froth_flotation_recipe.results = {{ type = "item", @@ -599,13 +602,19 @@ if found_sisiquartz then amount = mineral_output_count*adv_recover_ratio },{ type = "item", - name = "coal", - probability = adamo.geo.abundance.coal, + name = "iron-ore", + probability = adamo.geo.abundance.iron, amount = mineral_output_count*adv_recover_ratio },{ type = "item", - name = "landfill", - amount = landfill_output_count + name = "copper-ore", + probability = adamo.geo.abundance.copper, + amount = mineral_output_count*adv_recover_ratio + },{ + type = "item", + name = "coal", + probability = adamo.geo.abundance.coal, + amount = mineral_output_count*adv_recover_ratio }} else basic_froth_flotation_recipe.results = {{ @@ -625,13 +634,19 @@ else amount = mineral_output_count*recover_ratio },{ type = "item", - name = "sulfur", - probability = adamo.geo.abundance.sulfur, - amount = mineral_output_count*recover_ratio + name = "iron-ore", + probability = adamo.geo.abundance.iron, + amount = mineral_output_count*adv_recover_ratio },{ type = "item", - name = "landfill", - amount = landfill_output_count + name = "copper-ore", + probability = adamo.geo.abundance.copper, + amount = mineral_output_count*adv_recover_ratio + },{ + type = "item", + name = "coal", + probability = adamo.geo.abundance.coal, + amount = mineral_output_count*adv_recover_ratio }} advanced_froth_flotation_recipe.results = {{ type = "item", @@ -660,13 +675,19 @@ else amount = mineral_output_count*adv_recover_ratio },{ type = "item", - name = "coal", - probability = adamo.geo.abundance.coal, + name = "iron-ore", + probability = adamo.geo.abundance.iron, amount = mineral_output_count*adv_recover_ratio },{ type = "item", - name = "landfill", - amount = landfill_output_count + name = "copper-ore", + probability = adamo.geo.abundance.copper, + amount = mineral_output_count*adv_recover_ratio + },{ + type = "item", + name = "coal", + probability = adamo.geo.abundance.coal, + amount = mineral_output_count*adv_recover_ratio }} end data:extend({ @@ -676,7 +697,8 @@ data:extend({ water_recipe, clinker_recipe, clinker_recipe_with_fluorite, - brick_recipe, + limestone_brick_recipe, + mixed_brick_recipe, cement_recipe, concrete_recipe, refined_concrete_recipe, diff --git a/facilities.lua b/machines.lua similarity index 85% rename from facilities.lua rename to machines.lua index aff7103..63ba341 100644 --- a/facilities.lua +++ b/machines.lua @@ -1,36 +1,28 @@ local vesselpipecovers = function() return { east = { - filename = - "__adamo-chemical__/graphics/" - .."connections/pipe-cover-east-medium.png", + 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", + 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", + 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", + filename = "__adamo-chemical__/graphics/connections/pipe-cover-south-medium.png", priority = "extra-high", width = 128, height = 128, @@ -41,17 +33,13 @@ end local vessel_layers = function() return {{ - filename = - "__adamo-chemical__/graphics/entity/" - .."process-vessel.png", + 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", + filename = "__adamo-chemical__/graphics/entity/process-vessel-shadow.png", width = 274, height = 220, frame_count = 1, @@ -68,9 +56,7 @@ local vessel_escaping_pressure_layer = function () east_position = util.by_pixel(16, 11), constant_speed = true, animation = { - filename = - "__adamo-chemical__/graphics/entity/" - .."process-vessel-anim.png", + filename = "__adamo-chemical__/graphics/entity/process-vessel-anim.png", frame_count = 40, line_length = 10, width = 128, @@ -84,9 +70,7 @@ 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", + filename = "__adamo-chemical__/graphics/entity/hr-blast-furnace.png", priority = "extra-high", width = 200, height = 221, @@ -96,9 +80,7 @@ local blast_furnace_layers = function(size,speed) size*0 ), },{ - filename = - "__base__/graphics/entity/stone-furnace/" - .."hr-stone-furnace-shadow.png", + filename = "__base__/graphics/entity/stone-furnace/hr-stone-furnace-shadow.png", priority = "extra-high", line_length = 8, width = 164, @@ -111,9 +93,7 @@ local blast_furnace_layers = function(size,speed) ), draw_as_shadow = true, },{ - filename = - "__base__/graphics/entity/boiler/" - .."hr-boiler-N-shadow.png", + filename = "__base__/graphics/entity/boiler/hr-boiler-N-shadow.png", priority = "extra-high", width = 274, height = 164, @@ -131,9 +111,7 @@ local blast_furnace_fire = function(size,speed) local speed = number_or_one(speed) local depth_scale = 0.85 return { - filename = - "__base__/graphics/entity/" - .."stone-furnace/hr-stone-furnace-fire.png", + filename = "__base__/graphics/entity/stone-furnace/hr-stone-furnace-fire.png", priority = "extra-high", animation_speed = speed, scale = 0.5*depth_scale*size, @@ -166,9 +144,7 @@ local furnace_recipe = { local furnace_item = { type = "item", name = "adamo-blast-furnace", - icon = - "__adamo-chemical__/graphics/icons/" - .."blast-furnace.png", + icon = "__adamo-chemical__/graphics/icons/blast-furnace.png", icon_size = 32, flags = {}, subgroup = "adamo-chemical-production-machine", @@ -181,9 +157,7 @@ local furnace_entity = { name = "adamo-blast-furnace", gui_title_key = "adamo-blast-furnace", has_backer_name = true, - icon = - "__adamo-chemical__/graphics/icons/" - .."blast-furnace.png", + icon = "__adamo-chemical__/graphics/icons/blast-furnace.png", icon_size = 32, flags = {"placeable-neutral", "player-creation"}, minable = { @@ -192,7 +166,7 @@ local furnace_entity = { result = "adamo-blast-furnace" }, module_specification = { - module_slots = 1 + module_slots = 3 }, allowed_effects = { "consumption", @@ -213,14 +187,14 @@ local furnace_entity = { }, selection_box = {{-1,-1}, {1,1}}, collision_box = {{-0.99, -0.99}, {0.99, 0.99}}, - crafting_speed = 1, - crafting_categories = {"adamo-chemical-firing"}, - energy_usage = "150kW", + 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 = 6, + emissions_per_minute = data.raw.furnace["steel-furnace"].energy_source.emissions_per_minute, smoke = {{ name = "smoke", position = {-0.725,-1.275}, @@ -249,7 +223,7 @@ data:extend({ furnace_entity }) add_recipe_to_tech( - "advanced-material-processing-2", + "advanced-material-processing", "adamo-blast-furnace" )