Compare commits

..

No commits in common. "17cd626cd80b02ef04f414eabd8150480799e990" and "4cfe87fcf0e8b870c71b388689142215f39f2b16" have entirely different histories.

12 changed files with 266 additions and 74 deletions

1
.gitignore vendored
View file

@ -1,2 +1 @@
.idea
*.zip

View file

@ -1,22 +1,25 @@
**This is an unofficial update to Factorio 2.0 and it stays until Brevven takes over again.**
**Compatibility with Space Age is explicitly excluded until someone integrates it nicely.**
# Foundry
Provides a foundry building, as well as an electric version. The building is used for founding (e.g. casting metal), as well as other "hot" things like coking coke/solid fuel (optional). Can (optionally, default off) perform vanilla smelting tasks as well.
By default, the foundry building is used to smelt steel and to make coke (used in steel and as fuel). If you have the relevant BZ mods enabled, silicon, tungsten carbide, aluminum alloys, crucibles, cermet, and other recipes use the foundry. Most of this is fully configurable.
[factorio mod page](https://mods.factorio.com/mod/bzfoundry)
Other vanilla smelting recipes are, by default, not done in foundries, but that can be configured as well.
## Version History
See changelog.txt
There are also optional recipes (default off) that enable advantageous smelting ratios when using a supplemental refractory.
## License
This work is released under a CC license instead of MIT. Contact me on github if you have questions.
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
See LICENSE
## Credits
- Brevven ([Original mod](https://mods.factorio.com/mod/bzchlorine))
- [brevven](https://mods.factorio.com/user/brevven) (code, design)
- [cackling fiend](https://mods.factorio.com/user/cackling.fiend) (Update to 2.0)
- Wube (Graphics)
### Localization
- [x2605](https://github.com/x2605) (ko)
- [Sakuro](https://github.com/sakuro) (ja)
- [Pergamum663](https://github.com/Pergamum663) (ru)

View file

@ -1,5 +1,194 @@
---------------------------------------------------------------------------------------------------
Version: 2.0.0
Date: 19.10.2025
Version: 0.2.14
Date: 2024-02-07
Fixes:
- Attempt to fix a rare compatibility issue related to indexing nil value
---------------------------------------------------------------------------------------------------
Version: 0.2.13
Date: 2023-12-28
Changes:
- Update to Factorio 2.0
- Some recipes moved in crafting menus, they were defaulting to appearing at the top:
- In vanilla: recipes for certain intermediates created in foundries moved after
"raw-material" recipes (such as most plates, etc), and before "intermediate-product"
recipes (eg circuits). There's not a perfect place for this right now, but this seems to be
thematically a decent place to put it.
- In Space Exploration (SE): Similar to above, but after gears, sticks, etc
- In vanilla and SE: recipes for foundry entities moved after furnace entities but before
assemblers. This seems to be the right location, thematically.
Localization:
- ja locale updates thanks to Sakuro
---------------------------------------------------------------------------------------------------
Version: 0.2.12
Date: 2023-04-18
Features:
- Default upgrade planner now upgrades foundry to electric foundry.
---------------------------------------------------------------------------------------------------
Version: 0.2.11
Fixes:
- Fix some minor recipe ordering issues
---------------------------------------------------------------------------------------------------
Version: 0.2.10
Date: 2023-03-06
Features:
- For some mod loadouts, optional coke recipe to use up wood, default off.
---------------------------------------------------------------------------------------------------
Version: 0.2.9
Date: 2022-12-27
Fixes:
- Attempt to fix issue with character crafting categories
---------------------------------------------------------------------------------------------------
Version: 0.2.8
Date: 2022-12-24
Localization:
- zh-CN by sunnytan53
---------------------------------------------------------------------------------------------------
Version: 0.2.7
Date: 2022-08-23
Changes:
- deepcore mining outputs balance for greater coal need
---------------------------------------------------------------------------------------------------
Version: 0.2.6
Date: 2022-08-09
Changes:
- Stacked coke icon
- Support for Tungsten mod update
---------------------------------------------------------------------------------------------------
Version: 0.2.5
Date: 2022-07-30
Localization:
- cs locale thanks to RiCZrd
---------------------------------------------------------------------------------------------------
Version: 0.2.4
Date: 2022-07-25
Localization:
- ru locale thanks to Pergamum663
Fixes:
- With tin enabled, other machines set to do founding can now do solder or aai glass.
- Clean up some logging
---------------------------------------------------------------------------------------------------
Version: 0.2.3
Date: 2022-07-16
Changes:
- Refractory: When Tin mod is used, glass should not have a refractory recipe at all.
---------------------------------------------------------------------------------------------------
Version: 0.2.2
Date: 2022-07-06
Fixes:
- Attempt to fix an issue with duplicate ingredients in refractory recipes
---------------------------------------------------------------------------------------------------
Version: 0.2.1
Date: 2022-07-05
Changes:
- Support for Tin
- Add basic founding recipe category. Pre-founding-tech recipes in this category can be crafted
by hand. In some mod loadouts there will indeed be recipes that can only be crafted by hand
until founding is researched.
- Minor restructure of refractory recipes (should have no effect)
---------------------------------------------------------------------------------------------------
Version: 0.2.0
Date: 2022-07-01
Changes:
- Support for Space Exploration 0.6
Localization:
- Japanese (ja) locale thanks to sakuro
---------------------------------------------------------------------------------------------------
Version: 0.1.2
Date: 2022-06-23
Fixes:
- In minimal mode, use industrial furnace if available
---------------------------------------------------------------------------------------------------
Version: 0.1.1
Date: 2022-02-22
Localization:
- Korean (ko) l10n thanks to x2605
---------------------------------------------------------------------------------------------------
Version: 0.1.0
Date: 2022-02-17
Fixes:
- K2+SE rare metal + vulcanite + refractory now works
---------------------------------------------------------------------------------------------------
Version: 0.0.12
Date: 2022-02-12
Features:
- Minimal mode setting. Only visible and used for certain mods (like Aluminum).
Intended as a workaround due to the way required dependencies work in Factorio.
Disables foundry buildings and many recipe changes. Intended to allow people to opt out of
using Foundry buildings while still letting Foundry be a required dependency for certain
other mods (like Aluminum). Founding will happen in assemblers.
Fixes:
- Processed fuel works in foundries with K2 + AAI Industry both enabled, once again.
- Refractory recipes: Productivity no longer applies to refractories
---------------------------------------------------------------------------------------------------
Version: 0.0.11
Date: 2022-02-02
Changes:
- Refractory recipes: Remove "Imersium Plate" recipe - was not meant for endgame materials.
- Refractory recipes: Add "rare-metals" recipes.
- Refractory recipes: Change Space Exploration ore refractory recipes to new tech.
---------------------------------------------------------------------------------------------------
Version: 0.0.10
Date: 2022-01-31
Fixes:
- Fix default setting for refractory recipes.
WARNING: If you use these recipes, update your refractory recipes setting before
saving your game.
- Fix some refractory recipes when used without certain mods
- Fix some refractory recipe product amounts
Changes:
- Minor compatibility updates
---------------------------------------------------------------------------------------------------
Version: 0.0.9
Date: 2022-01-25
Changes:
- Add deadlock stacking recipe for coke
- Add entity-description strings (due to minor issue with SE)
---------------------------------------------------------------------------------------------------
Version: 0.0.8
Date: 2022-01-08
Changes:
- New icon
Fixes:
- K2 issue with nil ingredients
---------------------------------------------------------------------------------------------------
Version: 0.0.7
Date: 2022-01-02
Fixes:
- Fix issue with more efficient founding recipes
---------------------------------------------------------------------------------------------------
Version: 0.0.6
Date: 2022-01-01
Features:
- Graphite compatibility - crucible
- New option to enable more efficient founding of plates using refractory materials
Fixes:
- Steel time adjustment fix
---------------------------------------------------------------------------------------------------
Version: 0.0.5
Date: 2021-08-20
Changes:
- Minor refactor
- Fix production deadlock with bio industries + silicon
---------------------------------------------------------------------------------------------------
Version: 0.0.4
Date: 2021-07-21
Changes:
- Both foundry items are more expensive
- Both foundry entities use more energy: burner doubled, electric quadrupled
Features:
- Setting to enable other "assembling machine" entities to do foundry tasks.
---------------------------------------------------------------------------------------------------
Version: 0.0.3
Date: 2021-07-19
Features:
- Krastorio2 compatibility
- Space Exploration/AAI compatibility
---------------------------------------------------------------------------------------------------
Version: 0.0.2
Date: 2021-07-18
Features:
- Thumbnail
---------------------------------------------------------------------------------------------------
Version: 0.0.1
Date: 2021-07-17
Features:
- New foundry building, coke (optional), updated recipes

View file

@ -10,7 +10,7 @@ end
if data.raw.item["coke"] and not mods.Krastorio2 then
if deadlock then
deadlock.add_stack("coke", "__bzfoundry2__/graphics/icons/coke-stacked.png", "deadlock-stacking-1", 128)
deadlock.add_stack("coke", "__bzfoundry__/graphics/icons/coke-stacked.png", "deadlock-stacking-1", 128)
end
if deadlock_crating then
deadlock_crating.add_crate("coke", "deadlock-crating-1")

View file

@ -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)

View file

@ -1,20 +1,21 @@
{
"name": "bzfoundry2",
"version": "2.0.0",
"factorio_version": "2.0",
"title": "Foundry",
"description": "Adds a foundry building for making alloys, etc.",
"author": "Brevven, cackling fiend",
"homepage": "https://discord.gg/ufvFUJtVwk",
"dependencies": [
"base >= 2.0.0",
"rusty-locale >= 1.0.17",
"? space-exploration >= 0.7.34",
"(?) Krastorio2 >= 2.0.8",
"? bzsilicon >= 2.0.18",
"? bztungsten",
"? bzzirconium >= 2.1.13",
"! space-age"
]
"name": "bzfoundry",
"version": "2.0.0",
"factorio_version": "2.0",
"title": "Foundry",
"author": "Brevven",
"contact": "",
"homepage": "",
"dependencies": [
"base >= 2.0.0",
"rusty-locale >= 1.0.17",
"? space-exploration >= 0.7.34",
"(?) Krastorio2 >= 2.0.8",
"? bzsilicon >= 2.0.18",
"? bztungsten",
"? bzzirconium >= 2.1.13",
"! space-age"
],
"description": "Adds a foundry building for making alloys, etc.\n\nA standalone accessory from BZ Mods."
}

View file

@ -1,6 +1,6 @@
local me = {}
me.name = "bzfoundry2"
me.name = "bzfoundry"
function me.basic_founding()
return mods.bztin or mods.bzaluminum2

View file

@ -5,13 +5,13 @@ data:extend({
{
type = "item",
name = "coke",
icon = "__bzfoundry2__/graphics/icons/coke-icon.png",
icon = "__bzfoundry__/graphics/icons/coke-icon.png",
icon_size = 128,
pictures = {
{size = 128, filename = "__bzfoundry2__/graphics/icons/coke.png", scale = 0.125},
{size = 128, filename = "__bzfoundry2__/graphics/icons/coke-1.png", scale = 0.125},
{size = 128, filename = "__bzfoundry2__/graphics/icons/coke-2.png", scale = 0.125},
{size = 128, filename = "__bzfoundry2__/graphics/icons/coke-3.png", scale = 0.125},
{size = 128, filename = "__bzfoundry__/graphics/icons/coke.png", scale = 0.125},
{size = 128, filename = "__bzfoundry__/graphics/icons/coke-1.png", scale = 0.125},
{size = 128, filename = "__bzfoundry__/graphics/icons/coke-2.png", scale = 0.125},
{size = 128, filename = "__bzfoundry__/graphics/icons/coke-3.png", scale = 0.125},
},
fuel_category = "chemical",
fuel_value = "10MJ",
@ -42,7 +42,7 @@ data:extend({
energy_required = 3.2,
enabled=false,
icons = {
{ icon = "__bzfoundry2__/graphics/icons/coke-icon.png", icon_size = 128},
{ icon = "__bzfoundry__/graphics/icons/coke-icon.png", icon_size = 128},
{ icon = "__base__/graphics/icons/wood.png", icon_size = 64, scale=0.25, shift={8,-8}},
},
},

View file

@ -11,7 +11,7 @@ data:extend({
{
type = "assembling-machine",
name = "electric-foundry",
icon = "__bzfoundry2__/graphics/icons/electric-foundry.png",
icon = "__bzfoundry__/graphics/icons/electric-foundry.png",
icon_size = 64,
flags = {"placeable-neutral","player-creation"},
minable = {mining_time = 0.2, result = "electric-foundry"},
@ -50,7 +50,7 @@ data:extend({
{
sound =
{
filename = "__bzfoundry2__/sound/entity/foundry/foundry.ogg",
filename = "__bzfoundry__/sound/entity/foundry/foundry.ogg",
volume = 0.5,
audible_distance_modifier = 0.6
},
@ -58,24 +58,24 @@ data:extend({
fade_out_ticks = 20,
sound_accents =
{
{sound = {filename = "__bzfoundry2__/sound/entity/foundry/foundry-pipe-out.ogg", volume = 0.9, audible_distance_modifier = 0.4}, frame = 2},
{sound = {filename = "__bzfoundry2__/sound/entity/foundry/foundry-slide-close.ogg", volume = 0.65, audible_distance_modifier = 0.3}, frame = 18},
{sound = {filename = "__bzfoundry2__/sound/entity/foundry/foundry-clamp.ogg", volume = 0.45, audible_distance_modifier = 0.3}, frame = 39},
{sound = {filename = "__bzfoundry2__/sound/entity/foundry/foundry-slide-stop.ogg", volume = 0.7, audible_distance_modifier = 0.4}, frame = 43},
{sound = {variations = sound_variations("__bzfoundry2__/sound/entity/foundry/foundry-fire-whoosh", 3, 0.8), audible_distance_modifier = 0.3}, frame = 64},
{sound = {filename = "__bzfoundry2__/sound/entity/foundry/foundry-metal-clunk.ogg", volume = 0.65, audible_distance_modifier = 0.4}, frame = 64},
{sound = {filename = "__bzfoundry2__/sound/entity/foundry/foundry-slide-open.ogg", volume = 0.65, audible_distance_modifier = 0.3}, frame = 74},
{sound = {filename = "__bzfoundry2__/sound/entity/foundry/foundry-pipe-in.ogg", volume = 0.75, audible_distance_modifier = 0.4}, frame = 106},
{sound = {filename = "__bzfoundry2__/sound/entity/foundry/foundry-smoke-puff.ogg", volume = 0.8, audible_distance_modifier = 0.3}, frame = 106},
{sound = {variations = sound_variations("__bzfoundry2__/sound/entity/foundry/foundry-pour", 2, 0.7)}, frame = 110},
{sound = {filename = "__bzfoundry2__/sound/entity/foundry/foundry-rocks.ogg", volume = 0.65, audible_distance_modifier = 0.3}, frame = 120},
{sound = {filename = "__bzfoundry2__/sound/entity/foundry/foundry-blade.ogg", volume = 0.7}, frame = 126},
{sound = {filename = "__bzfoundry__/sound/entity/foundry/foundry-pipe-out.ogg", volume = 0.9, audible_distance_modifier = 0.4}, frame = 2},
{sound = {filename = "__bzfoundry__/sound/entity/foundry/foundry-slide-close.ogg", volume = 0.65, audible_distance_modifier = 0.3}, frame = 18},
{sound = {filename = "__bzfoundry__/sound/entity/foundry/foundry-clamp.ogg", volume = 0.45, audible_distance_modifier = 0.3}, frame = 39},
{sound = {filename = "__bzfoundry__/sound/entity/foundry/foundry-slide-stop.ogg", volume = 0.7, audible_distance_modifier = 0.4}, frame = 43},
{sound = {variations = sound_variations("__bzfoundry__/sound/entity/foundry/foundry-fire-whoosh", 3, 0.8), audible_distance_modifier = 0.3}, frame = 64},
{sound = {filename = "__bzfoundry__/sound/entity/foundry/foundry-metal-clunk.ogg", volume = 0.65, audible_distance_modifier = 0.4}, frame = 64},
{sound = {filename = "__bzfoundry__/sound/entity/foundry/foundry-slide-open.ogg", volume = 0.65, audible_distance_modifier = 0.3}, frame = 74},
{sound = {filename = "__bzfoundry__/sound/entity/foundry/foundry-pipe-in.ogg", volume = 0.75, audible_distance_modifier = 0.4}, frame = 106},
{sound = {filename = "__bzfoundry__/sound/entity/foundry/foundry-smoke-puff.ogg", volume = 0.8, audible_distance_modifier = 0.3}, frame = 106},
{sound = {variations = sound_variations("__bzfoundry__/sound/entity/foundry/foundry-pour", 2, 0.7)}, frame = 110},
{sound = {filename = "__bzfoundry__/sound/entity/foundry/foundry-rocks.ogg", volume = 0.65, audible_distance_modifier = 0.3}, frame = 120},
{sound = {filename = "__bzfoundry__/sound/entity/foundry/foundry-blade.ogg", volume = 0.7}, frame = 126},
},
max_sounds_per_prototype = 2
},
water_reflection =
{
pictures = util.sprite_load("__bzfoundry2__/graphics/entity/electric-foundry/foundry-reflection",
pictures = util.sprite_load("__bzfoundry__/graphics/entity/electric-foundry/foundry-reflection",
{
scale = 4,
shift = {0,2}
@ -86,7 +86,7 @@ data:extend({
{
type = "corpse",
name = "electric-foundry-remnants",
icon = "__bzfoundry2__/graphics/icons/electric-foundry.png",
icon = "__bzfoundry__/graphics/icons/electric-foundry.png",
flags = {"placeable-neutral", "not-on-map"},
hidden_in_factoriopedia = true,
subgroup = "smelting-machine-remnants",
@ -101,7 +101,7 @@ data:extend({
remove_on_tile_placement = false,
animation =
{
filename = "__bzfoundry2__/graphics/entity/electric-foundry/foundry-remnants.png",
filename = "__bzfoundry__/graphics/entity/electric-foundry/foundry-remnants.png",
line_length = 1,
width = 494,
height = 478,
@ -114,7 +114,7 @@ data:extend({
{
type = "explosion",
name = "foundry-explosion",
icon = "__bzfoundry2__/graphics/icons/electric-foundry.png",
icon = "__bzfoundry__/graphics/icons/electric-foundry.png",
flags = {"not-on-map"},
hidden = true,
subgroup = "smelting-machine-explosions",

View file

@ -2,7 +2,7 @@ local foundry_animation_speed = 0.16
local frames = 128
local function foundry_main_pictures()
return util.sprite_load("__bzfoundry2__/graphics/entity/electric-foundry/foundry-main",
return util.sprite_load("__bzfoundry__/graphics/entity/electric-foundry/foundry-main",
{
animation_speed = foundry_animation_speed,
frame_count = frames,
@ -11,7 +11,7 @@ local function foundry_main_pictures()
end
local function foundry_main_shadow_pictures()
return util.sprite_load("__bzfoundry2__/graphics/entity/electric-foundry/foundry-shadow",
return util.sprite_load("__bzfoundry__/graphics/entity/electric-foundry/foundry-shadow",
{
animation_speed = foundry_animation_speed,
frame_count = frames,
@ -25,7 +25,7 @@ local function foundry_working_pictures()
{
fadeout = true,
animation =
util.sprite_load("__bzfoundry2__/graphics/entity/electric-foundry/foundry-working",
util.sprite_load("__bzfoundry__/graphics/entity/electric-foundry/foundry-working",
{
animation_speed = foundry_animation_speed,
frame_count = frames,
@ -41,7 +41,7 @@ local function foundry_lights_pictures()
effect = "flicker",
fadeout = true,
animation =
util.sprite_load("__bzfoundry2__/graphics/entity/electric-foundry/foundry-lights",
util.sprite_load("__bzfoundry__/graphics/entity/electric-foundry/foundry-lights",
{
draw_as_glow = true,
animation_speed = foundry_animation_speed,
@ -57,7 +57,7 @@ local function foundry_status_lamp_pictures()
return
{
animation =
util.sprite_load("__bzfoundry2__/graphics/entity/electric-foundry/foundry-status-lamp",
util.sprite_load("__bzfoundry__/graphics/entity/electric-foundry/foundry-status-lamp",
{
draw_as_glow = true,
repeat_count = frames,

View file

@ -10,7 +10,7 @@ local foundry = table.deepcopy(data.raw["assembling-machine"]["electric-foundry"
meld(foundry, {
name = "foundry",
next_upgrade = "electric-foundry",
icon = "__bzfoundry2__/graphics/icons/foundry.png",
icon = "__bzfoundry__/graphics/icons/foundry.png",
minable = {mining_time = 0.2, result = "foundry"},
energy_usage = "180kW",
energy_source = {
@ -32,8 +32,8 @@ meld(foundry, {
},
})
foundry.graphics_set.animation.layers[1].filenames = {
"__bzfoundry2__/graphics/entity/foundry/foundry-main-1.png",
"__bzfoundry2__/graphics/entity/foundry/foundry-main-2.png"
"__bzfoundry__/graphics/entity/foundry/foundry-main-1.png",
"__bzfoundry__/graphics/entity/foundry/foundry-main-2.png"
}
data:extend({
@ -41,7 +41,7 @@ data:extend({
{
type = "corpse",
name = "foundry-remnants",
icon = "__bzfoundry2__/graphics/icons/foundry.png",
icon = "__bzfoundry__/graphics/icons/foundry.png",
flags = {"placeable-neutral", "not-on-map"},
hidden_in_factoriopedia = true,
subgroup = "smelting-machine-remnants",
@ -56,7 +56,7 @@ data:extend({
remove_on_tile_placement = false,
animation =
{
filename = "__bzfoundry2__/graphics/entity/foundry/foundry-remnants.png",
filename = "__bzfoundry__/graphics/entity/foundry/foundry-remnants.png",
line_length = 1,
width = 494,
height = 478,

View file

@ -14,7 +14,7 @@ data:extend({
{
type = "item",
name = "foundry",
icon = "__bzfoundry2__/graphics/icons/foundry.png",
icon = "__bzfoundry__/graphics/icons/foundry.png",
icon_size = 64,
subgroup = "founding-machines",
order = "z[foundry]",
@ -32,7 +32,7 @@ data:extend({
type = "technology",
name = "foundry",
icon_size = 256,
icon = "__bzfoundry2__/graphics/icons/technology/foundry.png",
icon = "__bzfoundry__/graphics/icons/technology/foundry.png",
prerequisites = {"automation"},
effects = {
{type = "unlock-recipe", recipe = "foundry"},
@ -62,7 +62,7 @@ data:extend({
{
type = "item",
name = "electric-foundry",
icon = "__bzfoundry2__/graphics/icons/electric-foundry.png",
icon = "__bzfoundry__/graphics/icons/electric-foundry.png",
icon_size = 64,
subgroup = "founding-machines",
order = "z[foundryelectric]",
@ -93,7 +93,7 @@ data:extend({
type = "technology",
name = "electric-foundry",
icon_size = 256,
icon = "__bzfoundry2__/graphics/icons/technology/electric-foundry.png",
icon = "__bzfoundry__/graphics/icons/technology/electric-foundry.png",
prerequisites = {"automation-3"},
effects = {
{type = "unlock-recipe", recipe = "electric-foundry"},
@ -117,7 +117,7 @@ if util.me.founding_plates() then
type = "technology",
name = "advanced-founding",
icons = {
{icon = "__bzfoundry2__/graphics/icons/technology/foundry.png", icon_size = 256},
{icon = "__bzfoundry__/graphics/icons/technology/foundry.png", icon_size = 256},
(mods.bzcarbon and
{ icon = "__bzcarbon__/graphics/icons/graphite-2.png",
icon_size = 128, scale=0.5, shift={32, -32}})
@ -153,7 +153,7 @@ if util.me.founding_plates() then
type = "technology",
name = "advanced-founding-space",
icons = {
{icon = "__bzfoundry2__/graphics/icons/technology/foundry.png", icon_size = 256},
{icon = "__bzfoundry__/graphics/icons/technology/foundry.png", icon_size = 256},
(mods.bzcarbon and
{ icon = "__bzcarbon__/graphics/icons/graphite-2.png",
icon_size = 128, scale=0.5, shift={32, -32}})