aquilo-start/data-updates.lua

Wed, 27 Aug 2025 10:26:12 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Wed, 27 Aug 2025 10:26:12 +0300
changeset 19
adbc5c74f279
permissions
-rw-r--r--

Lots of stuff

require("aqs_util")

data.raw.recipe["refinery"].ingredients = {
	item("steel-plate", 10),
	item("low-density-structure", 5),
	item("processing-unit", 5),
	fluid("fluorine", 1000),
	item("promethium-asteroid-chunk", 10),
}

local function rename(arr, a, b)
	arr[b] = arr[a]
	arr[a] = nil
	arr[b].name = b
end

--rename(data.raw["recipe"], "promethium-chunk-submerging", "promethium-emulsion")
data.raw["recipe"]["promethium-chunk-submerging"].ingredients = {
	item("promethium-asteroid-chunk", 1),
	fluid("ammonia", 300),
	fluid("fluorine", 300),
}
data.raw["recipe"]["promethium-chunk-submerging"].icon = "__aquilo-start__/graphics/icons/promethium-chunk-submerging.png"
data.raw["fluid"]["promethium-emulsion"].icon = "__aquilo-start__/graphics/icons/promethium-emulsion.png"
data.raw["fluid"]["promethium-emulsion"].base_color = {r=0.44, g=0.09, b=0.14}
data.raw["fluid"]["promethium-emulsion"].flow_color = {r=0.84, g=0.24, b=0.49}
data.raw["fluid"]["promethium-emulsion"].visualization_color = {r=0.84, g=0.24, b=0.49}
data.raw["recipe"]["promethium-chunk-melting"].hidden = true

data.raw.recipe["cryogenic-plant"].ingredients = {
	item("lithium-plate", 20),
	item("processing-unit", 20),
	item("heat-conduit", 50),
	item("refined-concrete", 40)
}

data.raw["technology"]["cryogenic-plant"].unit = blue_science{count = 200, time = 30}
data.raw["technology"]["cryogenic-plant"].research_trigger = nil
data.raw["technology"]["cryogenic-plant"].prerequisites = {"lithium-processing-2", "concrete", "processing-unit"}

data.raw.furnace["refinery"].effect_receiver.base_effect.quality = 4 -- 40%
data.raw.technology["refinery"].unit = cryo_science{count = 500, time = 30}
data.raw.technology["refinery"].prerequisites = {
	"processing-unit",
	"low-density-structure",
	"cryogenic-science-pack",
}

data.raw["recipe"]["lithium"].ingredients = {
	fluid("lithium-brine", 10),
	fluid("ammonia", 10),
}
data.raw.recipe["lithium"].results[1].amount = 1
data.raw["technology"]["flare-stack-fluid-venting-tech"].unit = red_science{count = 20, time = 30,}
data.raw.tile["ice-platform"].mined_sound = table.deepcopy(data.raw["simple-entity"]["lithium-iceberg-huge"].mined_sound)

remove_recipe_effect(data.raw["technology"]["lithium-processing"], "lithium")
remove_recipe_effect(data.raw["technology"]["cryogenic-plant"], "fluoroketone")
remove_recipe_effect(data.raw["technology"]["cryogenic-plant"], "fluoroketone-cooling")

data.raw["technology"]["cryogenic-science-pack"].prerequisites = {"lithium-processing-2", "fluorine-processing"}
data.raw["technology"]["foundation"].prerequisites = {"cryogenic-science-pack", "metallurgic-science-pack", "agricultural-science-pack", "electromagnetic-science-pack"}

data.raw["technology"]["landfill"].unit = nil
data.raw["technology"]["landfill"].research_trigger = {
	type = "mine-entity",
	entity = "stone",
}
data.raw["technology"]["landfill"].prerequisites = {"space-platform-thruster"}
data.raw["technology"]["planet-discovery-gleba"].prerequisites = {"space-platform-thruster"}
data.raw["technology"]["agriculture"].prerequisites = {"planet-discovery-gleba", "landfill"}

data.raw["technology"]["quantum-processor"].prerequisites = {
	"cryogenic-science-pack",
	"metallurgic-science-pack",
	"agricultural-science-pack",
	"nuclear-science-pack",
	"electromagnetic-science-pack"}
data.raw["technology"]["foundation"].prerequisites = {"rail-support-foundations", "agricultural-science-pack", "cryogenic-science-pack", "nuclear-science-pack", "electromagnetic-science-pack"}

if data.raw["technology"]["freezing"]
then
	data.raw["technology"]["freezing"].unit = cryo_science{count = 100, time = 30}
	data.raw["technology"]["freezing"].prerequisites = {"cryogenic-science-pack"}
end

if data.raw["technology"]["spoilables-processing"]
then
	data.raw["technology"]["spoilables-processing"].unit = cryo_science{count = 250, time = 30}
	data.raw["technology"]["spoilables-processing"].prerequisites = {"planet-discovery-gleba", "freezing"}
end

local exclude_from_cryo = {
	["nuclear-fuel-reprocessing"] = 1,
	["elevated-rail"] = 1,
}

-- Replace production science pack with cryo science
for technology_name, technology in pairs(data.raw["technology"])
do
	if technology.unit
	then
		local has_production = is_in_unit(technology, "production-science-pack")
		local has_cryo = is_in_unit(technology, "cryogenic-science-pack")
		if has_production and (has_cryo or exclude_from_cryo[technology.name])
		then
			delete_from_unit(technology, "production-science-pack")
		else
			replace_in_unit(technology, "production-science-pack", "cryogenic-science-pack")
		end
	end
end

table.insert(data.raw["technology"]["elevated-rail"].prerequisites, "chemical-science-pack")
table.insert(data.raw["technology"]["planet-discovery-fulgora"].prerequisites, "elevated-rail")
data.raw["technology"]["automated_bridges"].hidden = true
data.raw["tool"]["cryogenic-science-pack"].order = "e[cryogenic-science-pack]"

for _, lab in pairs(data.raw["lab"])
do
	local new_inputs = {}
	for _, input in pairs(lab.inputs)
	do
		if input ~= "production-science-pack"
		then
			table.insert(new_inputs, input)
		end
	end
	lab.inputs = new_inputs
end

data.raw["tool"]["production-science-pack"].hidden = true
data.raw["technology"]["production-science-pack"].hidden = true

for _, recipe in pairs(data.raw["recipe"])
do
	if (#(recipe.results or {}) == 1 and recipe.results[1].name == "production-science-pack")
		or ((recipe.main_product or "") == "production-science-pack")
	then
		recipe.hidden = true
	end
end

table.insert(data.raw["technology"]["planet-discovery-fulgora"], "elevated-rail")
data.raw["technology"]["induction-technology1"].prerequisites = {"battery", "modular-armor"}
data.raw["technology"]["battery-equipment"].prerequisites = {"induction-technology1"}
for _, tech in pairs(data.raw["technology"])
do
	replace_in_prerequisites(tech, "solar-panel-equipment", "battery-equipment")
end

data.raw["electric-pole"]["wire-buoy"].supply_area_distance = 3
data.raw["technology"]["epic-quality"].prerequisites = {
	"electromagnetic-science-pack",
	"utility-science-pack",
	"cryogenic-science-pack"
}
data.raw["technology"]["epic-quality"].unit.ingredients = {
	{"automation-science-pack", 1},
	{"logistic-science-pack", 1},
	{"chemical-science-pack", 1},
	{"space-science-pack", 1},
	{"cryogenic-science-pack", 1},
	{"utility-science-pack", 1},
	{"electromagnetic-science-pack", 1},
}
data.raw["technology"]["legendary-quality"].prerequisites = {
	"epic-quality",
	"metallurgic-science-pack",
	"agricultural-science-pack",
	"nuclear-science-pack"
}

data.raw.technology["steam-power"].prerequisites = {"fluid-handling"}
data.raw.technology["steam-power"].unit = red_science{count = 20, time = 30}
remove_effect(data.raw["technology"]["steam-power"], unlock_recipe "burner-crusher")
remove_effect(data.raw["technology"]["steam-power"], unlock_recipe "sand")
table.insert(data.raw["technology"]["crude-asteroid-crushing"].effects, unlock_recipe "burner-crusher")
table.insert(data.raw["technology"]["crude-asteroid-crushing"].effects, unlock_recipe "sand")

remove_effect(data.raw["technology"]["steam-power"], unlock_recipe "pipe")
remove_effect(data.raw["technology"]["steam-power"], unlock_recipe "pipe-to-ground")
table.insert(data.raw["technology"]["steel-processing"].effects, unlock_recipe "pipe")
data.raw["technology"]["electronics"].prerequisites = {"crude-asteroid-crushing"}
data.raw["technology"]["steel-processing"].prerequisites = {"crude-asteroid-crushing"}
data.raw["technology"]["promethium-thermals"].prerequisites = {"lithium-processing", "steel-processing"}
data.raw["technology"]["automation-science-pack"].prerequisites = {"steel-processing", "electronics", "promethium-thermals"}

table.insert(data.raw["technology"]["oil-gathering"].effects, unlock_recipe "pipe-to-ground")

data.raw.recipe["metallic-asteroid-crushing"].category = "crushing"
data.raw.recipe["carbonic-asteroid-crushing"].category = "crushing"
data.raw.recipe["oxide-asteroid-crushing"].category = "crushing"
data.raw.recipe["crude-metallic-asteroid-crushing"].category = "basic-crushing"
data.raw.recipe["crude-carbonic-asteroid-crushing"].category = "basic-crushing"

local electric_drill = data.raw["mining-drill"]["electric-mining-drill"]
for _, crusher_name in pairs{"crusher", "burner-crusher"}
do
	local crusher = data.raw["assembling-machine"][crusher_name] or data.raw["furnace"][crusher_name]
	crusher.open_sound = electric_drill.open_sound
	crusher.close_sound = electric_drill.close_sound
end

mercurial