refractory prod fix

This commit is contained in:
Brevven 2022-02-12 00:03:35 -08:00
parent ae88d8f26f
commit c5cbd638a2
4 changed files with 9 additions and 4 deletions

View file

@ -1,4 +1,9 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 0.0.12
Date: 2022-02-12
Fixes:
- Refractory recipes: Productivity no longer applies to refractories
---------------------------------------------------------------------------------------------------
Version: 0.0.11 Version: 0.0.11
Date: 2022-02-02 Date: 2022-02-02
Changes: Changes:

View file

@ -70,7 +70,7 @@ end
function util.remove_prerequisite(technology_name, prerequisite) function util.remove_prerequisite(technology_name, prerequisite)
local technology = data.raw.technology[technology_name] local technology = data.raw.technology[technology_name]
local index = -1 local index = -1
if technology and data.raw.technology[prerequisite] then if technology then
for i, prereq in pairs(technology.prerequisites) do for i, prereq in pairs(technology.prerequisites) do
if prereq == prerequisite then if prereq == prerequisite then
index = i index = i
@ -558,7 +558,7 @@ function util.add_crafting_category(entity_type, entity, category)
if data.raw[entity_type][entity] then if data.raw[entity_type][entity] then
for i, existing in pairs(data.raw[entity_type][entity].crafting_categories) do for i, existing in pairs(data.raw[entity_type][entity].crafting_categories) do
if existing == category then if existing == category then
log(entity.." not adding "..new.." -- duplicate") log(entity.." not adding "..category.." -- duplicate")
return return
end end
end end

View file

@ -1,6 +1,6 @@
{ {
"name": "bzfoundry", "name": "bzfoundry",
"version": "0.0.11", "version": "0.0.12",
"factorio_version": "1.1", "factorio_version": "1.1",
"title": "Foundry", "title": "Foundry",
"author": "Brevven", "author": "Brevven",

View file

@ -192,7 +192,7 @@ function make_ingredients_and_products(r, name)
end end
end end
for i, refractory in pairs(refractories) do for i, refractory in pairs(refractories) do
table.insert(r.results, {type="item", name=refractory, amount=max_count, table.insert(r.results, {type="item", name=refractory, amount=max_count, catalyst_amount=max_count,
probability=get_probability(#refractories)}) probability=get_probability(#refractories)})
end end
end end