Move technology changes to final fixes stage
This commit is contained in:
		
							parent
							
								
									3c0ebc98e2
								
							
						
					
					
						commit
						1adf84ef1a
					
				
					 3 changed files with 12 additions and 7 deletions
				
			
		
							
								
								
									
										1
									
								
								hot-metals/data-final-fixes.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								hot-metals/data-final-fixes.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| require("prototypes/hot-metals-final") | ||||
							
								
								
									
										9
									
								
								hot-metals/prototypes/hot-metals-final.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								hot-metals/prototypes/hot-metals-final.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,9 @@ | |||
| -- Change technology triggers | ||||
| for _, tech in pairs(data.raw.technology) do | ||||
|     if tech.research_trigger then | ||||
|         local item = data.raw.item[tech.research_trigger.item] | ||||
|         if item and item.hot_item and not contains(HotMetals.skipTechUnlocksFor, item.name) then | ||||
|             tech.research_trigger.item = item.hot_item | ||||
|         end | ||||
|     end | ||||
| end | ||||
|  | @ -76,6 +76,8 @@ function createHotVariant(config) | |||
|     hotItem.spoil_ticks = spoilTicks | ||||
|     data:extend({ hotItem }) | ||||
| 
 | ||||
|     item.hot_item = hotItem.name | ||||
| 
 | ||||
|     -- Change recipes | ||||
|     for _, recipe in pairs(data.raw.recipe) do | ||||
|         if contains(HotMetals.craftingCategories, recipe.category) then | ||||
|  | @ -101,13 +103,6 @@ function createHotVariant(config) | |||
|             end | ||||
|         end | ||||
|     end | ||||
| 
 | ||||
|     -- Change technology triggers | ||||
|     for _, tech in pairs(data.raw.technology) do | ||||
|         if tech.research_trigger and tech.research_trigger.item == itemName and not contains(HotMetals.skipTechUnlocksFor, itemName) then | ||||
|             tech.research_trigger.item = hotItem.name | ||||
|         end | ||||
|     end | ||||
| end | ||||
| 
 | ||||
| -- Checks if a table contains a certain value | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann