forked from cacklingfiend/lignumis
		
	Add recipes to Quality assembler
This commit is contained in:
		
							parent
							
								
									3dacb39714
								
							
						
					
					
						commit
						ade334c1da
					
				
					 2 changed files with 75 additions and 20 deletions
				
			
		| 
						 | 
					@ -35,6 +35,9 @@ basic-radar=Basic radar
 | 
				
			||||||
active-noise-cancelling-tower=Active noise cancelling tower
 | 
					active-noise-cancelling-tower=Active noise cancelling tower
 | 
				
			||||||
quality-assembler=Quality assembler
 | 
					quality-assembler=Quality assembler
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[entity-description]
 | 
				
			||||||
 | 
					quality-assembler=High-end assembler to craft only the finest quality machines. It gives one free quality tier to the crafted item by consuming [item=gold-quality-catalyst]. Surface conditions and ingredients are otherwise unchanged.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[equipment-name]
 | 
					[equipment-name]
 | 
				
			||||||
basic-portable-generator-equipment-gold=Basic portable generator equipment (gold)
 | 
					basic-portable-generator-equipment-gold=Basic portable generator equipment (gold)
 | 
				
			||||||
basic-portable-generator-equipment-copper=Basic portable generator equipment (copper)
 | 
					basic-portable-generator-equipment-copper=Basic portable generator equipment (copper)
 | 
				
			||||||
| 
						 | 
					@ -61,7 +64,7 @@ gold-quality-catalyst=Gold quality catalyst
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[item-description]
 | 
					[item-description]
 | 
				
			||||||
wooden-wall=Use wooden walls to protect your base from the locals and to reduce noise levels.
 | 
					wooden-wall=Use wooden walls to protect your base from the locals and to reduce noise levels.
 | 
				
			||||||
destination-nauvis=Insert this item into a rocket to travel to Nauvis. Notice that you won`t come back for a while.\n__REMARK_COLOR_BEGIN__ALPHA notice: Keep at most 20 item stack in your inventory before leaving as the current transition to Nauvis is a temporary implementation. Be sure to take material to jumpstart you iron, copper and wood production.__REMARK_COLOR_END__
 | 
					destination-nauvis=Insert this item into a rocket to travel to Nauvis. Notice that you won`t come back for a while.\n__REMARK_COLOR_BEGIN__BETA notice: Keep at most 20 item stack in your inventory before leaving as the current transition to Nauvis is a temporary implementation. Be sure to take material to jumpstart you iron, copper and wood production.__REMARK_COLOR_END__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[fluid-name]
 | 
					[fluid-name]
 | 
				
			||||||
wood-pulp=Wood pulp
 | 
					wood-pulp=Wood pulp
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,10 +4,6 @@ local QualityAssemblerFactory = require(MF.buildings .. "GravityAssembler")
 | 
				
			||||||
local QualityAssembler = QualityAssemblerFactory("quality-assembler")
 | 
					local QualityAssembler = QualityAssemblerFactory("quality-assembler")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
data:extend({
 | 
					data:extend({
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        type = "recipe-category",
 | 
					 | 
				
			||||||
        name = "quality-assembling"
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        type = "burner-usage",
 | 
					        type = "burner-usage",
 | 
				
			||||||
        name = "quality-catalyst",
 | 
					        name = "quality-catalyst",
 | 
				
			||||||
| 
						 | 
					@ -54,23 +50,17 @@ data:extend({
 | 
				
			||||||
        type = "recipe",
 | 
					        type = "recipe",
 | 
				
			||||||
        name = "gold-quality-catalyst",
 | 
					        name = "gold-quality-catalyst",
 | 
				
			||||||
        category = "electromagnetics",
 | 
					        category = "electromagnetics",
 | 
				
			||||||
        energy_required = 20,
 | 
					        energy_required = 60,
 | 
				
			||||||
        ingredients = {
 | 
					        ingredients = {
 | 
				
			||||||
            { type = "item", name = "gold-plate", amount = 10 },
 | 
					            { type = "item", name = "gold-plate",       amount = 10 },
 | 
				
			||||||
            { type = "item", name = "tungsten-carbide", amount = 2 },
 | 
					            { type = "item", name = "tungsten-carbide", amount = 2 },
 | 
				
			||||||
            { type = "item", name = "supercapacitor", amount = 2 }
 | 
					            { type = "item", name = "supercapacitor",   amount = 2 }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        results = { { type = "item", name = "gold-quality-catalyst", amount = 1 } },
 | 
					        results = { { type = "item", name = "gold-quality-catalyst", amount = 2 } },
 | 
				
			||||||
        allow_productivity = false,
 | 
					        allow_productivity = false,
 | 
				
			||||||
 | 
					        allow_quality = false,
 | 
				
			||||||
        enabled = false
 | 
					        enabled = false
 | 
				
			||||||
    },
 | 
					    }
 | 
				
			||||||
    table.assign(table.deepcopy(data.raw.recipe["electromagnetic-plant"]), {
 | 
					 | 
				
			||||||
        name = "electromagnetic-plant-quality",
 | 
					 | 
				
			||||||
        localised_name = { "entity-name.electromagnetic-plant" },
 | 
					 | 
				
			||||||
        category = "quality-assembling",
 | 
					 | 
				
			||||||
        hide_from_player_crafting = true,
 | 
					 | 
				
			||||||
        enabled = true
 | 
					 | 
				
			||||||
    })
 | 
					 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QualityAssembler.EntityBuilder:new()
 | 
					QualityAssembler.EntityBuilder:new()
 | 
				
			||||||
| 
						 | 
					@ -81,10 +71,10 @@ QualityAssembler.EntityBuilder:new()
 | 
				
			||||||
        fuel_inventory_size = 1,
 | 
					        fuel_inventory_size = 1,
 | 
				
			||||||
        emissions_per_minute = { noise = 100, pollution = 6 }
 | 
					        emissions_per_minute = { noise = 100, pollution = 6 }
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
 | 
					    :pipes()
 | 
				
			||||||
    :apply({
 | 
					    :apply({
 | 
				
			||||||
        crafting_categories = { "quality-assembling" },
 | 
					 | 
				
			||||||
        energy_usage = "1MW",
 | 
					        energy_usage = "1MW",
 | 
				
			||||||
        crafting_speed = 6,
 | 
					        crafting_speed = 4,
 | 
				
			||||||
        module_slots = 6,
 | 
					        module_slots = 6,
 | 
				
			||||||
        allowed_effects = { "pollution", "quality" },
 | 
					        allowed_effects = { "pollution", "quality" },
 | 
				
			||||||
        effect_receiver = { base_effect = { quality = 10 } }
 | 
					        effect_receiver = { base_effect = { quality = 10 } }
 | 
				
			||||||
| 
						 | 
					@ -100,7 +90,9 @@ QualityAssembler.RecipeBuilder:new()
 | 
				
			||||||
        { type = "item", name = "carbon-fiber",      amount = 100 },
 | 
					        { type = "item", name = "carbon-fiber",      amount = 100 },
 | 
				
			||||||
        { type = "item", name = "quantum-processor", amount = 10 }
 | 
					        { type = "item", name = "quantum-processor", amount = 10 }
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    :apply()
 | 
					    :apply({
 | 
				
			||||||
 | 
					        category = "electromagnetics-or-quality-assembling",
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QualityAssembler.TechnologyBuilder:new()
 | 
					QualityAssembler.TechnologyBuilder:new()
 | 
				
			||||||
    :prerequisites({ "legendary-quality", "quantum-processor" })
 | 
					    :prerequisites({ "legendary-quality", "quantum-processor" })
 | 
				
			||||||
| 
						 | 
					@ -122,3 +114,63 @@ QualityAssembler.TechnologyBuilder:new()
 | 
				
			||||||
    :time(60)
 | 
					    :time(60)
 | 
				
			||||||
    :additionalRecipes({ "gold-quality-catalyst" })
 | 
					    :additionalRecipes({ "gold-quality-catalyst" })
 | 
				
			||||||
    :apply()
 | 
					    :apply()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					local function convert_category(name)
 | 
				
			||||||
 | 
					    local quality_name = name .. "-or-quality-assembling"
 | 
				
			||||||
 | 
					    data:extend({
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            type = "recipe-category",
 | 
				
			||||||
 | 
					            name = quality_name
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					    for _, assembler in pairs(data.raw["assembling-machine"]) do
 | 
				
			||||||
 | 
					        if assembler.crafting_categories and table.contains(assembler.crafting_categories, name) then
 | 
				
			||||||
 | 
					            table.insert(assembler.crafting_categories, quality_name)
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					    table.insert(data.raw["assembling-machine"]["quality-assembler"].crafting_categories, quality_name)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					convert_category("wood-processing-or-assembling")
 | 
				
			||||||
 | 
					convert_category("metallurgy-or-assembling")
 | 
				
			||||||
 | 
					convert_category("metallurgy")
 | 
				
			||||||
 | 
					convert_category("electronics")
 | 
				
			||||||
 | 
					convert_category("electronics-or-assembling")
 | 
				
			||||||
 | 
					convert_category("electromagnetics")
 | 
				
			||||||
 | 
					convert_category("organic-or-assembling")
 | 
				
			||||||
 | 
					convert_category("crafting")
 | 
				
			||||||
 | 
					convert_category("cryogenics-or-assembling")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Lignumis
 | 
				
			||||||
 | 
					data.raw.recipe["lumber-mill"].category = "wood-processing-or-assembling-or-quality-assembling"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Nauvis
 | 
				
			||||||
 | 
					data.raw.recipe["logistic-robot"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["construction-robot"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["roboport"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["speed-module-3"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["productivity-module-3"].category = "electronics-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["efficiency-module-3"].category = "electronics-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["rocket-silo"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["cargo-bay"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["asteroid-collector"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["thruster"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Vulcanus
 | 
				
			||||||
 | 
					data.raw.recipe["foundry"].category = "metallurgy-or-assembling-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["big-mining-drill"].category = "metallurgy-or-quality-assembling"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Fulgora
 | 
				
			||||||
 | 
					data.raw.recipe["electromagnetic-plant"].category = "electronics-or-assembling-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["lightning-collector"].category = "electromagnetics-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["mech-armor"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["quality-module-3"].category = "electronics-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["recycler"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Gleba
 | 
				
			||||||
 | 
					data.raw.recipe["biochamber"].category = "organic-or-assembling-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["stack-inserter"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					data.raw.recipe["spidertron"].category = "crafting-or-quality-assembling"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Aquilo
 | 
				
			||||||
 | 
					data.raw.recipe["cryogenic-plant"].category = "cryogenics-or-assembling-or-quality-assembling"
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue