forked from cacklingfiend/lignumis
		
	Add quality assembler
This commit is contained in:
		
							parent
							
								
									a6f0fc52b1
								
							
						
					
					
						commit
						6c99dea3d2
					
				
					 9 changed files with 105 additions and 0 deletions
				
			
		
							
								
								
									
										
											BIN
										
									
								
								lignumis/graphics/empty-quality-catalyst-slot.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lignumis/graphics/empty-quality-catalyst-slot.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 3.7 KiB | 
							
								
								
									
										
											BIN
										
									
								
								lignumis/graphics/icons/quality-gold-catalyst.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lignumis/graphics/icons/quality-gold-catalyst.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 8.6 KiB | 
							
								
								
									
										
											BIN
										
									
								
								lignumis/graphics/quality-catalyst-icon-red.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lignumis/graphics/quality-catalyst-icon-red.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 4.9 KiB | 
|  | @ -33,6 +33,7 @@ wood-underground-belt=Wood underground belt | |||
| wood-splitter=Wood splitter | ||||
| basic-radar=Basic radar | ||||
| active-noise-cancelling-tower=Active noise cancelling tower | ||||
| quality-assembler=Quality assembler | ||||
| 
 | ||||
| [equipment-name] | ||||
| basic-portable-generator-equipment-gold=Basic portable generator equipment (gold) | ||||
|  | @ -56,6 +57,7 @@ lumber=Lumber | |||
| basic-repair-pack=Basic repair pack | ||||
| cupriavidus-necator=Cupriavidus necator | ||||
| dead-cupriavidus-necator=Dead Cupriavidus necator | ||||
| gold-quality-catalyst=Gold quality catalyst | ||||
| 
 | ||||
| [item-description] | ||||
| wooden-wall=Use wooden walls to protect your base from the locals and to reduce noise levels. | ||||
|  | @ -122,6 +124,7 @@ natural-gold-soil=Gold-infused soil | |||
| 
 | ||||
| [fuel-category-name] | ||||
| wood=Wood fuel | ||||
| quality-catalyst=Quality catalyst | ||||
| 
 | ||||
| [mod-setting-name] | ||||
| lignumis-belt-progression=Enable progressive belt recipes | ||||
|  | @ -137,5 +140,15 @@ pollution-type=Pollution type | |||
| [surface-property-unit] | ||||
| pollution-type=__plural_for_parameter__1__{1=Pollution|2=Spores|3=Noise|rest=-}__ | ||||
| 
 | ||||
| [entity-status] | ||||
| no-quality-catalyst=No quality catalyst | ||||
| 
 | ||||
| [description] | ||||
| accepted-catalysts=Accepted catalysts | ||||
| quality-catalyst-energy-value=Quality value | ||||
| 
 | ||||
| [gui] | ||||
| quality-catalyst=Quality catalyst | ||||
| 
 | ||||
| [lignumis] | ||||
| start-new-game=Lignumis is meant to be played in a fresh game as it extends the early game before Nauvis. | ||||
|  | @ -25,5 +25,6 @@ require("basic-repair-pack") | |||
| require("basic-radar") | ||||
| require("mid-game-recipes") | ||||
| require("active-noise-cancelling-tower") | ||||
| require("quality-assembler") | ||||
| 
 | ||||
| require("noise") | ||||
|  |  | |||
							
								
								
									
										91
									
								
								lignumis/prototypes/content/quality-assembler.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								lignumis/prototypes/content/quality-assembler.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,91 @@ | |||
| local item_sounds = require("__base__.prototypes.item_sounds") | ||||
| 
 | ||||
| local QualityAssemblerFactory = require(MF.buildings .. "GravityAssembler") | ||||
| local QualityAssembler = QualityAssemblerFactory("quality-assembler") | ||||
| 
 | ||||
| data:extend({ | ||||
|     { | ||||
|         type = "recipe-category", | ||||
|         name = "quality-assembling" | ||||
|     }, | ||||
|     { | ||||
|         type = "burner-usage", | ||||
|         name = "quality-catalyst", | ||||
|         empty_slot_sprite = { | ||||
|             filename = "__lignumis__/graphics/empty-quality-catalyst-slot.png", | ||||
|             priority = "extra-high-no-scale", | ||||
|             size = 64, | ||||
|             flags = { "gui-icon" }, | ||||
|         }, | ||||
|         empty_slot_caption = { "gui.quality-catalyst" }, | ||||
|         empty_slot_description = { "gui.quality-catalyst-description" }, | ||||
|         icon = { | ||||
|             filename = "__lignumis__/graphics/quality-catalyst-icon-red.png", | ||||
|             priority = "extra-high-no-scale", | ||||
|             width = 64, | ||||
|             height = 64, | ||||
|             flags = { "icon" } | ||||
|         }, | ||||
|         no_fuel_status = { "entity-status.no-quality-catalyst" }, | ||||
|         accepted_fuel_key = "description.accepted-catalysts", | ||||
|         burned_in_key = "used-in", -- factoriopedia | ||||
|     }, | ||||
|     { | ||||
|         type = "fuel-category", | ||||
|         name = "quality-catalyst", | ||||
|         fuel_value_type = { "description.quality-catalyst-energy-value" } | ||||
|     }, | ||||
|     { | ||||
|         type = "item", | ||||
|         name = "gold-quality-catalyst", | ||||
|         icon = "__lignumis__/graphics/icons/quality-gold-catalyst.png", | ||||
|         subgroup = "raw-material", | ||||
|         color_hint = { text = "C" }, | ||||
|         order = "a[smelting]-0[gold-plate]", | ||||
|         inventory_move_sound = item_sounds.metal_small_inventory_move, | ||||
|         pick_sound = item_sounds.metal_small_inventory_pickup, | ||||
|         drop_sound = item_sounds.metal_small_inventory_move, | ||||
|         stack_size = 50, | ||||
|         fuel_category = "quality-catalyst", | ||||
|         fuel_value = "1MJ", | ||||
|         weight = 1000 / 50 * kg, | ||||
|     }, | ||||
|     table.assign(table.deepcopy(data.raw.recipe["electromagnetic-plant"]), { | ||||
|         name = "electromagnetic-plant-quality", | ||||
|         category = "quality-assembling", | ||||
|         hide_from_player_crafting = true, | ||||
|         enabled = true | ||||
|     }) | ||||
| }) | ||||
| 
 | ||||
| QualityAssembler.EntityBuilder:new() | ||||
|     :allowProductivity(false) | ||||
|     :burnerEnergySource({ | ||||
|         burner_usage = "quality-catalyst", | ||||
|         fuel_categories = { "quality-catalyst" }, | ||||
|         fuel_inventory_size = 1, | ||||
|         emissions_per_minute = { noise = 100, pollution = 6 } | ||||
|     }) | ||||
|     :apply({ | ||||
|         crafting_categories = { "quality-assembling" }, | ||||
|         energy_usage = "1MW", | ||||
|         crafting_speed = 6, | ||||
|         module_slots = 6, | ||||
|         allowed_effects = { "pollution", "quality" }, | ||||
|         effect_receiver = { base_effect = { quality = 10 } } | ||||
|     }) | ||||
| 
 | ||||
| QualityAssembler.ItemBuilder:new():apply() | ||||
| 
 | ||||
| QualityAssembler.RecipeBuilder:new() | ||||
|     :ingredients({ | ||||
|         { type = "item", name = "iron-plate", amount = 100 } | ||||
|     }) | ||||
|     :apply() | ||||
| 
 | ||||
| QualityAssembler.TechnologyBuilder:new() | ||||
|     :prerequisites({ "automation-science-pack" }) | ||||
|     :count(500) | ||||
|     :ingredients({ { "automation-science-pack", 1 } }) | ||||
|     :time(60) | ||||
|     :apply() | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann