Muluna / Crushing Industry compatibility
This commit is contained in:
parent
ccab7a49cb
commit
df0bf957f6
5 changed files with 62 additions and 12 deletions
1
space-age-extended/data-updates.lua
Normal file
1
space-age-extended/data-updates.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
require("planets/tier1/muluna/updates")
|
||||||
2
space-age-extended/locale/en/space-age-extended.cfg
Normal file
2
space-age-extended/locale/en/space-age-extended.cfg
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[technology-name]
|
||||||
|
asteroid-crushing=Asteroid crushing
|
||||||
11
space-age-extended/planets/tier1/muluna/crushing-updates.lua
Normal file
11
space-age-extended/planets/tier1/muluna/crushing-updates.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
local Technology = require("__cf-lib__/data/Technology")
|
||||||
|
|
||||||
|
-- Crushing productivity
|
||||||
|
Technology:new("ore-crushing-productivity-1")
|
||||||
|
:setPrerequisites({ "space-science-pack" })
|
||||||
|
:setIngredients({ "wood-science-pack", "steam-science-pack", "automation-science-pack", "logistic-science-pack", "space-science-pack" })
|
||||||
|
Technology:new("ore-crushing-productivity-2")
|
||||||
|
:addPrerequisite("production-science-pack")
|
||||||
|
:setIngredients({ "wood-science-pack", "steam-science-pack", "automation-science-pack", "logistic-science-pack", "space-science-pack", "production-science-pack" })
|
||||||
|
Technology:new("ore-crushing-productivity-3")
|
||||||
|
:removePrerequisite("production-science-pack")
|
||||||
|
|
@ -3,26 +3,61 @@ local Recipe = require("__cf-lib__/data/Recipe")
|
||||||
|
|
||||||
-- Move crusher to Muluna
|
-- Move crusher to Muluna
|
||||||
Technology:new("engine"):removeRecipe("electric-crusher")
|
Technology:new("engine"):removeRecipe("electric-crusher")
|
||||||
Technology:new("planet-discovery-muluna"):addRecipe("electric-crusher")
|
|
||||||
Technology:new("ore-crushing")
|
Technology:new("ore-crushing")
|
||||||
:setPrerequisites({ "space-science-pack" })
|
:setPrerequisites({ "space-science-pack" })
|
||||||
:addIngredient("space-science-pack")
|
:addIngredient("space-science-pack")
|
||||||
|
|
||||||
-- Remove steam entities
|
-- Remove Muluna crushers in favor of Crushing Industry crushers
|
||||||
data.raw.technology["muluna-steam-crusher"] = nil
|
data.raw.technology["muluna-steam-crusher"] = nil
|
||||||
|
data.raw.technology["crusher-2"] = nil
|
||||||
data.raw.recipe["muluna-steam-crusher"] = nil
|
data.raw.recipe["muluna-steam-crusher"] = nil
|
||||||
|
data.raw.recipe["crusher-2"] = nil
|
||||||
data.raw.item["muluna-steam-crusher"] = nil
|
data.raw.item["muluna-steam-crusher"] = nil
|
||||||
|
data.raw.item["crusher-2"] = nil
|
||||||
data.raw["assembling-machine"]["muluna-steam-crusher"] = nil
|
data.raw["assembling-machine"]["muluna-steam-crusher"] = nil
|
||||||
|
data.raw["assembling-machine"]["crusher-2"] = nil
|
||||||
Technology:new("space-science-pack")
|
Technology:new("space-science-pack")
|
||||||
:replacePrerequisite("muluna-steam-crusher", "muluna-advanced-boiler")
|
:replacePrerequisite("muluna-steam-crusher", "muluna-advanced-boiler")
|
||||||
.prototype.research_trigger.entity = "electric-crusher"
|
.prototype.research_trigger.entity = "electric-crusher"
|
||||||
Recipe:new("interstellar-science-pack"):replaceIngredient("muluna-steam-crusher", "electric-crusher")
|
Recipe:new("interstellar-science-pack"):replaceIngredient("muluna-steam-crusher", "electric-crusher")
|
||||||
|
|
||||||
-- Crushing productivity
|
-- Only hide vanilla crusher to not cause problems with compatibility code
|
||||||
Technology:new("ore-crushing-productivity-1")
|
local prototypes = {
|
||||||
:setIngredients({ "wood-science-pack", "steam-science-pack", "automation-science-pack", "logistic-science-pack", "space-science-pack" })
|
data.raw["assembling-machine"]["crusher"],
|
||||||
Technology:new("ore-crushing-productivity-2")
|
data.raw.item["crusher"],
|
||||||
:addPrerequisite("production-science-pack")
|
data.raw.recipe["crusher"]
|
||||||
:setIngredients({ "wood-science-pack", "steam-science-pack", "automation-science-pack", "logistic-science-pack", "space-science-pack", "production-science-pack" })
|
}
|
||||||
Technology:new("ore-crushing-productivity-3")
|
for _, prototype in pairs(prototypes) do
|
||||||
:removePrerequisite("production-science-pack")
|
table.assign(prototype, {
|
||||||
|
hidden = true,
|
||||||
|
hidden_in_factoriopedia = true
|
||||||
|
})
|
||||||
|
end
|
||||||
|
data.raw["assembling-machine"]["crusher"].next_upgrade = nil
|
||||||
|
|
||||||
|
-- Change vanilla crusher technology so it unlocks all asteroid crushing at once
|
||||||
|
Technology:new("crusher")
|
||||||
|
:removeRecipe("crusher")
|
||||||
|
:addRecipe("electric-crusher")
|
||||||
|
:addRecipe("carbonic-asteroid-crushing")
|
||||||
|
:addRecipe("metallic-asteroid-crushing")
|
||||||
|
:addRecipe("oxide-asteroid-crushing")
|
||||||
|
:addRecipe("anorthite-crushing")
|
||||||
|
:assign({
|
||||||
|
localised_name = { "asteroid-crushing" },
|
||||||
|
prerequisites = { "planet-discovery-muluna" },
|
||||||
|
unit = {
|
||||||
|
count = 500,
|
||||||
|
time = 30,
|
||||||
|
ingredients = {
|
||||||
|
{"automation-science-pack", 1},
|
||||||
|
{"logistic-science-pack", 1},
|
||||||
|
{"chemical-science-pack", 1}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-- TODO: icon
|
||||||
|
})
|
||||||
|
Technology:new("carbonic-asteroid-crushing"):removeRecipe("carbonic-asteroid-crushing")
|
||||||
|
Technology:new("metallic-asteroid-crushing"):removeRecipe("metallic-asteroid-crushing")
|
||||||
|
Technology:new("oxide-asteroid-crushing"):removeRecipe("oxide-asteroid-crushing")
|
||||||
|
--Technology:new("anorthite-crushing"):removeRecipe("anorthite-crushing")
|
||||||
1
space-age-extended/planets/tier1/muluna/updates.lua
Normal file
1
space-age-extended/planets/tier1/muluna/updates.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
require("crushing-updates")
|
||||||
Loading…
Add table
Add a link
Reference in a new issue