Restructure repository

This commit is contained in:
Simon Brodtmann 2025-10-18 23:50:18 +02:00
parent 16fdf8a220
commit 4cfe87fcf0
86 changed files with 0 additions and 37 deletions

427
bzfoundry2/LICENSE Normal file
View file

@ -0,0 +1,427 @@
Attribution-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-ShareAlike 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.

194
bzfoundry2/changelog.txt Normal file
View file

@ -0,0 +1,194 @@
---------------------------------------------------------------------------------------------------
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:
- 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

@ -0,0 +1,29 @@
local me = require("me")
local util = {}
util.me = me
function decode(data)
if type(data) == "string" then return data end
local str = {}
for i = 2, #data do
str[i-1] = decode(data[i])
end
return table.concat(str, "")
end
function util.get_list()
local p = game.item_prototypes[me.name.."-list"]
if p then
data = p.localised_description
return decode(data)
end
end
function util.force_enable_recipe(event, recipe_name)
if game.players[event.player_index].force.recipes[recipe_name] then
game.players[event.player_index].force.recipes[recipe_name].enabled=true
end
end
return util

View file

@ -0,0 +1,25 @@
local util = require("data-util")
require("refractory-updates")
-- Prevent production deadlock
if mods.Bio_Industries then
util.remove_ingredient("foundry", "silica")
end
if data.raw.item["coke"] and not mods.Krastorio2 then
if deadlock then
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")
end
end
util.add_to_product("vtk-deepcore-mining-ore-chunk-refining-coal-focus", "vtk-deepcore-mining-coal-chunk", 8)
util.add_to_product("vtk-deepcore-mining-ore-chunk-refining", "vtk-deepcore-mining-coal-chunk", 10)
util.add_to_product("vtk-deepcore-mining-ore-chunk-refining-no-uranium", "vtk-deepcore-mining-coal-chunk", 10)
util.set_vtk_dcm_ingredients()

View file

@ -0,0 +1 @@
require("foundry-updates")

1273
bzfoundry2/data-util.lua Normal file

File diff suppressed because it is too large Load diff

10
bzfoundry2/data.lua Normal file
View file

@ -0,0 +1,10 @@
local util = require("data-util")
require("prototypes/categories")
if util.me.enable() then
require("prototypes/coke")
require("prototypes/foundry")
require("prototypes/entity/electric-foundry")
require("prototypes/entity/foundry")
end

View file

@ -0,0 +1,49 @@
local util = require("data-util")
if util.me.enable() then
util.set_to_founding("steel-plate")
util.replace_some_ingredient("steel-plate", "iron-plate", 1, util.me.carbon(), 1)
util.multiply_time("steel-plate", 4/5)
util.add_prerequisite("steel-processing", "foundry")
util.set_to_founding("tungsten-carbide")
util.add_ingredient("tungsten-carbide", util.me.carbon(), 1)
util.set_to_founding("cuw")
util.set_to_founding(mods.Krastorio2 and "kr-silicon" or "silicon")
util.add_ingredient(mods.Krastorio2 and "kr-silicon" or "silicon", util.me.carbon(), 1)
util.set_to_founding("cermet") -- from zirconium
util.set_to_founding("crucible") -- from graphite
util.set_category("solder", "basic-founding")
else
-- If we're not using Foundry buildings, add founding recipes to assemblers in vanilla, or furnaces in K2
local sought = mods.Krastorio2 and "smelting" or "crafting"
for i, machine in pairs(data.raw["assembling-machine"]) do
for j, category in pairs(machine.crafting_categories) do
if category == sought then
util.add_crafting_category("assembling-machine", machine.name, "founding")
if util.me.basic_founding() then
util.add_crafting_category("assembling-machine", machine.name, "basic-founding")
end
break
end
end
end
util.add_crafting_category("assembling-machine", "industrial-furnace", "founding")
util.add_crafting_category("assembling-machine", "kr-advanced-furnace", "founding")
if util.me.basic_founding() then
util.add_crafting_category("assembling-machine", "industrial-furnace", "basic-founding")
util.add_crafting_category("assembling-machine", "kr-advanced-furnace", "basic-founding")
end
end
for i, machine in pairs(util.me.get_other_machines()) do
log("Allowing "..machine.." to handle founding")
util.add_crafting_category("assembling-machine", machine, "founding")
if util.me.basic_founding() then
util.add_crafting_category("assembling-machine", machine, "basic-founding")
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 KiB

View file

@ -0,0 +1,12 @@
return
{
width = 442,
height = 356,
shift = util.by_pixel( 30.5, -7.5),
line_length = 8,
filenames = {
"-1.png",
"-2.png",
},
lines_per_file = 8,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

View file

@ -0,0 +1,12 @@
return
{
width = 376,
height = 398,
shift = util.by_pixel( 0.0, -6.0),
line_length = 8,
filenames = {
"-1.png",
"-2.png",
},
lines_per_file = 8,
}

View file

@ -0,0 +1,7 @@
return
{
width = 38,
height = 46,
shift = util.by_pixel( -0.5, 6.5),
line_length = 1,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View file

@ -0,0 +1,12 @@
return
{
width = 514,
height = 214,
shift = util.by_pixel( 47.5, 29.0),
line_length = 6,
filenames = {
"-1.png",
"-2.png",
},
lines_per_file = 11,
}

View file

@ -0,0 +1,7 @@
return
{
width = 122,
height = 142,
shift = util.by_pixel( 26.5, -42.5),
line_length = 1,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

View file

@ -0,0 +1,12 @@
return
{
width = 314,
height = 290,
shift = util.by_pixel( 25.0, -9.5),
line_length = 8,
filenames = {
"-1.png",
"-2.png",
},
lines_per_file = 8,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

21
bzfoundry2/info.json Normal file
View file

@ -0,0 +1,21 @@
{
"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

@ -0,0 +1,50 @@
[entity-name]
foundry=__ITEM__foundry__
electric-foundry=__ITEM__electric-foundry__
[entity-description]
foundry=Taví a odlévá kovy, může také tavit, či vyrábět jiné předměty.
electric-foundry=Taví a odlévá kovy, může také tavit, či vyrábět jiné předměty.
[item-name]
foundry=Slévárna
electric-foundry=Elektrická slévárna
coke=Koks
[item-description]
foundry=Taví a odlévá kovy, může také tavit, či vyrábět jiné předměty.
electric-foundry=Taví a odlévá kovy, může také tavit, či vyrábět jiné předměty.
coke=Ekologické palivo a zdroj uhlíku.
[recipe-name]
solid-fuel-from-coal=Tuhé palivo z uhlí
with-refractory=__1__ with refractory
[recipe-description]
solid-fuel-from-coal=Vyrábí tuhé palivo z uhlí, ztrátový proces.
[technology-name]
foundry=__ITEM__foundry__
electric-foundry=__ITEM__electric-foundry__
advanced-founding=Pokročilé slévárenství
advanced-founding-space=Pokročilé slévárenství pro mimozemské materiály
[technology-description]
foundry=Slévárenství, odlévání, koksování atd.
advanced-founding=Alternativní, efektivní receptury pro slévárenství
[mod-setting-name]
bzfoundry-recipe-bypass=Ignorované recepty
bzfoundry-smelt=Slévárny zpracovávají i rudu
bzfoundry-plates=Žáruvzdorné recepty (experimentální)
bzfoundry-hydrocarbon=Uhlovodíky (použité ve slévárenství)
bzfoundry-other-machines=Další entity, které taví a odlevají
bzfoundry-minimal=Minimální mód (odstraní budovy sléváren)
[mod-setting-description]
bzfoundry-recipe-bypass=Modifikace originálních receptů uvedených v seznamu nebudou povoleny. Jednotlivé recepty oddělte čárkami.
bzfoundry-smelt=Je-li povoleno, slévárny také taví i surové rudy.
bzfoundry-hydrocarbon=Zvolí jaký uhlovodík se bude používat pro odlévání. Slévárna se také používá pro koksování.\n[color=cyan]coke[/color], je přidán koks a recept na výrobu koksu.\n[color=cyan]solid-fuel[/color], je přidán neefektivní recept na výrobu tuhého paliva.\n[color=cyan]coal[/color], je použito uhlí.\n[color=cyan]none[/color], uhlovodíky nejsou používány (nedeporučuje se).
bzfoundry-other-machines=Seznam dalších entit „assembling-machine“, které mohou provádět odlévání. Například „kr-advanced-furnace“ z Krastorio2 nebo „industrial-furnace“ z AAII. Jednotlivé recepty oddělte čárkami.
bzfoundry-plates=[color=orange]EXPERIMENTÁLNÍ![/color] Přísady, produkty, cokoliv jiného může být změněno. Použitím jednoho nebo vícero žáruvzdorných materiálů slévárna může zvýšit výrobu plátů. Upozorňujeme, že se jedná o složité receptury.
bzfoundry-minimal=[color=yellow]POUŽÍVEJTE OPATRNĚ![/color] Deaktivuje budovy sléváren a změny receptur na nich závislé. Umožňuje hrát bez Foundry módu s Aluminium módem, přičemž Foundry mód je stále požadován s výchozím nastavením.

View file

@ -0,0 +1,52 @@
[entity-name]
foundry=__ITEM__foundry__
electric-foundry=__ITEM__electric-foundry__
[entity-description]
foundry=Melts and casts metals, can also heat up other things.
electric-foundry=Melts and casts metals, can also heat up other things.
[item-name]
foundry=Foundry
electric-foundry=Electric foundry
coke=Coke
[item-description]
foundry=Melts and casts metals, can also heat up other things.
electric-foundry=Melts and casts metals, can also heat up other things.
coke=A pure fuel and source of carbon.
[recipe-name]
solid-fuel-from-coal=Solid fuel from coal
with-refractory=__1__ with refractory
[recipe-description]
solid-fuel-from-coal=Make solid fuel from coal, a wasteful process.
[technology-name]
foundry=__ITEM__foundry__
electric-foundry=__ITEM__electric-foundry__
advanced-founding=Advanced founding
advanced-founding-space=Advanced founding of offworld materials
[technology-description]
foundry=Use heat for founding, coking, etc.
advanced-founding=Alternate, efficient recipes for founding
[mod-setting-name]
bzfoundry-recipe-bypass=Bypass recipes
bzfoundry-smelt=Foundry can smelt
bzfoundry-plates=Add refractory recipes (experimental)
bzfoundry-hydrocarbon=Hydrocarbon for founding
bzfoundry-other-machines=Other machines that can do founding
bzfoundry-woodcoke=Optional recipe for coke that uses wood
bzfoundry-minimal=Minimal mode (remove buildings)
[mod-setting-description]
bzfoundry-recipe-bypass=Skip modifying these recipes (comma-separated list).
bzfoundry-smelt=If true, the foundry building can also handle raw ore smelting.
bzfoundry-hydrocarbon=Which hydrocarbon to use for founding. The foundry building is also used for coking.\nIf [color=cyan]coke[/color], a coke item and recipe is added, if needed.\nIf [color=cyan]solid fuel[/color], an early but inefficient recipe is added.\nIf [color=cyan]coal[/color], that is used.\nIf [color=cyan]none[/color], no hydrocarbon is used in founding (not recommended).
bzfoundry-other-machines=Comma-separated list of other "assembling-machine" entities that can do "founding" recipes. Eg. Krastorio2's "kr-advanced-furnace", AAII's "industrial-furnace", or Space Exploration's "se-space-thermodynamics-laboratory"
bzfoundry-plates=[color=orange]EXPERIMENTAL[/color] Ingredients, products, or anything might change.\nUsing one or more refractories, foundries can increase output of plates.\nBe warned, these are complex recipes.
bzfoundry-minimal=[color=yellow]Use with caution![/color]\nIntended as a workaround for Factorio's required mod dependency system. Disables foundry buildings and recipe changes that rely on them. Allows you to play without Foundry with Aluminum, while still letting Foundry be a required dependency with default mod settings.
bzfoundry-woodcoke=Also works with solid fuel as hydrocarbon, but not coal.

View file

@ -0,0 +1,60 @@
[entity-name]
foundry=__ITEM__foundry__
electric-foundry=__ITEM__electric-foundry__
[entity-description]
foundry=金属を融解したのち鋳造します。他の物を高温に加熱するためにも使用できます。
electric-foundry=金属を融解したのち鋳造します。他の物を高温に加熱するためにも使用できます。
[item-name]
foundry=鋳造所
electric-foundry=電気鋳造所
coke=コークス
[item-description]
foundry=金属を融解したのち鋳造します。他の物を高温に加熱するためにも使用できます。
electric-foundry=金属を融解したのち鋳造します。他の物を高温に加熱するためにも使用できます。
coke=純粋な燃料であり、炭素の供給源
[recipe-name]
solid-fuel-from-coal=固形燃料 (石炭)
with-refractory=__1__ (耐熱)
[recipe-description]
solid-fuel-from-coal=無駄の多いプロセスで石炭から固形燃料を作成します。
[technology-name]
foundry=__ITEM__foundry__
electric-foundry=__ITEM__electric-foundry__
advanced-founding=高度な鋳造
advanced-founding-space=他の星の素材を使用した高度な鋳造
[technology-description]
foundry=熱を用いて鋳造やコークス作成を行います。
advanced-founding=高度で効率的な鋳造レシピ
[mod-setting-name]
bzfoundry-recipe-bypass=変更しないレシピ
bzfoundry-smelt=鋳造所で製錬可能
bzfoundry-plates=耐熱レシピを追加 (実験的)
bzfoundry-hydrocarbon=鋳造に使用する炭化水素類
bzfoundry-other-machines=鋳造所以外に鋳造を行える設備
bzfoundry-woodcoke=木材を使用するコークスのレシピ
bzfoundry-minimal=ミニマルモード (建造物を取り除く)
[mod-setting-description]
bzfoundry-recipe-bypass=指定したレシピの改変を行わない。(コンマ区切り)
bzfoundry-smelt=チェックすると、鋳造所で鉱石の製錬も行える。
bzfoundry-hydrocarbon=鋳造に使用する炭化水素類。コークス化にも使用。\n[color=cyan]coke[/color]ならコークスとレシピを必要に応じて追加。\n[color=cyan]solid fuel[/color]なら初期から使えるが非効率な固形燃料レシピを追加。\n[color=cyan]coal[/color]なら石炭を使用。\n[color=cyan]none[/color]なら鋳造に炭化水素類を使用しない (非推奨)。
bzfoundry-other-machines=鋳造所以外に "founding" レシピを実行できる "assembling-machine" エンティティの一覧。例: K2の "kr-advanced-furnace" や AAII の "industrial-furnace" (コンマ区切り)
bzfoundry-plates=[color=orange]実験的[/color] 材料、生産物などあらゆる点が変更される可能性があります。\n一つ以上の耐熱素材を使うことで鋳造所における板材の生産量を向上することが出来ます。\n警告: 煩雑なレシピです。
bzfoundry-minimal=[color=yellow]注意して使用のこと![/color]\nFactorioのMOD依存関係システムの問題回避を意図した設定。鋳造所とそれに依存したレシピを無効化します。デフォルトのMOD設定でFoundry MODを依存関係に残したまま、Aluminium MODをFoundry MODを使わずにプレイすることが可能になります。
bzfoundry-woodcoke=他の炭化水素類としては、固形燃料にも対応しますが石炭には対応しません。
[string-mod-setting]
bzfoundry-plates-yes=はい
bzfoundry-plates-no=いいえ
bzfoundry-hydrocarbon-coke=__ITEM__coke__
bzfoundry-hydrocarbon-solid-fuel=__ITEM__solid-fuel__
bzfoundry-hydrocarbon-coal=__ITEM__coal__
bzfoundry-hydrocarbon-none=なし

View file

@ -0,0 +1,50 @@
[entity-name]
foundry=__ITEM__foundry__
electric-foundry=__ITEM__electric-foundry__
[entity-description]
foundry=금속을 녹이고 주조합니다. 다른 것도 가열할 수 있습니다.
electric-foundry=금속을 녹이고 주조합니다. 다른 것도 가열할 수 있습니다.
[item-name]
foundry=주조 공장
electric-foundry=전기 주조 공장
coke=코크스
[item-description]
foundry=금속을 녹이고 주조합니다. 다른 것도 가열할 수 있습니다.
electric-foundry=금속을 녹이고 주조합니다. 다른 것도 가열할 수 있습니다.
coke=순수 연료 및 탄소 공급원입니다.
[recipe-name]
solid-fuel-from-coal=석탄으로부터 고체 연료 얻기
with-refractory=내화재를 포함한 __1__
[recipe-description]
solid-fuel-from-coal=석탄으로 고체 연료를 만드는 것은 낭비적인 과정입니다.
[technology-name]
foundry=__ITEM__foundry__
electric-foundry=__ITEM__electric-foundry__
advanced-founding=고급 주조
advanced-founding-space=오프월드 소재의 고급 주조
[technology-description]
foundry=주조와 코킹 등에 열을 사용합니다.
advanced-founding=대체적이고 효율적인 주조 방법
[mod-setting-name]
bzfoundry-recipe-bypass=우회 제작
bzfoundry-smelt=주조 공장이 녹일 수 있음
bzfoundry-plates=내화성 제작법 추가(실험적)
bzfoundry-hydrocarbon=주조용 탄화수소
bzfoundry-other-machines=다른 기계도 주조를 할 수 있습니다.
bzfoundry-minimal=최소 모드(건물 제거)
[mod-setting-description]
bzfoundry-recipe-bypass=이러한 제작법 수정을 건너뜁니다(콤마로 구분된 목록).
bzfoundry-smelt="예"이라면 주조 공장 건물도 기초적인 광석 제련 작업을 처리할 수 있습니다.
bzfoundry-hydrocarbon=주조에 사용할 탄화수소. 주조 공장 건물은 코킹에도 사용됩니다.\n[color=cyan]면 필요한 경우 코크스 품목과 제작법이 추가됩니다.\n[color=cyan]고체 연료[/color]인 경우, 초기지만 비효율적인 레시피가 추가됩니다.\n[color=cyan]석탄[/color]인 경우 이 값이 사용됩니다.\n[color=cyan]없음[/color]이면 주조에 탄화수소가 사용되지 않습니다(권장되지 않음).
bzfoundry-other-machines="주조" 제작법을 수행할 수 있는 "조립 기계" 엔티티의 목록입니다. Eg. Krastorio2의 "kr-advanced-furnace" 또는 AAI의 "Industrial-furnace"(쉼표로 구분된 목록)입니다.
bzfoundry-plates=[color=orange]실험적.[/color] 재료, 생산품 또는 모든 것이 변경될 수 있습니다.\n주조 공장은 하나 이상의 내화재를 사용하여 판 생산속도를 높일 수 있습니다.\n조심하십시오, 이것들은 복잡한 제작법입니다.
bzfoundry-minimal=[color=yellow]주의하여 사용하십시오![/color]\n팩토리오의 필수 모드 종속성 시스템에 대한 해결 방법으로 사용됩니다. 주조 공장 건물 및 이에 의존하는 제작법 변경을 비활성화합니다. 주조 공장이 기본 모드 설정에서 필수 의존성이 되도록 하면서도 알루미늄을 사용한 주조 공장 없이 플레이할 수 있습니다.

View file

@ -0,0 +1,50 @@
[entity-name]
foundry=Плавильня
electric-foundry=Электрическая плавильня
[entity-description]
foundry=Плавит и отливает металлы, может также нагревать другие предметы.
electric-foundry=Плавит и отливает металлы, может также нагревать другие предметы.
[item-name]
foundry=Плавильня
electric-foundry=Электрическая плавильня
coke=Кокс
[item-description]
foundry=Плавит и отливает металлы, может также нагревать другие предметы.
electric-foundry=Плавит и отливает металлы, может также нагревать другие предметы.
coke=Чистое топливо и источник углерода.
[recipe-name]
solid-fuel-from-coal=Твердое топливо из угля
with-refractory=2 x __1__
[recipe-description]
solid-fuel-from-coal=Производство твердого топлива из угля, расточительный процесс.
[technology-name]
foundry=__ITEM__foundry__
electric-foundry=__ITEM__electric-foundry__
advanced-founding=Продвинутое литейное производство
advanced-founding-space=Продвинутое литейное производство материалов внеземного происхождения
[technology-description]
foundry=Используйте тепло для литья, коксования и т.д.
advanced-founding=Альтернативные, эффективные рецепты для литейного производства
[mod-setting-name]
bzfoundry-recipe-bypass=Обходные рецепты
bzfoundry-smelt=Плавильня может переплавлять руду
bzfoundry-plates=Добавить рецепты тугоплавких материалов (экспериментально)
bzfoundry-hydrocarbon=Углеводород для литейного производства
bzfoundry-other-machines=Другие машины, которые могут заниматься литейным производством
bzfoundry-minimal=Минимальный режим (удаление зданий)
[mod-setting-description]
bzfoundry-recipe-bypass=Пропустить изменение этих рецептов (список, разделенный запятыми).
bzfoundry-smelt=Если включено, то плавильня также может выполнять плавку сырой руды.
bzfoundry-hydrocarbon=Какой углеводород использовать для литья.\nЕсли используется [color=cyan]кокс[/color], добавляется предмет и рецепт кокса.\nЕсли используется [color=cyan]твердое топливо[/color], добавляется ранний, но неэффективный рецепт.\nЕсли [color=cyan]уголь[/color], используется именно он.\nЕсли [color=cyan]нет[/color], углеводороды не используются при плавке (не рекомендуется).
bzfoundry-other-machines=Список других энтити " assembling-machine", которые могут выполнять рецепты "founding". Например, "kr-advanced-furnace" от Krastorio2, или "industrial-furnace" от AAII (список, разделенный запятыми).
bzfoundry-plates=[color=orange]ЭКСПЕРИМЕНТАЛЬНО[/color] Ингредиенты, продукты или что-то еще может измениться.\nИспользуя один или несколько тугоплавких материалов, плавильни могут увеличить выпуск плит.\nБудьте внимательны, это сложные рецепты.
bzfoundry-minimal=[color=yellow]Использовать осторожно![/color]\nПредназначен в качестве обходного пути для системы зависимостей требуемых модов Factorio. Отключает здания Foundry и изменения рецептов, которые зависят от них. Позволяет играть без плавильни с Алюминием, но при этом позволяет плавильне быть обязательной зависимостью с настройками мода по умолчанию.

View file

@ -0,0 +1,61 @@
[entity-name]
foundry=铸造厂
electric-foundry=电力铸造厂
[entity-description]
foundry=可以熔化和铸造金属,也可以加热其他东西。
electric-foundry=可以熔化和铸造金属,也可以加热其他东西。
[item-name]
foundry=铸造厂
electric-foundry=电力铸造厂
coke=焦炭
[item-description]
foundry=可以熔化和铸造金属,也可以加热其他东西。
electric-foundry=可以熔化和铸造金属,也可以加热其他东西。
coke=一种纯碳燃料。
[recipe-name]
solid-fuel-from-coal=煤制固体燃料
with-refractory=__1__加入耐火材料
[recipe-description]
solid-fuel-from-coal=用煤制作固体燃料,会有浪费。
[technology-name]
foundry=__ITEM__foundry__
electric-foundry=__ITEM__electric-foundry__
advanced-founding=高级铸造
advanced-founding-space=高级铸造(异星材料)
[technology-description]
foundry=利用热量进行铸造、焦化等。
advanced-founding=另一种高效的铸造合成。
[mod-setting-name]
bzfoundry-recipe-bypass=跳过合成
bzfoundry-smelt=铸造厂可以冶炼
bzfoundry-plates=加入耐火材料的合成(实验性功能)
bzfoundry-hydrocarbon=用于铸造的燃料
bzfoundry-other-machines=其它铸造厂类型的机器
bzfoundry-minimal=简洁模式(移除铸造厂)
[mod-setting-description]
bzfoundry-recipe-bypass=跳过修改这些合成(用逗号分开)。
bzfoundry-smelt=如果启用,铸造厂也可以冶炼矿物。
bzfoundry-hydrocarbon=使用哪种燃料进行铸造。
bzfoundry-other-machines=其他可以铸造的机器用逗号分开尤其是模组。例如K2kr-advanced-furnace太空探索se-space-thermodynamics-laboratory
bzfoundry-plates=[color=orange]实验性功能[/color]\n合成配方和其他东西都可能会改变。\n通过使用一种或更多的耐火材料铸造厂可以增加板材的产量。\n请注意将会有更复杂的合成配方。
bzfoundry-minimal=[color=yellow]谨慎使用[/color]\n将会禁用所有依赖于铸造的建筑和合成允许在没有铸造厂的前提下还可以游玩BZ-铝。
[string-mod-setting]
bzfoundry-hydrocarbon-coke=焦炭,会加入焦炭及其合成。
bzfoundry-hydrocarbon-solid-fuel=固体燃料,前期加入用煤制作固体燃料的配方。
bzfoundry-hydrocarbon-coal=
bzfoundry-hydrocarbon-none=不用燃料
bzfoundry-plates-yes=启用
bzfoundry-plates-no=不启用
[mod-name]
bzfoundry=BZ-铸造厂

71
bzfoundry2/me.lua Normal file
View file

@ -0,0 +1,71 @@
local me = {}
me.name = "bzfoundry"
function me.basic_founding()
return mods.bztin or mods.bzaluminum2
end
function me.woodcoke()
return me.get_setting("bzfoundry-woodcoke")
end
function me.founding_plates()
return me.get_setting("bzfoundry-plates") == "yes"
end
function me.smelt()
return me.get_setting("bzfoundry-smelt")
end
function me.enable()
return not me.get_setting("bzfoundry-minimal")
end
function me.carbon()
if mods["Krastorio2"] then return "kr-coke" end
if me.get_setting("bz-all-intermediates") then return "coke" end
return me.get_setting("bzfoundry-hydrocarbon")
end
function me.carbonrecipe()
local carbon = me.carbon()
if carbon == "coke" or carbon == "kr-coke" then
return me.carbon()
elseif carbon == "solid-fuel" then
return "solid-fuel-from-coal"
end
return nil
end
function me.get_other_machines()
local machines = {}
if me.get_setting(me.name.."-other-machines") then
for machine in string.gmatch(me.get_setting(me.name.."-other-machines"), '[^",%s]+') do
table.insert(machines, machine)
end
end
return machines
end
function me.get_setting(name)
if settings.startup[name] == nil then
return nil
end
return settings.startup[name].value
end
me.bypass = {}
if me.get_setting(me.name.."-recipe-bypass") then
for recipe in string.gmatch(me.get_setting(me.name.."-recipe-bypass"), '[^",%s]+') do
me.bypass[recipe] = true
end
end
function me.add_modified(name)
if me.get_setting(me.name.."-list") then
table.insert(me.list, name)
end
end
return me

View file

@ -0,0 +1,19 @@
local util = require("data-util")
data:extend({
{ type = "recipe-category", name = "founding"},
{ type = "item-subgroup", name = "founding-machines", group = "production", order = "d-f"},
{ type = "item-subgroup", name = "foundry-intermediate", group = "intermediate-products",
order = util.se6() and "a-b-z" or "c-z"},
})
if util.me.basic_founding() then
data:extend({
{ type = "recipe-category", name = "basic-founding"},
})
for i, character in pairs(data.raw.character) do
if character.crafting_categories then
table.insert(character.crafting_categories, "basic-founding")
end
end
end

View file

@ -0,0 +1,80 @@
local util = require("data-util")
if util.me.carbon() == "coke" and not data.raw.item["coke"] then
data:extend({
{
type = "item",
name = "coke",
icon = "__bzfoundry__/graphics/icons/coke-icon.png",
icon_size = 128,
pictures = {
{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",
fuel_acceleration_multiplier = 1.2,
fuel_top_speed_multiplier = 1,
subgroup = "raw-material",
order = "c[coke]",
stack_size = 50
},
{
type = "recipe",
name = "coke",
category = "founding",
ingredients = {{type="item", name="coal", amount=2}},
results = {{ type = "item", name = "coke", amount = 1 }},
energy_required = 3.2,
enabled=false,
},
})
if util.me.woodcoke() then
data:extend({
{
type = "recipe",
name = "woodcoke",
category = "founding",
ingredients = {{type="item", name="coal", amount=1}, {type="item", name="wood", amount=2}},
results = {{ type = "item", name = "coke", amount = 1 }},
energy_required = 3.2,
enabled=false,
icons = {
{ 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}},
},
},
})
end
elseif util.me.carbon() == "solid-fuel" then
data:extend({
{
type = "recipe",
name = "solid-fuel-from-coal",
category = "founding",
ingredients = {{type="item", name="coal", amount=4}},
results = {{ type = "item", name = "solid-fuel", amount = 1 }},
energy_required = 3.2,
enabled=false,
},
})
if util.me.woodcoke() then
data:extend({
{
type = "recipe",
name = "woodcoke",
category = "founding",
ingredients = {{type="item", name="coal", amount=3}, {type="item", name="wood", amount=2}},
results = {{ type = "item", name = "solid-fuel", amount = 1 }},
energy_required = 3.2,
enabled=false,
icons = {
{ icon = "__base__/graphics/icons/solid-fuel.png", icon_size = 64, icon_mipmaps=4},
{ icon = "__base__/graphics/icons/wood.png", icon_size = 64, scale=0.25, shift={8,-8}, icon_mipmaps=4},
},
},
})
end
end

View file

@ -0,0 +1,337 @@
require("util")
local futil = require("data-util")
require ("sound-util")
require ("circuit-connector-sprites")
local hit_effects = require("__base__.prototypes.entity.hit-effects")
local sounds = require("__base__.prototypes.entity.sounds")
local explosion_animations = require("__base__/prototypes/entity/explosion-animations")
local particle_animations = require("__base__/prototypes/particle-animations")
data:extend({
{
type = "assembling-machine",
name = "electric-foundry",
icon = "__bzfoundry__/graphics/icons/electric-foundry.png",
icon_size = 64,
flags = {"placeable-neutral","player-creation"},
minable = {mining_time = 0.2, result = "electric-foundry"},
max_health = 300,
fast_replaceable_group = "foundry",
corpse = "electric-foundry-remnants",
dying_explosion = "foundry-explosion",
circuit_wire_max_distance = assembling_machine_circuit_wire_max_distance,
circuit_connector = circuit_connector_definitions["foundry"],
collision_box = {{-1.7, -1.7}, {1.7, 1.7}},
selection_box = {{-2, -2}, {2, 2}},
crafting_categories = {"founding", futil.me.smelt() and "smelting" or nil},
energy_usage = "360kW",
drain = "12kW",
crafting_speed = 4,
energy_source =
{
type = "electric",
emissions_per_minute = { pollution = 2 },
usage_priority = "secondary-input",
},
allowed_effects = {"consumption", "speed", "productivity", "pollution"},
damaged_trigger_effect = hit_effects.entity(),
drawing_box_vertical_extension = 1.3,
module_slots = 3,
icon_draw_specification = {scale = 2, shift = {0, -0.3}},
icons_positioning =
{
{inventory_index = defines.inventory.assembling_machine_modules, shift = {0, 1.25}}
},
perceived_performance = {minimum = 0.25, maximum = 20},
graphics_set = require("foundry-pictures").graphics_set,
open_sound = sounds.steam_open,
close_sound = sounds.steam_close,
working_sound =
{
sound =
{
filename = "__bzfoundry__/sound/entity/foundry/foundry.ogg",
volume = 0.5,
audible_distance_modifier = 0.6
},
fade_in_ticks = 4,
fade_out_ticks = 20,
sound_accents =
{
{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("__bzfoundry__/graphics/entity/electric-foundry/foundry-reflection",
{
scale = 4,
shift = {0,2}
}),
rotate = false
}
},
{
type = "corpse",
name = "electric-foundry-remnants",
icon = "__bzfoundry__/graphics/icons/electric-foundry.png",
flags = {"placeable-neutral", "not-on-map"},
hidden_in_factoriopedia = true,
subgroup = "smelting-machine-remnants",
order = "d[foundry]",
selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
tile_width = 5,
tile_height = 5,
selectable_in_game = false,
time_before_removed = 60 * 60 * 15, -- 15 minutes
expires = false,
final_render_layer = "remnants",
remove_on_tile_placement = false,
animation =
{
filename = "__bzfoundry__/graphics/entity/electric-foundry/foundry-remnants.png",
line_length = 1,
width = 494,
height = 478,
frame_count = 1,
direction_count = 1,
shift = util.by_pixel( -1.5, -5.5),
scale = 0.4
}
},
{
type = "explosion",
name = "foundry-explosion",
icon = "__bzfoundry__/graphics/icons/electric-foundry.png",
flags = {"not-on-map"},
hidden = true,
subgroup = "smelting-machine-explosions",
order = "d[foundry]",
height = 0,
animations = explosion_animations.big_explosion(),
smoke = "smoke-fast",
smoke_count = 2,
smoke_slow_down_factor = 1,
sound = sounds.large_explosion(0.7, 1.0),
created_effect =
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-particle",
repeat_count = 10,
probability = 1,
particle_name = "oil-refinery-metal-particle-big",
offsets =
{
{ 0.7734, -0.6484 },
{ -0.7266, 0.5859 }
},
offset_deviation = { { -0.6875, -0.6875 }, { 0.6875, 0.6875 } },
initial_height = 0.8,
initial_height_deviation = 0.49,
initial_vertical_speed = 0.088,
initial_vertical_speed_deviation = 0.05,
speed_from_center = 0.03,
speed_from_center_deviation = 0.05
},
{
type = "create-particle",
repeat_count = 38,
probability = 1,
particle_name = "oil-refinery-metal-particle-medium",
offsets = { { 0, 0 } },
offset_deviation = { { -0.9805, -0.8867 }, { 0.9805, 0.8867 } },
initial_height = 0.6,
initial_height_deviation = 0.5,
initial_vertical_speed = 0.098,
initial_vertical_speed_deviation = 0.05,
speed_from_center = 0.07,
speed_from_center_deviation = 0.05
},
{
type = "create-particle",
repeat_count = 10,
probability = 1,
particle_name = "foundry-metal-particle-big",
offsets =
{
{ -1.492, -1.453 },
{ 1.555, -1.469 },
{ 1.477, 1.469 },
{ -0.6172, 0.3281 }
},
offset_deviation = { { -0.9961, -0.5938 }, { 0.9961, 0.5938 } },
initial_height = 0.4,
initial_height_deviation = 0.5,
initial_vertical_speed = 0.075,
initial_vertical_speed_deviation = 0.05,
speed_from_center = 0.04,
speed_from_center_deviation = 0.05
},
{
type = "create-particle",
repeat_count = 35,
probability = 1,
particle_name = "foundry-metal-particle-medium",
offsets =
{
{ -0.02344, -0.8984 }
},
offset_deviation = { { -0.5, -0.2969 }, { 0.5, 0.2969 } },
initial_height = 0.7,
initial_height_deviation = 0.15,
initial_vertical_speed = 0.166,
initial_vertical_speed_deviation = 0.047,
speed_from_center = 0.05,
speed_from_center_deviation = 0.005
},
{
type = "create-particle",
repeat_count = 20,
particle_name = "foundry-metal-particle-small",
offset_deviation = { { -0.5, -0.5 }, { 0.5, 0.5 } },
initial_height = 0.5,
initial_height_deviation = 0.5,
initial_vertical_speed = 0.06,
initial_vertical_speed_deviation = 0.05,
speed_from_center = 0.04,
speed_from_center_deviation = 0.05
},
}
}
}
}
})
local make_particle = function(params)
return {
type = "optimized-particle",
name = params.name,
life_time = 60 * 15,
render_layer = "object",
render_layer_when_on_ground = "corpse",
regular_trigger_effect_frequency = 2,
regular_trigger_effect = params.regular_trigger_effect,
ended_in_water_trigger_effect = {
{
type = "create-particle",
probability = 1,
affects_target = false,
show_in_tooltip = false,
particle_name = "tintable-water-particle",
apply_tile_tint = "secondary",
offset_deviation = { { -0.05, -0.05 }, { 0.05, 0.05 } },
initial_height = 0,
initial_height_deviation = 0.02,
initial_vertical_speed = 0.05,
initial_vertical_speed_deviation = 0.05,
speed_from_center = 0.01,
speed_from_center_deviation = 0.006,
frame_speed = 1,
frame_speed_deviation = 0,
tail_length = 2,
tail_length_deviation = 1,
tail_width = 3,
only_when_visible = true
},
{
type = "create-particle",
repeat_count = 10,
repeat_count_deviation = 6,
probability = 0.03,
affects_target = false,
show_in_tooltip = false,
particle_name = "tintable-water-particle",
apply_tile_tint = "primary",
offsets =
{
{ 0, 0 },
{ 0.01563, -0.09375 },
{ 0.0625, 0.09375 },
{ -0.1094, 0.0625 }
},
offset_deviation = { { -0.2969, -0.1992 }, { 0.2969, 0.1992 } },
initial_height = 0,
initial_height_deviation = 0.02,
initial_vertical_speed = 0.053,
initial_vertical_speed_deviation = 0.005,
speed_from_center = 0.02,
speed_from_center_deviation = 0.006,
frame_speed = 1,
frame_speed_deviation = 0,
tail_length = 9,
tail_length_deviation = 0,
tail_width = 1,
only_when_visible = true
},
{
type = "play-sound",
sound = sounds.small_splash
}
},
pictures = params.pictures,
shadows = params.shadows,
}
end
local small_smoke_trigger_effect = function()
return
{
type = "create-trivial-smoke",
smoke_name = "smoke-explosion-particle-small",
starting_frame_deviation = 0,
offset_deviation = {{-0.03, -0.03}, {0.03, 0.03}},
speed_from_center = nil
}
end
local default_smoke_trigger_effect = function()
return
{
type = "create-trivial-smoke",
smoke_name = "smoke-explosion-particle",
starting_frame_deviation = 5,
offset_deviation = {{-0.06, -0.06}, {0.06, 0.06}},
speed_from_center = 0.007
}
end
data:extend({
make_particle({
name = "foundry-metal-particle-small",
pictures = particle_animations.get_metal_particle_small_pictures({tint = {0.606, 0.408, 0.512, 1}}),
shadows = particle_animations.get_metal_particle_small_pictures({ tint = shadowtint(), shift = util.by_pixel (1,0)}),
regular_trigger_effect = nil,
}),
make_particle({
name = "foundry-metal-particle-medium",
pictures = particle_animations.get_metal_particle_medium_pictures({tint = {0.5, 0.5, 0.5, 1}}),
shadows = particle_animations.get_metal_particle_medium_pictures({ tint = shadowtint(), shift = util.by_pixel (1,0)}),
regular_trigger_effect = small_smoke_trigger_effect()
}),
make_particle({
name = "foundry-metal-particle-big",
pictures = particle_animations.get_metal_particle_big_pictures({tint = {0.65, 0.40, 0.35, 1}}),
regular_trigger_effect = default_smoke_trigger_effect()
})
})
futil.add_crafting_category("assembling-machine", "electric-foundry", "basic-founding")

View file

@ -0,0 +1,111 @@
local foundry_animation_speed = 0.16
local frames = 128
local function foundry_main_pictures()
return util.sprite_load("__bzfoundry__/graphics/entity/electric-foundry/foundry-main",
{
animation_speed = foundry_animation_speed,
frame_count = frames,
scale = 0.4
})
end
local function foundry_main_shadow_pictures()
return util.sprite_load("__bzfoundry__/graphics/entity/electric-foundry/foundry-shadow",
{
animation_speed = foundry_animation_speed,
frame_count = frames,
draw_as_shadow = true,
scale = 0.4
})
end
local function foundry_working_pictures()
return
{
fadeout = true,
animation =
util.sprite_load("__bzfoundry__/graphics/entity/electric-foundry/foundry-working",
{
animation_speed = foundry_animation_speed,
frame_count = frames,
scale = 0.4
}
)
}
end
local function foundry_lights_pictures()
return
{
effect = "flicker",
fadeout = true,
animation =
util.sprite_load("__bzfoundry__/graphics/entity/electric-foundry/foundry-lights",
{
draw_as_glow = true,
animation_speed = foundry_animation_speed,
frame_count = frames,
blend_mode = "additive",
scale = 0.4
}
)
}
end
local function foundry_status_lamp_pictures()
return
{
animation =
util.sprite_load("__bzfoundry__/graphics/entity/electric-foundry/foundry-status-lamp",
{
draw_as_glow = true,
repeat_count = frames,
blend_mode = "additive",
scale = 0.4
}
)
}
end
local function foundry_chimney_smoke()
return
{
fadeout = true,
constant_speed = true,
render_layer = "wires",
animation =
{
filename = "__base__/graphics/entity/chemical-plant/chemical-plant-smoke-outer.png",
frame_count = 47,
line_length = 16,
width = 90,
height = 188,
animation_speed = 0.5,
shift = util.by_pixel(52, -131),
tint = {0.4, 0.4, 0.4, 1},
scale = 0.4
}
}
end
return {
graphics_set =
{
animation =
{
layers =
{
foundry_main_pictures(),
foundry_main_shadow_pictures()
}
},
working_visualisations =
{
foundry_working_pictures(),
foundry_lights_pictures(),
foundry_status_lamp_pictures(),
foundry_chimney_smoke()
}
}
}

View file

@ -0,0 +1,71 @@
require("util")
local futil = require("data-util")
local meld = require("meld")
local fuel = {"chemical"}
if mods.Krastorio2 then table.insert(fuel, "kr-vehicle-fuel") end
if mods["aai-industry"] then table.insert(fuel, "processed-chemical") end
local foundry = table.deepcopy(data.raw["assembling-machine"]["electric-foundry"])
meld(foundry, {
name = "foundry",
next_upgrade = "electric-foundry",
icon = "__bzfoundry__/graphics/icons/foundry.png",
minable = {mining_time = 0.2, result = "foundry"},
energy_usage = "180kW",
energy_source = {
type = "burner",
fuel_categories = fuel,
effectivity = 1,
emissions_per_minute = { pollution = 8 },
fuel_inventory_size = 1,
smoke =
{
{
name = "smoke",
frequency = 20,
position = {1, -1.7},
starting_vertical_speed = 0.1,
starting_frame_deviation = 60
}
}
},
})
foundry.graphics_set.animation.layers[1].filenames = {
"__bzfoundry__/graphics/entity/foundry/foundry-main-1.png",
"__bzfoundry__/graphics/entity/foundry/foundry-main-2.png"
}
data:extend({
foundry,
{
type = "corpse",
name = "foundry-remnants",
icon = "__bzfoundry__/graphics/icons/foundry.png",
flags = {"placeable-neutral", "not-on-map"},
hidden_in_factoriopedia = true,
subgroup = "smelting-machine-remnants",
order = "d[foundry]",
selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
tile_width = 5,
tile_height = 5,
selectable_in_game = false,
time_before_removed = 60 * 60 * 15, -- 15 minutes
expires = false,
final_render_layer = "remnants",
remove_on_tile_placement = false,
animation =
{
filename = "__bzfoundry__/graphics/entity/foundry/foundry-remnants.png",
line_length = 1,
width = 494,
height = 478,
frame_count = 1,
direction_count = 1,
shift = util.by_pixel( -1.5, -5.5),
scale = 0.4
}
}
})
futil.add_crafting_category("assembling-machine", "foundry", "basic-founding")

View file

@ -0,0 +1,195 @@
local util = require("data-util")
local foundry_ingredients = {{type="item", name="stone-brick", amount=20}, {type="item", name="iron-plate", amount=10}, {type="item", name="copper-plate", amount=5}}
if mods.bzlead then table.insert(foundry_ingredients, {type="item", name="lead-plate", amount=8}) end
if mods.Krastorio2 then
table.insert(foundry_ingredients, {type="item", name="kr-sand", amount=10})
elseif mods["aai-industry"] then
table.insert(foundry_ingredients, {type="item", name="sand", amount=10})
elseif data.raw.item["silica"] and data.raw.technology["silica-processing"] then
table.insert(foundry_ingredients, {type="item", name="silica", amount=20})
end
data:extend({
{
type = "item",
name = "foundry",
icon = "__bzfoundry__/graphics/icons/foundry.png",
icon_size = 64,
subgroup = "founding-machines",
order = "z[foundry]",
place_result = "foundry",
stack_size = 50
},
{
type = "recipe",
name = "foundry",
enabled = false,
ingredients = foundry_ingredients,
results = {{ type = "item", name = "foundry", amount = 1 }}
},
{
type = "technology",
name = "foundry",
icon_size = 256,
icon = "__bzfoundry__/graphics/icons/technology/foundry.png",
prerequisites = {"automation"},
effects = {
{type = "unlock-recipe", recipe = "foundry"},
util.me.carbonrecipe() and {type = "unlock-recipe", recipe = util.me.carbonrecipe()},
},
unit = {
count = 25,
ingredients = {{"automation-science-pack", 1}},
time = 10,
},
order = "foundry",
},
})
if util.me.woodcoke() then
util.add_unlock("foundry", "woodcoke")
end
if mods.Krastorio2 then
util.add_prerequisite("foundry", "kr-stone-processing")
elseif mods["aai-industry"] then
util.add_prerequisite("foundry", "sand-processing")
else
util.add_prerequisite("foundry", "silica-processing")
end
data:extend({
{
type = "item",
name = "electric-foundry",
icon = "__bzfoundry__/graphics/icons/electric-foundry.png",
icon_size = 64,
subgroup = "founding-machines",
order = "z[foundryelectric]",
place_result = "electric-foundry",
stack_size = 50
},
{
{
type = "bool-setting",
name = "bzfoundry-smelt",
setting_type = "startup",
default_value = false,
},
type = "recipe",
name = "electric-foundry",
enabled = false,
ingredients = {
{type="item", name="foundry", amount=1},
{type="item", name="steel-plate", amount=10},
{type="item", name="processing-unit", amount=4},
{type="item", name="concrete", amount=10},
(data.raw.item["zirconia"] and {type="item", name="zirconia", amount=10} or {type="item", name="stone-brick", amount=10}),
(data.raw.item["tungsten-plate"] and {type="item", name="tungsten-plate", amount=5} or nil),
},
results = {{ type = "item", name = "electric-foundry", amount = 1 }}
},
{
type = "technology",
name = "electric-foundry",
icon_size = 256,
icon = "__bzfoundry__/graphics/icons/technology/electric-foundry.png",
prerequisites = {"automation-3"},
effects = {
{type = "unlock-recipe", recipe = "electric-foundry"},
},
unit = {
count = 200,
ingredients = {{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1}},
time = 45,
},
order = "foundry",
},
})
if util.me.founding_plates() then
data:extend({
{
type = "technology",
name = "advanced-founding",
icons = {
{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}})
or (mods.bzsilicon and
{ icon = "__bzsilicon__/graphics/icons/silica.png",
icon_size = 64, scale=1, icon_mipmaps = 3, shift={32, -32}})
or (mods.bzzirconium and
{ icon = "__bzzirconium__/graphics/icons/zirconia.png",
icon_size = 128, scale=0.5, shift={32, -32}})
or (mods.bzaluminum2 and
{ icon = "__bzaluminum2__/graphics/icons/alumina.png",
icon_size = 128, scale=0.5, shift={32, -32}})
or { icon = "__base__/graphics/icons/stone-brick.png",
icon_size = 64, scale=1, icon_mipmaps = 4, shift={32, -32}}
},
effects = {},
prerequisites = {"electric-foundry", "utility-science-pack"},
unit = {
count = 1000,
ingredients = {{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
{"utility-science-pack", 1}},
time = 60,
},
order = "foundry",
}
})
if mods["space-exploration"] then
data:extend({
{
type = "technology",
name = "advanced-founding-space",
icons = {
{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}})
or (mods.bzsilicon and
{ icon = "__bzsilicon__/graphics/icons/silica.png",
icon_size = 64, scale=1, icon_mipmaps = 3, shift={32, -32}})
or (mods.bzzirconium and
{ icon = "__bzzirconium__/graphics/icons/zirconia.png",
icon_size = 128, scale=0.5, shift={32, -32}})
or (mods.bzaluminum2 and
{ icon = "__bzaluminum2__/graphics/icons/alumina.png",
icon_size = 128, scale=0.5, shift={32, -32}})
or { icon = "__base__/graphics/icons/stone-brick.png",
icon_size = 64, scale=1, icon_mipmaps = 4, shift={32, -32}}
},
effects = {},
prerequisites = {
"advanced-founding",
"se-processing-holmium",
"se-processing-iridium",
"se-processing-beryllium",
},
unit = {
count = 1000,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
{"utility-science-pack", 1},
{"se-rocket-science-pack", 1},
},
time = 60,
},
order = "foundry",
}
})
end
end

View file

@ -0,0 +1,167 @@
local rusty_locale = require("__rusty-locale__.locale")
local rusty_icons = require("__rusty-locale__.icons")
local futil = require("util")
local util = require("data-util")
function has_suffix(s, suffix)
return string.sub(s, -string.len(suffix), -1) == suffix
end
function has_prefix(s, prefix)
return string.sub(s, 1, string.len(prefix)) == prefix
end
function is_space(name)
return name:match("holmium") or name:match("beryllium") or name:match("iridium")
end
local suffixes = {"-plate", "-ingot"}
function check_name(name)
for i, suffix in pairs(suffixes) do
if has_suffix(name, suffix) then return true end
end
if name == "kr-rare-metals" then return true end
if name == "tungsten-carbide" then return true end
return false
end
function make_recipe(recipe)
local found_result = false
local new_results = {}
if recipe.results then -- standard recipes
for i, result in pairs(recipe.results) do
if result.name and check_name(result.name) then
found_result = result.name
new_results = futil.table.deepcopy(recipe.results)
break
end
end
end
if found_result then
log("Attempting to make refractory recipe for " .. recipe.name)
local r = futil.table.deepcopy(recipe)
r.name = r.name .. "-refractory"
r.main_product = found_result
r.results = {}
r.enabled = false
r.category = recipe.category == "casting" and "casting" or "founding"
r.subgroup = data.raw.item[found_result] and data.raw.item[found_result].subgroup or "foundry-intermediate"
icons = rusty_icons.of(data.raw.recipe[recipe.name])
table.insert(
icons,
(mods.bzcarbon and
{ icon = "__bzcarbon__/graphics/icons/graphite-2.png",
icon_size = 128, scale=0.125, shift={8, -8}})
or (mods.bzsilicon and
{ icon = "__bzsilicon__/graphics/icons/silica.png",
icon_size = 64, scale=0.25, icon_mipmaps = 3, shift={8, -8}})
or (mods.bzzirconium and
{ icon = "__bzzirconium__/graphics/icons/zirconia.png",
icon_size = 128, scale=0.125, shift={8, -8}})
or (mods.bzaluminum2 and
{ icon = "__bzaluminum2__/graphics/icons/alumina.png",
icon_size = 128, scale=0.125, shift={8, -8}})
or { icon = "__base__/graphics/icons/stone-brick.png",
icon_size = 64, scale=0.25, icon_mipmaps = 4, shift={8, -8}}
)
r.icons = icons
locale = rusty_locale.of_recipe(data.raw.recipe[recipe.name])
r.localised_name = {"recipe-name.with-refractory", locale.name}
r.results = new_results
make_ingredients_and_products(r, r.name)
r.allow_productivity = true
return r
end
return nil
end
-- Gets refractories for a recipe (currently all recipes use same refractories)
-- TODO make this more varied and interesting based on reality
function get_refractories(recipe, name)
local refractories = {}
if mods.bzcarbon then table.insert(refractories, "graphite") end
if mods.bzsilicon then table.insert(refractories, "silica") end
if #refractories < 2 and mods.bzzirconium and name ~= "zirconium-plate-refractory" then table.insert(refractories, "zirconia") end
if #refractories < 2 and mods.bzaluminum2 and name ~= "aluminum-plate-refractory" then table.insert(refractories, "alumina") end
if #refractories < 2 then table.insert(refractories, "stone-brick") end
return refractories
end
function make_ingredients_and_products(r, name)
local refractories = get_refractories(r, name)
local max_count = 1
for i, ingredient in pairs(r.ingredients) do
if ingredient.amount and ingredient.amount > max_count then
max_count = ingredient.amount
end
end
local refractory_amount = max_count
-- For space exploration, most ingots use 25 times less refractory
if mods["space-exploration"] and (has_suffix(name, "-ingot-refractory") or name == "tungsten-carbide-casting-refractory") then
if refractory_amount > 25 then refractory_amount = refractory_amount / 25 end
end
for i, refractory in pairs(refractories) do
for j, existing in pairs(r.ingredients) do
if existing.name == refractory then
log("Warning: "..name.." refractory recipe recipe unbalanced due to skipped ingredients")
goto skip
end
end
table.insert(r.ingredients, {type = "item", name = refractory, amount = refractory_amount})
end
::skip::
for i, result in pairs(r.results) do
if result.name and check_name(result.name) then
if result.amount then
result.amount = result.amount * 2
end
if result.amount_min then
result.amount_min = result.amount_min * 2
end
if result.amount_max then
result.amount_max = result.amount_max * 2
end
break
end
end
for i, refractory in pairs(refractories) do
table.insert(r.results, {type="item", name=refractory, amount=refractory_amount, ignored_by_productivity=refractory_amount,
ignored_by_stats=refractory_amount, probability=get_probability(#refractories)})
end
end
local roots = {0.5, 0.7, 0.8, 0.84, 0.87, 0.89, 0.9}
-- returns approx nth root of 0.5
function get_probability(n)
return roots[n]
end
if util.me.founding_plates() then
local new_recipes = {}
for name, recipe in pairs(data.raw.recipe) do
if not (recipe.category == "smelting" or (mods["space-exploration"] and recipe.category == "casting")) then goto continue end
if (name == "steel-plate" or
name == "imersium-plate" or
name == "tungsten-carbide" or -- exclude base recipe but not casting recipe
(name == "glass" and mods.bztin) or -- exclude glass when tin is in use, thematically
name == "se-naquium-ingot") then goto continue end
local new_recipe = make_recipe(recipe )
if new_recipe then
table.insert(new_recipes, new_recipe)
end
::continue::
end
data:extend(new_recipes)
for i, recipe in pairs(new_recipes) do
-- recipe unlock
if is_space(recipe.name) and data.raw.technology["advanced-founding-space"] then
util.add_effect("advanced-founding-space", {type="unlock-recipe", recipe=recipe.name})
else
util.add_effect("advanced-founding", {type="unlock-recipe", recipe=recipe.name})
end
end
end

View file

@ -0,0 +1,13 @@
-- WARNING WARNING WARNING
-- This file will be overwritten in mod zipfiles, edit bzlib/settings-util.lua
-- WARNING WARNING WARNING
local util = {}
function util.set_default_value(t, name, default)
if data.raw[t] and data.raw[t][name] then
data.raw[t][name].default_value = default
end
end
return util

59
bzfoundry2/settings.lua Normal file
View file

@ -0,0 +1,59 @@
data:extend({
{
type = "string-setting",
name = "bzfoundry-recipe-bypass",
setting_type = "startup",
default_value = "",
allow_blank = true,
order = "aaa",
},
{
type = "string-setting",
name = "bzfoundry-hydrocarbon",
setting_type = "startup",
allowed_values = {mods["Krastorio2"] and "kr-coke" or "coke", "solid-fuel", "coal", "none"},
default_value = mods["Krastorio2"] and "kr-coke" or "coke",
order = "aba",
},
{
type = "bool-setting",
name = "bzfoundry-smelt",
setting_type = "startup",
default_value = false,
order = "aca",
},
{
type = "string-setting",
name = "bzfoundry-other-machines",
setting_type = "startup",
default_value = "kr-advanced-furnace",
order = "acb",
},
{
type = "string-setting",
name = "bzfoundry-plates",
setting_type = "startup",
default_value = "no",
allowed_values = {"yes", "no"},
order = "acd",
},
{
type = "bool-setting",
name = "bzfoundry-minimal",
setting_type = "startup",
default_value = false,
hidden = not mods.bzaluminum2,
order = "zza",
},
})
if not mods.Krastorio2 then
data:extend({
{
type = "bool-setting",
name = "bzfoundry-woodcoke",
setting_type = "startup",
default_value = false,
order = "abb",
},
})
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bzfoundry2/thumbnail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
bzfoundry2/thumbnail.xcf Normal file

Binary file not shown.