Fixed technology triggers being replaced for items that have non-hot early game recipes
https://mods.factorio.com/mod/hot-metals/discussion/676668fb9ce172be6c25f87a
This commit is contained in:
		
							parent
							
								
									749012586a
								
							
						
					
					
						commit
						7bfcfad6d1
					
				
					 5 changed files with 16 additions and 4 deletions
				
			
		|  | @ -14,3 +14,6 @@ Add an item name as string or a table with `name` and optional `spoilTicks` and | ||||||
| 
 | 
 | ||||||
| ### `craftingCategories` | ### `craftingCategories` | ||||||
| A table containing all supported crafting categories. This mod uses a white list to prevent unwanted categories by default. Only categories used by smelting buildings like the furnace and the foundry should be added. | A table containing all supported crafting categories. This mod uses a white list to prevent unwanted categories by default. Only categories used by smelting buildings like the furnace and the foundry should be added. | ||||||
|  | 
 | ||||||
|  | ### `skipTechUnlocksFor` | ||||||
|  | A table containing item names that have early game variants without a hot variant. They won't be updated in technology triggers. This prevents deadlocks in the tech tree. | ||||||
|  | @ -2,6 +2,7 @@ Version: 1.1.1 | ||||||
| Date: 21.12.2024 | Date: 21.12.2024 | ||||||
|   Bug Fixes: |   Bug Fixes: | ||||||
|     - Fixed labels for hot pipe and underground pipe items and recipes (https://mods.factorio.com/mod/hot-metals/discussion/67493d0742705fa9914f61ca) |     - Fixed labels for hot pipe and underground pipe items and recipes (https://mods.factorio.com/mod/hot-metals/discussion/67493d0742705fa9914f61ca) | ||||||
|  |     - Fixed technology triggers being replaced for items that have non-hot early game recipes (https://mods.factorio.com/mod/hot-metals/discussion/676668fb9ce172be6c25f87a) | ||||||
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ||||||
| Version: 1.1.0 | Version: 1.1.0 | ||||||
| Date: 03.12.2024 | Date: 03.12.2024 | ||||||
|  |  | ||||||
|  | @ -10,3 +10,10 @@ table.insert(HotMetals.items, "tungsten-plate") | ||||||
| 
 | 
 | ||||||
| table.insert(HotMetals.craftingCategories, "metallurgy") | table.insert(HotMetals.craftingCategories, "metallurgy") | ||||||
| table.insert(HotMetals.craftingCategories, "crafting-with-fluid-or-metallurgy") | table.insert(HotMetals.craftingCategories, "crafting-with-fluid-or-metallurgy") | ||||||
|  | 
 | ||||||
|  | -- The regular early game recipes for these items are crafted in assemblers | ||||||
|  | table.insert(HotMetals.skipTechUnlocksFor, "iron-gear-wheel") | ||||||
|  | table.insert(HotMetals.skipTechUnlocksFor, "copper-cable") | ||||||
|  | table.insert(HotMetals.skipTechUnlocksFor, "iron-stick") | ||||||
|  | table.insert(HotMetals.skipTechUnlocksFor, "pipe") | ||||||
|  | table.insert(HotMetals.skipTechUnlocksFor, "pipe-to-ground") | ||||||
|  | @ -6,7 +6,8 @@ HotMetals = { | ||||||
|     }, |     }, | ||||||
|     craftingCategories = { |     craftingCategories = { | ||||||
|         "smelting" |         "smelting" | ||||||
|     } |     }, | ||||||
|  |     skipTechUnlocksFor = {} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| require("compatibility.data") | require("compatibility.data") | ||||||
|  | @ -31,7 +31,7 @@ function createHotVariant(item) | ||||||
| 
 | 
 | ||||||
|     -- Change technology triggers |     -- Change technology triggers | ||||||
|     for _, tech in pairs(data.raw.technology) do |     for _, tech in pairs(data.raw.technology) do | ||||||
|         if tech.research_trigger and tech.research_trigger.item == itemName then |         if tech.research_trigger and tech.research_trigger.item == itemName and not contains(HotMetals.skipTechUnlocksFor, itemName) then | ||||||
|             tech.research_trigger.item = hotItem.name |             tech.research_trigger.item = hotItem.name | ||||||
|         end |         end | ||||||
|     end |     end | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann