From e18619c807cf7abf2ebe77b6905403e22d0d2127 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Sun, 13 Apr 2025 13:42:42 +0200 Subject: [PATCH] Add setting for even earlier personal robots --- lignumis/locale/en/strings.cfg | 2 ++ .../content/basic-construction-robots.lua | 20 ++++++++++--------- lignumis/settings.lua | 7 +++++++ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lignumis/locale/en/strings.cfg b/lignumis/locale/en/strings.cfg index 944299d..8213404 100644 --- a/lignumis/locale/en/strings.cfg +++ b/lignumis/locale/en/strings.cfg @@ -179,6 +179,7 @@ lignumis-circuit-progression=Enable progressive circuit recipes lignumis-assembler-progression=Enable progressive assembler recipes lignumis-lumber-mill-more-recipes=Enable more recipes for the lumber mill lignumis-fulgora-wood=Add wood to Fulgora +lignumis-early-robots=Even earlier personal robots [mod-setting-description] lignumis-belt-progression=Yellow belts will require wood belts to craft. @@ -190,6 +191,7 @@ lignumis-circuit-progression=Electric circuits will require basic circuit boards lignumis-assembler-progression=Assembling machine 1 will require burner assembling machines to craft. lignumis-lumber-mill-more-recipes=The lumber mill can also craft basic turrets, burner assemblers and burner inserters. Improves balancing wood usage when all progressive recipes are enabled and helps with marathon games. lignumis-fulgora-wood=This adds wooden gear wheels to scrap recycling as the main source of wood. Disable this is you have a different source of wood or import everything from other planets. +lignumis-early-robots=Personal robots are moved from steam to wood science and are a tiny bit faster. [autoplace-control-names] lignumis_enemy_base=Lignumis enemy bases diff --git a/lignumis/prototypes/content/basic-construction-robots.lua b/lignumis/prototypes/content/basic-construction-robots.lua index 731dac5..95cae5b 100644 --- a/lignumis/prototypes/content/basic-construction-robots.lua +++ b/lignumis/prototypes/content/basic-construction-robots.lua @@ -2,6 +2,7 @@ local item_sounds = require("__base__.prototypes.item_sounds") local item_tints = require("__base__.prototypes.item-tints") local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value +local early_robots = settings.startup["lignumis-early-robots"].value local function robot(color) local result = table.deepcopy(data.raw["construction-robot"]["construction-robot"]) @@ -9,7 +10,7 @@ local function robot(color) result.icon = Lignumis.graphics .. "icons/basic-construction-robot-" .. color .. ".png" result.minable.result = "basic-construction-robot-" .. color result.max_health = 50 - result.speed = 0.04 + result.speed = early_robots and 0.05 or 0.04 result.max_energy = "1MJ" result.energy_per_tick = "0.04kJ" result.energy_per_move = "0.3kJ" @@ -180,15 +181,16 @@ local gold_robot_technology = { modifier = true } }, - prerequisites = { "steam-science-pack" }, + prerequisites = { early_robots and "wood-science-pack" or "steam-science-pack" }, unit = { count = 200, - ingredients = { + ingredients = early_robots and { { "wood-science-pack", 1 } } or { { "wood-science-pack", 1 }, { "steam-science-pack", 1 } }, time = 15 - } + }, + ignore_tech_cost_multiplier = early_robots } local copper_robot_technology = { @@ -248,22 +250,22 @@ data:extend({ robot("copper"), robot_item("copper", 1), robot_recipe("copper", { - { type = "item", name = "copper-plate", amount = 2 }, - { type = "item", name = "wooden-gear-wheel", amount = 5 }, + { type = "item", name = "copper-plate", amount = 2 }, + { type = "item", name = "wooden-gear-wheel", amount = 5 }, { type = "item", name = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 5 } }), generator("copper"), generator_item("copper", 1), generator_recipe("copper", { - { type = "item", name = "copper-plate", amount = 10 }, + { type = "item", name = "copper-plate", amount = 10 }, { type = "item", name = "wooden-gear-wheel", amount = 10 } }), roboport("copper"), roboport_item("copper", 1), roboport_recipe("copper", { - { type = "item", name = "copper-plate", amount = 5 }, + { type = "item", name = "copper-plate", amount = 5 }, { type = "item", name = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 10 }, - { type = "item", name = "wooden-gear-wheel", amount = 10 } + { type = "item", name = "wooden-gear-wheel", amount = 10 } }), -- Technology diff --git a/lignumis/settings.lua b/lignumis/settings.lua index 55ddb7b..9b2d2ca 100644 --- a/lignumis/settings.lua +++ b/lignumis/settings.lua @@ -62,6 +62,13 @@ data:extend({ default_value = true, order = "i" }, + { + type = "bool-setting", + name = "lignumis-early-robots", + setting_type = "startup", + default_value = false, + order = "j" + }, { type = "string-setting", name = "lignumis-second-planet",