1.0.0
This commit is contained in:
		
							parent
							
								
									4e70224881
								
							
						
					
					
						commit
						f9c120cf24
					
				
					 1 changed files with 13 additions and 14 deletions
				
			
		|  | @ -1,23 +1,22 @@ | |||
| local spoil_ticks = settings.startup["hot-metals-time"].value * 60 | ||||
| 
 | ||||
| function createHotVariant(itemName) | ||||
|     data.raw.item[itemName].flags = { "spoil-result" } | ||||
|     -- Create new item | ||||
|     --local hotItem = table.deepcopy(data.raw.item[itemName]) | ||||
|     --hotItem.name = "hot-" .. itemName | ||||
|     --hotItem.localised_name = { "", { "item-name.hot" }, " ", { "item-name." .. itemName } } | ||||
|     --hotItem.icon = "__hot-metals__/graphics/icons/hot-" .. itemName .. ".png" | ||||
|     --hotItem.order = hotItem.order .. "-hot" | ||||
|     --hotItem.spoil_result = itemName | ||||
|     --hotItem.spoil_ticks = spoil_ticks | ||||
|     --data:extend({ hotItem }) | ||||
|     local hotItem = table.deepcopy(data.raw.item[itemName]) | ||||
|     hotItem.name = "hot-" .. itemName | ||||
|     hotItem.localised_name = { "", { "item-name.hot" }, " ", { "item-name." .. itemName } } | ||||
|     hotItem.icon = "__hot-metals__/graphics/icons/hot-" .. itemName .. ".png" | ||||
|     hotItem.order = hotItem.order .. "-hot" | ||||
|     hotItem.spoil_result = itemName | ||||
|     hotItem.spoil_ticks = spoil_ticks | ||||
|     data:extend({ hotItem }) | ||||
| 
 | ||||
|     -- Change recipes | ||||
|     --for _, recipe in pairs(data.raw.recipe) do | ||||
|     --    if ((recipe.category == "smelting" or recipe.category == "metallurgy") and recipe.results[1].name == itemName) then | ||||
|     --        recipe.results[1].name = hotItem.name | ||||
|     --    end | ||||
|     --end | ||||
|     for _, recipe in pairs(data.raw.recipe) do | ||||
|         if ((recipe.category == "smelting" or recipe.category == "metallurgy") and recipe.results[1].name == itemName) then | ||||
|             recipe.results[1].name = hotItem.name | ||||
|         end | ||||
|     end | ||||
| end | ||||
| 
 | ||||
| createHotVariant("copper-cable") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann