diff --git a/changelog.txt b/changelog.txt index 9ba81d00..5e76cff0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,14 +4,17 @@ Date: ??? Changes: - fix zungrugor and numals not being disabled even when they had no animal modules - fixed that fawogae mk4 and fawogae mk5 were both unlocked at the same science tier (py4) - - buffed the fawogae->coal recipe by requiring 1 fawogae input instead of 10 - - buffed sap turd path 2 to give resveratrol instead of cellulose + - buffed the fawogae->coal recipe by requiring 1 fawogae input instead of 10 - added a new recipe for cumene+nickel+arthropod blood into organic solvent - buffed bioprinting by removing primers from the pluripotent stem cells recipes - fixed that bioprinting stage 2 unlocked both mk1 and mk2 of brain printing. mk1 recipe moved down to bioprinting stage 1 + - moved native flora smart farming down to chemical science + TURD: - added T.U.R.D unselect infinite tech to allow the indecisive to revert a single T.U.R.D selection - added a new T.U.R.D: the composter turd. why is it unlocked at military science? don't ask too many questions - - moved native flora smart farming down to chemical science + - buffed all three paths of bioprinter turd + - added creature chamber turd (avalible at py science pack 2) credit: soren + - buffed sap turd path 2 to give resveratrol instead of cellulose --------------------------------------------------------------------------------------------------- Version: 2.1.12 Date: 2023-11-22 diff --git a/locale/en/techs.cfg b/locale/en/techs.cfg index 28bd145c..fee7a946 100644 --- a/locale/en/techs.cfg +++ b/locale/en/techs.cfg @@ -284,7 +284,7 @@ biofactory-upgrade=Biofactory upgrade bioreactor-upgrade=Bioreactor upgrade cadaveric-arum-upgrade=Cadaveric arum upgrade compost-upgrade=Compost upgrade -creature-upgrade=Creature chamber upgrade +creature-chamber-upgrade=Creature chamber upgrade genlab-upgrade=Genlab upgrade cridren-upgrade=Cridren upgrade data-array-upgrade=Data-array upgrade @@ -372,9 +372,9 @@ e-photo=Electrical photoneutralization constant=Exothermic irrigation humus=Sweet tooth worm-hotel=Worm hotel -respiratory=Respiratory bioamplifier +respiratory=Knowledge transfer neural-fusion=Neural fusion -cc=Catalytic cytoosmosis +cc=Planetary adaptation hsn=High-speed nucleodeleter enn=Extreme nucleotide neutralization dwx=Hygroscopic addition @@ -819,11 +819,11 @@ acid-comtemplator=A standard greenhouse will use basic elements to neutralize th solar-scope=Replace the greenhouse plastic with a special material made from a nano-lens. The medium will focus and increase the solar energy density over these crops, improving their growth rate and removing the energy requirement for artificial heating. e-photo=Uses special light spectrums to break down and neutralize any excess acidity generated at the plant's roots. Grants a small byproduct of MSA acid in the soil that can be collected. The required light spectrums must be generated via artificial luminescence, increasing total energy usage. constant=Composting is always an exothermic process. The heat is generated by microbial activity and retained by insulation. At industrial scales, this residual heat can reach up to 250 degrees Celsius. Pouring water on the resulting biomass will instantly vaporize it, creating a significant amount of steam. Counterintuitively, the vaporizing process creates additional escape channels for existing moistures in the compost. This reduction in the overall moisture content will result in dry biomass. -humus=Certian strains of aerobic manure bacteria florish when mixed with the molasses contained in sweet tuuphra nectar. By adding this syrup to your compost bins, the resulting biomass becomes viable for this strain of bacteria. [font=default-semibold][color=255,60,60]WARNING: Picking this option will cause all composters to require a small amount of sweet syrup as a fluid fuel (0.1 per second per MK level).[/color][/font] Consumption rate is also scaled based on module effects. Due to the extra biological activity, composters also gain 5% productivity per MK level. +humus=Certian strains of aerobic manure bacteria florish when mixed with the molasses contained in sweet tuuphra nectar. By adding this syrup to your compost bins, the resulting biomass becomes the perfect breeding ground for retrovirus. [font=default-semibold][color=255,60,60]WARNING: Picking this option will cause all composters to require a small amount of sweet syrup as a fluid fuel (0.1 per second per MK level).[/color][/font] Consumption rate is also scaled based on module effects. Due to the extra biological activity, composters also gain 5% productivity per MK level. worm-hotel=Your composter attracts thousands of burrowing worms. The biofactory is able to seperate these earth dwellers from the biomass, leaving powdered compost behind. These worms are able to crush various materials more efficently than can be done through abiotic technologies. -respiratory=Install the special respiratory bioamplifier in the chambers, made with zipir parenchyma providing best cellular oxygenation and growth. -neural-fusion=Arthurian brain cellular matrix will now be used as a standard procedure in neural and brain maturing and organization, speeding up the longest of embryo phases. -cc=Low temperature cell aggregation at max thanks to the use of korlex cryoglands, we can command cells and even tissue to a specific location by a temperature gradient and some nexelit grains. +respiratory=Use the data array to open-source your scientific advancements with other researchers in the home galaxy. The alien data is revised by the community and returned with high fidelity. Due to the extra operational equipment, energy costs increase dramatically. +neural-fusion=Redesign the creature chamber for the arthurian brain cellular matrix to be useable as a standard procedure in neural and brain maturing and organization, speeding up the longest of embryo phases. +cc=The cellular blueprints for worker creatures such as caravans and digosaurs are not native to this galaxy. This forces the designs of these creatures to be generalized for function in all enviorments. Use additional DNA samples taken from this planet when constructing these creatures in order to make them more efficient. Speed and health are increased by 35%. The more complex biological construction process will take significantly longer. hsn=Use computational models to track and delete any aberration in the ADAM42 DNA building process by a focused laser array. enn=Nickel carbonyl is a nickel-based carbonyl with caustic and volatile properties, especially when exposed to biological material. A discovery was made that this biohazard could help in the synthesis of polyketide synthase enzymes (PKSs) by neutralization of nucleotides in the sample. The addition of this chemical will allow the chambers to have less than 0.0001% chance of xeno DNA mutation errors. The cycle in each stage will take longer, but the specimens will be the closest to perfection. dwx=Polyvinylpyrrolidone is a hygroscopic, amorphous, synthetic polymer consisting of linear 1-vinyl-2-pyrrolidinone groups. This chemical will improve the effectivity of heavy-metal ATPases by absorbing any remaining moisture and forcing the plants to become hydrophobic. diff --git a/prototypes/technologies/turd-respec.lua b/prototypes/technologies/turd-respec.lua index 5c62ce00..50ba0132 100644 --- a/prototypes/technologies/turd-respec.lua +++ b/prototypes/technologies/turd-respec.lua @@ -1,103 +1,76 @@ -TECHNOLOGY { - type = 'technology', - name = 'turd-respec-1', - icon = '__pyalienlifegraphics3__/graphics/technology/updates/restart.png', - icon_size = 128, - prerequisites = {'dhilmos-upgrade', 'dingrits-upgrade'}, - effects = {}, - unit = { - count_formula = '2^(L-1)*5000', - ingredients = { - {'automation-science-pack', 100}, - {'py-science-pack-1', 60}, - {'logistic-science-pack', 30}, - {'military-science-pack', 20}, - {'py-science-pack-2', 20}, - {'chemical-science-pack', 10}, - {'py-science-pack-3', 6}, - {'production-science-pack', 3}, - {'py-science-pack-4', 2}, - {'utility-science-pack', 1}, - }, - time = 1200, - }, - max_level = 1, - is_turd = true, - localised_description = {'', {'turd.font', {'turd.tech'}}, '\n', {'technology-description.turd-respec'}} -} +local description = {'', {'turd.font', {'turd.tech'}}, '\n', {'technology-description.turd-partial-respec'}} -TECHNOLOGY { - type = 'technology', - name = 'turd-respec-2', - icon = '__pyalienlifegraphics3__/graphics/technology/updates/restart.png', - icon_size = 128, - prerequisites = {'turd-respec-1'}, - effects = {}, - unit = { - count_formula = '2^(L-1)*2500', - ingredients = { - {'automation-science-pack', 200}, - {'py-science-pack-1', 100}, - {'logistic-science-pack', 60}, - {'military-science-pack', 30}, - {'py-science-pack-2', 30}, - {'chemical-science-pack', 20}, - {'py-science-pack-3', 10}, - {'production-science-pack', 6}, - {'py-science-pack-4', 3}, - {'utility-science-pack', 2}, - {'space-science-pack', 1}, - }, - time = 1200, - }, - max_level = 'infinite', - is_turd = true, - localised_description = {'', {'turd.font', {'turd.tech'}}, '\n', {'technology-description.turd-respec'}} -} +local science_packs +if mods.pystellarexpedition then + science_packs = { + 'automation-science-pack', + 'py-science-pack-1', + 'logistic-science-pack', + 'military-science-pack', + 'py-science-pack-2', + 'chemical-science-pack', + 'space-science-pack-2', + 'py-science-pack-3', + 'production-science-pack', + 'py-science-pack-4', + 'utility-science-pack', + 'space-science-pack', + } +else + science_packs = { + 'automation-science-pack', + 'py-science-pack-1', + 'logistic-science-pack', + 'py-science-pack-2', + 'chemical-science-pack', + 'py-science-pack-3', + 'production-science-pack', + 'py-science-pack-4', + 'utility-science-pack', + 'space-science-pack', + } +end -TECHNOLOGY { - type = 'technology', - name = 'turd-partial-respec-1', - icon = '__pyalienlifegraphics3__/graphics/technology/updates/single-restart.png', - icon_size = 128, - prerequisites = {'chemical-science-pack'}, - effects = {}, - unit = { - count_formula = '2^(L-1)*5000', - ingredients = { - {'automation-science-pack', 10}, - {'py-science-pack-1', 6}, - {'logistic-science-pack', 3}, - {'py-science-pack-2', 2}, - {'chemical-science-pack', 1}, +local offset = 5 + +local ingredients = {} +for i = offset, #science_packs - 1 do + pack = science_packs[i] + ingredients[i] = {pack, 1} + TECHNOLOGY { + type = 'technology', + name = 'turd-partial-respec-' .. (i-offset+1), + icon = '__pyalienlifegraphics3__/graphics/technology/updates/restart.png', + icon_size = 128, + prerequisites = i ~= offset and {'turd-partial-respec-' .. (i-offset)} or {'ulric-upgrade'}, + effects = {}, + unit = { + count = 50, + ingredients = table.deepcopy(ingredients), + time = 30, }, - time = 1200, - }, - max_level = 1, - is_turd = true, - localised_description = {'', {'turd.font', {'turd.tech'}}, '\n', {'technology-description.turd-partial-respec'}} -} + upgrade = true, + is_turd = true, + localised_description = {'', {'turd.font', {'turd.tech'}}, '\n', {'technology-description.turd-partial-respec'}} + } +end + +ingredients[#science_packs] = {science_packs[#science_packs], 1} TECHNOLOGY { type = 'technology', - name = 'turd-partial-respec-2', - icon = '__pyalienlifegraphics3__/graphics/technology/updates/single-restart.png', + name = 'turd-partial-respec-' .. (#science_packs - offset), + icon = '__pyalienlifegraphics3__/graphics/technology/updates/restart.png', icon_size = 128, - prerequisites = {'turd-partial-respec-1'}, + prerequisites = {'turd-partial-respec-' .. (#science_packs - 1 - offset)}, effects = {}, unit = { - count_formula = '2^(L-1)*2500', - ingredients = { - {'automation-science-pack', 20}, - {'py-science-pack-1', 10}, - {'logistic-science-pack', 6}, - {'py-science-pack-2', 3}, - {'chemical-science-pack', 2}, - {'production-science-pack', 1}, - }, - time = 1200, + count_formula = '2^(L-' .. (#science_packs - offset) .. ')*2500', + ingredients = ingredients, + time = 1800, }, max_level = 'infinite', is_turd = true, + upgrade = true, localised_description = {'', {'turd.font', {'turd.tech'}}, '\n', {'technology-description.turd-partial-respec'}} } diff --git a/prototypes/upgrades/bioprinting.lua b/prototypes/upgrades/bioprinting.lua index 7a9e3514..dce5bc66 100644 --- a/prototypes/upgrades/bioprinting.lua +++ b/prototypes/upgrades/bioprinting.lua @@ -8,53 +8,64 @@ if data and not yafc_turd_integration then table.deepcopy(data.raw.recipe['bio-scafold-4']), } do recipe.name = recipe.name .. '-with-lamp' - FUN.add_ingredient(recipe, {'small-lamp', 2}) + FUN.add_ingredient(recipe, {'small-lamp', 1}) FUN.multiply_result_amount(recipe, 'bio-scafold', 2) data:extend{recipe} end + for i, recipe in pairs({ + table.deepcopy(data.raw.recipe['bio-printer-mk01']), + table.deepcopy(data.raw.recipe['bio-printer-mk02']), + table.deepcopy(data.raw.recipe['bio-printer-mk03']), + table.deepcopy(data.raw.recipe['bio-printer-mk04']), + }) do + recipe.name = recipe.name .. '-yag' + FUN.add_ingredient(recipe, {type = 'item', name = 'yag-laser-module', amount = 2*i}) + data:extend{recipe} + end + data:extend{ { type = 'recipe', name = 'stem-cell-recycle-1', enabled = false, category = 'atomizer', - results = {{type = 'fluid', name = 'psc', amount = 10}}, + results = {{type = 'fluid', name = 'psc', amount = 30}}, ingredients = { {'bones', 3}, {'chitin', 3}, {'mukmoux-fat', 5}, {name = 'oxygen', amount = 150, type = 'fluid'} }, - energy_required = 20 + energy_required = 5 }, { type = 'recipe', name = 'stem-cell-recycle-2', enabled = false, category = 'atomizer', - results = {{type = 'fluid', name = 'psc', amount = 10}}, + results = {{type = 'fluid', name = 'psc', amount = 30}}, ingredients = { {'bonemeal', 3}, {'skin', 5}, {'brain', 2}, {name = 'oxygen', amount = 150, type = 'fluid'} }, - energy_required = 20 + energy_required = 5 }, { type = 'recipe', name = 'stem-cell-recycle-3', enabled = false, category = 'atomizer', - results = {{type = 'fluid', name = 'psc', amount = 10}}, + results = {{type = 'fluid', name = 'psc', amount = 30}}, ingredients = { {'guts', 6}, {'meat', 4}, {type = 'fluid', name = 'blood', amount = 40}, {name = 'oxygen', amount = 150, type = 'fluid'} }, - energy_required = 20 + energy_required = 5 } } end @@ -71,7 +82,7 @@ return { icon = '__pyalienlifegraphics3__/graphics/technology/updates/u-bioprinting.png', icon_size = 128, order = 'c-a', - prerequisites = {'organ-printing-mk02'}, + prerequisites = {'organ-printing-mk02', 'parametric-oscilator'}, unit = { count = 500, ingredients = { @@ -105,7 +116,11 @@ return { icon_size = 128, order = 'c-a', effects = { -- the effects the tech will have on the building. valid types: 'module-effects', 'unlock-recipe', 'recipe-replacement', 'machine-replacement' - {consumption = 2, speed = -1, productivity = 0.1, type = 'module-effects'} + {consumption = 2, speed = -1, productivity = 0.15, type = 'module-effects'}, + {old = 'bio-printer-mk01', new = 'bio-printer-mk01-yag', type = 'recipe-replacement'}, + {old = 'bio-printer-mk02', new = 'bio-printer-mk02-yag', type = 'recipe-replacement'}, + {old = 'bio-printer-mk03', new = 'bio-printer-mk03-yag', type = 'recipe-replacement'}, + {old = 'bio-printer-mk04', new = 'bio-printer-mk04-yag', type = 'recipe-replacement'}, } }, { diff --git a/prototypes/upgrades/compost.lua b/prototypes/upgrades/compost.lua index db52f377..05d5ea86 100644 --- a/prototypes/upgrades/compost.lua +++ b/prototypes/upgrades/compost.lua @@ -50,34 +50,18 @@ if data and not yafc_turd_integration then data:extend{{ type = 'recipe', - name = 'free-manure-bacteria', - category = 'compost', - enabled = false, - energy_required = 1, + name = 'cheap-retrovirus', + category = 'incubator', ingredients = { - {type = 'item', name = 'biomass', amount = 4}, - {type = 'fluid', name = 'water', amount = 60}, + {'retrovirus', 1}, + {'biomass', 2}, + {type = 'fluid', name = 'hot-air', amount = 30}, }, results = { - {type = 'fluid', name = 'manure-bacteria', amount = 60}, + {type = 'item', name = 'retrovirus', amount = 2, catalyst_amount = 1}, }, - main_product = 'manure-bacteria', - }} - - data:extend{{ - type = 'recipe', - name = 'manure-bacteria-to-manure', - category = 'bio-reactor', + energy_required = 5, enabled = false, - energy_required = 2, - ingredients = { - {type = 'fluid', name = 'manure-bacteria', amount = 60}, - }, - results = { - {type = 'item', name = 'manure', amount = 1}, - {type = 'fluid', name = 'water', amount = 50}, - }, - main_product = 'manure', }} data:extend{{ @@ -254,8 +238,7 @@ return { {type = 'machine-replacement', old = 'compost-plant-mk02', new = 'compost-plant-mk02-turd'}, {type = 'machine-replacement', old = 'compost-plant-mk03', new = 'compost-plant-mk03-turd'}, {type = 'machine-replacement', old = 'compost-plant-mk04', new = 'compost-plant-mk04-turd'}, - {type = 'unlock-recipe', recipe = 'free-manure-bacteria'}, - {type = 'unlock-recipe', recipe = 'manure-bacteria-to-manure'}, + {type = 'unlock-recipe', recipe = 'cheap-retrovirus'}, {recipe = 'sweet-syrup', type = 'unlock-recipe', also_unlocked_by_techs = true}, {recipe = 'a-molasse', type = 'unlock-recipe', also_unlocked_by_techs = true}, } diff --git a/prototypes/upgrades/creature.lua b/prototypes/upgrades/creature.lua index 4048f272..a9871ccc 100644 --- a/prototypes/upgrades/creature.lua +++ b/prototypes/upgrades/creature.lua @@ -1,3 +1,113 @@ +local FUN = require '__pycoalprocessing__/prototypes/functions/functions' +local path_1_module_effect = {consumption = 3, speed = -0.1, productivity = 0, type = 'module-effects'} +local path_1_effects = {} +local category = 'creature-chamber' +local units = { + 'digosaurus', + 'thikat', + 'work-o-dile', + 'caravan', + 'flyavan', + 'nukavan', +} +local path_3_effects = {} +for _, unit_name in pairs(units) do + path_3_effects[#path_3_effects + 1] = {type = 'recipe-replacement', old = unit_name, new = unit_name .. '-turd'} +end + +if data and not yafc_turd_integration then + path_1_effects[#path_1_effects + 1] = path_1_module_effect + local to_add = {} + for _, recipe in pairs(data.raw.recipe) do + if recipe.category == category then + FUN.standardize_results(recipe) + local dna_samples = {} + for _, ingredient in pairs(recipe.ingredients or {}) do + local name = ingredient[1] or ingredient.name + if name:match('earth%-.+%-sample') or name == 'strorix-unknown-sample' then + table.insert(dna_samples, ingredient) + end + end + if #dna_samples ~= 0 then + local replacement = table.deepcopy(recipe) + replacement.name = replacement.name .. '-earth-sample-turd' + replacement.enabled = false + replacement.main_product = replacement.main_product or replacement.results[1].name or replacement.results[1][1] + for _, sample in pairs(dna_samples) do + local amount = sample.amount or sample[2] or 1 + local name = sample.name or sample[1] + if amount >= 5 then + FUN.multiply_ingredient_amount(replacement, name, 0.1) + else + FUN.add_result(replacement, {type = 'item', name = name, amount = amount, probability = 0.9}) + end + end + to_add[#to_add + 1] = replacement + path_1_effects[#path_1_effects + 1] = {type = 'recipe-replacement', old = recipe.name, new = replacement.name} + end + end + end + data:extend(to_add) + + local arthurians = { + 'arthurian-codex', + 'arthurian-mk02', + 'arthurian-mk03', + 'arthurian-mk04', + } + for i, recipe in pairs({ + table.deepcopy(data.raw.recipe['creature-chamber-mk01']), + table.deepcopy(data.raw.recipe['creature-chamber-mk02']), + table.deepcopy(data.raw.recipe['creature-chamber-mk03']), + table.deepcopy(data.raw.recipe['creature-chamber-mk04']), + }) do + recipe.name = recipe.name .. '-arthurian' + FUN.add_ingredient(recipe, {type = 'item', name = arthurians[i], amount = 1}) + data:extend{recipe} + end + + for _, unit_name in pairs(units) do + local unit = table.deepcopy(data.raw.unit[unit_name]) + local recipe = table.deepcopy(data.raw.recipe[unit_name]) + local item = table.deepcopy(data.raw.item[unit_name] or data.raw['item-with-tags'][unit_name] or data.raw.module[unit_name]) + if not item then error('no item for ' .. unit_name) end + local name = unit_name .. '-turd' + + unit.name = name + unit.movement_speed = unit.movement_speed * 1.35 + unit.max_health = unit.max_health * 1.35 + unit.distance_per_frame = unit.distance_per_frame * 1.35 + if unit.minable and unit.minable.result then unit.minable.result = name end + unit.localised_name = unit.localised_name or {'entity-name.' .. unit_name} + unit.localised_description = unit.localised_description or {'?', {'entity-description.' .. unit_name}, ''} + + recipe.name = name + recipe.energy_required = recipe.energy_required * 4 + recipe.results = nil + recipe.result = name + recipe.result_count = 1 + + item.name = name + if item.place_result then item.place_result = name end + item.icons = { + {icon = item.icon, icon_size = item.icon_size, tint = {1, 1, 0.6}}, + } + item.icon = nil + + data:extend{unit, recipe, item} + end +elseif script then + path_1_effects = function() + local result = {path_1_module_effect} + for _, recipe in pairs(game.get_filtered_recipe_prototypes{{filter = 'category', category = category}}) do + if recipe.name:match('.+%-earth%-sample%-turd') then + result[#result + 1] = {type = 'recipe-replacement', old = recipe.name:gsub('%-earth%-sample%-turd', ''), new = recipe.name} + end + end + return result + end +end + return { affected_entities = { -- the entities that should be effected by this tech upgrade 'creature-chamber-mk01', @@ -6,18 +116,16 @@ return { 'creature-chamber-mk04', }, master_tech = { -- tech that is shown in the tech tree - name = 'creature-upgrade', + name = 'creature-chamber-upgrade', icon = '__pyalienlifegraphics3__/graphics/technology/updates/u-creature.png', icon_size = 128, order = 'c-a', - prerequisites = {'biotech-mk02'}, + prerequisites = {'domestication'}, unit = { count = 500, ingredients = { {'automation-science-pack', 1}, - {'logistic-science-pack', 1}, - -- {'py-science-pack-3', 1}, - {'chemical-science-pack', 1}, + {'py-science-pack-1', 1}, }, time = 45 } @@ -28,9 +136,7 @@ return { icon = '__pyalienlifegraphics3__/graphics/technology/respiratory.png', icon_size = 128, order = 'c-a', - effects = { -- the effects the tech will have on the building. valid types: 'module-effects', 'unlock-recipe', 'recipe-replacement', 'machine-replacement' - {consumption = 0.0, speed = 0.15, productivity = -0.12, type = 'module-effects'} - }, + effects = path_1_effects }, { name = 'neural-fusion', @@ -38,7 +144,12 @@ return { icon_size = 128, order = 'c-a', effects = { -- the effects the tech will have on the building. valid types: 'module-effects', 'unlock-recipe', 'recipe-replacement', 'machine-replacement' - {consumption = -0.1, speed = 0, productivity = -0.1, type = 'module-effects'} + {consumption = 10, speed = 10, productivity = 0, type = 'module-effects'}, + {type = 'unlock-recipe', recipe = 'arthurian-codex', also_unlocked_by_techs = true}, + {type = 'recipe-replacement', old = 'creature-chamber-mk01', new = 'creature-chamber-mk01-arthurian'}, + {type = 'recipe-replacement', old = 'creature-chamber-mk02', new = 'creature-chamber-mk02-arthurian'}, + {type = 'recipe-replacement', old = 'creature-chamber-mk03', new = 'creature-chamber-mk03-arthurian'}, + {type = 'recipe-replacement', old = 'creature-chamber-mk04', new = 'creature-chamber-mk04-arthurian'}, } }, { @@ -46,9 +157,7 @@ return { icon = '__pyalienlifegraphics3__/graphics/technology/cc.png', icon_size = 128, order = 'c-a', - effects = { -- the effects the tech will have on the building. valid types: 'module-effects', 'unlock-recipe', 'recipe-replacement', 'machine-replacement' - {consumption = 0.25, speed = 0, productivity = 0.2, type = 'module-effects'} - } + effects = path_3_effects } } } \ No newline at end of file diff --git a/prototypes/upgrades/slaughterhouse.lua b/prototypes/upgrades/slaughterhouse.lua index d6df67ab..6572b8ab 100644 --- a/prototypes/upgrades/slaughterhouse.lua +++ b/prototypes/upgrades/slaughterhouse.lua @@ -80,7 +80,7 @@ if data and not yafc_turd_integration then table.insert(effects[path], {old = recipe_name, new = recipe.name, type = 'recipe-replacement'}) end end -else +elseif script then for _, path in pairs{'laser', 'music', 'lard'} do for _, recipe_name in pairs(rendering_recipes) do table.insert(effects[path], {old = recipe_name, new = recipe_name .. '-' .. path, type = 'recipe-replacement'}) diff --git a/prototypes/upgrades/tech-upgrades.lua b/prototypes/upgrades/tech-upgrades.lua index 8372854f..8cddeab0 100644 --- a/prototypes/upgrades/tech-upgrades.lua +++ b/prototypes/upgrades/tech-upgrades.lua @@ -4,7 +4,7 @@ local tech_upgrades = { require('prototypes/upgrades/bioprinting'), require('prototypes/upgrades/biofactory'), require('prototypes/upgrades/compost'), - --require('prototypes/upgrades/creature'), + require('prototypes/upgrades/creature'), require('prototypes/upgrades/incubator'), require('prototypes/upgrades/slaughterhouse'), require('prototypes/upgrades/arthurian'), diff --git a/scripts/caravan/caravan-prototypes.lua b/scripts/caravan/caravan-prototypes.lua index c10559cf..888c0a6f 100644 --- a/scripts/caravan/caravan-prototypes.lua +++ b/scripts/caravan/caravan-prototypes.lua @@ -118,6 +118,13 @@ local prototypes = { } } +prototypes['caravan-turd'] = prototypes['caravan'] +prototypes['flyavan-turd'] = prototypes['flyavan'] +prototypes['nukavan-turd'] = prototypes['nukavan'] +prototypes['caravan-turd'].placeable_by = 'caravan-turd' +prototypes['flyavan-turd'].placeable_by = 'flyavan-turd' +prototypes['nukavan-turd'].placeable_by = 'nukavan-turd' + local function get_outpost_inventory(outpost) local type = outpost.type if type == 'character' then diff --git a/scripts/digosaurus/digosaurus-prototypes.lua b/scripts/digosaurus/digosaurus-prototypes.lua index cc4794ef..f69bc010 100644 --- a/scripts/digosaurus/digosaurus-prototypes.lua +++ b/scripts/digosaurus/digosaurus-prototypes.lua @@ -12,14 +12,20 @@ Digosaurus.minable_categories = { Digosaurus.valid_creatures = { ['digosaurus'] = 1, + ['digosaurus-turd'] = 1, ['thikat'] = 2, - ['work-o-dile'] = 3 + ['thikat-turd'] = 2, + ['work-o-dile'] = 3, + ['work-o-dile-turd'] = 3, } Digosaurus.mining_proxies = { ['digosaurus'] = 'digosaurus-mineable-proxy', ['thikat'] = 'thikats-mineable-proxy', - ['work-o-dile'] = 'work-o-dile-mineable-proxy' + ['work-o-dile'] = 'work-o-dile-mineable-proxy', + ['digosaurus-turd'] = 'digosaurus-mineable-proxy', + ['thikat-turd'] = 'thikats-mineable-proxy', + ['work-o-dile-turd'] = 'work-o-dile-mineable-proxy', } Digosaurus.mining_range = 12.5 diff --git a/scripts/turd/turd.lua b/scripts/turd/turd.lua index 8ae6a9d3..49e0ca6a 100644 --- a/scripts/turd/turd.lua +++ b/scripts/turd/turd.lua @@ -76,6 +76,12 @@ local function update_confirm_button(element, player, researched_technologies) end end +local function defunctionize_effect_table(sub_tech) + if type(sub_tech.effects) == 'function' then + sub_tech.effects = sub_tech.effects() + end +end + local function create_turd_page(gui, player) local textbox_frame = gui.add{type = 'frame', direction = 'vertical', name = 'textbox_frame'} textbox_frame.style.horizontally_stretchable = true @@ -143,6 +149,7 @@ local function create_turd_page(gui, player) local effects_scroll_pane = info_flow.add{type = 'scroll-pane', style = 'scroll_pane_under_subheader', vertical_scroll_policy = 'never', horizontal_scroll_policy = 'dont-show-but-allow-scrolling'} local effects_flow = effects_scroll_pane.add{type = 'flow', direction = 'horizontal'} effects_flow.style.vertical_align = 'center' + defunctionize_effect_table(sub_tech) for _, effect in pairs(sub_tech.effects) do if effect.type == 'module-effects' then local sprite = effects_flow.add{type = 'choose-elem-button', elem_type = 'item', style = 'transparent_slot'} @@ -353,6 +360,7 @@ local function apply_turd_bonus(force, master_tech_name, tech_upgrade, assemblin local recipes = force.recipes local item_prototypes = game.item_prototypes + defunctionize_effect_table(sub_tech) for _, effect in pairs(sub_tech.effects) do if effect.type == 'unlock-recipe' then recipes[effect.recipe].enabled = true @@ -380,6 +388,7 @@ end local function unselect_recipes_for_subtech(sub_tech, force, assembling_machine_list) local recipes = force.recipes + defunctionize_effect_table(sub_tech) for _, effect in pairs(sub_tech.effects) do if (effect.type == 'unlock-recipe' or effect.type == 'recipe-replacement') and not effect.also_unlocked_by_techs then local recipe = recipes[effect.new or effect.recipe] @@ -465,18 +474,6 @@ Turd.events.on_init = function() global.turd_machine_replacements = global.turd_machine_replacements or {} end -local function respec_all(force) - local assembling_machine_list = find_all_assembling_machines(force) - for _, tech_upgrade in pairs(tech_upgrades) do - for _, sub_tech in pairs(tech_upgrade.sub_techs) do - unselect_recipes_for_subtech(sub_tech, force, assembling_machine_list) - end - end - - global.turd_bonuses[force.index] = {} - destroy_all_hidden_beacons(force) -end - local function starts_with(str, start) return str:sub(1, #start) == start end @@ -492,9 +489,6 @@ local function on_researched(event) elseif starts_with(technology.name, 'turd-partial-respec') then global.turd_reset_remaining[force_index] = (global.turd_reset_remaining[force_index] or 0) + 1 return - elseif starts_with(technology.name, 'turd-respec') and game.tick ~= 0 then - respec_all(force) - return end -- this is for recipe replacement. if a non turd tech unlocks a recipe that is replaced by a turd tech, run reapply_turd_bonuses