mirror of
				https://asciireactor.com/factorio/adamo-chemical.git
				synced 2025-11-04 09:48:03 +00:00 
			
		
		
		
	Fixed sulfur locale key and algorithm for expensive/normal recipes.
This commit is contained in:
		
							parent
							
								
									a281ebad76
								
							
						
					
					
						commit
						17e794c844
					
				@ -1,3 +1,18 @@
 | 
				
			|||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.1.12
 | 
				
			||||||
 | 
					Date: 2020-07-15
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Fixes:
 | 
				
			||||||
 | 
					    - Fixed algorithm for recipes where both expensive and normal
 | 
				
			||||||
 | 
					      ingredients or results have been added.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.1.11
 | 
				
			||||||
 | 
					Date: 2020-07-08
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Fixes:
 | 
				
			||||||
 | 
					    - Added locale key for sulfur fuel category.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
---------------------------------------------------------------------------------------------------
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
Version: 0.1.10
 | 
					Version: 0.1.10
 | 
				
			||||||
Date: 2020-02-22
 | 
					Date: 2020-02-22
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,8 @@
 | 
				
			|||||||
require("factsheet")
 | 
					require("factsheet")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					adamo.opts.debugging = true 
 | 
				
			||||||
 | 
					adamo.opts.logging = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local binding_time_mult = 1
 | 
					local binding_time_mult = 1
 | 
				
			||||||
local binding_prod_mult = 5
 | 
					local binding_prod_mult = 5
 | 
				
			||||||
local separation_time_mult = 1/2
 | 
					local separation_time_mult = 1/2
 | 
				
			||||||
@ -238,11 +241,11 @@ local calcinate_recipe = function(recipe,mult)
 | 
				
			|||||||
	if type(mult) ~= "number"
 | 
						if type(mult) ~= "number"
 | 
				
			||||||
	or mult <= 0 then mult = ore_norm end
 | 
						or mult <= 0 then mult = ore_norm end
 | 
				
			||||||
	local calcined_recipe = util.table.deepcopy(recipe)
 | 
						local calcined_recipe = util.table.deepcopy(recipe)
 | 
				
			||||||
 | 
						calcined_recipe.name = calcined_recipe.name.."-calcined"
 | 
				
			||||||
	mult_recipe_energy(
 | 
						mult_recipe_energy(
 | 
				
			||||||
		calcined_recipe,mult*time_norm/ore_norm
 | 
							calcined_recipe,mult*time_norm/ore_norm
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
	mult_recipe_io(calcined_recipe,mult)
 | 
						mult_recipe_io(calcined_recipe,mult)
 | 
				
			||||||
	calcined_recipe.name = calcined_recipe.name.."-calcined"
 | 
					 | 
				
			||||||
	calcined_recipe.category = "adamo-chemical-firing"
 | 
						calcined_recipe.category = "adamo-chemical-firing"
 | 
				
			||||||
	calcined_recipe.subgroup = "adamo-chemical-firing"
 | 
						calcined_recipe.subgroup = "adamo-chemical-firing"
 | 
				
			||||||
	if uses_ingredient(recipe,"iron-plate") then
 | 
						if uses_ingredient(recipe,"iron-plate") then
 | 
				
			||||||
@ -259,12 +262,11 @@ local calcinate_recipe = function(recipe,mult)
 | 
				
			|||||||
			"copper-ore"
 | 
								"copper-ore"
 | 
				
			||||||
		)
 | 
							)
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
	local toss,ore_count,toss =
 | 
						local toss,iron_ore_count,toss =
 | 
				
			||||||
		get_ingredient(calcined_recipe,"iron-ore")
 | 
							get_ingredient(calcined_recipe,"iron-ore")
 | 
				
			||||||
	if ore_count == 0 then
 | 
						local toss,copper_ore_count,toss =
 | 
				
			||||||
		toss,ore_count,toss =
 | 
							get_ingredient(calcined_recipe,"copper-ore")
 | 
				
			||||||
			get_ingredient(calcined_recipe,"copper-ore")
 | 
						local ore_count = (iron_ore_count or 0) + (copper_ore_count or 0)
 | 
				
			||||||
	end
 | 
					 | 
				
			||||||
	if ore_count == 0 then
 | 
						if ore_count == 0 then
 | 
				
			||||||
		toss,stone_count,toss =
 | 
							toss,stone_count,toss =
 | 
				
			||||||
			get_ingredient(calcined_recipe,"stone")
 | 
								get_ingredient(calcined_recipe,"stone")
 | 
				
			||||||
 | 
				
			|||||||
@ -1 +1 @@
 | 
				
			|||||||
../factsheet.lua
 | 
					../../../factsheet.lua
 | 
				
			||||||
@ -40,3 +40,6 @@ adamo-chemical-still=Name of still entity
 | 
				
			|||||||
adamo-chemical-kiln=Name of kiln entity
 | 
					adamo-chemical-kiln=Name of kiln entity
 | 
				
			||||||
adamo-chemical-reactor=Name of reactor entity
 | 
					adamo-chemical-reactor=Name of reactor entity
 | 
				
			||||||
adamo-chemical-mixer=Name of mixer entity
 | 
					adamo-chemical-mixer=Name of mixer entity
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[fuel-category-name]
 | 
				
			||||||
 | 
					sulfur=Sulfur
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user