diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index bbf3e21..0000000 --- a/.editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[*] -indent_style = space -indent_size = 2 \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 85e49ae..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.idea -*.zip \ No newline at end of file diff --git a/bzgold2/LICENSE.md b/LICENSE.md similarity index 100% rename from bzgold2/LICENSE.md rename to LICENSE.md diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..11be59f --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +# 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 3c2ada3..5eda265 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,21 @@ # 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. -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. +## Version History +See changelog.txt -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. +## Created by +- [brevven](https://mods.factorio.com/user/brevven) (code, design, graphics) -## Credits -- Brevven ([Original mod](https://mods.factorio.com/mod/bzgold)) -- [cackling fiend](https://mods.factorio.com/user/cackling.fiend) (Update to 2.0) +## Thanks to - [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/bzgold2/changelog.txt b/bzgold2/changelog.txt deleted file mode 100644 index db6a1b0..0000000 --- a/bzgold2/changelog.txt +++ /dev/null @@ -1,5 +0,0 @@ ---------------------------------------------------------------------------------------------------- -Version: 2.0.0 -Date: 19.10.2025 - Changes: - - Update to Factorio 2.0 \ No newline at end of file diff --git a/bzgold2/compatibility/bobelectronics.lua b/bzgold2/compatibility/bobelectronics.lua deleted file mode 100644 index a8f46f1..0000000 --- a/bzgold2/compatibility/bobelectronics.lua +++ /dev/null @@ -1,16 +0,0 @@ -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/bzgold2/info.json b/bzgold2/info.json deleted file mode 100644 index 99afae3..0000000 --- a/bzgold2/info.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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/bzgold2/migrations/bzgold.0.0.15.json b/bzgold2/migrations/bzgold.0.0.15.json deleted file mode 100644 index 882479a..0000000 --- a/bzgold2/migrations/bzgold.0.0.15.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "item": - [ - ["processing-electronics", "cpu"] - ] -} diff --git a/bzgold2/modules.lua b/bzgold2/modules.lua deleted file mode 100644 index 8c39798..0000000 --- a/bzgold2/modules.lua +++ /dev/null @@ -1,9 +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 - data.raw.recipe[recipe].allow_productivity = true - end -end diff --git a/bzgold2/prototypes/cpu.lua b/bzgold2/prototypes/cpu.lua deleted file mode 100644 index 933764c..0000000 --- a/bzgold2/prototypes/cpu.lua +++ /dev/null @@ -1,65 +0,0 @@ -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/bzgold2/prototypes/gold-ore.lua b/bzgold2/prototypes/gold-ore.lua deleted file mode 100644 index a6af78a..0000000 --- a/bzgold2/prototypes/gold-ore.lua +++ /dev/null @@ -1,180 +0,0 @@ -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/bzgold2/cables.lua b/cables.lua similarity index 100% rename from bzgold2/cables.lua rename to cables.lua diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..273e194 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,123 @@ +--------------------------------------------------------------------------------------------------- +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/bzgold2/compatibility/248k-final.lua b/compatibility/248k-final.lua similarity index 95% rename from bzgold2/compatibility/248k-final.lua rename to compatibility/248k-final.lua index d45be4c..e83b478 100644 --- a/bzgold2/compatibility/248k-final.lua +++ b/compatibility/248k-final.lua @@ -1,6 +1,6 @@ local util = require("data-util"); -if mods["248k-Redux"] then +if mods["248k"] then local au2 = "fu_materials_gold_ingot" -- Swap out all 248k gold ingot for BZ gold ingot diff --git a/bzgold2/compatibility/248k.lua b/compatibility/248k.lua similarity index 100% rename from bzgold2/compatibility/248k.lua rename to compatibility/248k.lua diff --git a/bzgold2/compatibility/crafting-efficiency.lua b/compatibility/crafting-efficiency.lua similarity index 100% rename from bzgold2/compatibility/crafting-efficiency.lua rename to compatibility/crafting-efficiency.lua diff --git a/bzgold2/compatibility/modmashsplintergold.lua b/compatibility/modmashsplintergold.lua similarity index 100% rename from bzgold2/compatibility/modmashsplintergold.lua rename to compatibility/modmashsplintergold.lua diff --git a/bzgold2/control-util.lua b/control-util.lua similarity index 100% rename from bzgold2/control-util.lua rename to control-util.lua diff --git a/bzgold2/data-final-fixes.lua b/data-final-fixes.lua similarity index 100% rename from bzgold2/data-final-fixes.lua rename to data-final-fixes.lua diff --git a/bzgold2/data-updates.lua b/data-updates.lua similarity index 91% rename from bzgold2/data-updates.lua rename to data-updates.lua index 55f1f8e..ddd4b0e 100644 --- a/bzgold2/data-updates.lua +++ b/data-updates.lua @@ -1,6 +1,5 @@ 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/bzgold2/data-util.lua b/data-util.lua similarity index 80% rename from bzgold2/data-util.lua rename to data-util.lua index 3825ac6..6f24821 100644 --- a/bzgold2/data-util.lua +++ b/data-util.lua @@ -44,7 +44,7 @@ if get_setting("bz-recipe-bypass") then end function util.is_foundry() - return mods.bzfoundry2 and not me.get_setting("bzfoundry-minimal") + return mods.bzfoundry and not me.get_setting("bzfoundry-minimal") end function should_force(options) @@ -64,7 +64,17 @@ function util.fe_plus(sub) end end -function util.k2assets() +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() if mods["Krastorio2Assets"] then return "__Krastorio2Assets__" end @@ -101,8 +111,8 @@ function util.se_landfill(params) category = "hard-recycling", order = "z-b-"..params.ore, subgroup = "terrain", - results = {{type="item", name="landfill", amount=1}}, - ingredients = {{type="item", name=params.ore, amount=50}}, + result = "landfill", + ingredients = {{params.ore, 50}}, } }) util.add_unlock("se-recycling-facility", lname) @@ -113,7 +123,7 @@ end -- k2 matter -- params: {k2matter}, k2baseicon , {icon} function util.k2matter(params) - local matter = require("__Krastorio2__/prototypes/libraries/matter") + local matter = require("__Krastorio2__/lib/public/data-stages/matter-util") if mods["space-exploration"] then params.k2matter.need_stabilizer = true end @@ -159,7 +169,7 @@ function util.k2matter(params) { {"production-science-pack", 1}, {"utility-science-pack", 1}, - {"kr-matter-tech-card", 1} + {"matter-tech-card", 1} }, time = 45, }, @@ -167,7 +177,7 @@ function util.k2matter(params) }, }) end - matter.make_recipes(params.k2matter) + matter.createMatterRecipe(params.k2matter) end @@ -201,16 +211,16 @@ function util.se_matter(params) energy_required = params.energy_required, enabled = false, ingredients = { - {type="item", name=sedata, amount=1}, + {sedata, 1}, {type="fluid", name="se-particle-stream", amount=50}, {type="fluid", name="se-space-coolant-supercooled", amount=25}, }, results = { - {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}, + {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}, } } }) @@ -240,14 +250,14 @@ function util.se_matter(params) energy_required = 30, enabled = false, ingredients = { - {type="item", name="se-kr-matter-liberation-data", amount=1}, - {type="item", name=params.ore, amount=params.quant_in}, + {"se-kr-matter-liberation-data", 1}, + {params.ore, 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, ignored_by_productivity=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, catalyst_amount=50}, } } }) @@ -274,7 +284,7 @@ function util.se_matter(params) {"se-astronomic-science-pack-4", 1}, {"se-energy-science-pack-4", 1}, {"se-material-science-pack-4", 1}, - {"kr-matter-tech-card", 1}, + {"matter-tech-card", 1}, {"se-deep-space-science-pack-1", 1}, } @@ -288,6 +298,18 @@ 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] @@ -354,7 +376,7 @@ function util.add_unlock(technology_name, recipe) end -- Check if a tech unlocks a recipe -function util.check_unlock(technology_name, recipe) +function util.check_unlock(technology_name, recipe_name) local technology = data.raw.technology[technology_name] if technology and technology.effects then for i, effect in pairs(technology.effects) do @@ -399,13 +421,17 @@ end function util.set_enabled(recipe_name, enabled) if data.raw.recipe[recipe_name] then - data.raw.recipe[recipe_name].enabled = enabled + 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 end end function util.set_hidden(recipe_name) if data.raw.recipe[recipe_name] then - data.raw.recipe[recipe_name].hidden = true + 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 end end @@ -415,6 +441,8 @@ 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 @@ -437,6 +465,8 @@ 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 @@ -450,7 +480,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, {type="item", name=ingredient, amount=quantity}) + table.insert(recipe.ingredients, {ingredient, quantity}) end end end @@ -461,6 +491,8 @@ 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 @@ -484,6 +516,8 @@ 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 @@ -507,18 +541,29 @@ 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.name] or data.raw.fluid[product.name]) then + 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 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 recipe.results == nil then - recipe.results = {} + 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) end - table.insert(recipe.results, product) + end end end @@ -526,13 +571,18 @@ end function util.get_ingredient_amount(recipe_name, ingredient_name) local recipe = data.raw.recipe[recipe_name] if recipe then - if recipe.ingredients 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 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 1 + return 0 end return 0 end @@ -542,7 +592,14 @@ 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.results 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 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 @@ -560,7 +617,9 @@ 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.results then + if recipe.normal and recipe.normal.results then + return #(recipe.normal.results) + elseif recipe.results then return #(recipe.results) end return 1 @@ -575,6 +634,8 @@ 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 @@ -616,6 +677,8 @@ 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 @@ -641,23 +704,28 @@ 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, is_fluid) +function replace_some_product(recipe, old, old_amount, new, new_amount) 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.name == new then + if existing[1] == new or existing.name == new then return end end end - add_product(recipe, {type=is_fluid and "fluid" or "item", name=new, amount=new_amount}) + add_product(recipe, {new, 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 @@ -670,6 +738,8 @@ 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 @@ -698,6 +768,8 @@ 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 @@ -736,6 +808,8 @@ 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 @@ -743,6 +817,8 @@ 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 @@ -757,8 +833,8 @@ function multiply_recipe(recipe, multiple) result.amount_min = result.amount_min * multiple result.amount_max = result.amount_max * multiple end - if result.ignored_by_productivity then - result.ignored_by_productivity = result.ignored_by_productivity * multiple + if result.catalyst_amount then + result.catalyst_amount = result.catalyst_amount * multiple end end if result[1] then @@ -785,8 +861,9 @@ 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) + 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)) end function has_ingredient(recipe, ingredient) @@ -806,6 +883,8 @@ 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 @@ -828,6 +907,8 @@ 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 @@ -841,11 +922,13 @@ 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) + 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) end end -function replace_product(recipe, old, new) +function replace_product(recipe, old, new, options) if recipe then if recipe.main_product == old then recipe.main_product = new @@ -885,6 +968,8 @@ 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 @@ -902,6 +987,8 @@ 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 @@ -919,6 +1006,8 @@ 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 @@ -942,7 +1031,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] then + if data.raw.recipe[recipe_name] and data.raw["item-subgroup"][subgroup] then me.add_modified(recipe_name) data.raw.recipe[recipe_name].subgroup = subgroup end @@ -961,16 +1050,34 @@ 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 - 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 + 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 end table.insert(data.raw.recipe[recipe_name].icons, icon) end @@ -1030,6 +1137,8 @@ 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 @@ -1052,6 +1161,8 @@ 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 @@ -1174,8 +1285,10 @@ function remove_prior_unlocks(tech, recipe) util.remove_recipe_effect(tech, recipe) if technology.prerequisites then for i, prerequisite in pairs(technology.prerequisites) do - -- log("BZZZ removing prior unlocks for " .. tech ..", checking " .. prerequisite) -- Handy Debug :| - remove_prior_unlocks(prerequisite, recipe) + 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 end end end @@ -1217,7 +1330,9 @@ 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 :| - replace_ingredients_prior_to(prerequisite, old, new, multiplier) + if string.sub(prerequisite, 1, 3) ~= 'ei_' then + replace_ingredients_prior_to(prerequisite, old, new, multiplier) + end end end end diff --git a/bzgold2/data.lua b/data.lua similarity index 100% rename from bzgold2/data.lua rename to data.lua diff --git a/description.md b/description.md new file mode 100644 index 0000000..3486514 --- /dev/null +++ b/description.md @@ -0,0 +1,45 @@ +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/sources/gold.png b/gold.png similarity index 100% rename from sources/gold.png rename to gold.png diff --git a/sources/gold.xcf b/gold.xcf similarity index 100% rename from sources/gold.xcf rename to gold.xcf diff --git a/graphics/entity/ores/gold-ore.png b/graphics/entity/ores/gold-ore.png new file mode 100644 index 0000000..cf28f0e Binary files /dev/null and b/graphics/entity/ores/gold-ore.png differ diff --git a/bzgold2/graphics/entity/ores/hr-gold-ore.png b/graphics/entity/ores/hr-gold-ore.png similarity index 100% rename from bzgold2/graphics/entity/ores/hr-gold-ore.png rename to graphics/entity/ores/hr-gold-ore.png diff --git a/sources/graphics/entity/ores/hr-gold-ore.xcf b/graphics/entity/ores/hr-gold-ore.xcf similarity index 100% rename from sources/graphics/entity/ores/hr-gold-ore.xcf rename to graphics/entity/ores/hr-gold-ore.xcf diff --git a/bzgold2/graphics/entity/ores/hr-rich-copper-ore.png b/graphics/entity/ores/hr-rich-copper-ore.png similarity index 100% rename from bzgold2/graphics/entity/ores/hr-rich-copper-ore.png rename to graphics/entity/ores/hr-rich-copper-ore.png diff --git a/sources/graphics/entity/ores/hr-rich-copper-ore.xcf b/graphics/entity/ores/hr-rich-copper-ore.xcf similarity index 100% rename from sources/graphics/entity/ores/hr-rich-copper-ore.xcf rename to graphics/entity/ores/hr-rich-copper-ore.xcf diff --git a/graphics/entity/ores/particle/gold-ore-particle-1.png b/graphics/entity/ores/particle/gold-ore-particle-1.png new file mode 100644 index 0000000..c6817dc Binary files /dev/null and b/graphics/entity/ores/particle/gold-ore-particle-1.png differ diff --git a/graphics/entity/ores/particle/gold-ore-particle-2.png b/graphics/entity/ores/particle/gold-ore-particle-2.png new file mode 100644 index 0000000..403a5d8 Binary files /dev/null and b/graphics/entity/ores/particle/gold-ore-particle-2.png differ diff --git a/graphics/entity/ores/particle/gold-ore-particle-3.png b/graphics/entity/ores/particle/gold-ore-particle-3.png new file mode 100644 index 0000000..b2bc37b Binary files /dev/null and b/graphics/entity/ores/particle/gold-ore-particle-3.png differ diff --git a/graphics/entity/ores/particle/gold-ore-particle-4.png b/graphics/entity/ores/particle/gold-ore-particle-4.png new file mode 100644 index 0000000..9e312f6 Binary files /dev/null and b/graphics/entity/ores/particle/gold-ore-particle-4.png 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 new file mode 100644 index 0000000..1a5bdea Binary files /dev/null and b/graphics/entity/ores/particle/gold-ore-particle-shadow-1.png 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 new file mode 100644 index 0000000..963104d Binary files /dev/null and b/graphics/entity/ores/particle/gold-ore-particle-shadow-2.png 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 new file mode 100644 index 0000000..e44c241 Binary files /dev/null and b/graphics/entity/ores/particle/gold-ore-particle-shadow-3.png 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 new file mode 100644 index 0000000..a5f8e6e Binary files /dev/null and b/graphics/entity/ores/particle/gold-ore-particle-shadow-4.png differ diff --git a/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-1.png b/graphics/entity/ores/particle/hr-gold-ore-particle-1.png similarity index 100% rename from bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-1.png rename to graphics/entity/ores/particle/hr-gold-ore-particle-1.png diff --git a/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-2.png b/graphics/entity/ores/particle/hr-gold-ore-particle-2.png similarity index 100% rename from bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-2.png rename to graphics/entity/ores/particle/hr-gold-ore-particle-2.png diff --git a/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-3.png b/graphics/entity/ores/particle/hr-gold-ore-particle-3.png similarity index 100% rename from bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-3.png rename to graphics/entity/ores/particle/hr-gold-ore-particle-3.png diff --git a/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-4.png b/graphics/entity/ores/particle/hr-gold-ore-particle-4.png similarity index 100% rename from bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-4.png rename to graphics/entity/ores/particle/hr-gold-ore-particle-4.png diff --git a/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-1.png b/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-1.png similarity index 100% rename from bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-1.png rename to graphics/entity/ores/particle/hr-gold-ore-particle-shadow-1.png diff --git a/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-2.png b/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-2.png similarity index 100% rename from bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-2.png rename to graphics/entity/ores/particle/hr-gold-ore-particle-shadow-2.png diff --git a/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-3.png b/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-3.png similarity index 100% rename from bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-3.png rename to graphics/entity/ores/particle/hr-gold-ore-particle-shadow-3.png diff --git a/bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-4.png b/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-4.png similarity index 100% rename from bzgold2/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-4.png rename to graphics/entity/ores/particle/hr-gold-ore-particle-shadow-4.png diff --git a/graphics/entity/ores/rich-copper-ore.png b/graphics/entity/ores/rich-copper-ore.png new file mode 100644 index 0000000..ef1887f Binary files /dev/null and b/graphics/entity/ores/rich-copper-ore.png differ diff --git a/bzgold2/graphics/icons/enriched-gold.png b/graphics/icons/enriched-gold.png similarity index 100% rename from bzgold2/graphics/icons/enriched-gold.png rename to graphics/icons/enriched-gold.png diff --git a/sources/graphics/icons/enriched-gold.xcf b/graphics/icons/enriched-gold.xcf similarity index 100% rename from sources/graphics/icons/enriched-gold.xcf rename to graphics/icons/enriched-gold.xcf diff --git a/bzgold2/graphics/icons/enriched-silver.png b/graphics/icons/enriched-silver.png similarity index 100% rename from bzgold2/graphics/icons/enriched-silver.png rename to graphics/icons/enriched-silver.png diff --git a/sources/graphics/icons/enriched-silver.xcf b/graphics/icons/enriched-silver.xcf similarity index 100% rename from sources/graphics/icons/enriched-silver.xcf rename to graphics/icons/enriched-silver.xcf diff --git a/bzgold2/graphics/icons/gold-ingot.png b/graphics/icons/gold-ingot.png similarity index 100% rename from bzgold2/graphics/icons/gold-ingot.png rename to graphics/icons/gold-ingot.png diff --git a/bzgold2/graphics/icons/gold-ore-1.png b/graphics/icons/gold-ore-1.png similarity index 100% rename from bzgold2/graphics/icons/gold-ore-1.png rename to graphics/icons/gold-ore-1.png diff --git a/sources/graphics/icons/gold-ore-1.xcf b/graphics/icons/gold-ore-1.xcf similarity index 100% rename from sources/graphics/icons/gold-ore-1.xcf rename to graphics/icons/gold-ore-1.xcf diff --git a/bzgold2/graphics/icons/gold-ore-2.png b/graphics/icons/gold-ore-2.png similarity index 100% rename from bzgold2/graphics/icons/gold-ore-2.png rename to graphics/icons/gold-ore-2.png diff --git a/sources/graphics/icons/gold-ore-2.xcf b/graphics/icons/gold-ore-2.xcf similarity index 100% rename from sources/graphics/icons/gold-ore-2.xcf rename to graphics/icons/gold-ore-2.xcf diff --git a/bzgold2/graphics/icons/gold-ore-3.png b/graphics/icons/gold-ore-3.png similarity index 100% rename from bzgold2/graphics/icons/gold-ore-3.png rename to graphics/icons/gold-ore-3.png diff --git a/sources/graphics/icons/gold-ore-3.xcf b/graphics/icons/gold-ore-3.xcf similarity index 100% rename from sources/graphics/icons/gold-ore-3.xcf rename to graphics/icons/gold-ore-3.xcf diff --git a/bzgold2/graphics/icons/gold-ore-4.png b/graphics/icons/gold-ore-4.png similarity index 100% rename from bzgold2/graphics/icons/gold-ore-4.png rename to graphics/icons/gold-ore-4.png diff --git a/sources/graphics/icons/gold-ore-4.xcf b/graphics/icons/gold-ore-4.xcf similarity index 100% rename from sources/graphics/icons/gold-ore-4.xcf rename to graphics/icons/gold-ore-4.xcf diff --git a/bzgold2/graphics/icons/gold-ore.png b/graphics/icons/gold-ore.png similarity index 100% rename from bzgold2/graphics/icons/gold-ore.png rename to graphics/icons/gold-ore.png diff --git a/sources/graphics/icons/gold-ore.xcf b/graphics/icons/gold-ore.xcf similarity index 100% rename from sources/graphics/icons/gold-ore.xcf rename to graphics/icons/gold-ore.xcf diff --git a/bzgold2/graphics/icons/mainboard.png b/graphics/icons/mainboard.png similarity index 100% rename from bzgold2/graphics/icons/mainboard.png rename to graphics/icons/mainboard.png diff --git a/bzgold2/graphics/icons/mlcc-1.png b/graphics/icons/mlcc-1.png similarity index 100% rename from bzgold2/graphics/icons/mlcc-1.png rename to graphics/icons/mlcc-1.png diff --git a/bzgold2/graphics/icons/mlcc-2.png b/graphics/icons/mlcc-2.png similarity index 100% rename from bzgold2/graphics/icons/mlcc-2.png rename to graphics/icons/mlcc-2.png diff --git a/bzgold2/graphics/icons/mlcc-3.png b/graphics/icons/mlcc-3.png similarity index 100% rename from bzgold2/graphics/icons/mlcc-3.png rename to graphics/icons/mlcc-3.png diff --git a/bzgold2/graphics/icons/mlcc-4.png b/graphics/icons/mlcc-4.png similarity index 100% rename from bzgold2/graphics/icons/mlcc-4.png rename to graphics/icons/mlcc-4.png diff --git a/bzgold2/graphics/icons/mlcc.png b/graphics/icons/mlcc.png similarity index 100% rename from bzgold2/graphics/icons/mlcc.png rename to graphics/icons/mlcc.png diff --git a/bzgold2/graphics/icons/molten-gold.png b/graphics/icons/molten-gold.png similarity index 100% rename from bzgold2/graphics/icons/molten-gold.png rename to graphics/icons/molten-gold.png diff --git a/sources/graphics/icons/molten-gold.xcf b/graphics/icons/molten-gold.xcf similarity index 100% rename from sources/graphics/icons/molten-gold.xcf rename to graphics/icons/molten-gold.xcf diff --git a/bzgold2/graphics/icons/molten-silver.png b/graphics/icons/molten-silver.png similarity index 100% rename from bzgold2/graphics/icons/molten-silver.png rename to graphics/icons/molten-silver.png diff --git a/sources/graphics/icons/molten-silver.xcf b/graphics/icons/molten-silver.xcf similarity index 100% rename from sources/graphics/icons/molten-silver.xcf rename to graphics/icons/molten-silver.xcf diff --git a/bzgold2/graphics/icons/palladium-ingot.png b/graphics/icons/palladium-ingot.png similarity index 100% rename from bzgold2/graphics/icons/palladium-ingot.png rename to graphics/icons/palladium-ingot.png diff --git a/sources/graphics/icons/palladium-ingot.xcf b/graphics/icons/palladium-ingot.xcf similarity index 100% rename from sources/graphics/icons/palladium-ingot.xcf rename to graphics/icons/palladium-ingot.xcf diff --git a/bzgold2/graphics/icons/palladium-powder.png b/graphics/icons/palladium-powder.png similarity index 100% rename from bzgold2/graphics/icons/palladium-powder.png rename to graphics/icons/palladium-powder.png diff --git a/sources/graphics/icons/palladium-powder.xcf b/graphics/icons/palladium-powder.xcf similarity index 100% rename from sources/graphics/icons/palladium-powder.xcf rename to graphics/icons/palladium-powder.xcf diff --git a/bzgold2/graphics/icons/platinum-ingot.png b/graphics/icons/platinum-ingot.png similarity index 100% rename from bzgold2/graphics/icons/platinum-ingot.png rename to graphics/icons/platinum-ingot.png diff --git a/sources/graphics/icons/platinum-ingot.xcf b/graphics/icons/platinum-ingot.xcf similarity index 100% rename from sources/graphics/icons/platinum-ingot.xcf rename to graphics/icons/platinum-ingot.xcf diff --git a/bzgold2/graphics/icons/platinum-powder.png b/graphics/icons/platinum-powder.png similarity index 100% rename from bzgold2/graphics/icons/platinum-powder.png rename to graphics/icons/platinum-powder.png diff --git a/sources/graphics/icons/platinum-powder.xcf b/graphics/icons/platinum-powder.xcf similarity index 100% rename from sources/graphics/icons/platinum-powder.xcf rename to graphics/icons/platinum-powder.xcf diff --git a/bzgold2/graphics/icons/ptpd-catalyst-1.png b/graphics/icons/ptpd-catalyst-1.png similarity index 100% rename from bzgold2/graphics/icons/ptpd-catalyst-1.png rename to graphics/icons/ptpd-catalyst-1.png diff --git a/bzgold2/graphics/icons/ptpd-catalyst-2.png b/graphics/icons/ptpd-catalyst-2.png similarity index 100% rename from bzgold2/graphics/icons/ptpd-catalyst-2.png rename to graphics/icons/ptpd-catalyst-2.png diff --git a/bzgold2/graphics/icons/ptpd-catalyst-3.png b/graphics/icons/ptpd-catalyst-3.png similarity index 100% rename from bzgold2/graphics/icons/ptpd-catalyst-3.png rename to graphics/icons/ptpd-catalyst-3.png diff --git a/bzgold2/graphics/icons/ptpd-catalyst.png b/graphics/icons/ptpd-catalyst.png similarity index 100% rename from bzgold2/graphics/icons/ptpd-catalyst.png rename to graphics/icons/ptpd-catalyst.png diff --git a/bzgold2/graphics/icons/rich-copper-ore-1.png b/graphics/icons/rich-copper-ore-1.png similarity index 100% rename from bzgold2/graphics/icons/rich-copper-ore-1.png rename to graphics/icons/rich-copper-ore-1.png diff --git a/sources/graphics/icons/rich-copper-ore-1.xcf b/graphics/icons/rich-copper-ore-1.xcf similarity index 100% rename from sources/graphics/icons/rich-copper-ore-1.xcf rename to graphics/icons/rich-copper-ore-1.xcf diff --git a/bzgold2/graphics/icons/rich-copper-ore-2.png b/graphics/icons/rich-copper-ore-2.png similarity index 100% rename from bzgold2/graphics/icons/rich-copper-ore-2.png rename to graphics/icons/rich-copper-ore-2.png diff --git a/sources/graphics/icons/rich-copper-ore-2.xcf b/graphics/icons/rich-copper-ore-2.xcf similarity index 100% rename from sources/graphics/icons/rich-copper-ore-2.xcf rename to graphics/icons/rich-copper-ore-2.xcf diff --git a/bzgold2/graphics/icons/rich-copper-ore-3.png b/graphics/icons/rich-copper-ore-3.png similarity index 100% rename from bzgold2/graphics/icons/rich-copper-ore-3.png rename to graphics/icons/rich-copper-ore-3.png diff --git a/sources/graphics/icons/rich-copper-ore-3.xcf b/graphics/icons/rich-copper-ore-3.xcf similarity index 100% rename from sources/graphics/icons/rich-copper-ore-3.xcf rename to graphics/icons/rich-copper-ore-3.xcf diff --git a/bzgold2/graphics/icons/rich-copper-ore.png b/graphics/icons/rich-copper-ore.png similarity index 100% rename from bzgold2/graphics/icons/rich-copper-ore.png rename to graphics/icons/rich-copper-ore.png diff --git a/sources/graphics/icons/rich-copper-ore.xcf b/graphics/icons/rich-copper-ore.xcf similarity index 100% rename from sources/graphics/icons/rich-copper-ore.xcf rename to graphics/icons/rich-copper-ore.xcf diff --git a/bzgold2/graphics/icons/silver-brazing-alloy.png b/graphics/icons/silver-brazing-alloy.png similarity index 100% rename from bzgold2/graphics/icons/silver-brazing-alloy.png rename to graphics/icons/silver-brazing-alloy.png diff --git a/bzgold2/graphics/icons/silver-ingot.png b/graphics/icons/silver-ingot.png similarity index 100% rename from bzgold2/graphics/icons/silver-ingot.png rename to graphics/icons/silver-ingot.png diff --git a/sources/graphics/icons/silver-ingot.xcf b/graphics/icons/silver-ingot.xcf similarity index 100% rename from sources/graphics/icons/silver-ingot.xcf rename to graphics/icons/silver-ingot.xcf diff --git a/bzgold2/graphics/icons/silver-ore-1.png b/graphics/icons/silver-ore-1.png similarity index 100% rename from bzgold2/graphics/icons/silver-ore-1.png rename to graphics/icons/silver-ore-1.png diff --git a/sources/graphics/icons/silver-ore-1.xcf b/graphics/icons/silver-ore-1.xcf similarity index 100% rename from sources/graphics/icons/silver-ore-1.xcf rename to graphics/icons/silver-ore-1.xcf diff --git a/bzgold2/graphics/icons/silver-ore-2.png b/graphics/icons/silver-ore-2.png similarity index 100% rename from bzgold2/graphics/icons/silver-ore-2.png rename to graphics/icons/silver-ore-2.png diff --git a/sources/graphics/icons/silver-ore-2.xcf b/graphics/icons/silver-ore-2.xcf similarity index 100% rename from sources/graphics/icons/silver-ore-2.xcf rename to graphics/icons/silver-ore-2.xcf diff --git a/bzgold2/graphics/icons/silver-ore-3.png b/graphics/icons/silver-ore-3.png similarity index 100% rename from bzgold2/graphics/icons/silver-ore-3.png rename to graphics/icons/silver-ore-3.png diff --git a/sources/graphics/icons/silver-ore-3.xcf b/graphics/icons/silver-ore-3.xcf similarity index 100% rename from sources/graphics/icons/silver-ore-3.xcf rename to graphics/icons/silver-ore-3.xcf diff --git a/bzgold2/graphics/icons/silver-ore-4.png b/graphics/icons/silver-ore-4.png similarity index 100% rename from bzgold2/graphics/icons/silver-ore-4.png rename to graphics/icons/silver-ore-4.png diff --git a/sources/graphics/icons/silver-ore-4.xcf b/graphics/icons/silver-ore-4.xcf similarity index 100% rename from sources/graphics/icons/silver-ore-4.xcf rename to graphics/icons/silver-ore-4.xcf diff --git a/bzgold2/graphics/icons/silver-ore.png b/graphics/icons/silver-ore.png similarity index 100% rename from bzgold2/graphics/icons/silver-ore.png rename to graphics/icons/silver-ore.png diff --git a/sources/graphics/icons/silver-ore.xcf b/graphics/icons/silver-ore.xcf similarity index 100% rename from sources/graphics/icons/silver-ore.xcf rename to graphics/icons/silver-ore.xcf diff --git a/bzgold2/graphics/icons/silver-plate.png b/graphics/icons/silver-plate.png similarity index 100% rename from bzgold2/graphics/icons/silver-plate.png rename to graphics/icons/silver-plate.png diff --git a/bzgold2/graphics/icons/silver-wire.png b/graphics/icons/silver-wire.png similarity index 100% rename from bzgold2/graphics/icons/silver-wire.png rename to graphics/icons/silver-wire.png diff --git a/sources/graphics/icons/silver-wire.xcf b/graphics/icons/silver-wire.xcf similarity index 100% rename from sources/graphics/icons/silver-wire.xcf rename to graphics/icons/silver-wire.xcf diff --git a/bzgold2/graphics/icons/temperature-sensor.png b/graphics/icons/temperature-sensor.png similarity index 100% rename from bzgold2/graphics/icons/temperature-sensor.png rename to graphics/icons/temperature-sensor.png diff --git a/bzgold2/graphics/icons/titanium-palladium-alloy.png b/graphics/icons/titanium-palladium-alloy.png similarity index 100% rename from bzgold2/graphics/icons/titanium-palladium-alloy.png rename to graphics/icons/titanium-palladium-alloy.png diff --git a/bzgold2/graphics/technology/gold-processing.png b/graphics/technology/gold-processing.png similarity index 100% rename from bzgold2/graphics/technology/gold-processing.png rename to graphics/technology/gold-processing.png diff --git a/bzgold2/graphics/technology/mlcc.png b/graphics/technology/mlcc.png similarity index 100% rename from bzgold2/graphics/technology/mlcc.png rename to graphics/technology/mlcc.png diff --git a/bzgold2/graphics/technology/palladium-processing.png b/graphics/technology/palladium-processing.png similarity index 100% rename from bzgold2/graphics/technology/palladium-processing.png rename to graphics/technology/palladium-processing.png diff --git a/bzgold2/graphics/technology/platinum-processing.png b/graphics/technology/platinum-processing.png similarity index 100% rename from bzgold2/graphics/technology/platinum-processing.png rename to graphics/technology/platinum-processing.png diff --git a/bzgold2/graphics/technology/silver-processing.png b/graphics/technology/silver-processing.png similarity index 100% rename from bzgold2/graphics/technology/silver-processing.png rename to graphics/technology/silver-processing.png diff --git a/bzgold2/graphics/technology/temperature-sensor.png b/graphics/technology/temperature-sensor.png similarity index 100% rename from bzgold2/graphics/technology/temperature-sensor.png rename to graphics/technology/temperature-sensor.png diff --git a/info.json b/info.json new file mode 100644 index 0000000..817b273 --- /dev/null +++ b/info.json @@ -0,0 +1,32 @@ +{ + "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/bzgold2/locale/en/noble.cfg b/locale/en/noble.cfg similarity index 100% rename from bzgold2/locale/en/noble.cfg rename to locale/en/noble.cfg diff --git a/bzgold2/locale/ja/noble.cfg b/locale/ja/noble.cfg similarity index 100% rename from bzgold2/locale/ja/noble.cfg rename to locale/ja/noble.cfg diff --git a/bzgold2/locale/zh-CN/noble.cfg b/locale/zh-CN/noble.cfg similarity index 100% rename from bzgold2/locale/zh-CN/noble.cfg rename to locale/zh-CN/noble.cfg diff --git a/bzgold2/map-gen-preset-updates.lua b/map-gen-preset-updates.lua similarity index 100% rename from bzgold2/map-gen-preset-updates.lua rename to map-gen-preset-updates.lua diff --git a/bzgold2/matter.lua b/matter.lua similarity index 59% rename from bzgold2/matter.lua rename to matter.lua index 10ea30c..d4c8d84 100644 --- a/bzgold2/matter.lua +++ b/matter.lua @@ -4,27 +4,25 @@ if mods["Krastorio2"] then util.k2matter({ k2matter = { - material = { type = "item", name = "gold-ore", amount = 30 }, item_name = "gold-ore", - matter_count = 30, + matter_value = 30, energy_required = 10, need_stabilizer = false, unlocked_by_technology = "gold-matter-processing", }, k2baseicon = "stone", - icon = {icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 1} + icon = {icon = "__bzgold__/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_count = 8, + matter_value = 8, energy_required = 5, need_stabilizer = false, unlocked_by_technology = "silver-matter-processing", }, k2baseicon = "stone", - icon = {icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 1} + icon = {icon = "__bzgold__/graphics/icons/silver-ore.png", icon_size = 128, scale = 1} }) end diff --git a/bzgold2/me.lua b/me.lua similarity index 98% rename from bzgold2/me.lua rename to me.lua index 92d23e7..099b78f 100644 --- a/bzgold2/me.lua +++ b/me.lua @@ -1,6 +1,6 @@ local me = {} -me.name = "bzgold2" +me.name = "bzgold" me.list = {} me.recipes = { "electronic-circuit-silver", "silver-plate", "silver-wire", diff --git a/bzgold2/migrations/bzgold.0.0.6.json b/migrations/bzgold.0.0.6.json similarity index 100% rename from bzgold2/migrations/bzgold.0.0.6.json rename to migrations/bzgold.0.0.6.json diff --git a/modules.lua b/modules.lua new file mode 100644 index 0000000..6544032 --- /dev/null +++ b/modules.lua @@ -0,0 +1,17 @@ +-- 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/sources/palladium.png b/palladium.png similarity index 100% rename from sources/palladium.png rename to palladium.png diff --git a/sources/palladium.xcf b/palladium.xcf similarity index 100% rename from sources/palladium.xcf rename to palladium.xcf diff --git a/sources/platinum.png b/platinum.png similarity index 100% rename from sources/platinum.png rename to platinum.png diff --git a/sources/platinum.xcf b/platinum.xcf similarity index 100% rename from sources/platinum.xcf rename to platinum.xcf diff --git a/bzgold2/prototypes/alchemy.lua b/prototypes/alchemy.lua similarity index 81% rename from bzgold2/prototypes/alchemy.lua rename to prototypes/alchemy.lua index facd441..a94ddb2 100644 --- a/bzgold2/prototypes/alchemy.lua +++ b/prototypes/alchemy.lua @@ -11,11 +11,11 @@ if util.me.alchemy() then order = "d[gold-ingot]2", enabled = false, energy_required = 16, - ingredients = {{type="item", name="lead-plate", amount=2}}, - results = {{type="item", name="gold-ingot", amount=1}}, + ingredients = {{"lead-plate", 2}}, + results = {{"gold-ingot", 1}}, icons = { { - icon = "__bzgold2__/graphics/icons/gold-ingot.png", + icon = "__bzgold__/graphics/icons/gold-ingot.png", icon_size = 128, }, { @@ -29,7 +29,7 @@ if util.me.alchemy() then name = "alchemy", icons = { { - icon = "__bzgold2__/graphics/technology/gold-processing.png", + icon = "__bzgold__/graphics/technology/gold-processing.png", icon_size = 256, }, { diff --git a/bzgold2/prototypes/catalyst.lua b/prototypes/catalyst.lua similarity index 57% rename from bzgold2/prototypes/catalyst.lua rename to prototypes/catalyst.lua index 14e5cb8..7ca9ea7 100644 --- a/bzgold2/prototypes/catalyst.lua +++ b/prototypes/catalyst.lua @@ -6,17 +6,17 @@ if util.me.catalysis() then { type = "item", name = "ptpd-catalyst", - icon = "__bzgold2__/graphics/icons/ptpd-catalyst.png", + icon = "__bzgold__/graphics/icons/ptpd-catalyst.png", icon_size = 128, pictures = { - {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}, + {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}, }, subgroup = "intermediate-product", order = "b[catalyst]", - stack_size = 100, + stack_size = util.get_stack_size(100), }, { type = "technology", @@ -27,7 +27,7 @@ if util.me.catalysis() then icon_size = 256, }, { - icon = "__bzgold2__/graphics/icons/ptpd-catalyst.png", + icon = "__bzgold__/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.bzaluminum2 then base = "alumina" + if mods.bzaluminum then base = "alumina" elseif mods.bzsilicon then base = "silica" end @@ -62,21 +62,20 @@ 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 = { - {type="item", name=base, amount=1}, - {type="item", name="palladium-ingot", amount=1}, - {type="fluid", name=fluid, amount=100, ignored_by_productivity=100}, + {base, 1}, + {"palladium-ingot", 1}, + {type="fluid", name=fluid, amount=100, catalyst_amount=100}, }, results = { - {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}, + {"ptpd-catalyst", 1}, + {type="fluid", name=fluid, amount=90, catalyst_amount=90}, + {type="fluid", name="water", amount=10, catalyst_amount=9}, }, }, }) @@ -86,21 +85,20 @@ 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 = { - {type="item", name=base, amount=1}, - {type="item", name="platinum-ingot", amount=1}, - {type="fluid", name=fluid, amount=100, ignored_by_productivity=100}, + {base, 1}, + {"platinum-ingot", 1}, + {type="fluid", name=fluid, amount=100, catalyst_amount=100}, }, results = { - {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}, + {"ptpd-catalyst", 1}, + {type="fluid", name=fluid, amount=90, catalyst_amount=90}, + {type="fluid", name="water", amount=10, catalyst_amount=9}, }, }, }) diff --git a/prototypes/cpu.lua b/prototypes/cpu.lua new file mode 100644 index 0000000..0df7919 --- /dev/null +++ b/prototypes/cpu.lua @@ -0,0 +1,63 @@ +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/bzgold2/prototypes/electronic-circuit-final.lua b/prototypes/electronic-circuit-final.lua similarity index 66% rename from bzgold2/prototypes/electronic-circuit-final.lua rename to prototypes/electronic-circuit-final.lua index 3f37cd7..49f2005 100644 --- a/bzgold2/prototypes/electronic-circuit-final.lua +++ b/prototypes/electronic-circuit-final.lua @@ -3,30 +3,20 @@ local util = require("data-util"); if util.me.silver() then - if mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2 then - -- alternate electronic component recipe that uses silver + if mods.bobelectronics then + -- alternate electronic circuit 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") - 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", + util.add_icon("basic-electronic-components-silver", { + icon = "__bzgold__/graphics/icons/silver-wire.png", icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {-8,-8} - } }) - util.set_icons("basic-electronic-components", { - bec_icon, - { + util.add_icon("basic-electronic-components", { 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 @@ -34,32 +24,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") - 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} } - } + 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} + }) 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.bzgas2 then - local ec2 = futil.table.deepcopy(data.raw.recipe["electronic-circuit"]) + 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"]) 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 = "__bzgold2__/graphics/icons/silver-wire.png", + icon = "__bzgold__/graphics/icons/silver-wire.png", icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {8,-8} }) util.add_icon("electronic-circuit-stone-silver", { @@ -70,11 +60,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", { + util.add_icon("electronic-circuit-stone", { icon = "__aai-industry__/graphics/icons/stone-tablet.png", icon_size = 64, scale = 0.3, shift = {-8,-8} }) - if util.check_unlock("electronics", "electronic-circuit") then + if util.check_unlock("electronics", "electronic-circuit-stone") then util.add_unlock("electronics", "electronic-circuit-stone-silver") else util.add_unlock("silver-processing", "electronic-circuit-stone-silver") diff --git a/bzgold2/prototypes/enriched-gold.lua b/prototypes/enriched-gold.lua similarity index 75% rename from bzgold2/prototypes/enriched-gold.lua rename to prototypes/enriched-gold.lua index d8ce0d4..f3cb056 100644 --- a/bzgold2/prototypes/enriched-gold.lua +++ b/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 = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} } or { {type = "item", name = "enriched-gold", amount = 6}, - {type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} } data:extend({ @@ -17,16 +17,16 @@ data:extend({ type = "item", name = "enriched-gold", icon_size = 128, - icon = "__bzgold2__/graphics/icons/enriched-gold.png", + icon = "__bzgold__/graphics/icons/enriched-gold.png", -- pictures = { - -- {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}, + -- {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}, -- }, subgroup = "raw-material", order = "e05-a[enriched-ores]-a1[enriched-gold]", - stack_size = 100, + stack_size = util.get_stack_size(100), }, { type = "recipe", @@ -43,8 +43,8 @@ data:extend({ subgroup = "raw-material", ingredients = { - {type = "fluid", name = "kr-chlorine", amount = 15}, - {type = "fluid", name = "water", amount = 25, ignored_by_productivity = 25}, + {type = "fluid", name = "chlorine", amount = 15}, + {type = "fluid", name = "water", amount = 25, catalyst_amount = 25}, {type = "item", name = "gold-ore", amount = 9} }, results = enrich_results, @@ -60,7 +60,6 @@ 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, }, @@ -74,29 +73,30 @@ data:extend({ allow_productivity = true, ingredients = { - {type="item", name="enriched-gold", amount=20} + {"enriched-gold", 20} }, - results = {{type="item", name="gold-ingot", amount=10}}, + result = "gold-ingot", + result_count = 10, order = "b[gold-ingot]-b[enriched-gold-ingot]" }, { type = "recipe", name = "dirty-water-filtration-gold", - category = "kr-fluid-filtration", + category = "fluid-filtration", icons = { { - icon = data.raw.fluid["kr-dirty-water"].icon, - icon_size = data.raw.fluid["kr-dirty-water"].icon_size + icon = data.raw.fluid["dirty-water"].icon, + icon_size = data.raw.fluid["dirty-water"].icon_size }, { icon = data.raw.item["gold-ore"].icon, icon_size = data.raw.item["gold-ore"].icon_size, - scale = 0.2, + scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["gold-ore"].icon_size), shift = {0, 4} } }, - icon_size = data.raw.fluid["kr-dirty-water"].icon_size, + icon_size = data.raw.fluid["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 = "kr-dirty-water", amount = 100, ignored_by_productivity = 100}, + {type = "fluid", name = "dirty-water", amount = 100, catalyst_amount = 100}, }, results = { - {type = "fluid", name = "water", amount = 90, ignored_by_productivity = 90}, + {type = "fluid", name = "water", amount = 90, catalyst_amount = 90}, {type = "item", name = "stone", probability = 0.30, amount = 1}, {type = "item", name = "gold-ore", probability = 0.05, amount = 1} }, diff --git a/bzgold2/prototypes/enriched-silver.lua b/prototypes/enriched-silver.lua similarity index 77% rename from bzgold2/prototypes/enriched-silver.lua rename to prototypes/enriched-silver.lua index 3cf1954..4f6d6c7 100644 --- a/bzgold2/prototypes/enriched-silver.lua +++ b/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.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}, + -- {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}, -- }, subgroup = "raw-material", order = "e05-a[enriched-ores]-a1[enriched-silver]", - stack_size = 100, + stack_size = util.get_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 = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 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 = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 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 = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} } else enrich_results = { {type = "item", name = "enriched-silver", amount = 6}, - {type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25} + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} } end @@ -63,7 +63,7 @@ data:extend({ ingredients = { {type = "fluid", name = "sulfuric-acid", amount = 10}, - {type = "fluid", name = "water", amount = 25, ignored_by_productivity = 25}, + {type = "fluid", name = "water", amount = 25, catalyst_amount = 25}, {type = "item", name = "silver-ore", amount = 9} }, results = enrich_results, @@ -79,7 +79,6 @@ 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, }, @@ -93,29 +92,30 @@ data:extend({ allow_productivity = true, ingredients = { - {type="item", name="enriched-silver", amount=10} + {"enriched-silver", 10} }, - results = {{type="item", name="silver-plate", amount=10}}, + result = "silver-plate", + result_count = 10, order = "b[silver-plate]-b[enriched-silver-plate]" }, { type = "recipe", name = "dirty-water-filtration-silver", - category = "kr-fluid-filtration", + category = "fluid-filtration", icons = { { - icon = data.raw.fluid["kr-dirty-water"].icon, - icon_size = data.raw.fluid["kr-dirty-water"].icon_size + icon = data.raw.fluid["dirty-water"].icon, + icon_size = data.raw.fluid["dirty-water"].icon_size }, { icon = data.raw.item["silver-ore"].icon, icon_size = data.raw.item["silver-ore"].icon_size, - scale = 0.2, + scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["silver-ore"].icon_size), shift = {0, 4} } }, - icon_size = data.raw.fluid["kr-dirty-water"].icon_size, + icon_size = data.raw.fluid["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 = "kr-dirty-water", amount = 100, ignored_by_productivity = 100}, + {type = "fluid", name = "dirty-water", amount = 100, catalyst_amount = 100}, }, results = { - {type = "fluid", name = "water", amount = 90, ignored_by_productivity = 90}, + {type = "fluid", name = "water", amount = 90, catalyst_amount = 90}, {type = "item", name = "stone", probability = 0.30, amount = 1}, {type = "item", name = "silver-ore", probability = 0.05, amount = 1} }, diff --git a/prototypes/gold-ore.lua b/prototypes/gold-ore.lua new file mode 100644 index 0000000..1e1587b --- /dev/null +++ b/prototypes/gold-ore.lua @@ -0,0 +1,248 @@ +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/bzgold2/prototypes/gold.lua b/prototypes/gold.lua similarity index 87% rename from bzgold2/prototypes/gold.lua rename to prototypes/gold.lua index f3490ba..e2bf642 100644 --- a/bzgold2/prototypes/gold.lua +++ b/prototypes/gold.lua @@ -8,7 +8,7 @@ data:extend({ icon_size = 128, subgroup = "raw-resource", order = "b[gold-ingot]", - stack_size = 100, + stack_size = util.get_stack_size(100), }, { type = "technology", @@ -42,7 +42,7 @@ data:extend({ }) if mods.Krastorio2 then - local results = {{type="item", name="gold-ingot", amount=5}} + local results = {{"gold-ingot", 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 = {{type="item", name="gold-ore", amount=20}}, + ingredients = {{"gold-ore", 20}}, results = results, }, }) else - local results = {{type="item", name="gold-ingot", amount=1}} + local results = {{"gold-ingot", 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 = {{type="item", name="gold-ore", amount=2}}, + ingredients = {{"gold-ore", 2}}, results = results, }, }) diff --git a/bzgold2/prototypes/mainboard.lua b/prototypes/mainboard.lua similarity index 75% rename from bzgold2/prototypes/mainboard.lua rename to prototypes/mainboard.lua index f16e779..f17b249 100644 --- a/bzgold2/prototypes/mainboard.lua +++ b/prototypes/mainboard.lua @@ -1,7 +1,7 @@ local util = require("data-util"); -if not (mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2) then +if not mods.bobelectronics then data:extend({ { @@ -11,7 +11,7 @@ if not (mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2) icon_size = 128, subgroup = "intermediate-product", order = "b[mainboard]", - stack_size = 200, + stack_size = util.get_stack_size(200), }, { type = "recipe", @@ -20,8 +20,8 @@ if not (mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2) order = "d[mainboard]", enabled = false, energy_required = 2.5, - ingredients = {{type="item", name="advanced-circuit", amount=10}, {type="item", name="gold-ingot", amount=1}}, - results = {{type="item", name="mainboard", amount=10}}, + ingredients = {{"advanced-circuit", 10}, {"gold-ingot", 1}}, + results = {{"mainboard", 10}}, }, }) @@ -38,8 +38,8 @@ if not (mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2) order = "d[mainboard]", enabled = false, energy_required = 5, - 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}}, + ingredients = {{"se-holmium-cable", 2}, {"advanced-circuit", 20}, {"gold-ingot", 1}}, + results = {{"mainboard", 20}}, }, }) end @@ -54,8 +54,8 @@ if not (mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2) util.add_ingredient("mainboard-holmium", "mlcc", 10, {"force", true}) end if mods.Krastorio2 then - util.add_ingredient("mainboard", "kr-rare-metals", 20, {"force", true}) - util.add_ingredient("mainboard-holmium", "kr-rare-metals", 20, {"force", true}) + util.add_ingredient("mainboard", "rare-metals", 20, {"force", true}) + util.add_ingredient("mainboard-holmium", "rare-metals", 20, {"force", true}) end else diff --git a/bzgold2/prototypes/mlcc.lua b/prototypes/mlcc.lua similarity index 67% rename from bzgold2/prototypes/mlcc.lua rename to prototypes/mlcc.lua index c40f694..f942cb4 100644 --- a/bzgold2/prototypes/mlcc.lua +++ b/prototypes/mlcc.lua @@ -2,19 +2,17 @@ local util = require("data-util"); if util.me.palladium() then -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}} +local ingredients = {{"palladium-ingot", 1}, {"stone", 2}} +if mods.bzzirconium and mods.bzaluminum then + ingredients = {{"palladium-ingot", 1}, {"zirconia", 1}, {"alumina", 1}} elseif mods.bzzirconium then - 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}} + ingredients = {{"palladium-ingot", 1}, {"zirconia", 2}} +elseif mods.bzaluminum then + ingredients = {{"palladium-ingot", 1}, {"alumina", 2}} elseif mods.bzsilicon then - 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}} + 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}} end data:extend({ @@ -37,7 +35,7 @@ data:extend({ }, subgroup = "intermediate-product", order = "b[gold-ingot]", - stack_size = 100, + stack_size = util.get_stack_size(100), }, { type = "recipe", @@ -47,7 +45,7 @@ data:extend({ enabled = false, energy_required = 4, ingredients = ingredients, - results = {{type="item", name="mlcc", amount=10}}, + results = {{"mlcc", 10}}, }, { type = "technology", diff --git a/bzgold2/prototypes/oil-updates.lua b/prototypes/oil-updates.lua similarity index 94% rename from bzgold2/prototypes/oil-updates.lua rename to prototypes/oil-updates.lua index 50a1a1e..9ce42a9 100644 --- a/bzgold2/prototypes/oil-updates.lua +++ b/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, - ignored_by_productivity=1, probability=.9}, {force=true}) + catalyst_amount=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/bzgold2/prototypes/palladium.lua b/prototypes/palladium.lua similarity index 86% rename from bzgold2/prototypes/palladium.lua rename to prototypes/palladium.lua index ac316a1..f76164e 100644 --- a/bzgold2/prototypes/palladium.lua +++ b/prototypes/palladium.lua @@ -9,7 +9,7 @@ data:extend({ icon_size = 64, subgroup = "raw-resource", order = "b[palladium-powder]", - stack_size = 100, + stack_size = util.get_stack_size(100), }, { type = "item", @@ -18,7 +18,7 @@ data:extend({ icon_size = 128, subgroup = "raw-resource", order = "b[palladium-ingot]", - stack_size = 100, + stack_size = util.get_stack_size(100), }, { type = "recipe", @@ -28,12 +28,12 @@ data:extend({ order = "d[palladium-ingot]", enabled = false, energy_required = 1.6, - ingredients = {{type="item", name="palladium-powder", amount=1}}, + ingredients = {{"palladium-powder", 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 {{type="item", name="palladium-ingot", amount=1}}, + } or {{"palladium-ingot", 1}}, }, }) data:extend({ @@ -85,8 +85,8 @@ data:extend({ order = "d[palladium-ingot]", enabled = false, energy_required = 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}}, + ingredients = {{"palladium-ingot", 1}, {util.titanium_plate, 4}}, + results = {{"titanium-palladium-flange", 5}}, }, }) util.add_unlock("palladium-processing", "titanium-palladium-flange") diff --git a/bzgold2/prototypes/platinum.lua b/prototypes/platinum.lua similarity index 90% rename from bzgold2/prototypes/platinum.lua rename to prototypes/platinum.lua index a4e59a6..2fc6bc0 100644 --- a/bzgold2/prototypes/platinum.lua +++ b/prototypes/platinum.lua @@ -9,7 +9,7 @@ data:extend({ icon_size = 64, subgroup = "raw-resource", order = "b[platinum-powder]", - stack_size = 100, + stack_size = util.get_stack_size(100), }, { type = "item", @@ -18,7 +18,7 @@ data:extend({ icon_size = 128, subgroup = "raw-resource", order = "b[platinum-ingot]", - stack_size = 100, + stack_size = util.get_stack_size(100), }, { type = "recipe", @@ -28,12 +28,12 @@ data:extend({ order = "d[platinum-ingot]", enabled = false, energy_required = 1.6, - ingredients = {{type="item", name="platinum-powder", amount=1}}, + ingredients = {{"platinum-powder", 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 {{type="item", name="platinum-ingot", amount=1}}, + } or {{"platinum-ingot", 1}}, }, }) data:extend({ diff --git a/bzgold2/prototypes/processing-unit-updates.lua b/prototypes/processing-unit-updates.lua similarity index 81% rename from bzgold2/prototypes/processing-unit-updates.lua rename to prototypes/processing-unit-updates.lua index 89df585..b693c4c 100644 --- a/bzgold2/prototypes/processing-unit-updates.lua +++ b/prototypes/processing-unit-updates.lua @@ -1,11 +1,11 @@ local util = require("data-util") -util.remove_ingredient("processing-unit", mods.Krastorio2 and "kr-silicon" or "silicon") +util.remove_ingredient("processing-unit", "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", "kr-rare-metals") -- k2 +util.remove_ingredient("processing-unit", "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/bzgold2/prototypes/pyroflux-gold.lua b/prototypes/pyroflux-gold.lua similarity index 89% rename from bzgold2/prototypes/pyroflux-gold.lua rename to prototypes/pyroflux-gold.lua index f15e6e1..1c3ad6d 100644 --- a/bzgold2/prototypes/pyroflux-gold.lua +++ b/prototypes/pyroflux-gold.lua @@ -28,7 +28,7 @@ if util.se6() then }, energy_required = 60, ingredients = { - {type = "item", name = mods.Krastorio2 and "enriched-gold" or "gold-ore", amount = 24}, + {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 = {{type="item", name="gold-ingot", amount=1}}, + results = {{"gold-ingot", 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", {type="item", name="silver-ore", amount=9}) end + if util.me.byproduct() then util.add_product("molten-gold", {"silver-ore", 9}) end end end diff --git a/bzgold2/prototypes/pyroflux-silver.lua b/prototypes/pyroflux-silver.lua similarity index 89% rename from bzgold2/prototypes/pyroflux-silver.lua rename to prototypes/pyroflux-silver.lua index 8c8bd5b..4c4fc0d 100644 --- a/bzgold2/prototypes/pyroflux-silver.lua +++ b/prototypes/pyroflux-silver.lua @@ -35,7 +35,7 @@ if util.se6() and util.me.silver() then }, energy_required = 60, ingredients = { - {type = "item", name = mods.Krastorio2 and "enriched-silver" or "silver-ore", amount = 24}, + {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 = {{type="item", name="silver-ingot", amount=1}}, + results = {{"silver-ingot", 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 = { - {type = "item", name = "silver-plate", amount = 10}, + {name = "silver-plate", amount = 10}, }, energy_required = 5, ingredients = { - {type = "item", name = "silver-ingot", amount = 1} + {name = "silver-ingot", amount = 1} }, enabled = false, always_show_made_in = true, diff --git a/bzgold2/prototypes/recipe-updates-se.lua b/prototypes/recipe-updates-se.lua similarity index 98% rename from bzgold2/prototypes/recipe-updates-se.lua rename to prototypes/recipe-updates-se.lua index 6874a23..e73c2a7 100644 --- a/bzgold2/prototypes/recipe-updates-se.lua +++ b/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", "processing-unit") + util.remove_prerequisite("se-meteor-defence", "advanced-electronics-2") util.add_prerequisite("se-meteor-defence", "se-rocket-science-pack") util.set_tech_recipe("se-meteor-defence", { {"automation-science-pack", 1}, diff --git a/bzgold2/prototypes/recipe-updates.lua b/prototypes/recipe-updates.lua similarity index 87% rename from bzgold2/prototypes/recipe-updates.lua rename to prototypes/recipe-updates.lua index 2b127bd..a8e34c1 100644 --- a/bzgold2/prototypes/recipe-updates.lua +++ b/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", {type="item", name="silver-ore", amount=1}) + util.add_product("enriched-copper", {"silver-ore", 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("kr-additional-engine-equipment", "palladium-ingot", 1) + util.add_ingredient("additional-engine", "palladium-ingot", 1) elseif util.me.platinum() then - util.add_ingredient("kr-additional-engine-equipment", "platinum-ingot", 1) + util.add_ingredient("additional-engine", "platinum-ingot", 1) end -- K2 blank tech card if mods.Krastorio2 and util.me.silver() then - local tc = futil.table.deepcopy(data.raw.recipe["kr-blank-tech-card"]) + local tc = futil.table.deepcopy(data.raw.recipe["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("kr-blank-tech-card") - util.set_product_amount("blank-tech-card-silver", "kr-blank-tech-card", amt) + local amt = util.get_amount("blank-tech-card") + util.set_product_amount("blank-tech-card-silver", "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/bzgold2/prototypes/recipes-se.lua b/prototypes/recipes-se.lua similarity index 100% rename from bzgold2/prototypes/recipes-se.lua rename to prototypes/recipes-se.lua diff --git a/bzgold2/prototypes/rich-copper.lua b/prototypes/rich-copper.lua similarity index 75% rename from bzgold2/prototypes/rich-copper.lua rename to prototypes/rich-copper.lua index 10b4646..4583949 100644 --- a/bzgold2/prototypes/rich-copper.lua +++ b/prototypes/rich-copper.lua @@ -1,4 +1,5 @@ local resource_autoplace = require('resource-autoplace'); +local noise = require('noise'); local futil = require("util"); local util = require("data-util"); @@ -6,7 +7,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["kr-rare-metals"]) + local rm = futil.table.deepcopy(data.raw.recipe["rare-metals"]) rm.name = "rare-metals-1" data:extend({rm}) util.add_unlock("platinum-processing", "rare-metals-1") @@ -14,27 +15,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("kr-rare-metals", 2) + util.multiply_recipe("rare-metals", 2) util.multiply_recipe("rare-metals-1", 2) util.multiply_recipe("rare-metals-2", 2) - 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") + 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") if util.me.platinum() and util.me.palladium() then - 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}) + 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}) elseif util.me.platinum() then - 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}) + 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}) elseif util.me.palladium() then - 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}) + 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}) end else @@ -83,16 +84,17 @@ 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 .. "*(3/4)" + data.raw.resource["copper-ore"].autoplace.richness_expression = + data.raw.resource["copper-ore"].autoplace.richness_expression * noise.to_noise_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.bzaluminum2 and 3 or 4, + base_density = mods.bzaluminum and 3 or 4, has_starting_area_placement = true, regular_rq_factor_multiplier = 1.1, starting_rq_factor_multiplier = 1.1, @@ -115,6 +117,10 @@ end data:extend({ { + type = "noise-layer", + name = "rich-copper-ore" + }, + { type = "resource", name = "rich-copper-ore", icon = "__bzgold__/graphics/icons/rich-copper-ore.png", @@ -152,12 +158,20 @@ data:extend({ { sheet = { - 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/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 + } } }, }, @@ -167,14 +181,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.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}, + {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}, }, subgroup = "raw-resource", order = "t-c-a", - stack_size = 50 + stack_size = util.get_stack_size(50) }, }) @@ -183,7 +197,6 @@ data:extend({ { type = "recipe", name = "rich-copper", - localised_name = {"item-name.copper-plate"}, category = "smelting", main_product = "copper-plate", order = "d[copper-plate]", @@ -196,7 +209,7 @@ data:extend({ -- {icon = "__bzgold__/graphics/icons/palladium-powder.png", icon_size = 64, scale=0.25, shift = {-8,-8}}, }, energy_required = 6.4, - ingredients = {{type="item", name="rich-copper-ore", amount=2}}, + ingredients = {{"rich-copper-ore", 2}}, results = results, }, }) diff --git a/bzgold2/prototypes/silver.lua b/prototypes/silver.lua similarity index 73% rename from bzgold2/prototypes/silver.lua rename to prototypes/silver.lua index 3699416..fbdd9f6 100644 --- a/bzgold2/prototypes/silver.lua +++ b/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.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}, + {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}, }, subgroup = "raw-resource", order = "a[silver-ore]", - stack_size = 200, + stack_size = util.get_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 = 100, + stack_size = util.get_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 = {{type="item", name="silver-ore", amount=10}}, - results = {{type="item", name="silver-plate", amount=5}}, + ingredients = {{"silver-ore", 10}}, + results = {{"silver-plate", 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 = {{type="item", name="silver-ore", amount=1}}, - results = {{type="item", name="silver-plate", amount=1}}, + ingredients = {{"silver-ore", 1}}, + results = {{"silver-plate", 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 = 200, + stack_size = util.get_stack_size(200), }, { type = "recipe", @@ -67,18 +67,18 @@ if util.me.silver() then order = "d[silver-wire]", enabled = false, energy_required = 1, - ingredients = {{type="item", name="silver-plate", amount=1}}, - results = {{type="item", name="silver-wire", amount=3}}, + ingredients = {{"silver-plate", 1}}, + results = {{"silver-wire", 3}}, }, }) - 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} + brazing = mods.BrassTacks and { + {"silver-plate", 2}, + {"zinc-plate", 1}, + {"copper-plate", 1} } or { - {type="item", name="silver-plate", amount=2}, - {type="item", name="copper-plate", amount=2} + {"silver-plate", 2}, + {"copper-plate", 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 = 100, + stack_size = util.get_stack_size(100), }, { type = "recipe", @@ -99,16 +99,13 @@ if util.me.silver() then enabled = false, energy_required = 4, ingredients = brazing, - results = {{type="item", name="silver-brazing-alloy", amount=4}}, + results = {{"silver-brazing-alloy", 4}}, }, }) - if mods.bzfoundry2 then - util.set_category("silver-brazing-alloy", "basic-founding") - util.set_subgroup("silver-brazing-alloy", "foundry-intermediate") - end + util.set_to_founding("silver-brazing-alloy") - local prereqs= mods.bzaluminum2 and {"copper-processing"} or {"automation"} + local prereqs= mods.bzaluminum and {"copper-processing"} or {"automation"} data:extend({ { type = "technology", @@ -126,7 +123,7 @@ if util.me.silver() then }, unit = { count = 10, time = 15, - ingredients = mods.Krastorio2 and { {"kr-basic-tech-card", 1}, } + ingredients = mods.Krastorio2 and { {"basic-tech-card", 1}, } or { {"automation-science-pack", 1}, }, }, prerequisites = prereqs, diff --git a/bzgold2/prototypes/tech-updates.lua b/prototypes/tech-updates.lua similarity index 59% rename from bzgold2/prototypes/tech-updates.lua rename to prototypes/tech-updates.lua index ad6b5ab..923fce6 100644 --- a/bzgold2/prototypes/tech-updates.lua +++ b/prototypes/tech-updates.lua @@ -1,15 +1,15 @@ local util = require("data-util") -util.add_prerequisite("advanced-circuit", "silver-processing") +util.add_prerequisite("advanced-electronics", "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("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("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("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("processing-unit", "cpu") -util.add_unlock("processing-unit", "mainboard") +util.add_unlock("advanced-electronics-2", "cpu") +util.add_unlock("advanced-electronics-2", "mainboard") util.add_prerequisite("coal-liquefaction", "catalysis") util.remove_prerequisite("coal-liquefaction", "production-science-pack") diff --git a/bzgold2/prototypes/temperature-sensor.lua b/prototypes/temperature-sensor.lua similarity index 80% rename from bzgold2/prototypes/temperature-sensor.lua rename to prototypes/temperature-sensor.lua index 5b202ff..fd5b377 100644 --- a/bzgold2/prototypes/temperature-sensor.lua +++ b/prototypes/temperature-sensor.lua @@ -5,13 +5,11 @@ if util.me.platinum() then local base = "stone" if mods.bzzirconium then base = "zirconia" -elseif mods.bzaluminum2 then +elseif mods.bzaluminum then base = "alumina" elseif mods.bzsilicon then base = "silica" -elseif mods.Krastorio2 then - base = "kr-glass" -elseif mods["aai-industry"] or mods["sand-and-glass"] then +elseif mods.Krastorio2 or mods["aai-industry"] or mods["sand-and-glass"] then base = "glass" end @@ -24,7 +22,7 @@ data:extend({ icon_size = 128, subgroup = "intermediate-product", order = "b[gold-ingot]", - stack_size = 100, + stack_size = util.get_stack_size(100), }, { type = "recipe", @@ -33,8 +31,8 @@ data:extend({ order = "d[temperature-sensor]", enabled = false, energy_required = 4, - ingredients = {{type="item", name="platinum-ingot", amount=1}, {type="item", name=base, amount=2}}, - results = {{type="item", name="temperature-sensor", amount=10}}, + ingredients = {{"platinum-ingot", 1}, {base, 2}}, + results = {{"temperature-sensor", 10}}, }, { type = "technology", diff --git a/bzgold2/settings-util.lua b/settings-util.lua similarity index 100% rename from bzgold2/settings-util.lua rename to settings-util.lua diff --git a/bzgold2/settings.lua b/settings.lua similarity index 100% rename from bzgold2/settings.lua rename to settings.lua diff --git a/sources/silver.png b/silver.png similarity index 100% rename from sources/silver.png rename to silver.png diff --git a/sources/silver.xcf b/silver.xcf similarity index 100% rename from sources/silver.xcf rename to silver.xcf diff --git a/bzgold2/stacking.lua b/stacking.lua similarity index 100% rename from bzgold2/stacking.lua rename to stacking.lua diff --git a/bzgold2/thumbnail.png b/thumbnail.png similarity index 100% rename from bzgold2/thumbnail.png rename to thumbnail.png diff --git a/sources/thumbnail.xcf b/thumbnail.xcf similarity index 100% rename from sources/thumbnail.xcf rename to thumbnail.xcf