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
				
			
		|  | @ -13,4 +13,7 @@ It has the following properties. | |||
| Add an item name as string or a table with `name` and optional `spoilTicks` and `iconFolder`. The icon file will be `iconFolder .. "hot-" .. itemName .. ".png"`. | ||||
| 
 | ||||
| ### `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 | ||||
|   Bug Fixes: | ||||
|     - 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 | ||||
| Date: 03.12.2024 | ||||
|  |  | |||
|  | @ -9,4 +9,11 @@ table.insert(HotMetals.items, "tungsten-plate") | |||
| --table.insert(HotMetals.items, "low-density-structure") | ||||
| 
 | ||||
| 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 = { | ||||
|         "smelting" | ||||
|     } | ||||
|     }, | ||||
|     skipTechUnlocksFor = {} | ||||
| } | ||||
| 
 | ||||
| require("compatibility.data") | ||||
|  | @ -31,7 +31,7 @@ function createHotVariant(item) | |||
| 
 | ||||
|     -- Change technology triggers | ||||
|     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 | ||||
|         end | ||||
|     end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann