Skip to content

Commit

Permalink
Bob's Assembly 2.0 super final polish (#234)
Browse files Browse the repository at this point in the history
* advanced-electronics-3 -> advanced-processing-unit

* advanced-electronics-3 -> advanced-processing-unit

* advanced-electronics-3 -> advanced-processing-unit

* advanced-electronics-3 -> advanced-processing-unit

* advanced-electronics-3 -> advanced-processing-unit

* advanced-electronics-3 -> advanced-processing-unit

* advanced-electronics-3 -> advanced-processing-unit

* advanced-electronics-3 -> advanced-processing-unit

* Update icon drawing

* Update icon drawing

* Update icon drawing

* Update icon drawing

* Update icon drawing

* Update icon drawing

* Update icon drawing

* Update icon drawing

* Update icon drawing

* Update icon drawing

* Update icon drawing

* Update icon drawing and electrolyser circuit connectors, add "smelting" to chem furnaces

* Update icon drawing

* advanced-electronics-3 -> advanced-processing-unit

* Add advanced processing unit tech locale

* Update tech icons

* Update tech icons

* Update tech icons

* Migrate advanced-electronics-3 -> advanced-processing-unit

* Add quality to all

* Add quality to electrolyser, electric furnaces

* Update icon drawing

* Check quality feature flag rather than quality mod

* Remove smelting category from chemical furnaces

---------

Co-authored-by: KiwiHawk <[email protected]>
  • Loading branch information
Qatavin and KiwiHawk authored Nov 23, 2024
1 parent c6410b9 commit 8d22c92
Show file tree
Hide file tree
Showing 27 changed files with 354 additions and 80 deletions.
32 changes: 32 additions & 0 deletions bobassembly/data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,35 @@ require("prototypes.chemical-mixing-furnace")
require("prototypes.distillery")
require("prototypes.fluid-furnace")
require("prototypes.centrifuge")

if feature_flags["quality"] then
if data.raw["assembling-machine"]["assembling-machine-6"] then
table.insert(data.raw["assembling-machine"]["assembling-machine-4"].allowed_effects, "quality")
table.insert(data.raw["assembling-machine"]["assembling-machine-5"].allowed_effects, "quality")
table.insert(data.raw["assembling-machine"]["assembling-machine-6"].allowed_effects, "quality")
end
if data.raw["assembling-machine"]["electronics-machine-3"] then
table.insert(data.raw["assembling-machine"]["electronics-machine-1"].allowed_effects, "quality")
table.insert(data.raw["assembling-machine"]["electronics-machine-2"].allowed_effects, "quality")
table.insert(data.raw["assembling-machine"]["electronics-machine-3"].allowed_effects, "quality")
end
if data.raw["assembling-machine"]["chemical-plant-4"] then
table.insert(data.raw["assembling-machine"]["chemical-plant-2"].allowed_effects, "quality")
table.insert(data.raw["assembling-machine"]["chemical-plant-3"].allowed_effects, "quality")
table.insert(data.raw["assembling-machine"]["chemical-plant-4"].allowed_effects, "quality")
end
if data.raw.furnace["electric-furnace-3"] then
table.insert(data.raw.furnace["electric-furnace-2"].allowed_effects, "quality")
table.insert(data.raw.furnace["electric-furnace-3"].allowed_effects, "quality")
end
if data.raw["assembling-machine"]["electrolyser-5"] then
table.insert(data.raw["assembling-machine"]["electrolyser-2"].allowed_effects, "quality")
table.insert(data.raw["assembling-machine"]["electrolyser-3"].allowed_effects, "quality")
table.insert(data.raw["assembling-machine"]["electrolyser-4"].allowed_effects, "quality")
table.insert(data.raw["assembling-machine"]["electrolyser-5"].allowed_effects, "quality")
end
if data.raw["assembling-machine"]["electric-chemical-mixing-furnace-2"] then
table.insert(data.raw["assembling-machine"]["electric-chemical-mixing-furnace"].allowed_effects, "quality")
table.insert(data.raw["assembling-machine"]["electric-chemical-mixing-furnace-2"].allowed_effects, "quality")
end
end
7 changes: 7 additions & 0 deletions bobassembly/prototypes/assembly-burner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ if not mods["aai-industry"] and settings.startup["bobmods-assembly-burner"].valu
},
},
energy_usage = "60kW",
icon_draw_specification = {
scale = 0.66,
shift = { 0, -0.15 }
},
allowed_effects = {},
},

Expand Down Expand Up @@ -324,6 +328,9 @@ if not mods["aai-industry"] and settings.startup["bobmods-assembly-burner"].valu
},
},
energy_usage = "300kW",
icon_draw_specification = {
shift = { 0, -0.3 }
},
allowed_effects = {},
},

Expand Down
2 changes: 1 addition & 1 deletion bobassembly/prototypes/assembly-electronics-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then
end
if data.raw.item["advanced-processing-unit"] then
bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "processing-unit", "advanced-processing-unit")
bobmods.lib.tech.add_prerequisite("electronics-machine-3", "advanced-electronics-3")
bobmods.lib.tech.add_prerequisite("electronics-machine-3", "advanced-processing-unit")
end

if settings.startup["bobmods-assembly-limits"].value == true then
Expand Down
28 changes: 27 additions & 1 deletion bobassembly/prototypes/assembly-electronics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,18 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then
},
energy_usage = "100kW",
module_slots = 2,
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.5 },
scale = 0.4,
multi_row_initial_height_modifier = -0.3,
},
},
icon_draw_specification = {
scale = 0.66,
shift = { 0, -0.15 }
},
allowed_effects = { "consumption", "speed", "productivity", "pollution" },
},

Expand Down Expand Up @@ -318,9 +330,16 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
max_icons_per_row = 3,
shift = { 0, 0.7 },
scale = 0.4,
multi_row_initial_height_modifier = -0.3,
max_icons_per_row = 2,
},
},
icon_draw_specification = {
scale = 0.66,
shift = { 0, -0.15 }
},
allowed_effects = { "consumption", "speed", "productivity", "pollution" },
},

Expand Down Expand Up @@ -491,9 +510,16 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.7 },
scale = 0.4,
multi_row_initial_height_modifier = -0.3,
max_icons_per_row = 3,
},
},
icon_draw_specification = {
scale = 0.66,
shift = { 0, -0.15 }
},
allowed_effects = { "consumption", "speed", "productivity", "pollution" },
},

Expand Down
2 changes: 1 addition & 1 deletion bobassembly/prototypes/assembly-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ end

if data.raw.item["advanced-processing-unit"] then
bobmods.lib.recipe.replace_ingredient("assembling-machine-5", "processing-unit", "advanced-processing-unit")
bobmods.lib.tech.add_prerequisite("automation-5", "advanced-electronics-3")
bobmods.lib.tech.add_prerequisite("automation-5", "advanced-processing-unit")
bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "processing-unit", "advanced-processing-unit")
end

Expand Down
20 changes: 12 additions & 8 deletions bobassembly/prototypes/assembly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,8 @@ data:extend({
},
energy_usage = "300kW",
module_slots = 4,
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.5 },
multi_row_initial_height_modifier = -0.3,
},
icon_draw_specification = {
shift = { 0, -0.3 }
},
allowed_effects = { "consumption", "speed", "productivity", "pollution" },
},
Expand Down Expand Up @@ -324,10 +320,14 @@ data:extend({
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.5 },
shift = { 0, 0.8 },
multi_row_initial_height_modifier = -0.3,
max_icons_per_row = 3,
},
},
icon_draw_specification = {
shift = { 0, -0.3 }
},
allowed_effects = { "consumption", "speed", "productivity", "pollution" },
},

Expand Down Expand Up @@ -503,10 +503,14 @@ data:extend({
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.5 },
shift = { 0, 0.8 },
multi_row_initial_height_modifier = -0.3,
max_icons_per_row = 3,
},
},
icon_draw_specification = {
shift = { 0, -0.3 }
},
allowed_effects = { "consumption", "speed", "productivity", "pollution" },
},

Expand Down
2 changes: 1 addition & 1 deletion bobassembly/prototypes/centrifuge-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if settings.startup["bobmods-assembly-centrifuge"].value == true then

if data.raw.item["advanced-processing-unit"] then
bobmods.lib.recipe.replace_ingredient("centrifuge-3", "processing-unit", "advanced-processing-unit")
bobmods.lib.tech.add_prerequisite("centrifuge-3", "advanced-electronics-3")
bobmods.lib.tech.add_prerequisite("centrifuge-3", "advanced-processing-unit")
end

if data.raw.item["nitinol-gear-wheel"] then
Expand Down
8 changes: 8 additions & 0 deletions bobassembly/prototypes/centrifuge.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ if settings.startup["bobmods-assembly-centrifuge"].value == true then
energy_usage = "1050kW",
energy_source = { emissions_per_minute = { pollution = 2 } },
module_slots = 6,
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.8 },
multi_row_initial_height_modifier = -0.3,
max_icons_per_row = 3
},
},
},
}),

Expand Down
2 changes: 1 addition & 1 deletion bobassembly/prototypes/chemical-mixing-furnace-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ then
"processing-unit",
"advanced-processing-unit"
)
bobmods.lib.tech.add_prerequisite("multi-purpose-furnace-2", "advanced-electronics-3")
bobmods.lib.tech.add_prerequisite("multi-purpose-furnace-2", "advanced-processing-unit")
end

if settings.startup["bobmods-assembly-limits"].value == true then
Expand Down
12 changes: 9 additions & 3 deletions bobassembly/prototypes/chemical-mixing-furnace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,12 @@ then
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.5 },
multi_row_initial_height_modifier = -0.3,
shift = { 0, 0.8 },
},
},
icon_draw_specification = {
shift = { 0, -0.1 }
},
crafting_speed = 3,
crafting_categories = { "smelting", "mixing-furnace", "chemical-furnace" },
energy_usage = "250kW",
Expand Down Expand Up @@ -246,10 +248,14 @@ then
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.5 },
shift = { 0, 0.8 },
multi_row_initial_height_modifier = -0.3,
max_icons_per_row = 3
},
},
icon_draw_specification = {
shift = { 0, -0.1 }
},
crafting_speed = 4,
crafting_categories = { "smelting", "mixing-furnace", "chemical-furnace" },
energy_usage = "300kW",
Expand Down
2 changes: 1 addition & 1 deletion bobassembly/prototypes/chemical-plant-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then
end

if data.raw.item["advanced-processing-unit"] then
bobmods.lib.tech.add_prerequisite("chemical-plant-4", "advanced-electronics-3")
bobmods.lib.tech.add_prerequisite("chemical-plant-4", "advanced-processing-unit")
end

if settings.startup["bobmods-assembly-limits"].value == true then
Expand Down
25 changes: 25 additions & 0 deletions bobassembly/prototypes/chemical-plant.lua
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then
selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } },
allowed_effects = { "consumption", "speed", "productivity", "pollution" },
module_slots = 4,
icon_draw_specification = {
shift = { 0, -0.3 }
},
crafting_speed = 1.75,
energy_usage = "260kW",
energy_source = {
Expand Down Expand Up @@ -269,6 +272,17 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then
selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } },
allowed_effects = { "consumption", "speed", "productivity", "pollution" },
module_slots = 5,
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.8 },
multi_row_initial_height_modifier = -0.3,
max_icons_per_row = 3,
},
},
icon_draw_specification = {
shift = { 0, -0.3 }
},
crafting_speed = 2.75,
energy_usage = "390kW",
energy_source = {
Expand Down Expand Up @@ -305,6 +319,17 @@ if settings.startup["bobmods-assembly-chemicalplants"].value == true then
selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } },
allowed_effects = { "consumption", "speed", "productivity", "pollution" },
module_slots = 6,
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.8 },
multi_row_initial_height_modifier = -0.3,
max_icons_per_row = 3,
},
},
icon_draw_specification = {
shift = { 0, -0.3 }
},
crafting_speed = 3.5,
energy_usage = "480kW",
energy_source = {
Expand Down
27 changes: 27 additions & 0 deletions bobassembly/prototypes/distillery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,15 @@ then
crafting_speed = 2.1,
energy_usage = "205kW",
module_slots = 3,
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.7 },
scale = 0.4,
multi_row_initial_height_modifier = -0.3,
max_icons_per_row = 2,
},
},
next_upgrade = "bob-distillery-4",
},
}),
Expand All @@ -224,6 +233,15 @@ then
crafting_speed = 2.8,
energy_usage = "242kW",
module_slots = 4,
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.7 },
scale = 0.4,
multi_row_initial_height_modifier = -0.3,
max_icons_per_row = 2,
},
},
next_upgrade = "bob-distillery-5",
},
}),
Expand All @@ -246,6 +264,15 @@ then
crafting_speed = 3.5,
energy_usage = "270kW",
module_slots = 5,
icons_positioning = {
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.7 },
scale = 0.4,
multi_row_initial_height_modifier = -0.3,
max_icons_per_row = 3,
},
},
},
}),

Expand Down
2 changes: 1 addition & 1 deletion bobassembly/prototypes/electric-furnace-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ if settings.startup["bobmods-assembly-furnaces"].value == true and data.raw.furn

if data.raw.item["advanced-processing-unit"] then
bobmods.lib.recipe.replace_ingredient("electric-furnace-3", "processing-unit", "advanced-processing-unit")
bobmods.lib.tech.add_prerequisite("advanced-material-processing-4", "advanced-electronics-3")
bobmods.lib.tech.add_prerequisite("advanced-material-processing-4", "advanced-processing-unit")
end
end
15 changes: 13 additions & 2 deletions bobassembly/prototypes/electric-furnace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if settings.startup["bobmods-assembly-furnaces"].value == true and data.raw.furn
end

local function bob_electric_furnace(input)
return {
local prototype = {
type = "furnace",
name = input.name,
icon = input.icon,
Expand All @@ -100,9 +100,11 @@ if settings.startup["bobmods-assembly-furnaces"].value == true and data.raw.furn
{
inventory_index = defines.inventory.assembling_machine_modules,
shift = { 0, 0.8 },
multi_row_initial_height_modifier = -0.3,
},
},
icon_draw_specification = {
shift = { 0, -0.1 }
},
allowed_effects = { "consumption", "speed", "productivity", "pollution" },
crafting_categories = { "smelting" },
result_inventory_size = 1,
Expand All @@ -128,6 +130,15 @@ if settings.startup["bobmods-assembly-furnaces"].value == true and data.raw.furn
},
fast_replaceable_group = "furnace",
}

if input.module_slots == 5 or input.module_slots == 6 then
prototype.icons_positioning[1].max_icons_per_row = 3
end
if input.module_slots > 4 then
prototype.icons_positioning[1].multi_row_initial_height_modifier = -0.3
end

return prototype
end

data.raw.item["electric-furnace"].order = "c[electric-furnace-1]"
Expand Down
2 changes: 1 addition & 1 deletion bobassembly/prototypes/electrolyser-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ then

if data.raw.item["advanced-processing-unit"] then
bobmods.lib.recipe.replace_ingredient("electrolyser-5", "processing-unit", "advanced-processing-unit")
bobmods.lib.tech.add_prerequisite("electrolyser-5", "advanced-electronics-3")
bobmods.lib.tech.add_prerequisite("electrolyser-5", "advanced-processing-unit")
end

if data.raw.item["copper-tungsten-pipe"] then
Expand Down
Loading

0 comments on commit 8d22c92

Please sign in to comment.