tweak ore graphics

This commit is contained in:
Brevven 2022-07-06 00:27:48 -07:00
parent a3ffc38d75
commit 3e567fea83
6 changed files with 15 additions and 12 deletions

View file

@ -3,6 +3,7 @@ Version: 0.3.5
Date: 2022-07-06 Date: 2022-07-06
Chnages: Chnages:
- Japanese (ja) l10n updates thanks to Sakuro - Japanese (ja) l10n updates thanks to Sakuro
- Tweak to ore entity graphics.
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 0.3.4 Version: 0.3.4
Date: 2022-07-04 Date: 2022-07-04

View file

@ -183,7 +183,6 @@ function add_ingredient(recipe, ingredient, quantity, is_fluid)
if recipe ~= nil and recipe.ingredients ~= nil then if recipe ~= nil and recipe.ingredients ~= nil then
for i, existing in pairs(recipe.ingredients) do for i, existing in pairs(recipe.ingredients) do
if existing[1] == ingredient or existing.name == ingredient then if existing[1] == ingredient or existing.name == ingredient then
log("Not adding "..ingredient.." -- duplicate")
return return
end end
end end
@ -271,27 +270,32 @@ function add_product(recipe, product)
end end
-- Replace one ingredient with another in a recipe -- Replace one ingredient with another in a recipe
function util.replace_ingredient(recipe_name, old, new) function util.replace_ingredient(recipe_name, old, new, amount)
if me.bypass[recipe_name] then return end if me.bypass[recipe_name] then return end
if data.raw.recipe[recipe_name] and (data.raw.item[new] or data.raw.fluid[new]) then if data.raw.recipe[recipe_name] and (data.raw.item[new] or data.raw.fluid[new]) then
me.add_modified(recipe_name) me.add_modified(recipe_name)
replace_ingredient(data.raw.recipe[recipe_name], old, new) replace_ingredient(data.raw.recipe[recipe_name], old, new, amount)
replace_ingredient(data.raw.recipe[recipe_name].normal, old, new) replace_ingredient(data.raw.recipe[recipe_name].normal, old, new, amount)
replace_ingredient(data.raw.recipe[recipe_name].expensive, old, new) replace_ingredient(data.raw.recipe[recipe_name].expensive, old, new, amount)
end end
end end
function replace_ingredient(recipe, old, new) function replace_ingredient(recipe, old, new, amount)
if recipe ~= nil and recipe.ingredients ~= nil then if recipe ~= nil and recipe.ingredients ~= nil then
for i, existing in pairs(recipe.ingredients) do for i, existing in pairs(recipe.ingredients) do
if existing[1] == new or existing.name == new then if existing[1] == new or existing.name == new then
log("Not adding "..new.." -- duplicate")
return return
end end
end end
for i, ingredient in pairs(recipe.ingredients) do for i, ingredient in pairs(recipe.ingredients) do
if ingredient.name == old then ingredient.name = new end if ingredient.name == old then
if ingredient[1] == old then ingredient[1] = new end ingredient.name = new
if amount then ingredient.amount = amount end
end
if ingredient[1] == old then
ingredient[1] = new
if amount then ingredient[2] = amount end
end
end end
end end
end end
@ -338,7 +342,6 @@ function replace_some_ingredient(recipe, old, old_amount, new, new_amount, is_fl
if recipe ~= nil and recipe.ingredients ~= nil then if recipe ~= nil and recipe.ingredients ~= nil then
for i, existing in pairs(recipe.ingredients) do for i, existing in pairs(recipe.ingredients) do
if existing[1] == new or existing.name == new then if existing[1] == new or existing.name == new then
log("Not adding "..new.." -- duplicate")
return return
end end
end end
@ -604,7 +607,6 @@ function util.add_crafting_category(entity_type, entity, category)
if data.raw[entity_type][entity] and data.raw["recipe-category"][category] then if data.raw[entity_type][entity] and data.raw["recipe-category"][category] 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 "..category.." -- duplicate")
return return
end end
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 KiB

After

Width:  |  Height:  |  Size: 545 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 2 MiB

Before After
Before After

View file

@ -1,6 +1,6 @@
{ {
"name": "bzaluminum", "name": "bzaluminum",
"version": "0.3.4", "version": "0.3.5",
"factorio_version": "1.1", "factorio_version": "1.1",
"title": "Aluminum", "title": "Aluminum",
"author": "Brevven", "author": "Brevven",