Add setting for spoiling of science packs

This commit is contained in:
Simon Brodtmann 2025-08-29 22:26:22 +02:00
parent 8cb2417f6d
commit a146b68220
4 changed files with 61 additions and 2 deletions

View file

@ -82,11 +82,13 @@ wood-armor=Wood armor
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
[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.
[fluid-name]
wood-pulp=Wood pulp
@ -109,10 +111,12 @@ casting-gold=Casting gold
gold-ore-crushing=Gold ore crushing
processing-unit-gold=Processing unit (gold)
burner-lamp-burning=Generating light
refresh-steam-science-pack=Refresh steam science pack
[recipe-description]
moist-stromatolite-remnant-desiccation-without-steam=Used for balancing the production of steam.
gold-stromatolite-seed-to-peat=Used for voiding excess gold stromatolite seeds.
refresh-steam-science-pack=Heats a science flask with water to the right temperature to be used as steam science pack.
[technology-name]
wood-science-pack=Wood science pack
@ -185,6 +189,7 @@ lignumis-fulgora-wood=Add wood to Fulgora
lignumis-early-robots=Even earlier personal robots
lignumis-vanilla-lab=Keep vanilla lab recipe
lignumis-double-rocket=Double provisional rocket cargo capacity
lignumis-sciences-spoil=Lignumis science packs spoil
[mod-setting-description]
lignumis-belt-progression=Yellow belts will require wood belts to craft.
@ -199,6 +204,7 @@ lignumis-fulgora-wood=This adds wooden gear wheels to scrap recycling as the mai
lignumis-early-robots=Personal robots are moved from steam to wood science and are a tiny bit faster.
lignumis-vanilla-lab=Moves the transport belt recipe to Iron processing so the lab can be crafted with the original recipe without requiring to research logistics.
lignumis-double-rocket=The provisional rocket can carry 80 instead of 40 slots.
lignumis-sciences-spoil=Both wood science packs and steam science packs spoil for additional difficulty.
[autoplace-control-names]
lignumis_enemy_base=Lignumis enemy bases

View file

@ -2,6 +2,8 @@ local item_tints = require("__base__.prototypes.item-tints")
local item_sounds = require("__base__.prototypes.item_sounds")
local Technology = require("__cf-lib__/data/Technology")
local spoil = settings.startup["lignumis-sciences-spoil"].value
data:extend({
{
type = "tool",
@ -21,7 +23,9 @@ data:extend({
factoriopedia_durability_description_key = "description.factoriopedia-science-pack-remaining-amount-key",
durability_description_value = "description.science-pack-remaining-amount-value",
random_tint_color = item_tints.iron_rust,
default_import_location = "lignumis"
default_import_location = "lignumis",
spoil_result = spoil and "steam-science-pack-spoiled" or nil,
spoil_ticks = spoil and 3600 * 5 or nil
},
{
type = "recipe",
@ -78,4 +82,42 @@ data:extend({
}
})
if spoil then
data:extend({
{
type = "item",
name = "steam-science-pack-spoiled",
icon = Lignumis.graphics .. "icons/steam-science-pack-spoiled.png",
subgroup = "science-pack",
color_hint = { text = "A" },
order = "2[steam-science-pack]",
inventory_move_sound = item_sounds.science_inventory_move,
pick_sound = item_sounds.science_inventory_pickup,
drop_sound = item_sounds.science_inventory_move,
stack_size = 200,
weight = 1 * kg,
random_tint_color = item_tints.iron_rust,
default_import_location = "lignumis"
},
{
type = "recipe",
name = "refresh-steam-science-pack",
category = "smelting",
enabled = false,
energy_required = 10,
ingredients = {
{ type = "item", name = "steam-science-pack-spoiled", amount = 1 }
},
results = { { type = "item", name = "steam-science-pack", amount = 1 } },
crafting_machine_tint = {
primary = { r = 0.65, g = 0.27, b = 0.18, a = 1.000 },
secondary = { r = 0.65, g = 0.27, b = 0.18, a = 1.000 },
},
allow_productivity = false
}
})
Technology:new("steam-science-pack"):addRecipe("refresh-steam-science-pack")
end
Technology:new("automation-2"):addRecipe("steam-science-pack-steam")

View file

@ -1,6 +1,8 @@
local item_tints = require("__base__.prototypes.item-tints")
local item_sounds = require("__base__.prototypes.item_sounds")
local spoil = settings.startup["lignumis-sciences-spoil"].value
data:extend({
{
type = "tool",
@ -20,7 +22,9 @@ data:extend({
factoriopedia_durability_description_key = "description.factoriopedia-science-pack-remaining-amount-key",
durability_description_value = "description.science-pack-remaining-amount-value",
random_tint_color = item_tints.iron_rust,
default_import_location = "lignumis"
default_import_location = "lignumis",
spoil_result = spoil and "spoilage" or nil,
spoil_ticks = spoil and 3600 * 60 or nil
},
{
type = "recipe",

View file

@ -83,6 +83,13 @@ data:extend({
default_value = false,
order = "l"
},
{
type = "bool-setting",
name = "lignumis-sciences-spoil",
setting_type = "startup",
default_value = false,
order = "m"
},
{
type = "string-setting",
name = "lignumis-second-planet",