Skip to content

Commit

Permalink
Add function call for update_recycling_recipe (#245)
Browse files Browse the repository at this point in the history
* Add function call for update_recycling_recipe

This has been tested, and it works properly in the data-updates stage. However, because the Quality mod generates recycling recipes in this stage as well, there may be other cases where this function call will need to be in data-final-fixes instead.

* Add function call for update_recycling_recipe

* Expand function call for update_recycling_recipe

* Add function call for updating recycling recipes

* Add function call for update_recycling_recipe

* Add function call for updating recycling recipes

* Add to update_recycling_recipe list

* Add function call for update_recycling_recipe

* Add function call for updating recycling recipes

* Add function call for update_recycling_recipe

* Add function calls for updating recycling recipes and icons

---------

Co-authored-by: KiwiHawk <[email protected]>
  • Loading branch information
Qatavin and KiwiHawk authored Dec 18, 2024
1 parent 48d98d1 commit 184fa0a
Show file tree
Hide file tree
Showing 9 changed files with 415 additions and 0 deletions.
52 changes: 52 additions & 0 deletions bobassembly/data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,55 @@ data.raw.fluid["heavy-oil"].emissions_multiplier = 3
data.raw.fluid["light-oil"].fuel_value = "1.5MJ"
data.raw.fluid["light-oil"].emissions_multiplier = 2
data.raw.fluid["petroleum-gas"].fuel_value = "2.3MJ"

if feature_flags["quality"] then
bobmods.lib.recipe.update_recycling_recipe({
"assembling-machine-3",
"assembling-machine-4",
"assembling-machine-5",
"assembling-machine-6",
"electronics-machine-1",
"electronics-machine-2",
"electronics-machine-3",
"centrifuge-2",
"centrifuge-3",
"electric-chemical-mixing-furnace",
"electric-chemical-mixing-furnace-2",
"chemical-plant-2",
"chemical-plant-3",
"chemical-plant-4",
"bob-distillery",
"bob-distillery-2",
"bob-distillery-3",
"bob-distillery-4",
"bob-distillery-5",
"electric-furnace-2",
"electric-furnace-3",
"electrolyser-2",
"electrolyser-3",
"electrolyser-4",
"electrolyser-5",
"fluid-furnace",
"fluid-mixing-furnace",
"fluid-chemical-furnace",
"oil-refinery-2",
"oil-refinery-3",
"oil-refinery-4",
})
if
settings.startup["bobmods-plates-convert-recipes"]
and settings.startup["bobmods-plates-convert-recipes"].value == true
then
bobmods.lib.recipe.update_recycling_recipe({
"stone-furnace",
"stone-mixing-furnace",
"stone-chemical-furnace",
"steel-furnace",
"steel-mixing-furnace",
"steel-chemical-furnace",
"electric-furnace",
"electric-mixing-furnace",
"electric-chemical-furnace",
})
end
end
19 changes: 19 additions & 0 deletions bobclasses/data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,22 @@ if data.raw["recipe-category"]["mixing-furnace"] then
end

require("prototypes.recipe-updates")

if feature_flags["quality"] then
bobmods.lib.recipe.update_recycling_recipe({
"bob-character-miner-2",
"bob-character-fighter-2",
"bob-character-builder-2",
"player-brain",
"player-head",
"player-boots",
"player-gloves",
"player-power-core",
"player-frame",
"player-brain-2",
"player-head-2",
"player-boots-2",
"player-gloves-2",
"player-frame-2",
})
end
24 changes: 24 additions & 0 deletions bobelectronics/data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,27 @@ if settings.startup["bobmods-colorupdate"].value == true then
data.raw.item["processing-unit"].icon_size = 128
data.raw.item["advanced-processing-unit"].icon_size = 128
end

if feature_flags["quality"] then
bobmods.lib.recipe.update_recycling_recipe_to_self_recipe("resin", false)
bobmods.lib.recipe.update_recycling_recipe_to_self_recipe("wooden-board", false)
bobmods.lib.recipe.update_recycling_recipe_to_self_recipe("phenolic-board", false)
bobmods.lib.recipe.update_recycling_recipe_to_self_recipe("fibreglass-board", false)
bobmods.lib.recipe.update_recycling_recipe_to_self_recipe("solder-alloy", false)
bobmods.lib.recipe.update_recycling_recipe({
"basic-electronic-components",
"electronic-components",
"intergrated-electronics",
"processing-electronics",
"electronic-circuit",
"advanced-circuit",
"processing-unit",
"advanced-processing-unit",
"circuit-board",
"superior-circuit-board",
"multi-layer-circuit-board",
})
if settings.startup["bobmods-colorupdate"].value == true then
bobmods.lib.recipe.update_recycling_recipe_icon("basic-circuit-board-recycling", "__bobelectronics__/graphics/icons/colour-coded/basic-circuit-board.png", 128)
end
end
5 changes: 5 additions & 0 deletions bobgreenhouse/prototypes/updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ if data.raw.technology["nitrogen-processing"] then
else
bobmods.lib.tech.add_prerequisite("bob-fertiliser", "sulfur-processing")
end

if feature_flags["quality"] then
bobmods.lib.recipe.update_recycling_recipe_single("bob-greenhouse", false)
bobmods.lib.recipe.update_recycling_recipe_to_self_recipe("wood-pellets", false)
end
106 changes: 106 additions & 0 deletions boblogistics/data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,109 @@ bobmods.lib.item.set_subgroup("express-splitter", "bob-logistic-tier-3")

-- because there's no specific section for it.
data.raw["pump"]["pump"].next_upgrade = "bob-pump-2"

if feature_flags["quality"] then
bobmods.lib.recipe.update_recycling_recipe({
"transport-belt",
"underground-belt",
"splitter",
"fast-transport-belt",
"fast-underground-belt",
"fast-splitter",
"express-transport-belt",
"express-underground-belt",
"express-splitter",
"turbo-transport-belt",
"turbo-underground-belt",
"turbo-splitter",
"ultimate-transport-belt",
"ultimate-underground-belt",
"ultimate-splitter",
"inserter",
"long-handed-inserter",
"red-bulk-inserter",
"fast-inserter",
"bulk-inserter",
"turbo-inserter",
"turbo-bulk-inserter",
"express-inserter",
"express-bulk-inserter",
"passive-provider-chest",
"storage-chest",
"passive-provider-chest-2",
"active-provider-chest-2",
"storage-chest-2",
"buffer-chest-2",
"requester-chest-2",
"passive-provider-chest-3",
"active-provider-chest-3",
"storage-chest-3",
"buffer-chest-3",
"requester-chest-3",
"pump",
"bob-pump-2",
"bob-pump-3",
"bob-pump-4",
"roboport",
"bob-roboport-2",
"bob-roboport-3",
"bob-roboport-4",
"bob-robochest-2",
"bob-robochest-3",
"bob-robochest-4",
"bob-logistic-zone-expander-2",
"bob-logistic-zone-expander-3",
"bob-logistic-zone-expander-4",
"bob-robo-charge-port-2",
"bob-robo-charge-port-3",
"bob-robo-charge-port-4",
"bob-robo-charge-port-large-2",
"bob-robo-charge-port-large-3",
"bob-robo-charge-port-large-4",
"logistic-robot",
"bob-logistic-robot-2",
"bob-logistic-robot-3",
"bob-logistic-robot-4",
"bob-logistic-robot-5",
"construction-robot",
"bob-construction-robot-2",
"bob-construction-robot-3",
"bob-construction-robot-4",
"bob-construction-robot-5",
"flying-robot-frame",
"flying-robot-frame-2",
"flying-robot-frame-3",
"flying-robot-frame-4",
"bob-robot-brain",
"bob-robot-brain-2",
"bob-robot-brain-3",
"bob-robot-brain-4",
"bob-robot-tool",
"bob-robot-tool-2",
"bob-robot-tool-3",
"bob-robot-tool-4",
"storage-tank-2",
"storage-tank-3",
"storage-tank-4",
"bob-storage-tank-all-corners-2",
"bob-storage-tank-all-corners-3",
"bob-storage-tank-all-corners-4",
"repair-pack",
"repair-pack-2",
"repair-pack-3",
"repair-pack-4",
"repair-pack-5",
"bob-locomotive-2",
"bob-locomotive-3",
"bob-armoured-locomotive",
"bob-armoured-locomotive-2",
"bob-cargo-wagon-2",
"bob-cargo-wagon-3",
"bob-armoured-cargo-wagon",
"bob-armoured-cargo-wagon-2",
"bob-fluid-wagon-2",
"bob-fluid-wagon-3",
"bob-armoured-fluid-wagon",
"bob-armoured-fluid-wagon-2",
})
end
23 changes: 23 additions & 0 deletions bobmining/data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,26 @@ require("prototypes.water-miner-updates")

data.raw.item["electric-mining-drill"].icon = "__bobmining__/graphics/icons/electric-mining-drill-1.png"
data.raw["mining-drill"]["electric-mining-drill"].icon = "__bobmining__/graphics/icons/electric-mining-drill-1.png"

if feature_flags["quality"] then
bobmods.lib.recipe.update_recycling_recipe({
"bob-area-mining-drill-1",
"bob-area-mining-drill-2",
"bob-area-mining-drill-3",
"bob-area-mining-drill-4",
"electric-mining-drill",
"bob-mining-drill-1",
"bob-mining-drill-2",
"bob-mining-drill-3",
"bob-mining-drill-4",
"bob-pumpjack-1",
"bob-pumpjack-2",
"bob-pumpjack-3",
"bob-pumpjack-4",
"water-miner-1",
"water-miner-2",
"water-miner-3",
"water-miner-4",
"water-miner-5",
})
end
59 changes: 59 additions & 0 deletions bobpower/data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,62 @@ data.raw.item["coal"].fuel_emissions_multiplier = 2
data.raw.item["solid-fuel"].fuel_emissions_multiplier = 0.8
data.raw.item["rocket-fuel"].fuel_emissions_multiplier = 1.2
data.raw.item["nuclear-fuel"].fuel_emissions_multiplier = 5


if feature_flags["quality"] then
bobmods.lib.recipe.update_recycling_recipe({
"burner-reactor-2",
"fluid-reactor",
"fluid-reactor-2",
"heat-pipe-2",
"heat-pipe-3",
"heat-pipe-4",
"accumulator",
"large-accumulator-2",
"fast-accumulator-2",
"slow-accumulator-2",
"large-accumulator-3",
"fast-accumulator-3",
"slow-accumulator-3",
"boiler-2",
"boiler-3",
"boiler-4",
"boiler-5",
"fluid-generator",
"fluid-generator-2",
"fluid-generator-3",
"hydrazine-generator",
"heat-exchanger-2",
"heat-exchanger-3",
"heat-exchanger-4",
"nuclear-reactor",
"nuclear-reactor-2",
"nuclear-reactor-3",
"oil-boiler",
"oil-boiler-2",
"oil-boiler-3",
"oil-boiler-4",
"medium-electric-pole-2",
"medium-electric-pole-3",
"medium-electric-pole-4",
"big-electric-pole-2",
"big-electric-pole-3",
"big-electric-pole-4",
"substation-2",
"substation-3",
"substation-4",
"solar-panel-small-2",
"solar-panel-2",
"solar-panel-large-2",
"solar-panel-small-3",
"solar-panel-3",
"solar-panel-large-3",
"steam-engine-2",
"steam-engine-3",
"steam-engine-4",
"steam-engine-5",
"steam-turbine",
"steam-turbine-2",
"steam-turbine-3",
})
end
10 changes: 10 additions & 0 deletions bobtech/data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,14 @@ if settings.startup["bobmods-tech-colorupdate"].value == true then
data.raw.technology["automation-science-pack"].icon = "__base__/graphics/technology/utility-science-pack.png"
data.raw.technology["logistic-science-pack"].icon = "__base__/graphics/technology/automation-science-pack.png"
data.raw.technology["utility-science-pack"].icon = "__base__/graphics/technology/logistic-science-pack.png"

if feature_flags["quality"] then
bobmods.lib.recipe.update_recycling_recipe_icon("automation-science-pack-recycling", "__base__/graphics/icons/utility-science-pack.png")
bobmods.lib.recipe.update_recycling_recipe_icon("logistic-science-pack-recycling", "__base__/graphics/icons/automation-science-pack.png")
bobmods.lib.recipe.update_recycling_recipe_icon("utility-science-pack-recycling", "__base__/graphics/icons/logistic-science-pack.png")
end
end

if feature_flags["quality"] then
bobmods.lib.recipe.update_recycling_recipe_single("lab")
end
Loading

0 comments on commit 184fa0a

Please sign in to comment.