diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..bbf3e21 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,3 @@ +[*] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85e49ae --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +*.zip \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index 11be59f..0000000 --- a/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# General makefile for factorio mods. -# -# Presumes the development work is done in a /dev// -# directory where this makefile resides. This directory must be parallel to -# the /mods/ directory where mods are installed. Run `make -# install` from dev/ to install the mod as a zip file. That zip file -# should also be ready to upload to the mod portal - -.PHONY: copy lint-changelog install - -libdir = "../bzlib" -libfiles = $(shell ls $(libdir)/*.lua | grep -o '[^/]*.lua') -pwd = $(shell pwd) -v = $(shell basename "$(pwd)")_$(shell jq -r .version info.json) - -link: - for f in $(libfiles) ; do \ - echo "using $(libdir)/$$f" ;\ - cp $(libdir)/$$f .; \ - done; - -copy: link - rm -rf ../$(v) - mkdir -p ../$(v) - cp -rf * ../$(v) - rm -f ../$(v).zip - cd ..; zip -9 -r -y $(v).zip $(v) -x "*.xcf" -x "*.git*" -x "*.bak" -x "*.blend*" - -install: lint-changelog copy - cp -f ../$(v).zip ../../mods/ - -lint-changelog: copy - python3 ../da-changelog-tools_0.0.14/changelog-checker.py --changelog ../$(v).zip - -zorro: - python3 ../da-changelog-tools_0.0.14/changelog-checker.py --zorro --changelog ../$(v).zip - diff --git a/README.md b/README.md index 5eda265..3c2ada3 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,19 @@ # Noble Metals -[factorio mod page](https://mods.factorio.com/mod/bzgold) - Adds gold, silver, platinum and palladium to the game. Reworks processing units and much more. -## Version History -See changelog.txt +This mod adds more complexity to a vanilla Factorio game, especially after chemical science, though silver shows up earlier. As always, the more BZ mods you add the more complex the game will become. -## Created by -- [brevven](https://mods.factorio.com/user/brevven) (code, design, graphics) +Note, when silver from this mod is used with [Lead](https://mods.factorio.com/mod/bzlead), lead outputs a silver byproduct instead of a copper byproduct. -## Thanks to +## Credits +- Brevven ([Original mod](https://mods.factorio.com/mod/bzgold)) +- [cackling fiend](https://mods.factorio.com/user/cackling.fiend) (Update to 2.0) - [snouz](https://github.com/snouz) (inspiration for logo) - ### Localization - [Klarkxy](https://github.com/klarkxy) (zh-CN) +- [Sakuro](https://mods.factorio.com/user/sakuro) (ja) ### Testing - [Sakuro](https://mods.factorio.com/user/sakuro) diff --git a/LICENSE.md b/bzgold2/LICENSE.md similarity index 100% rename from LICENSE.md rename to bzgold2/LICENSE.md diff --git a/cables.lua b/bzgold2/cables.lua similarity index 100% rename from cables.lua rename to bzgold2/cables.lua diff --git a/bzgold2/changelog.txt b/bzgold2/changelog.txt new file mode 100644 index 0000000..db6a1b0 --- /dev/null +++ b/bzgold2/changelog.txt @@ -0,0 +1,5 @@ +--------------------------------------------------------------------------------------------------- +Version: 2.0.0 +Date: 19.10.2025 + Changes: + - Update to Factorio 2.0 \ No newline at end of file diff --git a/compatibility/248k-final.lua b/bzgold2/compatibility/248k-final.lua similarity index 95% rename from compatibility/248k-final.lua rename to bzgold2/compatibility/248k-final.lua index e83b478..d45be4c 100644 --- a/compatibility/248k-final.lua +++ b/bzgold2/compatibility/248k-final.lua @@ -1,6 +1,6 @@ local util = require("data-util"); -if mods["248k"] then +if mods["248k-Redux"] then local au2 = "fu_materials_gold_ingot" -- Swap out all 248k gold ingot for BZ gold ingot diff --git a/compatibility/248k.lua b/bzgold2/compatibility/248k.lua similarity index 100% rename from compatibility/248k.lua rename to bzgold2/compatibility/248k.lua diff --git a/bzgold2/compatibility/bobelectronics.lua b/bzgold2/compatibility/bobelectronics.lua new file mode 100644 index 0000000..a8f46f1 --- /dev/null +++ b/bzgold2/compatibility/bobelectronics.lua @@ -0,0 +1,16 @@ +local util = require("data-util") + +if mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2 then + util.replace_ingredient("advanced-processing-unit", "processing-electronics", "cpu", 4) + util.remove_recipe_effect("advanced-electronics-3", "processing-electronics") + util.remove_raw("recipe", "processing-electronics") + util.remove_raw("item", "processing-electronics") + + if mods["Krastorio2"] then + data.raw.recipe["kr-crush-processing-electronics"] = nil + end + + if mods["248k-Redux"] then + data.raw.recipe["fu_burn_processing-electronics_recipe"] = nil + end +end diff --git a/compatibility/crafting-efficiency.lua b/bzgold2/compatibility/crafting-efficiency.lua similarity index 100% rename from compatibility/crafting-efficiency.lua rename to bzgold2/compatibility/crafting-efficiency.lua diff --git a/compatibility/modmashsplintergold.lua b/bzgold2/compatibility/modmashsplintergold.lua similarity index 100% rename from compatibility/modmashsplintergold.lua rename to bzgold2/compatibility/modmashsplintergold.lua diff --git a/control-util.lua b/bzgold2/control-util.lua similarity index 100% rename from control-util.lua rename to bzgold2/control-util.lua diff --git a/data-final-fixes.lua b/bzgold2/data-final-fixes.lua similarity index 100% rename from data-final-fixes.lua rename to bzgold2/data-final-fixes.lua diff --git a/data-updates.lua b/bzgold2/data-updates.lua similarity index 91% rename from data-updates.lua rename to bzgold2/data-updates.lua index ddd4b0e..55f1f8e 100644 --- a/data-updates.lua +++ b/bzgold2/data-updates.lua @@ -1,5 +1,6 @@ require("prototypes/tech-updates") require("prototypes/processing-unit-updates") +require("compatibility/bobelectronics") require("prototypes/recipe-updates") require("prototypes/recipe-updates-se") require("map-gen-preset-updates") diff --git a/data-util.lua b/bzgold2/data-util.lua similarity index 80% rename from data-util.lua rename to bzgold2/data-util.lua index 6f24821..3825ac6 100644 --- a/data-util.lua +++ b/bzgold2/data-util.lua @@ -44,7 +44,7 @@ if get_setting("bz-recipe-bypass") then end function util.is_foundry() - return mods.bzfoundry and not me.get_setting("bzfoundry-minimal") + return mods.bzfoundry2 and not me.get_setting("bzfoundry-minimal") end function should_force(options) @@ -64,17 +64,7 @@ function util.fe_plus(sub) end end -function util.get_stack_size(default) - if mods.Krastorio2 then - local size = get_setting("kr-stack-size") - if size and tonumber(size) then - return tonumber(size) - end - end - return default -end - -function util.k2assets() +function util.k2assets() if mods["Krastorio2Assets"] then return "__Krastorio2Assets__" end @@ -111,8 +101,8 @@ function util.se_landfill(params) category = "hard-recycling", order = "z-b-"..params.ore, subgroup = "terrain", - result = "landfill", - ingredients = {{params.ore, 50}}, + results = {{type="item", name="landfill", amount=1}}, + ingredients = {{type="item", name=params.ore, amount=50}}, } }) util.add_unlock("se-recycling-facility", lname) @@ -123,7 +113,7 @@ end -- k2 matter -- params: {k2matter}, k2baseicon , {icon} function util.k2matter(params) - local matter = require("__Krastorio2__/lib/public/data-stages/matter-util") + local matter = require("__Krastorio2__/prototypes/libraries/matter") if mods["space-exploration"] then params.k2matter.need_stabilizer = true end @@ -169,7 +159,7 @@ function util.k2matter(params) { {"production-science-pack", 1}, {"utility-science-pack", 1}, - {"matter-tech-card", 1} + {"kr-matter-tech-card", 1} }, time = 45, }, @@ -177,7 +167,7 @@ function util.k2matter(params) }, }) end - matter.createMatterRecipe(params.k2matter) + matter.make_recipes(params.k2matter) end @@ -211,16 +201,16 @@ function util.se_matter(params) energy_required = params.energy_required, enabled = false, ingredients = { - {sedata, 1}, + {type="item", name=sedata, amount=1}, {type="fluid", name="se-particle-stream", amount=50}, {type="fluid", name="se-space-coolant-supercooled", amount=25}, }, results = { - {params.ore, params.quant_out}, - {"se-contaminated-scrap", 1}, - {type=item, name=sedata, amount=1, probability=.99}, - {type=item, name=sejunk, amount=1, probability=.01}, - {type="fluid", name="se-space-coolant-hot", amount=25, catalyst_amount=25}, + {type="item", name=params.ore, amount=params.quant_out}, + {type="item", name="se-contaminated-scrap", amount=1}, + {type="item", name=sedata, amount=1, probability=.99}, + {type="item", name=sejunk, amount=1, probability=.01}, + {type="fluid", name="se-space-coolant-hot", amount=25, ignored_by_productivity=25}, } } }) @@ -250,14 +240,14 @@ function util.se_matter(params) energy_required = 30, enabled = false, ingredients = { - {"se-kr-matter-liberation-data", 1}, - {params.ore, params.quant_in}, + {type="item", name="se-kr-matter-liberation-data", amount=1}, + {type="item", name=params.ore, amount=params.quant_in}, {type="fluid", name="se-particle-stream", amount=50}, }, results = { - {type=item, name="se-kr-matter-liberation-data", amount=1, probability=.99}, - {type=item, name=sejunk, amount=1, probability=.01}, - {type="fluid", name="se-particle-stream", amount=params.stream_out, catalyst_amount=50}, + {type="item", name="se-kr-matter-liberation-data", amount=1, probability=.99}, + {type="item", name=sejunk, amount=1, probability=.01}, + {type="fluid", name="se-particle-stream", amount=params.stream_out, ignored_by_productivity=50}, } } }) @@ -284,7 +274,7 @@ function util.se_matter(params) {"se-astronomic-science-pack-4", 1}, {"se-energy-science-pack-4", 1}, {"se-material-science-pack-4", 1}, - {"matter-tech-card", 1}, + {"kr-matter-tech-card", 1}, {"se-deep-space-science-pack-1", 1}, } @@ -298,18 +288,6 @@ function util.se_matter(params) end end --- Get the normal prototype for a recipe -- either .normal or the recipe itself -function util.get_normal(recipe_name) - if data.raw.recipe[recipe_name] then - recipe = data.raw.recipe[recipe_name] - if recipe.normal and recipe.normal.ingredients then - return recipe.normal - elseif recipe.ingredients then - return recipe - end - end -end - -- Set/override a technology's prerequisites function util.set_prerequisite(technology_name, prerequisites) local technology = data.raw.technology[technology_name] @@ -376,7 +354,7 @@ function util.add_unlock(technology_name, recipe) end -- Check if a tech unlocks a recipe -function util.check_unlock(technology_name, recipe_name) +function util.check_unlock(technology_name, recipe) local technology = data.raw.technology[technology_name] if technology and technology.effects then for i, effect in pairs(technology.effects) do @@ -421,17 +399,13 @@ end function util.set_enabled(recipe_name, enabled) if data.raw.recipe[recipe_name] then - if data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].normal.enabled = enabled end - if data.raw.recipe[recipe_name].expensive then data.raw.recipe[recipe_name].expensive.enabled = enabled end - if not data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].enabled = enabled end + data.raw.recipe[recipe_name].enabled = enabled end end function util.set_hidden(recipe_name) if data.raw.recipe[recipe_name] then - if data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].normal.hidden = true end - if data.raw.recipe[recipe_name].expensive then data.raw.recipe[recipe_name].expensive.hidden = true end - if not data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].hidden = true end + data.raw.recipe[recipe_name].hidden = true end end @@ -441,8 +415,6 @@ function util.add_or_add_to_ingredient(recipe_name, ingredient, quantity, option if data.raw.recipe[recipe_name] and data.raw.item[ingredient] then me.add_modified(recipe_name) add_or_add_to_ingredient(data.raw.recipe[recipe_name], ingredient, quantity) - add_or_add_to_ingredient(data.raw.recipe[recipe_name].normal, ingredient, quantity) - add_or_add_to_ingredient(data.raw.recipe[recipe_name].expensive, ingredient, quantity) end end @@ -465,8 +437,6 @@ function util.add_ingredient(recipe_name, ingredient, quantity, options) if data.raw.recipe[recipe_name] and (data.raw.item[ingredient] or is_fluid) then me.add_modified(recipe_name) add_ingredient(data.raw.recipe[recipe_name], ingredient, quantity, is_fluid) - add_ingredient(data.raw.recipe[recipe_name].normal, ingredient, quantity, is_fluid) - add_ingredient(data.raw.recipe[recipe_name].expensive, ingredient, quantity, is_fluid) end end @@ -480,7 +450,7 @@ function add_ingredient(recipe, ingredient, quantity, is_fluid) if is_fluid then table.insert(recipe.ingredients, {type="fluid", name=ingredient, amount=quantity}) else - table.insert(recipe.ingredients, {ingredient, quantity}) + table.insert(recipe.ingredients, {type="item", name=ingredient, amount=quantity}) end end end @@ -491,8 +461,6 @@ function util.add_ingredient_raw(recipe_name, ingredient, options) if data.raw.recipe[recipe_name] and (data.raw.item[ingredient.name] or data.raw.item[ingredient[1]]) then me.add_modified(recipe_name) add_ingredient_raw(data.raw.recipe[recipe_name], ingredient) - add_ingredient_raw(data.raw.recipe[recipe_name].normal, ingredient) - add_ingredient_raw(data.raw.recipe[recipe_name].expensive, ingredient) end end @@ -516,8 +484,6 @@ function util.set_ingredient(recipe_name, ingredient, quantity, options) if data.raw.recipe[recipe_name] and data.raw.item[ingredient] then me.add_modified(recipe_name) set_ingredient(data.raw.recipe[recipe_name], ingredient, quantity) - set_ingredient(data.raw.recipe[recipe_name].normal, ingredient, quantity) - set_ingredient(data.raw.recipe[recipe_name].expensive, ingredient, quantity) end end @@ -541,29 +507,18 @@ end -- Only works for recipes with multiple products function util.add_product(recipe_name, product, options) if not should_force(options) and bypass(recipe_name) then return end - if data.raw.recipe[recipe_name] and - (data.raw.item[product[1]] or data.raw.item[product.name] or - data.raw.fluid[product[1]] or data.raw.fluid[product.name] - ) then + if data.raw.recipe[recipe_name] and + (data.raw.item[product.name] or data.raw.fluid[product.name]) then add_product(data.raw.recipe[recipe_name], product) - add_product(data.raw.recipe[recipe_name].normal, product) - add_product(data.raw.recipe[recipe_name].expensive, product) end end function add_product(recipe, product) if recipe ~= nil then - if (product[1] and data.raw.item[product[1]]) or - (product.name and data.raw[product.type][product.name]) then - if not recipe.normal then - if recipe.results == nil then - recipe.results = {{recipe.result, recipe.result_count and recipe.result_count or 1}} - end - recipe.result = nil - recipe.result_count = nil - table.insert(recipe.results, product) + if recipe.results == nil then + recipe.results = {} end - end + table.insert(recipe.results, product) end end @@ -571,18 +526,13 @@ end function util.get_ingredient_amount(recipe_name, ingredient_name) local recipe = data.raw.recipe[recipe_name] if recipe then - if recipe.normal and recipe.normal.ingredients then - for i, ingredient in pairs(recipe.normal.ingredients) do - if ingredient[1] == ingredient_name then return ingredient[2] end - if ingredient.name == ingredient_name then return ingredient.amount end - end - elseif recipe.ingredients then + if recipe.ingredients then for i, ingredient in pairs(recipe.ingredients) do if ingredient[1] == ingredient_name then return ingredient[2] end if ingredient.name == ingredient_name then return ingredient.amount end end end - return 0 + return 1 end return 0 end @@ -592,14 +542,7 @@ function util.get_amount(recipe_name, product) if not product then product = recipe_name end local recipe = data.raw.recipe[recipe_name] if recipe then - if recipe.normal and recipe.normal.results then - for i, result in pairs(recipe.normal.results) do - if result[1] == product then return result[2] end - if result.name == product then return result.amount end - end - elseif recipe.normal and recipe.normal.result_count then - return recipe.normal.result_count - elseif recipe.results then + if recipe.results then for i, result in pairs(recipe.results) do if result[1] == product then return result[2] end if result.name == product then return result.amount end @@ -617,9 +560,7 @@ function util.get_result_count(recipe_name, product) if not product then product = recipe_name end local recipe = data.raw.recipe[recipe_name] if recipe then - if recipe.normal and recipe.normal.results then - return #(recipe.normal.results) - elseif recipe.results then + if recipe.results then return #(recipe.results) end return 1 @@ -634,8 +575,6 @@ function util.replace_ingredient(recipe_name, old, new, amount, multiply, option if data.raw.recipe[recipe_name] and (data.raw.item[new] or data.raw.fluid[new]) then me.add_modified(recipe_name) replace_ingredient(data.raw.recipe[recipe_name], old, new, amount, multiply) - replace_ingredient(data.raw.recipe[recipe_name].normal, old, new, amount, multiply) - replace_ingredient(data.raw.recipe[recipe_name].expensive, old, new, amount, multiply) end end @@ -677,8 +616,6 @@ function util.remove_ingredient(recipe_name, old, options) if data.raw.recipe[recipe_name] then me.add_modified(recipe_name) remove_ingredient(data.raw.recipe[recipe_name], old) - remove_ingredient(data.raw.recipe[recipe_name].normal, old) - remove_ingredient(data.raw.recipe[recipe_name].expensive, old) end end @@ -704,28 +641,23 @@ function util.replace_some_product(recipe_name, old, old_amount, new, new_amount if data.raw.recipe[recipe_name] and (data.raw.item[new] or is_fluid) then me.add_modified(recipe_name) replace_some_product(data.raw.recipe[recipe_name], old, old_amount, new, new_amount, is_fluid) - replace_some_product(data.raw.recipe[recipe_name].normal, old, old_amount, new, new_amount, is_fluid) - replace_some_product(data.raw.recipe[recipe_name].expensive, old, old_amount, new, new_amount, is_fluid) end end -function replace_some_product(recipe, old, old_amount, new, new_amount) +function replace_some_product(recipe, old, old_amount, new, new_amount, is_fluid) if recipe ~= nil then if recipe.result == new then return end if recipe.results then for i, existing in pairs(recipe.results) do - if existing[1] == new or existing.name == new then + if existing.name == new then return end end end - add_product(recipe, {new, new_amount}) + add_product(recipe, {type=is_fluid and "fluid" or "item", name=new, amount=new_amount}) for i, product in pairs(recipe.results) do if product.name == old then product.amount = math.max(1, product.amount - old_amount) - end - if product[1] == old then - product[2] = math.max(1, product[2] - old_amount) end end end @@ -738,8 +670,6 @@ function util.replace_some_ingredient(recipe_name, old, old_amount, new, new_amo if data.raw.recipe[recipe_name] and (data.raw.item[new] or is_fluid) then me.add_modified(recipe_name) replace_some_ingredient(data.raw.recipe[recipe_name], old, old_amount, new, new_amount, is_fluid) - replace_some_ingredient(data.raw.recipe[recipe_name].normal, old, old_amount, new, new_amount, is_fluid) - replace_some_ingredient(data.raw.recipe[recipe_name].expensive, old, old_amount, new, new_amount, is_fluid) end end @@ -768,8 +698,6 @@ function util.set_product_amount(recipe_name, product, amount, options) me.add_modified(recipe_name) if data.raw.recipe[recipe_name] then set_product_amount(data.raw.recipe[recipe_name], product, amount) - set_product_amount(data.raw.recipe[recipe_name].normal, product, amount) - set_product_amount(data.raw.recipe[recipe_name].expensive, product, amount) end end @@ -808,8 +736,6 @@ function util.multiply_recipe(recipe_name, multiple, options) me.add_modified(recipe_name) if data.raw.recipe[recipe_name] then multiply_recipe(data.raw.recipe[recipe_name], multiple) - multiply_recipe(data.raw.recipe[recipe_name].normal, multiple) - multiply_recipe(data.raw.recipe[recipe_name].expensive, multiple) end end @@ -817,8 +743,6 @@ function multiply_recipe(recipe, multiple) if recipe then if recipe.energy_required then recipe.energy_required = recipe.energy_required * multiple - else - recipe.energy_required = 0.5 * multiple -- 0.5 is factorio default end if recipe.result_count then recipe.result_count = recipe.result_count * multiple @@ -833,8 +757,8 @@ function multiply_recipe(recipe, multiple) result.amount_min = result.amount_min * multiple result.amount_max = result.amount_max * multiple end - if result.catalyst_amount then - result.catalyst_amount = result.catalyst_amount * multiple + if result.ignored_by_productivity then + result.ignored_by_productivity = result.ignored_by_productivity * multiple end end if result[1] then @@ -861,9 +785,8 @@ end -- Returns true if a recipe has an ingredient function util.has_ingredient(recipe_name, ingredient) - return data.raw.recipe[recipe_name] and ( - has_ingredient(data.raw.recipe[recipe_name], ingredient) or - has_ingredient(data.raw.recipe[recipe_name].normal, ingredient)) + return data.raw.recipe[recipe_name] and + has_ingredient(data.raw.recipe[recipe_name], ingredient) end function has_ingredient(recipe, ingredient) @@ -883,8 +806,6 @@ function util.remove_product(recipe_name, old, options) me.add_modified(recipe_name) if data.raw.recipe[recipe_name] then remove_product(data.raw.recipe[recipe_name], old) - remove_product(data.raw.recipe[recipe_name].normal, old) - remove_product(data.raw.recipe[recipe_name].expensive, old) end end @@ -907,8 +828,6 @@ function util.set_main_product(recipe_name, product, options) if not should_force(options) and bypass(recipe_name) then return end if data.raw.recipe[recipe_name] then set_main_product(data.raw.recipe[recipe_name], product) - set_main_product(data.raw.recipe[recipe_name].normal, product) - set_main_product(data.raw.recipe[recipe_name].expensive, product) end end @@ -922,13 +841,11 @@ end function util.replace_product(recipe_name, old, new, options) if not should_force(options) and bypass(recipe_name) then return end if data.raw.recipe[recipe_name] then - replace_product(data.raw.recipe[recipe_name], old, new, options) - replace_product(data.raw.recipe[recipe_name].normal, old, new, options) - replace_product(data.raw.recipe[recipe_name].expensive, old, new, options) + replace_product(data.raw.recipe[recipe_name], old, new) end end -function replace_product(recipe, old, new, options) +function replace_product(recipe, old, new) if recipe then if recipe.main_product == old then recipe.main_product = new @@ -968,8 +885,6 @@ function util.set_recipe_time(recipe_name, time, options) me.add_modified(recipe_name) if data.raw.recipe[recipe_name] then set_recipe_time(data.raw.recipe[recipe_name], time) - set_recipe_time(data.raw.recipe[recipe_name].normal, time) - set_recipe_time(data.raw.recipe[recipe_name].expensive, time) end end @@ -987,8 +902,6 @@ function util.multiply_time(recipe_name, factor, options) me.add_modified(recipe_name) if data.raw.recipe[recipe_name] then multiply_time(data.raw.recipe[recipe_name], factor) - multiply_time(data.raw.recipe[recipe_name].normal, factor) - multiply_time(data.raw.recipe[recipe_name].expensive, factor) end end @@ -1006,8 +919,6 @@ function util.add_time(recipe_name, amount, options) me.add_modified(recipe_name) if data.raw.recipe[recipe_name] then add_time(data.raw.recipe[recipe_name], amount) - add_time(data.raw.recipe[recipe_name].normal, amount) - add_time(data.raw.recipe[recipe_name].expensive, amount) end end @@ -1031,7 +942,7 @@ end -- Set recipe subgroup function util.set_subgroup(recipe_name, subgroup, options) if not should_force(options) and bypass(recipe_name) then return end - if data.raw.recipe[recipe_name] and data.raw["item-subgroup"][subgroup] then + if data.raw.recipe[recipe_name] then me.add_modified(recipe_name) data.raw.recipe[recipe_name].subgroup = subgroup end @@ -1050,34 +961,16 @@ function util.add_icon(recipe_name, icon, options) if data.raw.recipe[recipe_name] then me.add_modified(recipe_name) if not (data.raw.recipe[recipe_name].icons and #(data.raw.recipe[recipe_name].icons) > 0) then - if data.raw.recipe[recipe_name].icon then - data.raw.recipe[recipe_name].icons = {{ - icon=data.raw.recipe[recipe_name].icon, - icon_size=data.raw.recipe[recipe_name].icon_size, - icon_mipmaps=data.raw.recipe[recipe_name].icon_mipmaps, - }} - elseif data.raw.item[data.raw.recipe[recipe_name].main_product] then - data.raw.recipe[recipe_name].icons = {{ - icon=data.raw.item[data.raw.recipe[recipe_name].main_product].icon, - icon_size=data.raw.item[data.raw.recipe[recipe_name].main_product].icon_size, - icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].main_product].icon_mipmaps, - }} - elseif data.raw.item[data.raw.recipe[recipe_name].result] then - data.raw.recipe[recipe_name].icons = {{ - icon=data.raw.item[data.raw.recipe[recipe_name].result].icon, - icon_size=data.raw.item[data.raw.recipe[recipe_name].result].icon_size, - icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].result].icon_mipmaps, - }} - elseif data.raw.recipe[recipe_name].normal and - data.raw.item[data.raw.recipe[recipe_name].normal.result] then - data.raw.recipe[recipe_name].icons = {{ - icon=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon, - icon_size=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon_size, - icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon_mipmaps, - }} - end - data.raw.recipe[recipe_name].icon = nil - data.raw.recipe[recipe_name].icon_size = nil + data.raw.recipe[recipe_name].icons = {} + if data.raw.recipe[recipe_name].icon then + data.raw.recipe[recipe_name].icons = {{ + icon=data.raw.recipe[recipe_name].icon, + icon_size=data.raw.recipe[recipe_name].icon_size, + icon_mipmaps=data.raw.recipe[recipe_name].icon_mipmaps, + }} + data.raw.recipe[recipe_name].icon = nil + data.raw.recipe[recipe_name].icon_size = nil + end end table.insert(data.raw.recipe[recipe_name].icons, icon) end @@ -1137,8 +1030,6 @@ function util.add_to_ingredient(recipe, ingredient, amount, options) if not should_force(options) and bypass(recipe_name) then return end if data.raw.recipe[recipe] then add_to_ingredient(data.raw.recipe[recipe], ingredient, amount) - add_to_ingredient(data.raw.recipe[recipe].normal, ingredient, amount) - add_to_ingredient(data.raw.recipe[recipe].expensive, ingredient, amount) end end @@ -1161,8 +1052,6 @@ function util.add_to_product(recipe_name, product, amount, options) if not should_force(options) and bypass(recipe_name) then return end if data.raw.recipe[recipe_name] then add_to_product(data.raw.recipe[recipe_name], product, amount) - add_to_product(data.raw.recipe[recipe_name].normal, product, amount) - add_to_product(data.raw.recipe[recipe_name].expensive, product, amount) end end @@ -1285,10 +1174,8 @@ function remove_prior_unlocks(tech, recipe) util.remove_recipe_effect(tech, recipe) if technology.prerequisites then for i, prerequisite in pairs(technology.prerequisites) do - if string.sub(prerequisite, 1, 3) ~= 'ei_' then - -- log("BZZZ removing prior unlocks for " .. recipe .. " from " .. tech ..", checking " .. prerequisite) -- Handy Debug :| - remove_prior_unlocks(prerequisite, recipe) - end + -- log("BZZZ removing prior unlocks for " .. tech ..", checking " .. prerequisite) -- Handy Debug :| + remove_prior_unlocks(prerequisite, recipe) end end end @@ -1330,9 +1217,7 @@ function replace_ingredients_prior_to(tech, old, new, multiplier) if technology.prerequisites then for i, prerequisite in pairs(technology.prerequisites) do -- log("BZZZ checking " .. prerequisite) -- Handy Debug :| - if string.sub(prerequisite, 1, 3) ~= 'ei_' then - replace_ingredients_prior_to(prerequisite, old, new, multiplier) - end + replace_ingredients_prior_to(prerequisite, old, new, multiplier) end end end diff --git a/data.lua b/bzgold2/data.lua similarity index 100% rename from data.lua rename to bzgold2/data.lua diff --git a/graphics/entity/ores/hr-gold-ore.png b/bzgold2/graphics/entity/ores/hr-gold-ore.png similarity index 100% rename from graphics/entity/ores/hr-gold-ore.png rename to bzgold2/graphics/entity/ores/hr-gold-ore.png diff --git a/graphics/entity/ores/hr-rich-copper-ore.png b/bzgold2/graphics/entity/ores/hr-rich-copper-ore.png similarity index 100% rename from graphics/entity/ores/hr-rich-copper-ore.png rename to bzgold2/graphics/entity/ores/hr-rich-copper-ore.png diff --git a/graphics/entity/ores/particle/hr-gold-ore-particle-1.png b/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-1.png similarity index 100% rename from graphics/entity/ores/particle/hr-gold-ore-particle-1.png rename to bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-1.png diff --git a/graphics/entity/ores/particle/hr-gold-ore-particle-2.png b/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-2.png similarity index 100% rename from graphics/entity/ores/particle/hr-gold-ore-particle-2.png rename to bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-2.png diff --git a/graphics/entity/ores/particle/hr-gold-ore-particle-3.png b/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-3.png similarity index 100% rename from graphics/entity/ores/particle/hr-gold-ore-particle-3.png rename to bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-3.png diff --git a/graphics/entity/ores/particle/hr-gold-ore-particle-4.png b/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-4.png similarity index 100% rename from graphics/entity/ores/particle/hr-gold-ore-particle-4.png rename to bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-4.png diff --git a/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-1.png b/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-1.png similarity index 100% rename from graphics/entity/ores/particle/hr-gold-ore-particle-shadow-1.png rename to bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-1.png diff --git a/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-2.png b/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-2.png similarity index 100% rename from graphics/entity/ores/particle/hr-gold-ore-particle-shadow-2.png rename to bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-2.png diff --git a/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-3.png b/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-3.png similarity index 100% rename from graphics/entity/ores/particle/hr-gold-ore-particle-shadow-3.png rename to bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-3.png diff --git a/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-4.png b/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-4.png similarity index 100% rename from graphics/entity/ores/particle/hr-gold-ore-particle-shadow-4.png rename to bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-4.png diff --git a/graphics/icons/enriched-gold.png b/bzgold2/graphics/icons/enriched-gold.png similarity index 100% rename from graphics/icons/enriched-gold.png rename to bzgold2/graphics/icons/enriched-gold.png diff --git a/graphics/icons/enriched-silver.png b/bzgold2/graphics/icons/enriched-silver.png similarity index 100% rename from graphics/icons/enriched-silver.png rename to bzgold2/graphics/icons/enriched-silver.png diff --git a/graphics/icons/gold-ingot.png b/bzgold2/graphics/icons/gold-ingot.png similarity index 100% rename from graphics/icons/gold-ingot.png rename to bzgold2/graphics/icons/gold-ingot.png diff --git a/graphics/icons/gold-ore-1.png b/bzgold2/graphics/icons/gold-ore-1.png similarity index 100% rename from graphics/icons/gold-ore-1.png rename to bzgold2/graphics/icons/gold-ore-1.png diff --git a/graphics/icons/gold-ore-2.png b/bzgold2/graphics/icons/gold-ore-2.png similarity index 100% rename from graphics/icons/gold-ore-2.png rename to bzgold2/graphics/icons/gold-ore-2.png diff --git a/graphics/icons/gold-ore-3.png b/bzgold2/graphics/icons/gold-ore-3.png similarity index 100% rename from graphics/icons/gold-ore-3.png rename to bzgold2/graphics/icons/gold-ore-3.png diff --git a/graphics/icons/gold-ore-4.png b/bzgold2/graphics/icons/gold-ore-4.png similarity index 100% rename from graphics/icons/gold-ore-4.png rename to bzgold2/graphics/icons/gold-ore-4.png diff --git a/graphics/icons/gold-ore.png b/bzgold2/graphics/icons/gold-ore.png similarity index 100% rename from graphics/icons/gold-ore.png rename to bzgold2/graphics/icons/gold-ore.png diff --git a/graphics/icons/mainboard.png b/bzgold2/graphics/icons/mainboard.png similarity index 100% rename from graphics/icons/mainboard.png rename to bzgold2/graphics/icons/mainboard.png diff --git a/graphics/icons/mlcc-1.png b/bzgold2/graphics/icons/mlcc-1.png similarity index 100% rename from graphics/icons/mlcc-1.png rename to bzgold2/graphics/icons/mlcc-1.png diff --git a/graphics/icons/mlcc-2.png b/bzgold2/graphics/icons/mlcc-2.png similarity index 100% rename from graphics/icons/mlcc-2.png rename to bzgold2/graphics/icons/mlcc-2.png diff --git a/graphics/icons/mlcc-3.png b/bzgold2/graphics/icons/mlcc-3.png similarity index 100% rename from graphics/icons/mlcc-3.png rename to bzgold2/graphics/icons/mlcc-3.png diff --git a/graphics/icons/mlcc-4.png b/bzgold2/graphics/icons/mlcc-4.png similarity index 100% rename from graphics/icons/mlcc-4.png rename to bzgold2/graphics/icons/mlcc-4.png diff --git a/graphics/icons/mlcc.png b/bzgold2/graphics/icons/mlcc.png similarity index 100% rename from graphics/icons/mlcc.png rename to bzgold2/graphics/icons/mlcc.png diff --git a/graphics/icons/molten-gold.png b/bzgold2/graphics/icons/molten-gold.png similarity index 100% rename from graphics/icons/molten-gold.png rename to bzgold2/graphics/icons/molten-gold.png diff --git a/graphics/icons/molten-silver.png b/bzgold2/graphics/icons/molten-silver.png similarity index 100% rename from graphics/icons/molten-silver.png rename to bzgold2/graphics/icons/molten-silver.png diff --git a/graphics/icons/palladium-ingot.png b/bzgold2/graphics/icons/palladium-ingot.png similarity index 100% rename from graphics/icons/palladium-ingot.png rename to bzgold2/graphics/icons/palladium-ingot.png diff --git a/graphics/icons/palladium-powder.png b/bzgold2/graphics/icons/palladium-powder.png similarity index 100% rename from graphics/icons/palladium-powder.png rename to bzgold2/graphics/icons/palladium-powder.png diff --git a/graphics/icons/platinum-ingot.png b/bzgold2/graphics/icons/platinum-ingot.png similarity index 100% rename from graphics/icons/platinum-ingot.png rename to bzgold2/graphics/icons/platinum-ingot.png diff --git a/graphics/icons/platinum-powder.png b/bzgold2/graphics/icons/platinum-powder.png similarity index 100% rename from graphics/icons/platinum-powder.png rename to bzgold2/graphics/icons/platinum-powder.png diff --git a/graphics/icons/ptpd-catalyst-1.png b/bzgold2/graphics/icons/ptpd-catalyst-1.png similarity index 100% rename from graphics/icons/ptpd-catalyst-1.png rename to bzgold2/graphics/icons/ptpd-catalyst-1.png diff --git a/graphics/icons/ptpd-catalyst-2.png b/bzgold2/graphics/icons/ptpd-catalyst-2.png similarity index 100% rename from graphics/icons/ptpd-catalyst-2.png rename to bzgold2/graphics/icons/ptpd-catalyst-2.png diff --git a/graphics/icons/ptpd-catalyst-3.png b/bzgold2/graphics/icons/ptpd-catalyst-3.png similarity index 100% rename from graphics/icons/ptpd-catalyst-3.png rename to bzgold2/graphics/icons/ptpd-catalyst-3.png diff --git a/graphics/icons/ptpd-catalyst.png b/bzgold2/graphics/icons/ptpd-catalyst.png similarity index 100% rename from graphics/icons/ptpd-catalyst.png rename to bzgold2/graphics/icons/ptpd-catalyst.png diff --git a/graphics/icons/rich-copper-ore-1.png b/bzgold2/graphics/icons/rich-copper-ore-1.png similarity index 100% rename from graphics/icons/rich-copper-ore-1.png rename to bzgold2/graphics/icons/rich-copper-ore-1.png diff --git a/graphics/icons/rich-copper-ore-2.png b/bzgold2/graphics/icons/rich-copper-ore-2.png similarity index 100% rename from graphics/icons/rich-copper-ore-2.png rename to bzgold2/graphics/icons/rich-copper-ore-2.png diff --git a/graphics/icons/rich-copper-ore-3.png b/bzgold2/graphics/icons/rich-copper-ore-3.png similarity index 100% rename from graphics/icons/rich-copper-ore-3.png rename to bzgold2/graphics/icons/rich-copper-ore-3.png diff --git a/graphics/icons/rich-copper-ore.png b/bzgold2/graphics/icons/rich-copper-ore.png similarity index 100% rename from graphics/icons/rich-copper-ore.png rename to bzgold2/graphics/icons/rich-copper-ore.png diff --git a/graphics/icons/silver-brazing-alloy.png b/bzgold2/graphics/icons/silver-brazing-alloy.png similarity index 100% rename from graphics/icons/silver-brazing-alloy.png rename to bzgold2/graphics/icons/silver-brazing-alloy.png diff --git a/graphics/icons/silver-ingot.png b/bzgold2/graphics/icons/silver-ingot.png similarity index 100% rename from graphics/icons/silver-ingot.png rename to bzgold2/graphics/icons/silver-ingot.png diff --git a/graphics/icons/silver-ore-1.png b/bzgold2/graphics/icons/silver-ore-1.png similarity index 100% rename from graphics/icons/silver-ore-1.png rename to bzgold2/graphics/icons/silver-ore-1.png diff --git a/graphics/icons/silver-ore-2.png b/bzgold2/graphics/icons/silver-ore-2.png similarity index 100% rename from graphics/icons/silver-ore-2.png rename to bzgold2/graphics/icons/silver-ore-2.png diff --git a/graphics/icons/silver-ore-3.png b/bzgold2/graphics/icons/silver-ore-3.png similarity index 100% rename from graphics/icons/silver-ore-3.png rename to bzgold2/graphics/icons/silver-ore-3.png diff --git a/graphics/icons/silver-ore-4.png b/bzgold2/graphics/icons/silver-ore-4.png similarity index 100% rename from graphics/icons/silver-ore-4.png rename to bzgold2/graphics/icons/silver-ore-4.png diff --git a/graphics/icons/silver-ore.png b/bzgold2/graphics/icons/silver-ore.png similarity index 100% rename from graphics/icons/silver-ore.png rename to bzgold2/graphics/icons/silver-ore.png diff --git a/graphics/icons/silver-plate.png b/bzgold2/graphics/icons/silver-plate.png similarity index 100% rename from graphics/icons/silver-plate.png rename to bzgold2/graphics/icons/silver-plate.png diff --git a/graphics/icons/silver-wire.png b/bzgold2/graphics/icons/silver-wire.png similarity index 100% rename from graphics/icons/silver-wire.png rename to bzgold2/graphics/icons/silver-wire.png diff --git a/graphics/icons/temperature-sensor.png b/bzgold2/graphics/icons/temperature-sensor.png similarity index 100% rename from graphics/icons/temperature-sensor.png rename to bzgold2/graphics/icons/temperature-sensor.png diff --git a/graphics/icons/titanium-palladium-alloy.png b/bzgold2/graphics/icons/titanium-palladium-alloy.png similarity index 100% rename from graphics/icons/titanium-palladium-alloy.png rename to bzgold2/graphics/icons/titanium-palladium-alloy.png diff --git a/graphics/technology/gold-processing.png b/bzgold2/graphics/technology/gold-processing.png similarity index 100% rename from graphics/technology/gold-processing.png rename to bzgold2/graphics/technology/gold-processing.png diff --git a/graphics/technology/mlcc.png b/bzgold2/graphics/technology/mlcc.png similarity index 100% rename from graphics/technology/mlcc.png rename to bzgold2/graphics/technology/mlcc.png diff --git a/graphics/technology/palladium-processing.png b/bzgold2/graphics/technology/palladium-processing.png similarity index 100% rename from graphics/technology/palladium-processing.png rename to bzgold2/graphics/technology/palladium-processing.png diff --git a/graphics/technology/platinum-processing.png b/bzgold2/graphics/technology/platinum-processing.png similarity index 100% rename from graphics/technology/platinum-processing.png rename to bzgold2/graphics/technology/platinum-processing.png diff --git a/graphics/technology/silver-processing.png b/bzgold2/graphics/technology/silver-processing.png similarity index 100% rename from graphics/technology/silver-processing.png rename to bzgold2/graphics/technology/silver-processing.png diff --git a/graphics/technology/temperature-sensor.png b/bzgold2/graphics/technology/temperature-sensor.png similarity index 100% rename from graphics/technology/temperature-sensor.png rename to bzgold2/graphics/technology/temperature-sensor.png diff --git a/bzgold2/info.json b/bzgold2/info.json new file mode 100644 index 0000000..99afae3 --- /dev/null +++ b/bzgold2/info.json @@ -0,0 +1,32 @@ +{ + "name": "bzgold2", + "version": "2.0.0", + "factorio_version": "2.0", + "title": "Noble Metals", + "description": "Adds silver, gold, platinum, palladium and more to the base game. Reworks processing units.", + "author": "Brevven, cackling fiend", + "homepage": "https://discord.gg/ufvFUJtVwk", + "dependencies": [ + "base >= 2.0.0", + "? bzfoundry2 >= 2.0.0", + "? bztitanium >= 2.0.26", + "? bzlead >= 2.0.28", + "? bzzirconium >= 2.1.13", + "? bztungsten >= 0.6.0", + "? bzcarbon >= 2.0.21", + "? bztin >= 2.1.15", + "? bzgas2", + "? bzchlorine2", + "? 248k-Redux >= 0.1.22", + "? space-exploration >= 0.7.34", + "? aai-industry", + "(?) aai-loaders", + "? Krastorio2", + "? bobelectronics", + "? MDbobelectronics2", + "? modmashsplintergold", + "? deadlock-beltboxes-loaders", + "? DeadlockCrating", + "! space-age" + ] +} diff --git a/locale/en/noble.cfg b/bzgold2/locale/en/noble.cfg similarity index 100% rename from locale/en/noble.cfg rename to bzgold2/locale/en/noble.cfg diff --git a/locale/ja/noble.cfg b/bzgold2/locale/ja/noble.cfg similarity index 100% rename from locale/ja/noble.cfg rename to bzgold2/locale/ja/noble.cfg diff --git a/locale/zh-CN/noble.cfg b/bzgold2/locale/zh-CN/noble.cfg similarity index 100% rename from locale/zh-CN/noble.cfg rename to bzgold2/locale/zh-CN/noble.cfg diff --git a/map-gen-preset-updates.lua b/bzgold2/map-gen-preset-updates.lua similarity index 100% rename from map-gen-preset-updates.lua rename to bzgold2/map-gen-preset-updates.lua diff --git a/matter.lua b/bzgold2/matter.lua similarity index 59% rename from matter.lua rename to bzgold2/matter.lua index d4c8d84..10ea30c 100644 --- a/matter.lua +++ b/bzgold2/matter.lua @@ -4,25 +4,27 @@ if mods["Krastorio2"] then util.k2matter({ k2matter = { + material = { type = "item", name = "gold-ore", amount = 30 }, item_name = "gold-ore", - matter_value = 30, + matter_count = 30, energy_required = 10, need_stabilizer = false, unlocked_by_technology = "gold-matter-processing", }, k2baseicon = "stone", - icon = {icon = "__bzgold__/graphics/icons/gold-ore.png", icon_size = 128, scale = 1} + icon = {icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 1} }) util.k2matter({ k2matter = { + material = { type = "item", name = "silver-ore", amount = 8 }, item_name = "silver-ore", - matter_value = 8, + matter_count = 8, energy_required = 5, need_stabilizer = false, unlocked_by_technology = "silver-matter-processing", }, k2baseicon = "stone", - icon = {icon = "__bzgold__/graphics/icons/silver-ore.png", icon_size = 128, scale = 1} + icon = {icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 1} }) end diff --git a/me.lua b/bzgold2/me.lua similarity index 98% rename from me.lua rename to bzgold2/me.lua index 099b78f..92d23e7 100644 --- a/me.lua +++ b/bzgold2/me.lua @@ -1,6 +1,6 @@ local me = {} -me.name = "bzgold" +me.name = "bzgold2" me.list = {} me.recipes = { "electronic-circuit-silver", "silver-plate", "silver-wire", diff --git a/bzgold2/migrations/bzgold.0.0.15.json b/bzgold2/migrations/bzgold.0.0.15.json new file mode 100644 index 0000000..882479a --- /dev/null +++ b/bzgold2/migrations/bzgold.0.0.15.json @@ -0,0 +1,6 @@ +{ + "item": + [ + ["processing-electronics", "cpu"] + ] +} diff --git a/migrations/bzgold.0.0.6.json b/bzgold2/migrations/bzgold.0.0.6.json similarity index 100% rename from migrations/bzgold.0.0.6.json rename to bzgold2/migrations/bzgold.0.0.6.json diff --git a/bzgold2/modules.lua b/bzgold2/modules.lua new file mode 100644 index 0000000..8c39798 --- /dev/null +++ b/bzgold2/modules.lua @@ -0,0 +1,9 @@ +-- Enable prod modules for some recipes +-- Recipes with very specific ratios are deliberately excluded +local util = require("data-util") + +for i, recipe in pairs(util.me.recipes) do + if data.raw.recipe[recipe] then + data.raw.recipe[recipe].allow_productivity = true + end +end diff --git a/prototypes/alchemy.lua b/bzgold2/prototypes/alchemy.lua similarity index 81% rename from prototypes/alchemy.lua rename to bzgold2/prototypes/alchemy.lua index a94ddb2..facd441 100644 --- a/prototypes/alchemy.lua +++ b/bzgold2/prototypes/alchemy.lua @@ -11,11 +11,11 @@ if util.me.alchemy() then order = "d[gold-ingot]2", enabled = false, energy_required = 16, - ingredients = {{"lead-plate", 2}}, - results = {{"gold-ingot", 1}}, + ingredients = {{type="item", name="lead-plate", amount=2}}, + results = {{type="item", name="gold-ingot", amount=1}}, icons = { { - icon = "__bzgold__/graphics/icons/gold-ingot.png", + icon = "__bzgold2__/graphics/icons/gold-ingot.png", icon_size = 128, }, { @@ -29,7 +29,7 @@ if util.me.alchemy() then name = "alchemy", icons = { { - icon = "__bzgold__/graphics/technology/gold-processing.png", + icon = "__bzgold2__/graphics/technology/gold-processing.png", icon_size = 256, }, { diff --git a/prototypes/catalyst.lua b/bzgold2/prototypes/catalyst.lua similarity index 57% rename from prototypes/catalyst.lua rename to bzgold2/prototypes/catalyst.lua index 7ca9ea7..14e5cb8 100644 --- a/prototypes/catalyst.lua +++ b/bzgold2/prototypes/catalyst.lua @@ -6,17 +6,17 @@ if util.me.catalysis() then { type = "item", name = "ptpd-catalyst", - icon = "__bzgold__/graphics/icons/ptpd-catalyst.png", + icon = "__bzgold2__/graphics/icons/ptpd-catalyst.png", icon_size = 128, pictures = { - {filename="__bzgold__/graphics/icons/ptpd-catalyst.png", size=128, scale=0.125}, - {filename="__bzgold__/graphics/icons/ptpd-catalyst-1.png", size=128, scale=0.125}, - {filename="__bzgold__/graphics/icons/ptpd-catalyst-2.png", size=128, scale=0.125}, - {filename="__bzgold__/graphics/icons/ptpd-catalyst-3.png", size=128, scale=0.125}, + {filename="__bzgold2__/graphics/icons/ptpd-catalyst.png", size=128, scale=0.25}, + {filename="__bzgold2__/graphics/icons/ptpd-catalyst-1.png", size=128, scale=0.25}, + {filename="__bzgold2__/graphics/icons/ptpd-catalyst-2.png", size=128, scale=0.25}, + {filename="__bzgold2__/graphics/icons/ptpd-catalyst-3.png", size=128, scale=0.25}, }, subgroup = "intermediate-product", order = "b[catalyst]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, { type = "technology", @@ -27,7 +27,7 @@ if util.me.catalysis() then icon_size = 256, }, { - icon = "__bzgold__/graphics/icons/ptpd-catalyst.png", + icon = "__bzgold2__/graphics/icons/ptpd-catalyst.png", icon_size = 128, shift={0,20} }, }, @@ -49,7 +49,7 @@ if util.me.catalysis() then local base = "stone" - if mods.bzaluminum then base = "alumina" + if mods.bzaluminum2 then base = "alumina" elseif mods.bzsilicon then base = "silica" end @@ -62,20 +62,21 @@ if util.me.catalysis() then { type = "recipe", name = "pd-catalyst", + localised_name = {"item-name.ptpd-catalyst"}, main_product = "ptpd-catalyst", category = "chemistry", order = "d[catalyst]", enabled = false, energy_required = 1.6, ingredients = { - {base, 1}, - {"palladium-ingot", 1}, - {type="fluid", name=fluid, amount=100, catalyst_amount=100}, + {type="item", name=base, amount=1}, + {type="item", name="palladium-ingot", amount=1}, + {type="fluid", name=fluid, amount=100, ignored_by_productivity=100}, }, results = { - {"ptpd-catalyst", 1}, - {type="fluid", name=fluid, amount=90, catalyst_amount=90}, - {type="fluid", name="water", amount=10, catalyst_amount=9}, + {type="item", name="ptpd-catalyst", amount=1}, + {type="fluid", name=fluid, amount=90, ignored_by_productivity=90}, + {type="fluid", name="water", amount=10, ignored_by_productivity=9}, }, }, }) @@ -85,20 +86,21 @@ if util.me.catalysis() then { type = "recipe", name = "pt-catalyst", + localised_name = {"item-name.ptpd-catalyst"}, main_product = "ptpd-catalyst", category = "chemistry", order = "d[catalyst]", enabled = false, energy_required = 1.6, ingredients = { - {base, 1}, - {"platinum-ingot", 1}, - {type="fluid", name=fluid, amount=100, catalyst_amount=100}, + {type="item", name=base, amount=1}, + {type="item", name="platinum-ingot", amount=1}, + {type="fluid", name=fluid, amount=100, ignored_by_productivity=100}, }, results = { - {"ptpd-catalyst", 1}, - {type="fluid", name=fluid, amount=90, catalyst_amount=90}, - {type="fluid", name="water", amount=10, catalyst_amount=9}, + {type="item", name="ptpd-catalyst", amount=1}, + {type="fluid", name=fluid, amount=90, ignored_by_productivity=90}, + {type="fluid", name="water", amount=10, ignored_by_productivity=9}, }, }, }) diff --git a/bzgold2/prototypes/cpu.lua b/bzgold2/prototypes/cpu.lua new file mode 100644 index 0000000..933764c --- /dev/null +++ b/bzgold2/prototypes/cpu.lua @@ -0,0 +1,65 @@ +local util = require("data-util"); + +local silicon = {type="item", name="stone", amount=30} +if mods.bzsilicon then + silicon = data.raw.item["silicon-wafer"] and {type="item", name="silicon-wafer", amount=30} or {type="item", name=mods.Krastorio2 and "kr-silicon" or "silicon", amount=15} +elseif mods.Krastorio2 then + silicon = data.raw.item["silicon-wafer"] and {type="item", name="silicon-wafer", amount=30} or {type="item", name="kr-silicon", amount=15} +elseif data.raw.item["sand"] then + silicon = {type="item", name="sand", amount=30} +end + +local spreader = data.raw.item["cuw"] and {type="item", name="cuw", amount=2} or {type="item", name="copper-plate", amount=2} +data:extend({ + { + type = "item", + name = "cpu", + icon = "__base__/graphics/technology/advanced-circuit.png", + icon_size = 256, + subgroup = "intermediate-product", + order = "b[cpu]", + stack_size = 200, + }, + { + type = "recipe", + name = "cpu", + category = "crafting-with-fluid", + order = "d[cpu]", + enabled = false, + energy_required = 50, + ingredients = { + silicon, spreader, {type="item", name="gold-ingot", amount=1}, {type="item", name="electronic-circuit", amount=10}, + {type="fluid", name="sulfuric-acid", amount=50}, + }, + results = {{type="item", name="cpu", amount=10}}, + }, +}) +if mods["space-exploration"] then + local cpui = {} + if mods.Krastorio2 then + cpui = {{type="item", name="se-holmium-cable", amount=2}, silicon, spreader, {type="item", name="electronic-circuit", amount=20}, {type="item", name="gold-ingot", amount=1}, + {type="fluid", name="sulfuric-acid", amount=50}} + else + cpui = {{type="item", name="se-holmium-cable", amount=1}, silicon, spreader, {type="item", name="electronic-circuit", amount=20}, {type="item", name="gold-ingot", amount=1}, + {type="fluid", name="sulfuric-acid", amount=50}} + end + data:extend({ + { + type = "recipe", + name = "cpu-holmium", + icons = { + { icon = "__base__/graphics/technology/advanced-circuit.png", icon_size = 256, }, + { icon = "__space-exploration-graphics__/graphics/icons/holmium-solenoid.png", icon_size = 64, scale=.25, shift={-8, -8} }, + }, + category = "crafting-with-fluid", + order = "d[cpu]", + enabled = false, + energy_required = 50, + ingredients = cpui, + results = {{type="item", name="cpu", amount=20}}, + }, + }) +end + +util.replace_ingredient("cpu", "electronic-circuit", "pcb", 10, false, {"force", true}) +util.replace_ingredient("cpu-holmium", "electronic-circuit", "pcb", 20, false, {"force", true}) diff --git a/prototypes/electronic-circuit-final.lua b/bzgold2/prototypes/electronic-circuit-final.lua similarity index 66% rename from prototypes/electronic-circuit-final.lua rename to bzgold2/prototypes/electronic-circuit-final.lua index 49f2005..3f37cd7 100644 --- a/prototypes/electronic-circuit-final.lua +++ b/bzgold2/prototypes/electronic-circuit-final.lua @@ -3,20 +3,30 @@ local util = require("data-util"); if util.me.silver() then - if mods.bobelectronics then - -- alternate electronic circuit recipe that uses silver + if mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2 then + -- alternate electronic component recipe that uses silver local ec = futil.table.deepcopy(data.raw.recipe["basic-electronic-components"]) ec.name = "basic-electronic-components-silver" data:extend({ec}) util.set_enabled("basic-electronic-components-silver", false) util.replace_ingredient("basic-electronic-components-silver", "copper-cable", "silver-wire") - util.add_icon("basic-electronic-components-silver", { - icon = "__bzgold__/graphics/icons/silver-wire.png", + local bec_icon = { + icon = data.raw.item["basic-electronic-components"].icon, + icon_size = data.raw.item["basic-electronic-components"].icon_size + } + util.set_icons("basic-electronic-components-silver", { + bec_icon, + { + icon = "__bzgold2__/graphics/icons/silver-wire.png", icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {-8,-8} + } }) - util.add_icon("basic-electronic-components", { + util.set_icons("basic-electronic-components", { + bec_icon, + { icon = "__base__/graphics/icons/copper-cable.png", icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {-8,-8} + } }) util.add_unlock("electronics", "basic-electronic-components-silver") else @@ -24,32 +34,32 @@ if util.me.silver() then util.set_main_product("electronic-circuit", "electronic-circuit") local ec = futil.table.deepcopy(data.raw.recipe["electronic-circuit"]) ec.name = "electronic-circuit-silver" + ec.localised_name = {"item-name.electronic-circuit"} + ec.icons = { + { icon = "__base__/graphics/icons/electronic-circuit.png" }, + { icon = "__bzgold2__/graphics/icons/silver-wire.png", scale = 0.3, shift = {8,-8} } + } data:extend({ec}) util.set_enabled("electronic-circuit-silver", false) util.replace_ingredient("electronic-circuit-silver", "copper-cable", "silver-wire") - util.add_icon("electronic-circuit-silver", { - icon = "__bzgold__/graphics/icons/silver-wire.png", - icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {8,-8} - }) - util.add_icon("electronic-circuit", { - icon = "__base__/graphics/icons/copper-cable.png", - icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {8,-8} - }) + data.raw.recipe["electronic-circuit"].icons = { + { icon = "__base__/graphics/icons/electronic-circuit.png" }, + { icon = "__base__/graphics/icons/copper-cable.png", scale = 0.3, shift = {8,-8} } + } if util.check_unlock("electronics", "electronic-circuit") then util.add_unlock("electronics", "electronic-circuit-silver") else util.add_unlock("silver-processing", "electronic-circuit-silver") end - if mods["aai-industry"] and not mods.bzgas then - util.set_main_product("electronic-circuit-stone", "electronic-circuit") - local ec2 = futil.table.deepcopy(data.raw.recipe["electronic-circuit-stone"]) + if mods["aai-industry"] and not mods.bzgas2 then + local ec2 = futil.table.deepcopy(data.raw.recipe["electronic-circuit"]) ec2.name = "electronic-circuit-stone-silver" data:extend({ec2}) util.set_enabled("electronic-circuit-stone-silver", false) util.replace_ingredient("electronic-circuit-stone-silver", "copper-cable", "silver-wire") util.add_icon("electronic-circuit-stone-silver", { - icon = "__bzgold__/graphics/icons/silver-wire.png", + icon = "__bzgold2__/graphics/icons/silver-wire.png", icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {8,-8} }) util.add_icon("electronic-circuit-stone-silver", { @@ -60,11 +70,11 @@ if util.me.silver() then icon = "__base__/graphics/icons/copper-cable.png", icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {8,-8} }) - util.add_icon("electronic-circuit-stone", { + util.add_icon("electronic-circuit", { icon = "__aai-industry__/graphics/icons/stone-tablet.png", icon_size = 64, scale = 0.3, shift = {-8,-8} }) - if util.check_unlock("electronics", "electronic-circuit-stone") then + if util.check_unlock("electronics", "electronic-circuit") then util.add_unlock("electronics", "electronic-circuit-stone-silver") else util.add_unlock("silver-processing", "electronic-circuit-stone-silver") diff --git a/prototypes/enriched-gold.lua b/bzgold2/prototypes/enriched-gold.lua similarity index 75% rename from prototypes/enriched-gold.lua rename to bzgold2/prototypes/enriched-gold.lua index f3cb056..d8ce0d4 100644 --- a/prototypes/enriched-gold.lua +++ b/bzgold2/prototypes/enriched-gold.lua @@ -6,10 +6,10 @@ local enrich_results = util.me.silver() and { {type = "item", name = "enriched-gold", amount = 5}, {type = "item", name = "enriched-silver", amount = 1}, - {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + {type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} } or { {type = "item", name = "enriched-gold", amount = 6}, - {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + {type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} } data:extend({ @@ -17,16 +17,16 @@ data:extend({ type = "item", name = "enriched-gold", icon_size = 128, - icon = "__bzgold__/graphics/icons/enriched-gold.png", + icon = "__bzgold2__/graphics/icons/enriched-gold.png", -- pictures = { - -- {filename="__bzgold__/graphics/icons/enriched-gold.png", size=64, scale=0.25}, - -- {filename="__bzgold__/graphics/icons/enriched-gold-2.png", size=64, scale=0.25}, - -- {filename="__bzgold__/graphics/icons/enriched-gold-3.png", size=64, scale=0.25}, - -- {filename="__bzgold__/graphics/icons/enriched-gold-4.png", size=64, scale=0.25}, + -- {filename="__bzgold__/graphics/icons/enriched-gold.png", size=64, scale=0.5}, + -- {filename="__bzgold__/graphics/icons/enriched-gold-2.png", size=64, scale=0.5}, + -- {filename="__bzgold__/graphics/icons/enriched-gold-3.png", size=64, scale=0.5}, + -- {filename="__bzgold__/graphics/icons/enriched-gold-4.png", size=64, scale=0.5}, -- }, subgroup = "raw-material", order = "e05-a[enriched-ores]-a1[enriched-gold]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, { type = "recipe", @@ -43,8 +43,8 @@ data:extend({ subgroup = "raw-material", ingredients = { - {type = "fluid", name = "chlorine", amount = 15}, - {type = "fluid", name = "water", amount = 25, catalyst_amount = 25}, + {type = "fluid", name = "kr-chlorine", amount = 15}, + {type = "fluid", name = "water", amount = 25, ignored_by_productivity = 25}, {type = "item", name = "gold-ore", amount = 9} }, results = enrich_results, @@ -60,6 +60,7 @@ data:extend({ { type = "recipe", name = "enriched-gold-ingot", + localised_name = {"item-name.enriched-gold"}, icons = { { icon = "__bzgold__/graphics/icons/gold-ingot.png", icon_size = 128, icon_mipmaps = 3, }, @@ -73,30 +74,29 @@ data:extend({ allow_productivity = true, ingredients = { - {"enriched-gold", 20} + {type="item", name="enriched-gold", amount=20} }, - result = "gold-ingot", - result_count = 10, + results = {{type="item", name="gold-ingot", amount=10}}, order = "b[gold-ingot]-b[enriched-gold-ingot]" }, { type = "recipe", name = "dirty-water-filtration-gold", - category = "fluid-filtration", + category = "kr-fluid-filtration", icons = { { - icon = data.raw.fluid["dirty-water"].icon, - icon_size = data.raw.fluid["dirty-water"].icon_size + icon = data.raw.fluid["kr-dirty-water"].icon, + icon_size = data.raw.fluid["kr-dirty-water"].icon_size }, { icon = data.raw.item["gold-ore"].icon, icon_size = data.raw.item["gold-ore"].icon_size, - scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["gold-ore"].icon_size), + scale = 0.2, shift = {0, 4} } }, - icon_size = data.raw.fluid["dirty-water"].icon_size, + icon_size = data.raw.fluid["kr-dirty-water"].icon_size, energy_required = 2, enabled = false, allow_as_intermediate = false, @@ -104,11 +104,11 @@ data:extend({ always_show_products = true, ingredients = { - {type = "fluid", name = "dirty-water", amount = 100, catalyst_amount = 100}, + {type = "fluid", name = "kr-dirty-water", amount = 100, ignored_by_productivity = 100}, }, results = { - {type = "fluid", name = "water", amount = 90, catalyst_amount = 90}, + {type = "fluid", name = "water", amount = 90, ignored_by_productivity = 90}, {type = "item", name = "stone", probability = 0.30, amount = 1}, {type = "item", name = "gold-ore", probability = 0.05, amount = 1} }, diff --git a/prototypes/enriched-silver.lua b/bzgold2/prototypes/enriched-silver.lua similarity index 77% rename from prototypes/enriched-silver.lua rename to bzgold2/prototypes/enriched-silver.lua index 4f6d6c7..3cf1954 100644 --- a/prototypes/enriched-silver.lua +++ b/bzgold2/prototypes/enriched-silver.lua @@ -8,14 +8,14 @@ data:extend({ icon_size = 128, icon = "__bzgold__/graphics/icons/enriched-silver.png", -- pictures = { - -- {filename="__bzgold__/graphics/icons/enriched-silver.png", size=64, scale=0.25}, - -- {filename="__bzgold__/graphics/icons/enriched-silver-2.png", size=64, scale=0.25}, - -- {filename="__bzgold__/graphics/icons/enriched-silver-3.png", size=64, scale=0.25}, - -- {filename="__bzgold__/graphics/icons/enriched-silver-4.png", size=64, scale=0.25}, + -- {filename="__bzgold__/graphics/icons/enriched-silver.png", size=64, scale=0.5}, + -- {filename="__bzgold__/graphics/icons/enriched-silver-2.png", size=64, scale=0.5}, + -- {filename="__bzgold__/graphics/icons/enriched-silver-3.png", size=64, scale=0.5}, + -- {filename="__bzgold__/graphics/icons/enriched-silver-4.png", size=64, scale=0.5}, -- }, subgroup = "raw-material", order = "e05-a[enriched-ores]-a1[enriched-silver]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, }) @@ -25,24 +25,24 @@ if util.me.platinum() and util.me.palladium() then {type = "item", name = "enriched-silver", amount = 5}, {type = "item", name = "platinum-powder", amount = 1, probability=0.5}, {type = "item", name = "palladium-powder", amount = 1, probability=0.5}, - {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + {type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} } elseif util.me.platinum() then enrich_results = { {type = "item", name = "enriched-silver", amount = 5}, {type = "item", name = "platinum-powder", amount = 1}, - {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + {type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} } elseif util.me.palladium() then enrich_results = { {type = "item", name = "enriched-silver", amount = 5}, {type = "item", name = "palladium-powder", amount = 1}, - {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + {type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} } else enrich_results = { {type = "item", name = "enriched-silver", amount = 6}, - {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + {type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} } end @@ -63,7 +63,7 @@ data:extend({ ingredients = { {type = "fluid", name = "sulfuric-acid", amount = 10}, - {type = "fluid", name = "water", amount = 25, catalyst_amount = 25}, + {type = "fluid", name = "water", amount = 25, ignored_by_productivity = 25}, {type = "item", name = "silver-ore", amount = 9} }, results = enrich_results, @@ -79,6 +79,7 @@ data:extend({ { type = "recipe", name = "enriched-silver-plate", + localised_name = {"item-name.enriched-silver"}, icons = { { icon = "__bzgold__/graphics/icons/silver-plate.png", icon_size = 128, icon_mipmaps = 3, }, @@ -92,30 +93,29 @@ data:extend({ allow_productivity = true, ingredients = { - {"enriched-silver", 10} + {type="item", name="enriched-silver", amount=10} }, - result = "silver-plate", - result_count = 10, + results = {{type="item", name="silver-plate", amount=10}}, order = "b[silver-plate]-b[enriched-silver-plate]" }, { type = "recipe", name = "dirty-water-filtration-silver", - category = "fluid-filtration", + category = "kr-fluid-filtration", icons = { { - icon = data.raw.fluid["dirty-water"].icon, - icon_size = data.raw.fluid["dirty-water"].icon_size + icon = data.raw.fluid["kr-dirty-water"].icon, + icon_size = data.raw.fluid["kr-dirty-water"].icon_size }, { icon = data.raw.item["silver-ore"].icon, icon_size = data.raw.item["silver-ore"].icon_size, - scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["silver-ore"].icon_size), + scale = 0.2, shift = {0, 4} } }, - icon_size = data.raw.fluid["dirty-water"].icon_size, + icon_size = data.raw.fluid["kr-dirty-water"].icon_size, energy_required = 2, enabled = false, allow_as_intermediate = false, @@ -123,11 +123,11 @@ data:extend({ always_show_products = true, ingredients = { - {type = "fluid", name = "dirty-water", amount = 100, catalyst_amount = 100}, + {type = "fluid", name = "kr-dirty-water", amount = 100, ignored_by_productivity = 100}, }, results = { - {type = "fluid", name = "water", amount = 90, catalyst_amount = 90}, + {type = "fluid", name = "water", amount = 90, ignored_by_productivity = 90}, {type = "item", name = "stone", probability = 0.30, amount = 1}, {type = "item", name = "silver-ore", probability = 0.05, amount = 1} }, diff --git a/bzgold2/prototypes/gold-ore.lua b/bzgold2/prototypes/gold-ore.lua new file mode 100644 index 0000000..a6af78a --- /dev/null +++ b/bzgold2/prototypes/gold-ore.lua @@ -0,0 +1,180 @@ +local resource_autoplace = require('resource-autoplace'); +local item_sounds = require('__base__.prototypes.item_sounds') + +local util = require("data-util"); + +data.raw.planet.nauvis.map_gen_settings.autoplace_controls["gold-ore"] = {} +data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["gold-ore"] = {} +resource_autoplace.initialize_patch_set("gold-ore", true) + +data:extend({ + { + type = "autoplace-control", + category = "resource", + name = "gold-ore", + richness = true, + order = "b-e" + }, + { + type = "resource", + name = "gold-ore", + icon = "__bzgold__/graphics/icons/gold-ore.png", + icon_size = 128, + flags = {"placeable-neutral"}, + order="a-b-a", + map_color = {r=1.00, g=0.90, b=0.10}, + tree_removal_probability = 0.7, + tree_removal_max_distance = 32 * 32, + minable = + { + hardness = 1, + mining_particle = "gold-ore-particle", + mining_time = 1, + results = + util.se6() and + { + {type="item", name="gold-ore", amount=1, probability=.75}, + {type="item", name="stone", amount=1, probability=.25}, + } or + { + {type="item", name="gold-ore", amount=1, probability=.25}, + {type="item", name="stone", amount=1, probability=.75}, + } + }, + collision_box = {{ -0.1, -0.1}, {0.1, 0.1}}, + selection_box = {{ -0.5, -0.5}, {0.5, 0.5}}, + + autoplace = resource_autoplace.resource_autoplace_settings{ + name = "gold-ore", + order = "b-z", + base_density = 1, + base_spots_per_km2 = 1, + has_starting_area_placement = false, + regular_rq_factor_multiplier = 1, + starting_rq_factor_multiplier = 1, + }, + + stage_counts = {15000, 9500, 5500, 2900, 1300, 400, 150, 80}, + stages = + { + sheet = + { + filename = "__bzgold__/graphics/entity/ores/hr-gold-ore.png", + priority = "extra-high", + size = 128, + frame_count = 8, + variation_count = 8, + scale = 0.5 + } + }, + }, + { + type = "item", + name = "gold-ore", + icon_size = 128, + icon = "__bzgold__/graphics/icons/gold-ore.png", + pictures = { + {filename="__bzgold__/graphics/icons/gold-ore.png", size=128, scale=0.25}, + {filename="__bzgold__/graphics/icons/gold-ore-1.png", size=128, scale=0.25}, + {filename="__bzgold__/graphics/icons/gold-ore-2.png", size=128, scale=0.25}, + {filename="__bzgold__/graphics/icons/gold-ore-3.png", size=128, scale=0.25}, + {filename="__bzgold__/graphics/icons/gold-ore-4.png", size=128, scale=0.25}, + }, + subgroup = "raw-resource", + order = "a-a-a", + stack_size = 50, + weight = 20*kg, + inventory_move_sound = item_sounds.resource_inventory_move, + pick_sound = item_sounds.resource_inventory_pickup, + drop_sound = item_sounds.resource_inventory_move, + }, +}) + +if util.se6() then + se_resources["gold-ore"] = { + order = "b-z-g", + has_starting_area_placement = false, + base_density = 1, + base_spots_per_km2 = 1, + } +end + +data:extend({ + { + type = "optimized-particle", + name = "gold-ore-particle", + flags = {"not-on-map"}, + life_time = 180, + pictures = + { + { + filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-1.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + }, + { + filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-2.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + }, + { + filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-3.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + }, + { + filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-4.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + } + }, + shadows = + { + { + filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-1.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + }, + { + filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-2.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + }, + { + filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-3.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + }, + { + filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-4.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + } + } + } +}) + diff --git a/prototypes/gold.lua b/bzgold2/prototypes/gold.lua similarity index 87% rename from prototypes/gold.lua rename to bzgold2/prototypes/gold.lua index e2bf642..f3490ba 100644 --- a/prototypes/gold.lua +++ b/bzgold2/prototypes/gold.lua @@ -8,7 +8,7 @@ data:extend({ icon_size = 128, subgroup = "raw-resource", order = "b[gold-ingot]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, { type = "technology", @@ -42,7 +42,7 @@ data:extend({ }) if mods.Krastorio2 then - local results = {{"gold-ingot", 5}} + local results = {{type="item", name="gold-ingot", amount=5}} if util.me.silver() and util.me.byproduct() then results = { {type = "item", name="gold-ingot", amount=4}, @@ -58,12 +58,12 @@ if mods.Krastorio2 then order = "d[gold-ingot]", enabled = false, energy_required = 8, - ingredients = {{"gold-ore", 20}}, + ingredients = {{type="item", name="gold-ore", amount=20}}, results = results, }, }) else - local results = {{"gold-ingot", 1}} + local results = {{type="item", name="gold-ingot", amount=1}} if util.me.silver() and util.me.byproduct() then results = { {type = "item", name="gold-ingot", amount=1, probability=.9}, @@ -80,7 +80,7 @@ else order = "d[gold-ingot]", enabled = false, energy_required = 1.6, - ingredients = {{"gold-ore", 2}}, + ingredients = {{type="item", name="gold-ore", amount=2}}, results = results, }, }) diff --git a/prototypes/mainboard.lua b/bzgold2/prototypes/mainboard.lua similarity index 75% rename from prototypes/mainboard.lua rename to bzgold2/prototypes/mainboard.lua index f17b249..f16e779 100644 --- a/prototypes/mainboard.lua +++ b/bzgold2/prototypes/mainboard.lua @@ -1,7 +1,7 @@ local util = require("data-util"); -if not mods.bobelectronics then +if not (mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2) then data:extend({ { @@ -11,7 +11,7 @@ if not mods.bobelectronics then icon_size = 128, subgroup = "intermediate-product", order = "b[mainboard]", - stack_size = util.get_stack_size(200), + stack_size = 200, }, { type = "recipe", @@ -20,8 +20,8 @@ if not mods.bobelectronics then order = "d[mainboard]", enabled = false, energy_required = 2.5, - ingredients = {{"advanced-circuit", 10}, {"gold-ingot", 1}}, - results = {{"mainboard", 10}}, + ingredients = {{type="item", name="advanced-circuit", amount=10}, {type="item", name="gold-ingot", amount=1}}, + results = {{type="item", name="mainboard", amount=10}}, }, }) @@ -38,8 +38,8 @@ if not mods.bobelectronics then order = "d[mainboard]", enabled = false, energy_required = 5, - ingredients = {{"se-holmium-cable", 2}, {"advanced-circuit", 20}, {"gold-ingot", 1}}, - results = {{"mainboard", 20}}, + ingredients = {{type="item", name="se-holmium-cable", amount=2}, {type="item", name="advanced-circuit", amount=20}, {type="item", name="gold-ingot", amount=1}}, + results = {{type="item", name="mainboard", amount=20}}, }, }) end @@ -54,8 +54,8 @@ if not mods.bobelectronics then util.add_ingredient("mainboard-holmium", "mlcc", 10, {"force", true}) end if mods.Krastorio2 then - util.add_ingredient("mainboard", "rare-metals", 20, {"force", true}) - util.add_ingredient("mainboard-holmium", "rare-metals", 20, {"force", true}) + util.add_ingredient("mainboard", "kr-rare-metals", 20, {"force", true}) + util.add_ingredient("mainboard-holmium", "kr-rare-metals", 20, {"force", true}) end else diff --git a/prototypes/mlcc.lua b/bzgold2/prototypes/mlcc.lua similarity index 67% rename from prototypes/mlcc.lua rename to bzgold2/prototypes/mlcc.lua index f942cb4..c40f694 100644 --- a/prototypes/mlcc.lua +++ b/bzgold2/prototypes/mlcc.lua @@ -2,17 +2,19 @@ local util = require("data-util"); if util.me.palladium() then -local ingredients = {{"palladium-ingot", 1}, {"stone", 2}} -if mods.bzzirconium and mods.bzaluminum then - ingredients = {{"palladium-ingot", 1}, {"zirconia", 1}, {"alumina", 1}} +local ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="stone", amount=2}} +if mods.bzzirconium and mods.bzaluminum2 then + ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="zirconia", amount=1}, {type="item", name="alumina", amount=1}} elseif mods.bzzirconium then - ingredients = {{"palladium-ingot", 1}, {"zirconia", 2}} -elseif mods.bzaluminum then - ingredients = {{"palladium-ingot", 1}, {"alumina", 2}} + ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="zirconia", amount=2}} +elseif mods.bzaluminum2 then + ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="alumina", amount=2}} elseif mods.bzsilicon then - ingredients = {{"palladium-ingot", 1}, {"silica", 3}} -elseif mods.Krastorio2 or mods["aai-industry"] or mods["sand-and-glass"] then - ingredients = {{"palladium-ingot", 1}, {"sand", 2}} + ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="silica", amount=3}} +elseif mods.Krastorio2 then + ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="kr-sand", amount=2}} +elseif mods["aai-industry"] or mods["sand-and-glass"] then + ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="sand", amount=2}} end data:extend({ @@ -35,7 +37,7 @@ data:extend({ }, subgroup = "intermediate-product", order = "b[gold-ingot]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, { type = "recipe", @@ -45,7 +47,7 @@ data:extend({ enabled = false, energy_required = 4, ingredients = ingredients, - results = {{"mlcc", 10}}, + results = {{type="item", name="mlcc", amount=10}}, }, { type = "technology", diff --git a/prototypes/oil-updates.lua b/bzgold2/prototypes/oil-updates.lua similarity index 94% rename from prototypes/oil-updates.lua rename to bzgold2/prototypes/oil-updates.lua index 9ce42a9..50a1a1e 100644 --- a/prototypes/oil-updates.lua +++ b/bzgold2/prototypes/oil-updates.lua @@ -32,7 +32,7 @@ for i, recipe_name in pairs(recipes_to_update) do data:extend({r}) util.add_ingredient(new_name, "ptpd-catalyst", 1, {force=true}) util.add_product(new_name, {type="item", name="ptpd-catalyst", amount=1, - catalyst_amount=1, probability=.9}, {force=true}) + ignored_by_productivity=1, probability=.9}, {force=true}) util.add_icon(new_name, {icon="__bzgold__/graphics/icons/ptpd-catalyst.png", icon_size=128, scale=0.124, shift={8,-8}}) diff --git a/prototypes/palladium.lua b/bzgold2/prototypes/palladium.lua similarity index 86% rename from prototypes/palladium.lua rename to bzgold2/prototypes/palladium.lua index f76164e..ac316a1 100644 --- a/prototypes/palladium.lua +++ b/bzgold2/prototypes/palladium.lua @@ -9,7 +9,7 @@ data:extend({ icon_size = 64, subgroup = "raw-resource", order = "b[palladium-powder]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, { type = "item", @@ -18,7 +18,7 @@ data:extend({ icon_size = 128, subgroup = "raw-resource", order = "b[palladium-ingot]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, { type = "recipe", @@ -28,12 +28,12 @@ data:extend({ order = "d[palladium-ingot]", enabled = false, energy_required = 1.6, - ingredients = {{"palladium-powder", 1}}, + ingredients = {{type="item", name="palladium-powder", amount=1}}, results = util.me.byproduct() and { {type="item", name="palladium-ingot", amount=1, probability=0.95}, {type="item", name="sulfur", amount=1, probability=0.05}, - } or {{"palladium-ingot", 1}}, + } or {{type="item", name="palladium-ingot", amount=1}}, }, }) data:extend({ @@ -85,8 +85,8 @@ data:extend({ order = "d[palladium-ingot]", enabled = false, energy_required = 5, - ingredients = {{"palladium-ingot", 1}, {util.titanium_plate, 4}}, - results = {{"titanium-palladium-flange", 5}}, + ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name=util.titanium_plate, amount=4}}, + results = {{type="item", name="titanium-palladium-flange", amount=5}}, }, }) util.add_unlock("palladium-processing", "titanium-palladium-flange") diff --git a/prototypes/platinum.lua b/bzgold2/prototypes/platinum.lua similarity index 90% rename from prototypes/platinum.lua rename to bzgold2/prototypes/platinum.lua index 2fc6bc0..a4e59a6 100644 --- a/prototypes/platinum.lua +++ b/bzgold2/prototypes/platinum.lua @@ -9,7 +9,7 @@ data:extend({ icon_size = 64, subgroup = "raw-resource", order = "b[platinum-powder]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, { type = "item", @@ -18,7 +18,7 @@ data:extend({ icon_size = 128, subgroup = "raw-resource", order = "b[platinum-ingot]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, { type = "recipe", @@ -28,12 +28,12 @@ data:extend({ order = "d[platinum-ingot]", enabled = false, energy_required = 1.6, - ingredients = {{"platinum-powder", 1}}, + ingredients = {{type="item", name="platinum-powder", amount=1}}, results = util.me.byproduct() and { {type="item", name="platinum-ingot", amount=1, probability=0.95}, {type="item", name="sulfur", amount=1, probability=0.05}, - } or {{"platinum-ingot", 1}}, + } or {{type="item", name="platinum-ingot", amount=1}}, }, }) data:extend({ diff --git a/prototypes/processing-unit-updates.lua b/bzgold2/prototypes/processing-unit-updates.lua similarity index 81% rename from prototypes/processing-unit-updates.lua rename to bzgold2/prototypes/processing-unit-updates.lua index b693c4c..89df585 100644 --- a/prototypes/processing-unit-updates.lua +++ b/bzgold2/prototypes/processing-unit-updates.lua @@ -1,11 +1,11 @@ local util = require("data-util") -util.remove_ingredient("processing-unit", "silicon") +util.remove_ingredient("processing-unit", mods.Krastorio2 and "kr-silicon" or "silicon") util.remove_ingredient("processing-unit", "silicon-wafer") util.remove_ingredient("processing-unit", "sulfuric-acid") util.remove_ingredient("processing-unit", "electronic-circuit") util.remove_ingredient("processing-unit", "advanced-circuit") -util.remove_ingredient("processing-unit", "rare-metals") -- k2 +util.remove_ingredient("processing-unit", "kr-rare-metals") -- k2 util.add_ingredient("processing-unit", "cpu", 1) util.set_recipe_time("processing-unit", 2) util.add_ingredient("processing-unit", "mainboard", 1) diff --git a/prototypes/pyroflux-gold.lua b/bzgold2/prototypes/pyroflux-gold.lua similarity index 89% rename from prototypes/pyroflux-gold.lua rename to bzgold2/prototypes/pyroflux-gold.lua index 1c3ad6d..f15e6e1 100644 --- a/prototypes/pyroflux-gold.lua +++ b/bzgold2/prototypes/pyroflux-gold.lua @@ -28,7 +28,7 @@ if util.se6() then }, energy_required = 60, ingredients = { - {name = mods.Krastorio2 and "enriched-gold" or "gold-ore", amount = 24}, + {type = "item", name = mods.Krastorio2 and "enriched-gold" or "gold-ore", amount = 24}, {type = "fluid", name = "se-pyroflux", amount = 10}, }, enabled = false, @@ -40,7 +40,7 @@ if util.se6() then type = "recipe", name = "gold-ingot-casting", category = "casting", - results = {{"gold-ingot", 1}}, + results = {{type="item", name="gold-ingot", amount=1}}, energy_required = 2.5, ingredients = { {type = "fluid", name = "molten-gold", amount = 50}, @@ -57,6 +57,6 @@ if util.se6() then data.raw.recipe["enriched-gold-ingot"].order = "d[gold-ingot]" se_delivery_cannon_recipes["enriched-gold"] = {name= "enriched-gold"} else - if util.me.byproduct() then util.add_product("molten-gold", {"silver-ore", 9}) end + if util.me.byproduct() then util.add_product("molten-gold", {type="item", name="silver-ore", amount=9}) end end end diff --git a/prototypes/pyroflux-silver.lua b/bzgold2/prototypes/pyroflux-silver.lua similarity index 89% rename from prototypes/pyroflux-silver.lua rename to bzgold2/prototypes/pyroflux-silver.lua index 4c4fc0d..8c8bd5b 100644 --- a/prototypes/pyroflux-silver.lua +++ b/bzgold2/prototypes/pyroflux-silver.lua @@ -35,7 +35,7 @@ if util.se6() and util.me.silver() then }, energy_required = 60, ingredients = { - {name = mods.Krastorio2 and "enriched-silver" or "silver-ore", amount = 24}, + {type = "item", name = mods.Krastorio2 and "enriched-silver" or "silver-ore", amount = 24}, {type = "fluid", name = "se-pyroflux", amount = 10}, }, enabled = false, @@ -47,7 +47,7 @@ if util.se6() and util.me.silver() then type = "recipe", name = "silver-ingot", category = "casting", - results = {{"silver-ingot", 1}}, + results = {{type="item", name="silver-ingot", amount=1}}, energy_required = 25, ingredients = { {type = "fluid", name = "molten-silver", amount = 250}, @@ -66,11 +66,11 @@ if util.se6() and util.me.silver() then {icon = "__bzgold__/graphics/icons/silver-ingot.png", icon_size = 128, scale = 0.125, shift = {-8, -8}}, }, results = { - {name = "silver-plate", amount = 10}, + {type = "item", name = "silver-plate", amount = 10}, }, energy_required = 5, ingredients = { - {name = "silver-ingot", amount = 1} + {type = "item", name = "silver-ingot", amount = 1} }, enabled = false, always_show_made_in = true, diff --git a/prototypes/recipe-updates-se.lua b/bzgold2/prototypes/recipe-updates-se.lua similarity index 98% rename from prototypes/recipe-updates-se.lua rename to bzgold2/prototypes/recipe-updates-se.lua index e73c2a7..6874a23 100644 --- a/prototypes/recipe-updates-se.lua +++ b/bzgold2/prototypes/recipe-updates-se.lua @@ -12,7 +12,7 @@ if util.se6() then util.replace_ingredient("se-space-science-lab", "processing-unit", "advanced-circuit", 100) util.replace_ingredient("se-empty-lifesupport-canister", "processing-unit", "advanced-circuit", 5) - util.remove_prerequisite("se-meteor-defence", "advanced-electronics-2") + util.remove_prerequisite("se-meteor-defence", "processing-unit") util.add_prerequisite("se-meteor-defence", "se-rocket-science-pack") util.set_tech_recipe("se-meteor-defence", { {"automation-science-pack", 1}, diff --git a/prototypes/recipe-updates.lua b/bzgold2/prototypes/recipe-updates.lua similarity index 87% rename from prototypes/recipe-updates.lua rename to bzgold2/prototypes/recipe-updates.lua index a8e34c1..2b127bd 100644 --- a/prototypes/recipe-updates.lua +++ b/bzgold2/prototypes/recipe-updates.lua @@ -4,7 +4,7 @@ local util = require("data-util") -- K2 silver from copper if mods.Krastorio2 then util.replace_some_product("copper-plate", "copper-plate", 1, "silver-ore", 1) - util.add_product("enriched-copper", {"silver-ore", 1}) + util.add_product("enriched-copper", {type="item", name="silver-ore", amount=1}) end if mods.bztitanium then @@ -63,19 +63,19 @@ util.add_ingredient("kr-quantum-computer", "mlcc", 50) if util.me.palladium() then - util.add_ingredient("additional-engine", "palladium-ingot", 1) + util.add_ingredient("kr-additional-engine-equipment", "palladium-ingot", 1) elseif util.me.platinum() then - util.add_ingredient("additional-engine", "platinum-ingot", 1) + util.add_ingredient("kr-additional-engine-equipment", "platinum-ingot", 1) end -- K2 blank tech card if mods.Krastorio2 and util.me.silver() then - local tc = futil.table.deepcopy(data.raw.recipe["blank-tech-card"]) + local tc = futil.table.deepcopy(data.raw.recipe["kr-blank-tech-card"]) tc.name = "blank-tech-card-silver" data:extend({tc}) util.replace_ingredient("blank-tech-card-silver", "copper-cable", "silver-wire") - local amt = util.get_amount("blank-tech-card") - util.set_product_amount("blank-tech-card-silver", "blank-tech-card", amt) + local amt = util.get_amount("kr-blank-tech-card") + util.set_product_amount("blank-tech-card-silver", "kr-blank-tech-card", amt) util.add_icon("blank-tech-card-silver", { icon = "__bzgold__/graphics/icons/silver-wire.png", icon_size = 64, icon_mipmaps = 4, scale = 0.25, shift = {8,-8} diff --git a/prototypes/recipes-se.lua b/bzgold2/prototypes/recipes-se.lua similarity index 100% rename from prototypes/recipes-se.lua rename to bzgold2/prototypes/recipes-se.lua diff --git a/prototypes/rich-copper.lua b/bzgold2/prototypes/rich-copper.lua similarity index 75% rename from prototypes/rich-copper.lua rename to bzgold2/prototypes/rich-copper.lua index 4583949..10b4646 100644 --- a/prototypes/rich-copper.lua +++ b/bzgold2/prototypes/rich-copper.lua @@ -1,5 +1,4 @@ local resource_autoplace = require('resource-autoplace'); -local noise = require('noise'); local futil = require("util"); local util = require("data-util"); @@ -7,7 +6,7 @@ local util = require("data-util"); if util.me.platinum() or util.me.palladium() then if mods.Krastorio2 then -- no rich copper - local rm = futil.table.deepcopy(data.raw.recipe["rare-metals"]) + local rm = futil.table.deepcopy(data.raw.recipe["kr-rare-metals"]) rm.name = "rare-metals-1" data:extend({rm}) util.add_unlock("platinum-processing", "rare-metals-1") @@ -15,27 +14,27 @@ if mods.Krastorio2 then util.add_icon("rare-metals-1", {icon = "__bzgold__/graphics/icons/platinum-powder.png", icon_size = 64, scale = 0.25, shift = {-8,8}}) - util.multiply_recipe("rare-metals", 2) + util.multiply_recipe("kr-rare-metals", 2) util.multiply_recipe("rare-metals-1", 2) util.multiply_recipe("rare-metals-2", 2) - util.set_main_product("rare-metals", "rare-metals") - util.set_product_amount("rare-metals", "rare-metals", 6) - util.set_main_product("rare-metals-1", "rare-metals") - util.set_main_product("rare-metals-2", "rare-metals") + util.set_main_product("kr-rare-metals", "kr-rare-metals") + util.set_product_amount("kr-rare-metals", "kr-rare-metals", 6) + util.set_main_product("rare-metals-1", "kr-rare-metals") + util.set_main_product("rare-metals-2", "kr-rare-metals") if util.me.platinum() and util.me.palladium() then - util.replace_some_product("rare-metals-1", "rare-metals", 2, "platinum-powder", 2, {force=true}) - util.replace_some_product("rare-metals-1", "rare-metals", 2, "palladium-powder", 2, {force=true}) - util.replace_some_product("rare-metals-2", "rare-metals", 3, "platinum-powder", 3, {force=true}) - util.replace_some_product("rare-metals-2", "rare-metals", 3, "palladium-powder", 3, {force=true}) + util.replace_some_product("rare-metals-1", "kr-rare-metals", 2, "platinum-powder", 2, {force=true}) + util.replace_some_product("rare-metals-1", "kr-rare-metals", 2, "palladium-powder", 2, {force=true}) + util.replace_some_product("rare-metals-2", "kr-rare-metals", 3, "platinum-powder", 3, {force=true}) + util.replace_some_product("rare-metals-2", "kr-rare-metals", 3, "palladium-powder", 3, {force=true}) elseif util.me.platinum() then - util.replace_some_product("rare-metals-1", "rare-metals", 3, "platinum-powder", 4, {force=true}) - util.replace_some_product("rare-metals-2", "rare-metals", 6, "platinum-powder", 6, {force=true}) + util.replace_some_product("rare-metals-1", "kr-rare-metals", 3, "platinum-powder", 4, {force=true}) + util.replace_some_product("rare-metals-2", "kr-rare-metals", 6, "platinum-powder", 6, {force=true}) elseif util.me.palladium() then - util.replace_some_product("rare-metals-1", "rare-metals", 3, "palladium-powder", 4, {force=true}) - util.replace_some_product("rare-metals-2", "rare-metals", 6, "palladium-powder", 6, {force=true}) + util.replace_some_product("rare-metals-1", "kr-rare-metals", 3, "palladium-powder", 4, {force=true}) + util.replace_some_product("rare-metals-2", "kr-rare-metals", 6, "palladium-powder", 6, {force=true}) end else @@ -84,17 +83,16 @@ end if data.raw.resource["copper-ore"] then if mods["space-exploration"] then - local noise = require('noise'); -- decrease richness of copper a bit (ok if it stacks with aluminum) - data.raw.resource["copper-ore"].autoplace.richness_expression = - data.raw.resource["copper-ore"].autoplace.richness_expression * noise.to_noise_expression(3/4) + data.raw.resource["copper-ore"].autoplace.richness_expression = + data.raw.resource["copper-ore"].autoplace.richness_expression .. "*(3/4)" else log("Replacing vanilla copper-ore autoplace") local resource_autoplace = require('resource-autoplace'); data.raw.resource["copper-ore"].autoplace = resource_autoplace.resource_autoplace_settings{ name = "copper-ore", order = "b", - base_density = mods.bzaluminum and 3 or 4, + base_density = mods.bzaluminum2 and 3 or 4, has_starting_area_placement = true, regular_rq_factor_multiplier = 1.1, starting_rq_factor_multiplier = 1.1, @@ -117,10 +115,6 @@ end data:extend({ { - type = "noise-layer", - name = "rich-copper-ore" - }, - { type = "resource", name = "rich-copper-ore", icon = "__bzgold__/graphics/icons/rich-copper-ore.png", @@ -158,20 +152,12 @@ data:extend({ { sheet = { - filename = "__bzgold__/graphics/entity/ores/rich-copper-ore.png", - priority = "extra-high", - size = 64, - frame_count = 8, - variation_count = 8, - hr_version = - { - filename = "__bzgold__/graphics/entity/ores/hr-rich-copper-ore.png", - priority = "extra-high", - size = 128, - frame_count = 8, - variation_count = 8, - scale = 0.5 - } + filename = "__bzgold__/graphics/entity/ores/hr-rich-copper-ore.png", + priority = "extra-high", + size = 128, + frame_count = 8, + variation_count = 8, + scale = 0.5 } }, }, @@ -181,14 +167,14 @@ data:extend({ icon_size = 64, icon_mipmaps=4, icon = "__bzgold__/graphics/icons/rich-copper-ore.png", pictures = { - {filename="__bzgold__/graphics/icons/rich-copper-ore.png", size=64, scale=0.25}, - {filename="__bzgold__/graphics/icons/rich-copper-ore-1.png", size=64, scale=0.25}, - {filename="__bzgold__/graphics/icons/rich-copper-ore-2.png", size=64, scale=0.25}, - {filename="__bzgold__/graphics/icons/rich-copper-ore-3.png", size=64, scale=0.25}, + {filename="__bzgold__/graphics/icons/rich-copper-ore.png", size=64, scale=0.5}, + {filename="__bzgold__/graphics/icons/rich-copper-ore-1.png", size=64, scale=0.5}, + {filename="__bzgold__/graphics/icons/rich-copper-ore-2.png", size=64, scale=0.5}, + {filename="__bzgold__/graphics/icons/rich-copper-ore-3.png", size=64, scale=0.5}, }, subgroup = "raw-resource", order = "t-c-a", - stack_size = util.get_stack_size(50) + stack_size = 50 }, }) @@ -197,6 +183,7 @@ data:extend({ { type = "recipe", name = "rich-copper", + localised_name = {"item-name.copper-plate"}, category = "smelting", main_product = "copper-plate", order = "d[copper-plate]", @@ -209,7 +196,7 @@ data:extend({ -- {icon = "__bzgold__/graphics/icons/palladium-powder.png", icon_size = 64, scale=0.25, shift = {-8,-8}}, }, energy_required = 6.4, - ingredients = {{"rich-copper-ore", 2}}, + ingredients = {{type="item", name="rich-copper-ore", amount=2}}, results = results, }, }) diff --git a/prototypes/silver.lua b/bzgold2/prototypes/silver.lua similarity index 73% rename from prototypes/silver.lua rename to bzgold2/prototypes/silver.lua index fbdd9f6..3699416 100644 --- a/prototypes/silver.lua +++ b/bzgold2/prototypes/silver.lua @@ -8,15 +8,15 @@ if util.me.silver() then icon = "__bzgold__/graphics/icons/silver-ore.png", icon_size = 128, pictures = { - {filename="__bzgold__/graphics/icons/silver-ore.png", size=128, scale=0.125}, - {filename="__bzgold__/graphics/icons/silver-ore-1.png", size=128, scale=0.125}, - {filename="__bzgold__/graphics/icons/silver-ore-2.png", size=128, scale=0.125}, - {filename="__bzgold__/graphics/icons/silver-ore-3.png", size=128, scale=0.125}, - {filename="__bzgold__/graphics/icons/silver-ore-4.png", size=128, scale=0.125}, + {filename="__bzgold__/graphics/icons/silver-ore.png", size=128, scale=0.25}, + {filename="__bzgold__/graphics/icons/silver-ore-1.png", size=128, scale=0.25}, + {filename="__bzgold__/graphics/icons/silver-ore-2.png", size=128, scale=0.25}, + {filename="__bzgold__/graphics/icons/silver-ore-3.png", size=128, scale=0.25}, + {filename="__bzgold__/graphics/icons/silver-ore-4.png", size=128, scale=0.25}, }, subgroup = "raw-resource", order = "a[silver-ore]", - stack_size = util.get_stack_size(200), + stack_size = 200, }, }) data:extend({ @@ -27,7 +27,7 @@ if util.me.silver() then icon_size = 128, subgroup = "raw-resource", order = "b[silver-plate]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, mods.Krastorio2 and { type = "recipe", @@ -36,8 +36,8 @@ if util.me.silver() then order = "d[silver-plate]", enabled = false, energy_required = 8, - ingredients = {{"silver-ore", 10}}, - results = {{"silver-plate", 5}}, + ingredients = {{type="item", name="silver-ore", amount=10}}, + results = {{type="item", name="silver-plate", amount=5}}, } or { type = "recipe", name = "silver-plate", @@ -45,8 +45,8 @@ if util.me.silver() then order = "d[silver-plate]", enabled = false, energy_required = 1.6, - ingredients = {{"silver-ore", 1}}, - results = {{"silver-plate", 1}}, + ingredients = {{type="item", name="silver-ore", amount=1}}, + results = {{type="item", name="silver-plate", amount=1}}, }, }) @@ -58,7 +58,7 @@ if util.me.silver() then icon_size = 64, icon_mipmaps = 4, subgroup = util.cablesg, order = "b[silver-wire]", - stack_size = util.get_stack_size(200), + stack_size = 200, }, { type = "recipe", @@ -67,18 +67,18 @@ if util.me.silver() then order = "d[silver-wire]", enabled = false, energy_required = 1, - ingredients = {{"silver-plate", 1}}, - results = {{"silver-wire", 3}}, + ingredients = {{type="item", name="silver-plate", amount=1}}, + results = {{type="item", name="silver-wire", amount=3}}, }, }) - brazing = mods.BrassTacks and { - {"silver-plate", 2}, - {"zinc-plate", 1}, - {"copper-plate", 1} + brazing = mods["BrassTacks-Updated"] and { + {type="item", name="silver-plate", amount=2}, + {type="item", name="zinc-plate", amount=1}, + {type="item", name="copper-plate", amount=1} } or { - {"silver-plate", 2}, - {"copper-plate", 2} + {type="item", name="silver-plate", amount=2}, + {type="item", name="copper-plate", amount=2} } data:extend({ @@ -89,7 +89,7 @@ if util.me.silver() then icon_size = 128, subgroup = "intermediate-product", order = "b[silver-brazing-alloy]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, { type = "recipe", @@ -99,13 +99,16 @@ if util.me.silver() then enabled = false, energy_required = 4, ingredients = brazing, - results = {{"silver-brazing-alloy", 4}}, + results = {{type="item", name="silver-brazing-alloy", amount=4}}, }, }) - util.set_to_founding("silver-brazing-alloy") + if mods.bzfoundry2 then + util.set_category("silver-brazing-alloy", "basic-founding") + util.set_subgroup("silver-brazing-alloy", "foundry-intermediate") + end - local prereqs= mods.bzaluminum and {"copper-processing"} or {"automation"} + local prereqs= mods.bzaluminum2 and {"copper-processing"} or {"automation"} data:extend({ { type = "technology", @@ -123,7 +126,7 @@ if util.me.silver() then }, unit = { count = 10, time = 15, - ingredients = mods.Krastorio2 and { {"basic-tech-card", 1}, } + ingredients = mods.Krastorio2 and { {"kr-basic-tech-card", 1}, } or { {"automation-science-pack", 1}, }, }, prerequisites = prereqs, diff --git a/prototypes/tech-updates.lua b/bzgold2/prototypes/tech-updates.lua similarity index 59% rename from prototypes/tech-updates.lua rename to bzgold2/prototypes/tech-updates.lua index 923fce6..ad6b5ab 100644 --- a/prototypes/tech-updates.lua +++ b/bzgold2/prototypes/tech-updates.lua @@ -1,15 +1,15 @@ local util = require("data-util") -util.add_prerequisite("advanced-electronics", "silver-processing") +util.add_prerequisite("advanced-circuit", "silver-processing") util.add_prerequisite("solar-energy", "silver-processing") util.add_prerequisite("oil-processing", "silver-processing") util.add_prerequisite("gas-extraction", "silver-processing") -util.add_prerequisite("advanced-electronics-2", "gold-processing") -util.remove_prerequisite("advanced-electronics-2", "chemical-science-pack") -util.add_prerequisite("advanced-electronics-2", "temperature-regulation") -util.add_prerequisite("advanced-electronics-2", "advanced-capacitors") +util.add_prerequisite("processing-unit", "gold-processing") +util.remove_prerequisite("processing-unit", "chemical-science-pack") +util.add_prerequisite("processing-unit", "temperature-regulation") +util.add_prerequisite("processing-unit", "advanced-capacitors") util.add_prerequisite("nuclear-power", "palladium-processing") if mods["aai-industry"] then @@ -18,8 +18,8 @@ else util.add_prerequisite("advanced-material-processing-2", "temperature-regulation") end -util.add_unlock("advanced-electronics-2", "cpu") -util.add_unlock("advanced-electronics-2", "mainboard") +util.add_unlock("processing-unit", "cpu") +util.add_unlock("processing-unit", "mainboard") util.add_prerequisite("coal-liquefaction", "catalysis") util.remove_prerequisite("coal-liquefaction", "production-science-pack") diff --git a/prototypes/temperature-sensor.lua b/bzgold2/prototypes/temperature-sensor.lua similarity index 80% rename from prototypes/temperature-sensor.lua rename to bzgold2/prototypes/temperature-sensor.lua index fd5b377..5b202ff 100644 --- a/prototypes/temperature-sensor.lua +++ b/bzgold2/prototypes/temperature-sensor.lua @@ -5,11 +5,13 @@ if util.me.platinum() then local base = "stone" if mods.bzzirconium then base = "zirconia" -elseif mods.bzaluminum then +elseif mods.bzaluminum2 then base = "alumina" elseif mods.bzsilicon then base = "silica" -elseif mods.Krastorio2 or mods["aai-industry"] or mods["sand-and-glass"] then +elseif mods.Krastorio2 then + base = "kr-glass" +elseif mods["aai-industry"] or mods["sand-and-glass"] then base = "glass" end @@ -22,7 +24,7 @@ data:extend({ icon_size = 128, subgroup = "intermediate-product", order = "b[gold-ingot]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, { type = "recipe", @@ -31,8 +33,8 @@ data:extend({ order = "d[temperature-sensor]", enabled = false, energy_required = 4, - ingredients = {{"platinum-ingot", 1}, {base, 2}}, - results = {{"temperature-sensor", 10}}, + ingredients = {{type="item", name="platinum-ingot", amount=1}, {type="item", name=base, amount=2}}, + results = {{type="item", name="temperature-sensor", amount=10}}, }, { type = "technology", diff --git a/settings-util.lua b/bzgold2/settings-util.lua similarity index 100% rename from settings-util.lua rename to bzgold2/settings-util.lua diff --git a/settings.lua b/bzgold2/settings.lua similarity index 100% rename from settings.lua rename to bzgold2/settings.lua diff --git a/stacking.lua b/bzgold2/stacking.lua similarity index 100% rename from stacking.lua rename to bzgold2/stacking.lua diff --git a/thumbnail.png b/bzgold2/thumbnail.png similarity index 100% rename from thumbnail.png rename to bzgold2/thumbnail.png diff --git a/changelog.txt b/changelog.txt deleted file mode 100644 index 273e194..0000000 --- a/changelog.txt +++ /dev/null @@ -1,123 +0,0 @@ ---------------------------------------------------------------------------------------------------- -Version: 0.0.15 -Date: 2023-12-29 - Changes: - - SE: Meteor/umbrella defense tech requires rocket science packs ---------------------------------------------------------------------------------------------------- -Version: 0.0.14 -Date: 2023-04-16 - Fixes: - - SE: Fix holmium cable mainboard recipe to use correct ingredients - Changes: - - Processing unit recipe time has been further halved - - K2: Rare metals are now used in mainbord recipes, not processing units - - SE: Lifesupport canisters no longer require processing units ---------------------------------------------------------------------------------------------------- -Version: 0.0.13 -Date: 2023-04-10 - Changes: - - Catalyzed oil recipes can now use prod modules. - Localization: - - zh-CN thanks to Klarkxy ---------------------------------------------------------------------------------------------------- -Version: 0.0.12 -Date: 2023-04-02 - Changes: - - Silver brazing alloy will use foundry if enabled. - - SE: Fix some possible tech/recipe deadlocks ---------------------------------------------------------------------------------------------------- -Version: 0.0.11 -Date: 2023-03-29 - Fixes: - - Several en locale strings added or fixed ---------------------------------------------------------------------------------------------------- -Version: 0.0.10 -Date: 2023-03-28 - Fixes: - - Correctly scale low res rich copper entity sprites ---------------------------------------------------------------------------------------------------- -Version: 0.0.9 -Date: 2023-03-27 - Fixes: - - When silver is disabled, do not enable an alternate electronic circuit recipe - - Alternate electronic circuit recipe now unlocks at appropriate time in certain mod loadouts - - Some fixes around platinum, palladium settings - Changes: - - Tweak silver wire icon - - Tweak electronic circuit recipe icons - - When used with Bob's electronics, provide alternate basic electronic components recipe - - When used with AAI Industry (and not Natural Gas) provide alt-alt electronic circuit recipe ---------------------------------------------------------------------------------------------------- -Version: 0.0.8 -Date: 2023-03-27 - Fixes: - - Researching Advanced Electronics 2 unlocks now correctly unlocks CPUs in most mod loadouts. ---------------------------------------------------------------------------------------------------- -Version: 0.0.7 -Date: 2023-03-26 - Fixes: - - Compatibility fixes for some loadouts - - Fix silicon in CPUs in some loadouts - Features: - - SE: Added setting to output a very small amount of ore in Nauvis core mining, default zero. ---------------------------------------------------------------------------------------------------- -Version: 0.0.6 -Date: 2023-03-22 - Features: - - Basic compatility with 248k, unified gold ingot items and production lines. - Fixes: - - SE: Satellite rocket silo no longer requires palladium, due to tech deadlock ---------------------------------------------------------------------------------------------------- -Version: 0.0.5 -Date: 2023-03-19 - Features: - - Compatible with ModMash Splinter Gold ---------------------------------------------------------------------------------------------------- -Version: 0.0.4 -Date: 2023-03-18 - Fixes: - - More locale strings (en) - - K2, SE: Prod modules for alternate smelting chains - Changes: - - Recipe balance changes - - K2: Early rare metals recipe does not output noble metals - - SE: Post-rocket techs require rocket science packs ---------------------------------------------------------------------------------------------------- -Version: 0.0.3 -Date: 2023-03-14 - Changes: - - K2: Fix some recipes - - SE: A bit more minor smoothing of progression - - K2SE: Matter updates - Fixes: - - SE: Fix some recipe building issues, eg alternate solid fuel recipes - - Fix some more mod load issues, as well as further playability compatibility ---------------------------------------------------------------------------------------------------- -Version: 0.0.2 -Date: 2023-03-13 - Fixes: - - Fix and add several en locale strings - Changes: - - Rebalance silver brazing alloy - - SE: Smooth progression around processing units and switch around some recipes - - SE: Alternate production chain for processing units using holmium ---------------------------------------------------------------------------------------------------- -Version: 0.0.1 -Date: 2023-03-10 - Features: - - Early alpha release, incomplete. - - Adds gold, silver, platinum and palladium - - Adds some intermediate items - - Updates processing units production chain - - Optionally adds catalysis recipes - - Compatible with Krastorio 2 (more to come) - - Compatible with Space Exploration (more to come) - - Compatible with Bob's Electronics - - Compatible with deadlock stacking/crating - - Compatible with many other mods - Known issues: - - Gameplay balance is not tuned. - - In Space Exploration, gold ore (and rich copper ore, without K2) will show up on Nauvis - They should eventually only show up off of Nauvis. - - Enriched ores need better graphics. - - Some mod setting configurations don't currently work. diff --git a/description.md b/description.md deleted file mode 100644 index 3486514..0000000 --- a/description.md +++ /dev/null @@ -1,45 +0,0 @@ -ALPHA RELEASE: anything can change including recipes, balance, etc. - ----- - -"The object thinkers build the trains, and the spatial visualizers make them run." - *Temple Grandin* - ----- -Adds gold, silver, platinum and palladium to the game. Reworks processing units and much more. - -This mod adds more complexity to a vanailla factorio game, especially after chemical science, though silver shows up earlier. As always, the more BZ mods you add the more complex the game will become. - -Note, when silver from this mod is used with [Lead](https://mods.factorio.com/mod/bzlead), lead outputs a silver byproduct instead of a copper byproduct. - -Supported compatible mods: - -- Space Exploration & AAI -- Krastorio 2 -- Bob's electronics, 248k, Mod Mash Splinter Gold -- Deadlock stacking, crating - -Coming soon: RSO -Coming soon: FE+, 5Dim's, ScienceCostTweaker, etc. - -Many other mods are compatible but not yet fully supported. Suggestions always appreciated! - ----- -#### Special thanks to - -- The community, for all the suggestions, feedback, and bug reports! -- [snouz](https://mods.factorio.com/user/snouz) (inspiration for thumbnail) - - -##### Thanks for testing - -[Sakuro](https://mods.factorio.com/user/sakuro), -[Fuuryuu](https://mods.factorio.com/user/fuuryuu), -[Shadowreaper](https://mods.factorio.com/user/shadowreaper), -[Baisius](https://mods.factorio.com/user/baisius), -[agmech](https://mods.factorio.com/user/agmech), -[Wonder Ginger](https://mods.factorio.com/user/WonderGinger), -[GeneralTank](https://mods.factorio.com/user/GeneralTank), -[JonathanF](https://mods.factorio.com/user/JonathanF), -[Berkelear](https://mods.factorio.com/user/Berkelear), -[Elanu](https://mods.factorio.com/user/elanu), -[aeosynth](https://mods.factorio.com/user/aeosynth) diff --git a/graphics/entity/ores/gold-ore.png b/graphics/entity/ores/gold-ore.png deleted file mode 100644 index cf28f0e..0000000 Binary files a/graphics/entity/ores/gold-ore.png and /dev/null differ diff --git a/graphics/entity/ores/particle/gold-ore-particle-1.png b/graphics/entity/ores/particle/gold-ore-particle-1.png deleted file mode 100644 index c6817dc..0000000 Binary files a/graphics/entity/ores/particle/gold-ore-particle-1.png and /dev/null differ diff --git a/graphics/entity/ores/particle/gold-ore-particle-2.png b/graphics/entity/ores/particle/gold-ore-particle-2.png deleted file mode 100644 index 403a5d8..0000000 Binary files a/graphics/entity/ores/particle/gold-ore-particle-2.png and /dev/null differ diff --git a/graphics/entity/ores/particle/gold-ore-particle-3.png b/graphics/entity/ores/particle/gold-ore-particle-3.png deleted file mode 100644 index b2bc37b..0000000 Binary files a/graphics/entity/ores/particle/gold-ore-particle-3.png and /dev/null differ diff --git a/graphics/entity/ores/particle/gold-ore-particle-4.png b/graphics/entity/ores/particle/gold-ore-particle-4.png deleted file mode 100644 index 9e312f6..0000000 Binary files a/graphics/entity/ores/particle/gold-ore-particle-4.png and /dev/null differ diff --git a/graphics/entity/ores/particle/gold-ore-particle-shadow-1.png b/graphics/entity/ores/particle/gold-ore-particle-shadow-1.png deleted file mode 100644 index 1a5bdea..0000000 Binary files a/graphics/entity/ores/particle/gold-ore-particle-shadow-1.png and /dev/null differ diff --git a/graphics/entity/ores/particle/gold-ore-particle-shadow-2.png b/graphics/entity/ores/particle/gold-ore-particle-shadow-2.png deleted file mode 100644 index 963104d..0000000 Binary files a/graphics/entity/ores/particle/gold-ore-particle-shadow-2.png and /dev/null differ diff --git a/graphics/entity/ores/particle/gold-ore-particle-shadow-3.png b/graphics/entity/ores/particle/gold-ore-particle-shadow-3.png deleted file mode 100644 index e44c241..0000000 Binary files a/graphics/entity/ores/particle/gold-ore-particle-shadow-3.png and /dev/null differ diff --git a/graphics/entity/ores/particle/gold-ore-particle-shadow-4.png b/graphics/entity/ores/particle/gold-ore-particle-shadow-4.png deleted file mode 100644 index a5f8e6e..0000000 Binary files a/graphics/entity/ores/particle/gold-ore-particle-shadow-4.png and /dev/null differ diff --git a/graphics/entity/ores/rich-copper-ore.png b/graphics/entity/ores/rich-copper-ore.png deleted file mode 100644 index ef1887f..0000000 Binary files a/graphics/entity/ores/rich-copper-ore.png and /dev/null differ diff --git a/info.json b/info.json deleted file mode 100644 index 817b273..0000000 --- a/info.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "bzgold", - "version": "0.0.15", - "factorio_version": "1.1", - "title": "Noble Metals", - "author": "Brevven", - "contact": "", - "homepage": "", - "dependencies": [ - "base >= 1.1.0", - "? bzfoundry >= 0.2.1", - "? bztitanium >= 1.2.0", - "? bzlead >= 1.2.0", - "? bzzirconium >= 0.6.0", - "? bztungsten >= 0.6.0", - "? bzcarbon >= 0.5.5", - "? bztin >= 0.1.8", - "? bzgas", - "? bzchlorine", - "? 248k >= 1.0.29", - "? space-exploration >= 0.6.0", - "? aai-industry", - "(?) aai-loaders", - "? Krastorio2", - "? bobelectronics", - "? MDbobelectronics", - "? modmashsplintergold", - "? deadlock-beltboxes-loaders", - "? DeadlockCrating" - ], - "description": "(Alpha release, anything can change, more to come, etc) Adds silver, gold, platinum, palladium and more to the base game. Reworks processing units.\n\nCompatible with Krastorio 2 and Space Exploration. A standalone piece of BZ Mods." -} diff --git a/modules.lua b/modules.lua deleted file mode 100644 index 6544032..0000000 --- a/modules.lua +++ /dev/null @@ -1,17 +0,0 @@ --- Enable prod modules for some recipes --- Recipes with very specific ratios are deliberately excluded -local util = require("data-util") - -for i, recipe in pairs(util.me.recipes) do - if data.raw.recipe[recipe] then - for j, module in pairs(data.raw.module) do - if module.effect then - for effect_name, effect in pairs(module.effect) do - if effect_name == "productivity" and effect.bonus > 0 and module.limitation and #module.limitation > 0 then - table.insert(module.limitation, recipe) - end - end - end - end - end -end diff --git a/prototypes/cpu.lua b/prototypes/cpu.lua deleted file mode 100644 index 0df7919..0000000 --- a/prototypes/cpu.lua +++ /dev/null @@ -1,63 +0,0 @@ -local util = require("data-util"); - -local silicon = {"stone", 30} -if mods.bzsilicon or mods.Krastorio2 then - silicon = data.raw.item["silicon-wafer"] and {"silicon-wafer", 30} or {"silicon", 15} -elseif data.raw.item["sand"] then - silicon = {"sand", 30} -end - -local spreader = data.raw.item["cuw"] and {"cuw", 2} or {"copper-plate", 2} -data:extend({ - { - type = "item", - name = "cpu", - icon = "__base__/graphics/technology/advanced-electronics-2.png", - icon_size = 256, - subgroup = "intermediate-product", - order = "b[cpu]", - stack_size = util.get_stack_size(200), - }, - { - type = "recipe", - name = "cpu", - category = "crafting-with-fluid", - order = "d[cpu]", - enabled = false, - energy_required = 50, - ingredients = { - silicon, spreader, {"gold-ingot", 1}, {"electronic-circuit", 10}, - {type="fluid", name="sulfuric-acid", amount=50}, - }, - results = {{"cpu", 10}}, - }, -}) -if mods["space-exploration"] then - local cpui = {} - if mods.Krastorio2 then - cpui = {{"se-holmium-cable", 2}, silicon, spreader, {"electronic-circuit", 20}, {"gold-ingot", 1}, - {type="fluid", name="sulfuric-acid", amount=50}} - else - cpui = {{"se-holmium-cable", 1}, silicon, spreader, {"electronic-circuit", 20}, {"gold-ingot", 1}, - {type="fluid", name="sulfuric-acid", amount=50}} - end - data:extend({ - { - type = "recipe", - name = "cpu-holmium", - icons = { - { icon = "__base__/graphics/technology/advanced-electronics-2.png", icon_size = 256, }, - { icon = "__space-exploration-graphics__/graphics/icons/holmium-solenoid.png", icon_size = 64, scale=.25, shift={-8, -8} }, - }, - category = "crafting-with-fluid", - order = "d[cpu]", - enabled = false, - energy_required = 50, - ingredients = cpui, - results = {{"cpu", 20}}, - }, - }) -end - -util.replace_ingredient("cpu", "electronic-circuit", "pcb", 10, false, {"force", true}) -util.replace_ingredient("cpu-holmium", "electronic-circuit", "pcb", 20, false, {"force", true}) diff --git a/prototypes/gold-ore.lua b/prototypes/gold-ore.lua deleted file mode 100644 index 1e1587b..0000000 --- a/prototypes/gold-ore.lua +++ /dev/null @@ -1,248 +0,0 @@ -local resource_autoplace = require('resource-autoplace'); -local noise = require('noise'); - -local util = require("data-util"); - -data:extend({ - { - type = "autoplace-control", - category = "resource", - name = "gold-ore", - richness = true, - order = "b-e" - }, - { - type = "noise-layer", - name = "gold-ore" - }, - { - type = "resource", - name = "gold-ore", - icon = "__bzgold__/graphics/icons/gold-ore.png", - icon_size = 128, - flags = {"placeable-neutral"}, - order="a-b-a", - map_color = {r=1.00, g=0.90, b=0.10}, - tree_removal_probability = 0.7, - tree_removal_max_distance = 32 * 32, - minable = - { - hardness = 1, - mining_particle = "gold-ore-particle", - mining_time = 1, - results = - util.se6() and - { - {type="item", name="gold-ore", amount=1, probability=.75}, - {type="item", name="stone", amount=1, probability=.25}, - } or - { - {type="item", name="gold-ore", amount=1, probability=.25}, - {type="item", name="stone", amount=1, probability=.75}, - } - }, - collision_box = {{ -0.1, -0.1}, {0.1, 0.1}}, - selection_box = {{ -0.5, -0.5}, {0.5, 0.5}}, - - autoplace = resource_autoplace.resource_autoplace_settings{ - name = "gold-ore", - order = "b-z", - base_density = 1, - base_spots_per_km2 = 1, - has_starting_area_placement = false, - regular_rq_factor_multiplier = 1, - starting_rq_factor_multiplier = 1, - }, - - stage_counts = {15000, 9500, 5500, 2900, 1300, 400, 150, 80}, - stages = - { - sheet = - { - filename = "__bzgold__/graphics/entity/ores/gold-ore.png", - priority = "extra-high", - size = 64, - frame_count = 8, - variation_count = 8, - hr_version = - { - filename = "__bzgold__/graphics/entity/ores/hr-gold-ore.png", - priority = "extra-high", - size = 128, - frame_count = 8, - variation_count = 8, - scale = 0.5 - } - } - }, - }, - { - type = "item", - name = "gold-ore", - icon_size = 128, - icon = "__bzgold__/graphics/icons/gold-ore.png", - pictures = { - {filename="__bzgold__/graphics/icons/gold-ore.png", size=128, scale=0.125}, - {filename="__bzgold__/graphics/icons/gold-ore-1.png", size=128, scale=0.125}, - {filename="__bzgold__/graphics/icons/gold-ore-2.png", size=128, scale=0.125}, - {filename="__bzgold__/graphics/icons/gold-ore-3.png", size=128, scale=0.125}, - {filename="__bzgold__/graphics/icons/gold-ore-4.png", size=128, scale=0.125}, - }, - subgroup = "raw-resource", - order = "a-a-a", - stack_size = util.get_stack_size(50) - }, -}) - -if util.se6() then - se_resources["gold-ore"] = { - order = "b-z-g", - has_starting_area_placement = false, - base_density = 1, - base_spots_per_km2 = 1, - } -end - -data:extend({ - { - type = "optimized-particle", - name = "gold-ore-particle", - flags = {"not-on-map"}, - life_time = 180, - pictures = - { - { - filename = "__bzgold__/graphics/entity/ores/particle/gold-ore-particle-1.png", - priority = "extra-high", - width = 16, - height = 16, - frame_count = 1, - hr_version = - { - filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-1.png", - priority = "extra-high", - width = 32, - height = 32, - frame_count = 1, - scale = 0.5 - } - }, - { - filename = "__bzgold__/graphics/entity/ores/particle/gold-ore-particle-2.png", - priority = "extra-high", - width = 16, - height = 16, - frame_count = 1, - hr_version = - { - filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-2.png", - priority = "extra-high", - width = 32, - height = 32, - frame_count = 1, - scale = 0.5 - } - }, - { - filename = "__bzgold__/graphics/entity/ores/particle/gold-ore-particle-3.png", - priority = "extra-high", - width = 16, - height = 16, - frame_count = 1, - hr_version = - { - filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-3.png", - priority = "extra-high", - width = 32, - height = 32, - frame_count = 1, - scale = 0.5 - } - }, - { - filename = "__bzgold__/graphics/entity/ores/particle/gold-ore-particle-4.png", - priority = "extra-high", - width = 16, - height = 16, - frame_count = 1, - hr_version = - { - filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-4.png", - priority = "extra-high", - width = 32, - height = 32, - frame_count = 1, - scale = 0.5 - } - } - }, - shadows = - { - { - filename = "__bzgold__/graphics/entity/ores/particle/gold-ore-particle-shadow-1.png", - priority = "extra-high", - width = 16, - height = 16, - frame_count = 1, - hr_version = - { - filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-1.png", - priority = "extra-high", - width = 32, - height = 32, - frame_count = 1, - scale = 0.5 - } - }, - { - filename = "__bzgold__/graphics/entity/ores/particle/gold-ore-particle-shadow-2.png", - priority = "extra-high", - width = 16, - height = 16, - frame_count = 1, - hr_version = - { - filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-2.png", - priority = "extra-high", - width = 32, - height = 32, - frame_count = 1, - scale = 0.5 - } - }, - { - filename = "__bzgold__/graphics/entity/ores/particle/gold-ore-particle-shadow-3.png", - priority = "extra-high", - width = 16, - height = 16, - frame_count = 1, - hr_version = - { - filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-3.png", - priority = "extra-high", - width = 32, - height = 32, - frame_count = 1, - scale = 0.5 - } - }, - { - filename = "__bzgold__/graphics/entity/ores/particle/gold-ore-particle-shadow-4.png", - priority = "extra-high", - width = 16, - height = 16, - frame_count = 1, - hr_version = - { - filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-4.png", - priority = "extra-high", - width = 32, - height = 32, - frame_count = 1, - scale = 0.5 - } - } - } - } -}) - diff --git a/gold.png b/sources/gold.png similarity index 100% rename from gold.png rename to sources/gold.png diff --git a/gold.xcf b/sources/gold.xcf similarity index 100% rename from gold.xcf rename to sources/gold.xcf diff --git a/graphics/entity/ores/hr-gold-ore.xcf b/sources/graphics/entity/ores/hr-gold-ore.xcf similarity index 100% rename from graphics/entity/ores/hr-gold-ore.xcf rename to sources/graphics/entity/ores/hr-gold-ore.xcf diff --git a/graphics/entity/ores/hr-rich-copper-ore.xcf b/sources/graphics/entity/ores/hr-rich-copper-ore.xcf similarity index 100% rename from graphics/entity/ores/hr-rich-copper-ore.xcf rename to sources/graphics/entity/ores/hr-rich-copper-ore.xcf diff --git a/graphics/icons/enriched-gold.xcf b/sources/graphics/icons/enriched-gold.xcf similarity index 100% rename from graphics/icons/enriched-gold.xcf rename to sources/graphics/icons/enriched-gold.xcf diff --git a/graphics/icons/enriched-silver.xcf b/sources/graphics/icons/enriched-silver.xcf similarity index 100% rename from graphics/icons/enriched-silver.xcf rename to sources/graphics/icons/enriched-silver.xcf diff --git a/graphics/icons/gold-ore-1.xcf b/sources/graphics/icons/gold-ore-1.xcf similarity index 100% rename from graphics/icons/gold-ore-1.xcf rename to sources/graphics/icons/gold-ore-1.xcf diff --git a/graphics/icons/gold-ore-2.xcf b/sources/graphics/icons/gold-ore-2.xcf similarity index 100% rename from graphics/icons/gold-ore-2.xcf rename to sources/graphics/icons/gold-ore-2.xcf diff --git a/graphics/icons/gold-ore-3.xcf b/sources/graphics/icons/gold-ore-3.xcf similarity index 100% rename from graphics/icons/gold-ore-3.xcf rename to sources/graphics/icons/gold-ore-3.xcf diff --git a/graphics/icons/gold-ore-4.xcf b/sources/graphics/icons/gold-ore-4.xcf similarity index 100% rename from graphics/icons/gold-ore-4.xcf rename to sources/graphics/icons/gold-ore-4.xcf diff --git a/graphics/icons/gold-ore.xcf b/sources/graphics/icons/gold-ore.xcf similarity index 100% rename from graphics/icons/gold-ore.xcf rename to sources/graphics/icons/gold-ore.xcf diff --git a/graphics/icons/molten-gold.xcf b/sources/graphics/icons/molten-gold.xcf similarity index 100% rename from graphics/icons/molten-gold.xcf rename to sources/graphics/icons/molten-gold.xcf diff --git a/graphics/icons/molten-silver.xcf b/sources/graphics/icons/molten-silver.xcf similarity index 100% rename from graphics/icons/molten-silver.xcf rename to sources/graphics/icons/molten-silver.xcf diff --git a/graphics/icons/palladium-ingot.xcf b/sources/graphics/icons/palladium-ingot.xcf similarity index 100% rename from graphics/icons/palladium-ingot.xcf rename to sources/graphics/icons/palladium-ingot.xcf diff --git a/graphics/icons/palladium-powder.xcf b/sources/graphics/icons/palladium-powder.xcf similarity index 100% rename from graphics/icons/palladium-powder.xcf rename to sources/graphics/icons/palladium-powder.xcf diff --git a/graphics/icons/platinum-ingot.xcf b/sources/graphics/icons/platinum-ingot.xcf similarity index 100% rename from graphics/icons/platinum-ingot.xcf rename to sources/graphics/icons/platinum-ingot.xcf diff --git a/graphics/icons/platinum-powder.xcf b/sources/graphics/icons/platinum-powder.xcf similarity index 100% rename from graphics/icons/platinum-powder.xcf rename to sources/graphics/icons/platinum-powder.xcf diff --git a/graphics/icons/rich-copper-ore-1.xcf b/sources/graphics/icons/rich-copper-ore-1.xcf similarity index 100% rename from graphics/icons/rich-copper-ore-1.xcf rename to sources/graphics/icons/rich-copper-ore-1.xcf diff --git a/graphics/icons/rich-copper-ore-2.xcf b/sources/graphics/icons/rich-copper-ore-2.xcf similarity index 100% rename from graphics/icons/rich-copper-ore-2.xcf rename to sources/graphics/icons/rich-copper-ore-2.xcf diff --git a/graphics/icons/rich-copper-ore-3.xcf b/sources/graphics/icons/rich-copper-ore-3.xcf similarity index 100% rename from graphics/icons/rich-copper-ore-3.xcf rename to sources/graphics/icons/rich-copper-ore-3.xcf diff --git a/graphics/icons/rich-copper-ore.xcf b/sources/graphics/icons/rich-copper-ore.xcf similarity index 100% rename from graphics/icons/rich-copper-ore.xcf rename to sources/graphics/icons/rich-copper-ore.xcf diff --git a/graphics/icons/silver-ingot.xcf b/sources/graphics/icons/silver-ingot.xcf similarity index 100% rename from graphics/icons/silver-ingot.xcf rename to sources/graphics/icons/silver-ingot.xcf diff --git a/graphics/icons/silver-ore-1.xcf b/sources/graphics/icons/silver-ore-1.xcf similarity index 100% rename from graphics/icons/silver-ore-1.xcf rename to sources/graphics/icons/silver-ore-1.xcf diff --git a/graphics/icons/silver-ore-2.xcf b/sources/graphics/icons/silver-ore-2.xcf similarity index 100% rename from graphics/icons/silver-ore-2.xcf rename to sources/graphics/icons/silver-ore-2.xcf diff --git a/graphics/icons/silver-ore-3.xcf b/sources/graphics/icons/silver-ore-3.xcf similarity index 100% rename from graphics/icons/silver-ore-3.xcf rename to sources/graphics/icons/silver-ore-3.xcf diff --git a/graphics/icons/silver-ore-4.xcf b/sources/graphics/icons/silver-ore-4.xcf similarity index 100% rename from graphics/icons/silver-ore-4.xcf rename to sources/graphics/icons/silver-ore-4.xcf diff --git a/graphics/icons/silver-ore.xcf b/sources/graphics/icons/silver-ore.xcf similarity index 100% rename from graphics/icons/silver-ore.xcf rename to sources/graphics/icons/silver-ore.xcf diff --git a/graphics/icons/silver-wire.xcf b/sources/graphics/icons/silver-wire.xcf similarity index 100% rename from graphics/icons/silver-wire.xcf rename to sources/graphics/icons/silver-wire.xcf diff --git a/palladium.png b/sources/palladium.png similarity index 100% rename from palladium.png rename to sources/palladium.png diff --git a/palladium.xcf b/sources/palladium.xcf similarity index 100% rename from palladium.xcf rename to sources/palladium.xcf diff --git a/platinum.png b/sources/platinum.png similarity index 100% rename from platinum.png rename to sources/platinum.png diff --git a/platinum.xcf b/sources/platinum.xcf similarity index 100% rename from platinum.xcf rename to sources/platinum.xcf diff --git a/silver.png b/sources/silver.png similarity index 100% rename from silver.png rename to sources/silver.png diff --git a/silver.xcf b/sources/silver.xcf similarity index 100% rename from silver.xcf rename to sources/silver.xcf diff --git a/thumbnail.xcf b/sources/thumbnail.xcf similarity index 100% rename from thumbnail.xcf rename to sources/thumbnail.xcf