Kind of already coded it myself for personal use, but I figure it'd be good to allow users to be able to use the V3 without Space Age if they either don't own the DLC or are playing a challenge run without Space Age.
I also kind of disagree with the placement of the V3 at Aquilo since it's so late into the game that bugs already stop being a problem altogether. Imo it makes more sense to require Fulgora + Vulcanus tech in order to help with Gleba prior to unlocking the Spidertron.
-- settings.lua
data:extend({
{
type = "bool-setting",
name = "heavy-trucks-v3-without-space-age",
setting_type = "startup",
default_value = false,
order = "a-99"
}
})
```lua
-- trucks/v3-truck.lua
-- line 4
if not space_age and not vanilla_enabled then return end
-- line 115
local vanilla_packs = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"military-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
{"utility-science-pack", 1},
{"space-science-pack", 1},
}
local truck_ingredients = space_age and {
{type = "item", name = "heavy-truck", amount = 1},
{type = "item", name = "quantum-processor", amount = 10},
{type = "item", name = "lithium-plate", amount = 50},
{type = "item", name = "tungsten-plate", amount = 20},
{type = "item", name = "low-density-structure", amount = 20},
{type = "item", name = "processing-unit", amount = 20},
} or {
{type = "item", name = "heavy-truck", amount = 1},
{type = "item", name = "processing-unit", amount = 50},
{type = "item", name = "low-density-structure", amount = 50},
{type = "item", name = "electric-engine-unit", amount = 20},
{type = "item", name = "steel-plate", amount = 100},
}
local technology_prereq = space_age
and {"heavy-truck", "artillery", "quantum-processor"}
or {"heavy-truck", "artillery", "space-science-pack"}
-- data:extend
{
type = "recipe",
name = NAME,
enabled = false,
energy_required = 20,
ingredients = truck_ingredients,
results = {{type = "item", name = NAME, amount = 1}},
}
{
type = "technology",
name = NAME,
icon = "__heavy-trucks__/graphics/technology/v3-truck.png",
icon_size = 256,
effects = {{type = "unlock-recipe", recipe = NAME}, {type = "unlock-recipe", recipe = shared.missile}},
prerequisites = technology_prereq,
unit = {count = 2000, ingredients = space_age and space_age_packs or vanilla_packs, time = 60},
}