From d22251cd2db6a9788d21c338dbf32126e751f05e Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Wed, 26 Feb 2025 19:48:46 +0100 Subject: [PATCH] Add support for AAI Loaders --- lignumis/info.json | 1 + lignumis/locale/en/strings.cfg | 1 + .../prototypes/compatibility/aai-loaders.lua | 51 +++++++++++++++++++ lignumis/prototypes/compatibility/data.lua | 3 +- 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 lignumis/prototypes/compatibility/aai-loaders.lua diff --git a/lignumis/info.json b/lignumis/info.json index c986909..26202da 100644 --- a/lignumis/info.json +++ b/lignumis/info.json @@ -25,6 +25,7 @@ "?aai-industry", "?planet-picker", "?Diversitree", + "?aai-loaders", "!apm_power_ldinc", "!wood-logistics", "!early-agriculture", diff --git a/lignumis/locale/en/strings.cfg b/lignumis/locale/en/strings.cfg index 600754d..80fff7a 100644 --- a/lignumis/locale/en/strings.cfg +++ b/lignumis/locale/en/strings.cfg @@ -44,6 +44,7 @@ wood-splitter=Wood splitter basic-radar=Basic radar active-noise-cancelling-tower=Active noise cancelling tower quality-assembler=Quality assembler +aai-wood-loader=Wood loader [entity-description] lumber-mill=Advanced machine to process wood. diff --git a/lignumis/prototypes/compatibility/aai-loaders.lua b/lignumis/prototypes/compatibility/aai-loaders.lua new file mode 100644 index 0000000..bee258a --- /dev/null +++ b/lignumis/prototypes/compatibility/aai-loaders.lua @@ -0,0 +1,51 @@ +local Recipe = require("__cf-lib__/data/Recipe") +local Technology = require("__cf-lib__/data/Technology") + +if not mods["aai-loaders"] then return end + +local recipe = { + ingredients = { + { type = "item", name = "lumber", amount = 5 }, + { type = "item", name = "gold-cable", amount = 10 }, + { type = "item", name = "wood-transport-belt", amount = 1 } + }, + energy_required = 1 +} + +AAILoaders.make_tier({ + name = "wood", + transport_belt = "wood-transport-belt", + color = { 163, 117, 102 }, + fluid = "steam", + fluid_per_minute = 7.5, + fluid_technology_prerequisites = { "gold-fluid-handling" }, + technology = { + unit = { + count = 25, + ingredients = { { "wood-science-pack", 1 } }, + time = 15 + }, + prerequisites = { "wood-logistics" } + }, + recipe = recipe, + unlubricated_recipe = mods["aai-loaders-sane"] and recipe or { + ingredients = { + { type = "item", name = "lumber", amount = 50 }, + { type = "item", name = "gold-cable", amount = 100 }, + { type = "item", name = "wood-transport-belt", amount = 1 } + }, + energy_required = 5 + }, + next_upgrade = "aai-loader", + localise = false +}) + +local nauvis_recipe = Recipe:new("aai-wood-loader"):clone("wood-loader-electronic-circuit") +nauvis_recipe:replaceIngredient("gold-cable", "electronic-circuit") +nauvis_recipe:unlockedByTechnology("electronics") +nauvis_recipe:apply() + +if mods["aai-loaders-sane"] then + Technology:new("wood-logistics"):addRecipe("aai-wood-loader") + data.raw.technology["aai-wood-loader"] = nil +end \ No newline at end of file diff --git a/lignumis/prototypes/compatibility/data.lua b/lignumis/prototypes/compatibility/data.lua index ebf1452..4b79d79 100644 --- a/lignumis/prototypes/compatibility/data.lua +++ b/lignumis/prototypes/compatibility/data.lua @@ -2,4 +2,5 @@ require("hot-metals") require("wood-military") require("metal-and-stars") require("alien-biomes") -require("planet-picker") \ No newline at end of file +require("planet-picker") +require("aai-loaders") \ No newline at end of file