From 8974981d07ec320bb2008a23964a73f75165dd89 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Tue, 16 Dec 2025 20:23:34 +0100 Subject: [PATCH] Add golden module --- lignumis/data-final-fixes.lua | 18 ++++++ lignumis/locale/en/strings.cfg | 4 ++ .../prototypes/content/quality-assembler.lua | 55 ++++++++++++++++++- 3 files changed, 76 insertions(+), 1 deletion(-) diff --git a/lignumis/data-final-fixes.lua b/lignumis/data-final-fixes.lua index bbdacb8..452d38d 100644 --- a/lignumis/data-final-fixes.lua +++ b/lignumis/data-final-fixes.lua @@ -4,4 +4,22 @@ require("prototypes/compatibility/final") if not mods["Burner-Leech-Fork"] and not mods["Burner-Leech"] and not mods["InserterFuelLeech"] then data.raw["inserter"]["burner-inserter"].allow_burner_leech = true data.raw["inserter"]["burner-long-handed-inserter"].allow_burner_leech = true +end + +-- disable gold module from everything where it's not manually added +local moduled_building_types = { "beacon", "assembling-machine", "rocket-silo", "furnace", "lab", "mining-drill" } + +for _, moduled_building_type in pairs(moduled_building_types) do + for _,moduled_building in pairs(data.raw[moduled_building_type]) do + if moduled_building then + if not moduled_building.allowed_module_categories then + moduled_building.allowed_module_categories = {} + for _, module_cat in pairs(data.raw["module-category"]) do + if not (module_cat.name == "quality-assembling") then + table.insert(moduled_building.allowed_module_categories, module_cat.name) + end + end + end + end + end end \ No newline at end of file diff --git a/lignumis/locale/en/strings.cfg b/lignumis/locale/en/strings.cfg index fc44237..f8449a5 100644 --- a/lignumis/locale/en/strings.cfg +++ b/lignumis/locale/en/strings.cfg @@ -83,12 +83,14 @@ wood-darts-magazine=Wood darts magazine basic-circuit-board=Basic circuit board crushed-gold-ore=Crushed gold ore steam-science-pack-spoiled=Science flask with water +gold-module-3=Golden module 3 [item-description] wooden-wall=Use wooden walls to protect your base from the locals and to reduce noise levels. stone-wall=Better acoustic and physical protection than the wooden counterpart. gold-stromatolite-seed=Plant the seed to grow gold stromatolites. They house bacteria that enrich gold from the ground.\n__REMARK_COLOR_BEGIN__Expected yield:__REMARK_COLOR_END__ 1.5 [item=gold-ore]/m steam-science-pack-spoiled=Spoiled steam science pack. Put it in a furnace to bring it to the right temperature. +gold-module-3=When you mastered quality assembling, this pristine module is unlocked, enabling you to craft the finest items available. [fluid-name] wood-pulp=Wood pulp @@ -147,6 +149,7 @@ aai-wood-loader=Wood loader basic-ore-crushing=Basic ore crushing astroponics-productivity=Astroponics productivity experienced-quality-assembling=Experienced quality assembling +gold-module=Golden module [technology-description] wood-science-pack=Allows research of basic technologies based on wood products. @@ -167,6 +170,7 @@ tree-seeding=[entity=burner-agricultural-tower] allows planting seeds into seeda active-noise-cancelling=Helps handling noise. quality-assembler=High-end assembler to craft only the finest quality machines using a special resource only found on Lignumis. automation-science-pack=Leave Lignumis to enable advanced technology research. +gold-module=Master quality assembling, to unlock a pristine module, enabling you to craft the finest items available. [modifier-description] basic-gun-turret-attack-bonus=Basic gun turret damage: +__1__ diff --git a/lignumis/prototypes/content/quality-assembler.lua b/lignumis/prototypes/content/quality-assembler.lua index 69bdf88..67fcced 100644 --- a/lignumis/prototypes/content/quality-assembler.lua +++ b/lignumis/prototypes/content/quality-assembler.lua @@ -50,6 +50,10 @@ data:extend({ type = "recipe-category", name = "quality-assembling" }, + { + type = "module-category", + name = "quality-assembling" + }, { type = "burner-usage", name = "quality-catalyst", @@ -129,6 +133,7 @@ data:extend({ { inventory_index = defines.inventory.assembling_machine_modules, shift = { 0, 1 }, max_icons_per_row = 4 } }, allowed_effects = { "consumption", "pollution", "quality" }, + allowed_module_categories = { "efficiency", "quality", "quality-assembling" }, crafting_categories = { "quality-assembling" }, crafting_speed = 4, energy_source = { @@ -373,6 +378,38 @@ data:extend({ time = 60 } }, + { + type = "module", + name = "gold-module-3", + localised_description = { "item-description.gold-module" }, + icon = Lignumis.graphics .. "icons/gold-module-3.png", + subgroup = "module", + color_hint = { text = "Q" }, + category = "quality-assembling", + tier = 3, + order = "e[gold]-c[gold-module-3]", + inventory_move_sound = item_sounds.module_inventory_move, + pick_sound = item_sounds.module_inventory_pickup, + drop_sound = item_sounds.module_inventory_move, + stack_size = 50, + weight = 20 * kg, + effect = { quality = 0.75, speed = -0.1 } + }, + { + type = "recipe", + name = "gold-module-3", + category = "electromagnetics", + additional_categories = { "quality-assembling" }, + enabled = false, + ingredients = + { + {type = "item", name = "quality-module-3", amount = 4}, + {type = "item", name = "quantum-processor", amount = 5}, + {type = "item", name = "gold-quality-catalyst", amount = 20} + }, + energy_required = 60, + results = {{type="item", name="gold-module-3", amount=1}} + }, { type = "technology", name = "experienced-quality-assembling-1", @@ -386,7 +423,7 @@ data:extend({ effects = { { type = "change-recipe-productivity", recipe = "gold-quality-catalyst", change = 0.25 } }, - research_trigger = { type = "craft-item", item = "gold-quality-catalyst", count = 1000 }, + research_trigger = { type = "craft-item", item = "gold-quality-catalyst", count = 2000 }, prerequisites = { "quality-assembler" } }, { @@ -404,6 +441,22 @@ data:extend({ }, research_trigger = { type = "craft-item", item = "gold-quality-catalyst", count = 10000 }, prerequisites = { "experienced-quality-assembling-1" } + }, + { + type = "technology", + name = "experienced-quality-assembling-3", + icons = { + { icon = "__quality__/graphics/technology/legendary-quality.png", icon_size = 256 }, + { icon = Lignumis.graphics .. "icons/quality-gold-catalyst.png", icon_size = 64, scale = 1, shift = { 50, 50 }, draw_background = true } + }, + level = 3, + max_level = 3, + show_levels_info = true, + effects = { + { type = "unlock-recipe", recipe = "gold-module-3" } + }, + research_trigger = { type = "craft-item", item = "gold-quality-catalyst", count = 40000 }, + prerequisites = { "experienced-quality-assembling-2" } } })