2.0.0
3
.editorconfig
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.idea
|
||||||
|
*.zip
|
|
@ -1 +1,5 @@
|
||||||
# Tantalite2
|
# Tantalite
|
||||||
|
|
||||||
|
Updated for Factorio 2.0.
|
||||||
|
|
||||||
|
Original mod: https://mods.factorio.com/mod/Tantalite
|
20
Tantalite2/LICENSE.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2023 Timeken
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
16
Tantalite2/README.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# MetalsForYou
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
See changelog.txt
|
||||||
|
|
||||||
|
## Created by
|
||||||
|
|
||||||
|
|
||||||
|
## Thanks to
|
||||||
|
|
||||||
|
### Compatibility
|
||||||
|
|
||||||
|
|
||||||
|
### Localization
|
||||||
|
|
||||||
|
|
57
Tantalite2/changelog.txt
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.7.0
|
||||||
|
Date: 2024-07-29
|
||||||
|
Features:
|
||||||
|
- Added a way to target niobium and tantalum smelting.
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.6.0
|
||||||
|
Date: 2024-07-16
|
||||||
|
Features:
|
||||||
|
- Added tantalum titanium beam recipe.
|
||||||
|
- Added niobium tin cable to SE energy science pack 1.
|
||||||
|
- Reworked SE material science pack production chain 1-3 to work with Tantalite
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.5.1
|
||||||
|
Date: 2024-07-05
|
||||||
|
Features:
|
||||||
|
- Fixed duplicate ingredient error for energy pyroflux.
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.5.0
|
||||||
|
Date: 2024-07-04
|
||||||
|
Features:
|
||||||
|
- Added new pyroflux SE recipe.
|
||||||
|
- Added tantalum plate to SE conductivity data.
|
||||||
|
- Added tantalum plate to SE thermodynamics data.
|
||||||
|
- Fixed enriched tantalite smelting not unlocking.
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.4.0
|
||||||
|
Date: 2024-01-21
|
||||||
|
Features:
|
||||||
|
- Added thorium ore and prossesing for better balance with 248k. (ty dovahkiinPL for suggestion)
|
||||||
|
- Added tantalite ore to SE core fragment.
|
||||||
|
- Added niobium tin cable to advanced solar panel.
|
||||||
|
- Removed old unused files.
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.3.0
|
||||||
|
Date: 2024-01-02
|
||||||
|
Features:
|
||||||
|
- Added niobium tin cable.
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.2.0
|
||||||
|
Date: 2023-12-24
|
||||||
|
Features:
|
||||||
|
- Added 248k support (molten, pure and cast niobium)
|
||||||
|
- Added 248k support (molten, pure and cast tantalum)
|
||||||
|
- Added SE support (molten, ingot, etc... niobium)
|
||||||
|
- Added SE support (molten, ingot, etc... tantalum)
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.1.1
|
||||||
|
Date: 2023-12-19
|
||||||
|
Features:
|
||||||
|
- Electron gun now uses empty amplifier tube if Lasing Around is installed.
|
||||||
|
- Fixed some things that broke after the mod split.
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.1.0
|
||||||
|
Date: 2023-11-23
|
||||||
|
Features:
|
||||||
|
- Alpha release.
|
1
Tantalite2/data-final-fixes.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
local util = require("recipe-final-fix")
|
1
Tantalite2/data-updates.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require("recipe-modify")
|
930
Tantalite2/data-util.lua
Normal file
|
@ -0,0 +1,930 @@
|
||||||
|
local util = {}
|
||||||
|
|
||||||
|
-- se landfill
|
||||||
|
-- params: ore, icon_size
|
||||||
|
function util.se_landfill(params)
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
if not params.icon_size then params.icon_size = 64 end
|
||||||
|
local lname="landfill-"..params.ore
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
icons = {
|
||||||
|
{ icon = "__base__/graphics/icons/landfill.png", icon_size = 64, icon_mipmaps = 3 },
|
||||||
|
{ icon = "__Chromium2__/graphics/icons/"..params.ore..".png", icon_size = params.icon_size, scale = 0.33*64/params.icon_size},
|
||||||
|
},
|
||||||
|
energy_required = 1,
|
||||||
|
enabled=false,
|
||||||
|
name = lname,
|
||||||
|
category = "hard-recycling",
|
||||||
|
order = "z-b-"..params.ore,
|
||||||
|
subgroup = "terrain",
|
||||||
|
results = {{type="item", name="landfill", amount=1}},
|
||||||
|
ingredients = {{type="item", name=params.ore, amount=50}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
util.add_unlock("se-recycling-facility", lname)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- se matter
|
||||||
|
-- params: ore, energy_required, quant_out, quant_in, icon_size, stream_out
|
||||||
|
function util.se_matter(params)
|
||||||
|
if not params.quant_in then params.quant_in = params.quant_out end
|
||||||
|
if not params.icon_size then params.icon_size = 64 end
|
||||||
|
local fname = "matter-fusion-"..params.ore
|
||||||
|
local sedata = mods["Krastorio2"] and "se-kr-matter-synthesis-data" or "se-fusion-test-data"
|
||||||
|
local sejunk = mods["Krastorio2"] and "se-broken-data" or "se-junk-data"
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = fname,
|
||||||
|
localised_name = {"recipe-name.se-matter-fusion-to", {"item-name."..params.ore}},
|
||||||
|
category = "space-materialisation",
|
||||||
|
subgroup = "materialisation",
|
||||||
|
order = "a-b-z",
|
||||||
|
icons = {
|
||||||
|
{icon = "__space-exploration-graphics__/graphics/blank.png",
|
||||||
|
icon_size = 64, scale = 0.5},
|
||||||
|
{icon = "__space-exploration-graphics__/graphics/icons/fluid/particle-stream.png",
|
||||||
|
icon_size = 64, scale = 0.33, shift = {8,-8}},
|
||||||
|
{icon = "__Chromium2__/graphics/icons/"..params.ore..".png",
|
||||||
|
icon_size = params.icon_size, scale = 0.33 * 64/params.icon_size, shift={-8, 8}},
|
||||||
|
{icon = "__space-exploration-graphics__/graphics/icons/transition-arrow.png",
|
||||||
|
icon_size = 64, scale = 0.5},
|
||||||
|
},
|
||||||
|
energy_required = params.energy_required,
|
||||||
|
enabled = false,
|
||||||
|
ingredients = {
|
||||||
|
{type = "item", name = sedata, amount=1},
|
||||||
|
{type="fluid", name="se-particle-stream", amount=50},
|
||||||
|
{type="fluid", name="se-space-coolant-supercooled", amount=25},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type = "item", name = params.ore, amount = params.quant_out},
|
||||||
|
{type="item", name="se-contaminated-scrap", amount=1},
|
||||||
|
{type="item", name=sedata, amount=1, probability=.99},
|
||||||
|
{type="item", name=sejunk, amount=1, probability=.01},
|
||||||
|
{type="fluid", name="se-space-coolant-hot", amount=25, ignored_by_productivity = 25, ignored_by_stats = 25},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
util.add_unlock("se-space-matter-fusion", fname)
|
||||||
|
|
||||||
|
if mods["Krastorio2"] then
|
||||||
|
local lname = params.ore.."-to-particle-stream"
|
||||||
|
data:extend({
|
||||||
|
enabled = false,
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = lname,
|
||||||
|
localised_name = {"recipe-name.se-kr-matter-liberation", {"item-name."..params.ore}},
|
||||||
|
category = "space-materialisation",
|
||||||
|
subgroup = "advanced-particle-stream",
|
||||||
|
order = "a-b-z",
|
||||||
|
icons = {
|
||||||
|
{icon = "__space-exploration-graphics__/graphics/blank.png",
|
||||||
|
icon_size = 64, scale = 0.5},
|
||||||
|
{icon = "__space-exploration-graphics__/graphics/icons/fluid/particle-stream.png",
|
||||||
|
icon_size = 64, scale = 0.33, shift = {-8,8}},
|
||||||
|
{icon = "__Chromium2__/graphics/icons/"..params.ore..".png",
|
||||||
|
icon_size = params.icon_size, scale = 0.33 * 64/params.icon_size, shift={8, -8}},
|
||||||
|
{icon = "__space-exploration-graphics__/graphics/icons/transition-arrow.png",
|
||||||
|
icon_size = 64, scale = 0.5},
|
||||||
|
},
|
||||||
|
energy_required = 30,
|
||||||
|
enabled = false,
|
||||||
|
ingredients = {
|
||||||
|
{type="item", name="se-kr-matter-liberation-data", amount=1},
|
||||||
|
{type="item", name=params.ore, amount=params.quant_in},
|
||||||
|
{type="fluid", name="se-particle-stream", amount=50},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="item", name="se-kr-matter-liberation-data", amount=1, probability=.99},
|
||||||
|
{type="item", name=sejunk, amount=1, probability=.01},
|
||||||
|
{type="fluid", name="se-particle-stream", amount=params.stream_out, ignored_by_productivity = 50, ignored_by_stats = 50},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if not data.raw.technology["bz-advanced-stream-production"] then
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "technology",
|
||||||
|
name ="bz-advanced-stream-production",
|
||||||
|
localised_name = {"", {"technology-name.se-kr-advanced-stream-production"}, " 2"},
|
||||||
|
icon = "__space-exploration-graphics__/graphics/technology/material-fabricator.png",
|
||||||
|
icon_size = 128,
|
||||||
|
effects = {},
|
||||||
|
unit = {
|
||||||
|
count = 100,
|
||||||
|
time = 15,
|
||||||
|
ingredients = {
|
||||||
|
{"automation-science-pack", 1},
|
||||||
|
{"logistic-science-pack", 1},
|
||||||
|
{"chemical-science-pack", 1},
|
||||||
|
{"se-rocket-science-pack", 1},
|
||||||
|
{"space-science-pack", 1},
|
||||||
|
{"production-science-pack", 1},
|
||||||
|
{"utility-science-pack", 1},
|
||||||
|
{"se-astronomic-science-pack-4", 1},
|
||||||
|
{"se-energy-science-pack-4", 1},
|
||||||
|
{"se-material-science-pack-4", 1},
|
||||||
|
{"matter-tech-card", 1},
|
||||||
|
{"se-deep-space-science-pack-1", 1},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
prerequisites = {"se-kr-advanced-stream-production"},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
util.add_unlock("bz-advanced-stream-production", lname)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Get the normal prototype for a recipe -- either .normal or the recipe itself
|
||||||
|
function util.get_normal(recipe_name)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
recipe = data.raw.recipe[recipe_name]
|
||||||
|
if recipe.ingredients then
|
||||||
|
return recipe
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set/override a technology's prerequisites
|
||||||
|
function util.set_prerequisite(technology_name, prerequisites)
|
||||||
|
local technology = data.raw.technology[technology_name]
|
||||||
|
if technology then
|
||||||
|
technology.prerequisites = {}
|
||||||
|
for i, prerequisite in pairs(prerequisites) do
|
||||||
|
if data.raw.technology[prerequisite] then
|
||||||
|
table.insert(technology.prerequisites, prerequisite)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Add a prerequisite to a given technology
|
||||||
|
function util.add_prerequisite(technology_name, prerequisite)
|
||||||
|
local technology = data.raw.technology[technology_name]
|
||||||
|
if technology and data.raw.technology[prerequisite] then
|
||||||
|
if technology.prerequisites then
|
||||||
|
for i, pre in pairs(technology.prerequisites) do
|
||||||
|
if pre == prerequisite then return end
|
||||||
|
end
|
||||||
|
table.insert(technology.prerequisites, prerequisite)
|
||||||
|
else
|
||||||
|
technology.prerequisites = {prerequisite}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Remove a prerequisite from a given technology
|
||||||
|
function util.remove_prerequisite(technology_name, prerequisite)
|
||||||
|
local technology = data.raw.technology[technology_name]
|
||||||
|
local index = -1
|
||||||
|
if technology then
|
||||||
|
for i, prereq in pairs(technology.prerequisites) do
|
||||||
|
if prereq == prerequisite then
|
||||||
|
index = i
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if index > -1 then
|
||||||
|
table.remove(technology.prerequisites, index)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Add an effect to a given technology
|
||||||
|
function util.add_effect(technology_name, effect)
|
||||||
|
local technology = data.raw.technology[technology_name]
|
||||||
|
if technology then
|
||||||
|
if not technology.effects then technology.effects = {} end
|
||||||
|
if effect and effect.type == "unlock-recipe" then
|
||||||
|
if not data.raw.recipe[effect.recipe] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
table.insert(technology.effects, effect)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Add an effect to a given technology to unlock recipe
|
||||||
|
function util.add_unlock(technology_name, recipe)
|
||||||
|
util.add_effect(technology_name, {type="unlock-recipe", recipe=recipe})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- remove recipe unlock effect from a given technology, multiple times if necessary
|
||||||
|
function util.remove_recipe_effect(technology_name, recipe_name)
|
||||||
|
local technology = data.raw.technology[technology_name]
|
||||||
|
local index = -1
|
||||||
|
local cnt = 0
|
||||||
|
if technology and technology.effects then
|
||||||
|
for i, effect in pairs(technology.effects) do
|
||||||
|
if effect.type == "unlock-recipe" and effect.recipe == recipe_name then
|
||||||
|
index = i
|
||||||
|
cnt = cnt + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if index > -1 then
|
||||||
|
table.remove(technology.effects, index)
|
||||||
|
if cnt > 1 then -- not over yet, do it again
|
||||||
|
util.remove_recipe_effect(technology_name, recipe_name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set technology ingredients
|
||||||
|
function util.set_tech_recipe(technology_name, ingredients)
|
||||||
|
local technology = data.raw.technology[technology_name]
|
||||||
|
if technology then
|
||||||
|
technology.unit.ingredients = ingredients
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.set_enabled(recipe_name, enabled)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
data.raw.recipe[recipe_name].enabled = enabled
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.set_hidden(recipe_name)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
data.raw.recipe[recipe_name].hidden = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Add a given quantity of ingredient to a given recipe
|
||||||
|
function util.add_or_add_to_ingredient(recipe_name, ingredient, quantity)
|
||||||
|
if data.raw.recipe[recipe_name] and data.raw.item[ingredient] then
|
||||||
|
add_or_add_to_ingredient(data.raw.recipe[recipe_name], ingredient, quantity)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_or_add_to_ingredient(recipe, ingredient, quantity)
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
|
for i, existing in pairs(recipe.ingredients) do
|
||||||
|
if existing[1] == ingredient or existing.name == ingredient then
|
||||||
|
add_to_ingredient(recipe, ingredient, quantity)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert(recipe.ingredients, {ingredient, quantity})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Add a given quantity of ingredient to a given recipe
|
||||||
|
function util.add_ingredient(recipe_name, ingredient, quantity)
|
||||||
|
local is_fluid = not not data.raw.fluid[ingredient]
|
||||||
|
if data.raw.recipe[recipe_name] and (data.raw.item[ingredient] or is_fluid) then
|
||||||
|
add_ingredient(data.raw.recipe[recipe_name], ingredient, quantity, is_fluid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_ingredient(recipe, ingredient, quantity, is_fluid)
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
|
for i, existing in pairs(recipe.ingredients) do
|
||||||
|
if existing.name == ingredient then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if is_fluid then
|
||||||
|
table.insert(recipe.ingredients, {type="fluid", name=ingredient, amount=quantity})
|
||||||
|
else
|
||||||
|
table.insert(recipe.ingredients, {type = "item", name = ingredient, amount = quantity})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Add a given ingredient prototype to a given recipe
|
||||||
|
function util.add_ingredient_raw(recipe_name, ingredient)
|
||||||
|
if data.raw.recipe[recipe_name] and (data.raw.item[ingredient.name] or data.raw.item[ingredient[1]]) then
|
||||||
|
add_ingredient_raw(data.raw.recipe[recipe_name], ingredient)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_ingredient_raw(recipe, ingredient)
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
|
for i, existing in pairs(recipe.ingredients) do
|
||||||
|
if (existing.name and existing.name == ingredient.name) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert(recipe.ingredients, ingredient)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set an ingredient to a given quantity
|
||||||
|
function util.set_ingredient(recipe_name, ingredient, quantity)
|
||||||
|
if data.raw.recipe[recipe_name] and data.raw.item[ingredient] then
|
||||||
|
set_ingredient(data.raw.recipe[recipe_name], ingredient, quantity)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function set_ingredient(recipe, ingredient, quantity)
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
|
for i, existing in pairs(recipe.ingredients) do
|
||||||
|
if existing.name == ingredient then
|
||||||
|
existing.amount = quantity
|
||||||
|
existing.amount_min = nil
|
||||||
|
existing.amount_max = nil
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert(recipe.ingredients, {ingredient, quantity})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Add a given quantity of product to a given recipe.
|
||||||
|
-- Only works for recipes with multiple products
|
||||||
|
function util.add_product(recipe_name, product)
|
||||||
|
if data.raw.recipe[recipe_name] and
|
||||||
|
(data.raw.item[product.name] or data.raw.fluid[product.name]) then
|
||||||
|
add_product(data.raw.recipe[recipe_name], product)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_product(recipe, product)
|
||||||
|
if recipe ~= nil then
|
||||||
|
if recipe.results == nil then
|
||||||
|
recipe.results = {}
|
||||||
|
end
|
||||||
|
table.insert(recipe.results, product)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Get the amount of the ingredient, will check base/normal not expensive
|
||||||
|
function util.get_ingredient_amount(recipe_name, ingredient_name)
|
||||||
|
local recipe = data.raw.recipe[recipe_name]
|
||||||
|
if recipe then
|
||||||
|
if recipe.ingredients then
|
||||||
|
for i, ingredient in pairs(recipe.ingredients) do
|
||||||
|
if ingredient.name == ingredient_name then return ingredient.amount end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Get the amount of the result, will check base/normal not expensive
|
||||||
|
function util.get_amount(recipe_name, product)
|
||||||
|
if not product then product = recipe_name end
|
||||||
|
local recipe = data.raw.recipe[recipe_name]
|
||||||
|
if recipe then
|
||||||
|
if recipe.results then
|
||||||
|
for i, result in pairs(recipe.results) do
|
||||||
|
if result.name == product then return result.amount end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Replace one ingredient with another in a recipe
|
||||||
|
-- Use amount to set an amount. If that amount is a multiplier instead of an exact amount, set multiply true.
|
||||||
|
function util.replace_ingredient(recipe_name, old, new, amount, multiply)
|
||||||
|
if data.raw.recipe[recipe_name] and (data.raw.item[new] or data.raw.fluid[new]) then
|
||||||
|
replace_ingredient(data.raw.recipe[recipe_name], old, new, amount or 1, multiply)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function replace_ingredient(recipe, old, new, amount, multiply)
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
|
for i, existing in pairs(recipe.ingredients) do
|
||||||
|
if existing.name == new then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for i, ingredient in pairs(recipe.ingredients) do
|
||||||
|
if ingredient.name == old then
|
||||||
|
ingredient.name = new
|
||||||
|
if multiply then
|
||||||
|
ingredient.amount = amount * ingredient.amount
|
||||||
|
else
|
||||||
|
ingredient.amount = amount
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Remove an ingredient from a recipe
|
||||||
|
function util.remove_ingredient(recipe_name, old)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
remove_ingredient(data.raw.recipe[recipe_name], old)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function remove_ingredient(recipe, old)
|
||||||
|
index = -1
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
|
for i, ingredient in pairs(recipe.ingredients) do
|
||||||
|
if ingredient.name == old then
|
||||||
|
index = i
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if index > -1 then
|
||||||
|
table.remove(recipe.ingredients, index)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Replace an amount of an ingredient in a recipe. Keep at least 1 of old.
|
||||||
|
function util.replace_some_ingredient(recipe_name, old, old_amount, new, new_amount)
|
||||||
|
local is_fluid = not not data.raw.fluid[new]
|
||||||
|
if data.raw.recipe[recipe_name] and (data.raw.item[new] or is_fluid) then
|
||||||
|
replace_some_ingredient(data.raw.recipe[recipe_name], old, old_amount, new, new_amount, is_fluid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function replace_some_ingredient(recipe, old, old_amount, new, new_amount, is_fluid)
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
|
for i, existing in pairs(recipe.ingredients) do
|
||||||
|
if existing.name == new then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for i, ingredient in pairs(recipe.ingredients) do
|
||||||
|
if ingredient.name == old then
|
||||||
|
ingredient.amount = math.max(1, ingredient.amount - old_amount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
add_ingredient(recipe, new, new_amount, is_fluid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- set the amount of a product.
|
||||||
|
function util.set_product_amount(recipe_name, product, amount)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
set_product_amount(data.raw.recipe[recipe_name], product, amount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function set_product_amount(recipe, product, amount)
|
||||||
|
if recipe then
|
||||||
|
if recipe.result_count then
|
||||||
|
recipe.result_count = amount
|
||||||
|
end
|
||||||
|
if recipe.results then
|
||||||
|
for i, result in pairs(recipe.results) do
|
||||||
|
if result.name == product then
|
||||||
|
if result.amount then
|
||||||
|
result.amount = amount
|
||||||
|
end
|
||||||
|
if result.amount_min ~= nil then
|
||||||
|
result.amount_min = nil
|
||||||
|
result.amount_max = nil
|
||||||
|
result.amount = amount
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if result[1] == product then
|
||||||
|
result[2] = amount
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not recipe.results and not recipe.result_count then
|
||||||
|
-- implicit one item result
|
||||||
|
recipe.result_count = amount
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- multiply the cost, energy, and results of a recipe by a multiple
|
||||||
|
function util.multiply_recipe(recipe_name, multiple)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
multiply_recipe(data.raw.recipe[recipe_name], multiple)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function multiply_recipe(recipe, multiple)
|
||||||
|
if recipe then
|
||||||
|
if recipe.energy_required then
|
||||||
|
recipe.energy_required = recipe.energy_required * multiple
|
||||||
|
end
|
||||||
|
if recipe.result_count then
|
||||||
|
recipe.result_count = recipe.result_count * multiple
|
||||||
|
end
|
||||||
|
if recipe.results then
|
||||||
|
for i, result in pairs(recipe.results) do
|
||||||
|
if result.name then
|
||||||
|
if result.amount then
|
||||||
|
result.amount = result.amount * multiple
|
||||||
|
end
|
||||||
|
if result.amount_min ~= nil then
|
||||||
|
result.amount_min = result.amount_min * multiple
|
||||||
|
result.amount_max = result.amount_max * multiple
|
||||||
|
end
|
||||||
|
if result.catalyst_amount then
|
||||||
|
result.catalyst_amount = result.catalyst_amount * multiple
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if result[1] then
|
||||||
|
result[2] = result[2] * multiple
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not recipe.results and not recipe.result_count then
|
||||||
|
-- implicit one item result
|
||||||
|
recipe.result_count = multiple
|
||||||
|
end
|
||||||
|
if recipe.ingredients then
|
||||||
|
for i, ingredient in pairs(recipe.ingredients) do
|
||||||
|
if ingredient.name then
|
||||||
|
ingredient.amount = ingredient.amount * multiple
|
||||||
|
end
|
||||||
|
if ingredient[1] then
|
||||||
|
ingredient[2] = ingredient[2] * multiple
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Returns true if a recipe has an ingredient
|
||||||
|
function util.has_ingredient(recipe_name, ingredient)
|
||||||
|
return data.raw.recipe[recipe_name] and
|
||||||
|
has_ingredient(data.raw.recipe[recipe_name], ingredient)
|
||||||
|
end
|
||||||
|
|
||||||
|
function has_ingredient(recipe, ingredient)
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
|
for i, existing in pairs(recipe.ingredients) do
|
||||||
|
if existing[1] == ingredient or existing.name == ingredient then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Remove a product from a recipe, WILL NOT remove the only product
|
||||||
|
function util.remove_product(recipe_name, old)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
remove_product(data.raw.recipe[recipe_name], old)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function remove_product(recipe, old)
|
||||||
|
index = -1
|
||||||
|
if recipe ~= nil and recipe.results ~= nil then
|
||||||
|
for i, result in pairs(recipe.results) do
|
||||||
|
if result.name == old or result[1] == old then
|
||||||
|
index = i
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if index > -1 then
|
||||||
|
table.remove(recipe.results, index)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.set_main_product(recipe_name, product)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
set_main_product(data.raw.recipe[recipe_name], product)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function set_main_product(recipe, product)
|
||||||
|
if recipe then
|
||||||
|
recipe.main_product = product
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Replace one product with another in a recipe
|
||||||
|
function util.replace_product(recipe_name, old, new)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
replace_product(data.raw.recipe[recipe_name], old, new)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function replace_product(recipe, old, new)
|
||||||
|
if recipe then
|
||||||
|
if recipe.main_product == old then
|
||||||
|
recipe.main_product = new
|
||||||
|
end
|
||||||
|
if recipe.result == old then
|
||||||
|
recipe.result = new
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if recipe.results then
|
||||||
|
for i, result in pairs(recipe.results) do
|
||||||
|
if result.name == old then result.name = new end
|
||||||
|
if result[1] == old then result[1] = new end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Remove an element of type t and name from data.raw
|
||||||
|
function util.remove_raw(t, name)
|
||||||
|
if not data.raw[t] then
|
||||||
|
log(t.." not found in data.raw")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if data.raw[t][name] then
|
||||||
|
for i, elem in pairs(data.raw[t]) do
|
||||||
|
if elem.name == name then
|
||||||
|
data.raw[t][i] = nil
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set energy required
|
||||||
|
function util.set_recipe_time(recipe_name, time)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
set_recipe_time(data.raw.recipe[recipe_name], time)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function set_recipe_time(recipe, time)
|
||||||
|
if recipe then
|
||||||
|
if recipe.energy_required then
|
||||||
|
recipe.energy_required = time
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Multiply energy required
|
||||||
|
function util.multiply_time(recipe_name, factor)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
multiply_time(data.raw.recipe[recipe_name], factor)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function multiply_time(recipe, factor)
|
||||||
|
if recipe then
|
||||||
|
if recipe.energy_required then
|
||||||
|
recipe.energy_required = recipe.energy_required * factor
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Add to energy required
|
||||||
|
function util.add_time(recipe_name, amount)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
add_time(data.raw.recipe[recipe_name], amount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_time(recipe, amount)
|
||||||
|
if recipe then
|
||||||
|
if recipe.energy_required then
|
||||||
|
recipe.energy_required = recipe.energy_required + amount
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set recipe category
|
||||||
|
function util.set_category(recipe_name, category)
|
||||||
|
if data.raw.recipe[recipe_name] and data.raw["recipe-category"][category] then
|
||||||
|
data.raw.recipe[recipe_name].category = category
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set recipe subgroup
|
||||||
|
function util.set_subgroup(recipe_name, subgroup)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
data.raw.recipe[recipe_name].subgroup = subgroup
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set item subgroup
|
||||||
|
function util.set_item_subgroup(item, subgroup)
|
||||||
|
if data.raw.item[item] and data.raw["item-subgroup"][subgroup] then
|
||||||
|
data.raw.item[item].subgroup = subgroup
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.add_icon(recipe_name, icon)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
if not (data.raw.recipe[recipe_name].icons and #(data.raw.recipe[recipe_name].icons) > 0) then
|
||||||
|
data.raw.recipe[recipe_name].icons = {{
|
||||||
|
icon=data.raw.recipe[recipe_name].icon,
|
||||||
|
icon_size=data.raw.recipe[recipe_name].icon_size,
|
||||||
|
icon_mipmaps=data.raw.recipe[recipe_name].icon_mipmaps,
|
||||||
|
}}
|
||||||
|
data.raw.recipe[recipe_name].icon = nil
|
||||||
|
data.raw.recipe[recipe_name].icon_size = nil
|
||||||
|
end
|
||||||
|
table.insert(data.raw.recipe[recipe_name].icons, icon)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set recipe icons
|
||||||
|
function util.set_icons(recipe_name, icons)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
data.raw.recipe[recipe_name].icons = icons
|
||||||
|
data.raw.recipe[recipe_name].icon = nil
|
||||||
|
data.raw.recipe[recipe_name].icon_size = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set recipe icons
|
||||||
|
function util.set_item_icons(item_name, icons)
|
||||||
|
if data.raw.item[item_name] then
|
||||||
|
data.raw.item[item_name].icons = icons
|
||||||
|
data.raw.item[item_name].icon = nil
|
||||||
|
data.raw.item[item_name].icon_size = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Gets an item or fluid icon
|
||||||
|
function util.get_item_or_fluid_icon(name)
|
||||||
|
icon = ""
|
||||||
|
if data.raw.item[name] then
|
||||||
|
icon = data.raw.item[name].icon
|
||||||
|
if not icon then icon = data.raw.item[name].icons[1].icon end
|
||||||
|
elseif data.raw.fluid[name] then
|
||||||
|
icon = data.raw.fluid[name].icon
|
||||||
|
if not icon then icon = data.raw.fluid[name].icons[1].icon end
|
||||||
|
end
|
||||||
|
return icon
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.set_to_founding(recipe)
|
||||||
|
util.set_category(recipe, "founding")
|
||||||
|
util.set_subgroup(recipe, "foundry-intermediate")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Add crafting category to an entity
|
||||||
|
function util.add_crafting_category(entity_type, entity, category)
|
||||||
|
if data.raw[entity_type][entity] and data.raw["recipe-category"][category] then
|
||||||
|
for i, existing in pairs(data.raw[entity_type][entity].crafting_categories) do
|
||||||
|
if existing == category then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert(data.raw[entity_type][entity].crafting_categories, category)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.add_to_ingredient(recipe, ingredient, amount)
|
||||||
|
if data.raw.recipe[recipe] then
|
||||||
|
add_to_ingredient(data.raw.recipe[recipe], ingredient, amount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_to_ingredient(recipe, it, amount)
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
|
for i, ingredient in pairs(recipe.ingredients) do
|
||||||
|
if ingredient.name == it then
|
||||||
|
ingredient.amount = ingredient.amount + amount
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if ingredient[1] == it then
|
||||||
|
ingredient[2] = ingredient[2] + amount
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.add_to_product(recipe_name, product, amount)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
add_to_product(data.raw.recipe[recipe_name], product, amount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_to_product(recipe, product, amount)
|
||||||
|
if recipe ~= nil and recipe.results ~= nil then
|
||||||
|
if recipe.result == product then
|
||||||
|
recipe.result_count = recipe.result_count + amount
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for i, result in pairs(recipe.results) do
|
||||||
|
if result.name == product then
|
||||||
|
result.amount = result.amount + amount
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if result[1] == product then
|
||||||
|
result[2] = result[2] + amount
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Adds a result to a mineable type
|
||||||
|
function util.add_minable_result(t, name, result)
|
||||||
|
if data.raw[t] and data.raw[t][name] and data.raw[t][name].minable then
|
||||||
|
if data.raw[t][name].minable.result and not data.raw[t][name].minable.results then
|
||||||
|
data.raw[t][name].minable.results = {
|
||||||
|
{data.raw[t][name].minable.result ,data.raw[t][name].minable.count}}
|
||||||
|
data.raw[t][name].minable.result = nil
|
||||||
|
data.raw[t][name].minable.result_count = nil
|
||||||
|
end
|
||||||
|
if data.raw[t][name].minable.results then
|
||||||
|
table.insert(data.raw[t][name].minable.results, result)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.remove_prior_unlocks(tech, recipe)
|
||||||
|
if data.raw.technology[tech].prerequisites then
|
||||||
|
for i, prerequisite in pairs(data.raw.technology[tech].prerequisites) do
|
||||||
|
remove_prior_unlocks(prerequisite, recipe)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function remove_prior_unlocks(tech, recipe)
|
||||||
|
local technology = data.raw.technology[tech]
|
||||||
|
if technology then
|
||||||
|
util.remove_recipe_effect(tech, recipe)
|
||||||
|
if technology.prerequisites then
|
||||||
|
for i, prerequisite in pairs(technology.prerequisites) do
|
||||||
|
-- log("BZZZ removing prior unlocks for " .. tech ..", checking " .. prerequisite) -- Handy Debug :|
|
||||||
|
remove_prior_unlocks(prerequisite, recipe)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.replace_ingredients_prior_to(tech, old, new, multiplier)
|
||||||
|
if not data.raw.technology[tech] then
|
||||||
|
log("Not replacing ingredient "..old.." with "..new.." because tech "..tech.." was not found")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
util.remove_prior_unlocks(tech, old)
|
||||||
|
for i, recipe in pairs(data.raw.recipe) do
|
||||||
|
if (recipe.enabled and recipe.enabled ~= 'false')
|
||||||
|
and (not recipe.hidden or recipe.hidden == 'true') -- probably don't want to change hidden recipes
|
||||||
|
and string.sub(recipe.name, 1, 3) ~= 'se-' -- have to exlude SE in general :(
|
||||||
|
then
|
||||||
|
-- log("BZZZ due to 'enabled' replacing " .. old .. " with " .. new .." in " .. recipe.name) -- Handy Debug :|
|
||||||
|
util.replace_ingredient(recipe.name, old, new, multiplier, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if data.raw.technology[tech].prerequisites then
|
||||||
|
for i, prerequisite in pairs(data.raw.technology[tech].prerequisites) do
|
||||||
|
replace_ingredients_prior_to(prerequisite, old, new, multiplier)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function replace_ingredients_prior_to(tech, old, new, multiplier)
|
||||||
|
local technology = data.raw.technology[tech]
|
||||||
|
if technology then
|
||||||
|
if technology.effects then
|
||||||
|
for i, effect in pairs(technology.effects) do
|
||||||
|
if effect.type == "unlock-recipe" then
|
||||||
|
-- log("BZZZ replacing " .. old .. " with " .. new .." in " .. effect.recipe) -- Handy Debug :|
|
||||||
|
util.replace_ingredient(effect.recipe, old, new, multiplier, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if technology.prerequisites then
|
||||||
|
for i, prerequisite in pairs(technology.prerequisites) do
|
||||||
|
-- log("BZZZ checking " .. prerequisite) -- Handy Debug :|
|
||||||
|
replace_ingredients_prior_to(prerequisite, old, new, multiplier)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.remove_all_recipe_effects(recipe_name)
|
||||||
|
for name, _ in pairs(data.raw.technology) do
|
||||||
|
util.remove_recipe_effect(name, recipe_name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.add_unlock_force(technology_name, recipe)
|
||||||
|
util.set_enabled(recipe, false)
|
||||||
|
util.remove_all_recipe_effects(recipe)
|
||||||
|
util.add_unlock(technology_name, recipe)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- sum the products of a recipe
|
||||||
|
function util.sum_products(recipe_name)
|
||||||
|
-- this is going to end up approximate in some cases, integer division is probs fine
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
local recipe = data.raw.recipe[recipe_name]
|
||||||
|
if not recipe.results then return recipe.result_count end
|
||||||
|
local sum = 0
|
||||||
|
for i, result in pairs(recipe.results) do
|
||||||
|
local amt = 0
|
||||||
|
if result[2] then amt = result[2]
|
||||||
|
elseif result.amount then amt = result.amount
|
||||||
|
elseif result.amount_min then amt = (result.amount_min + result.amount_max)/2
|
||||||
|
end
|
||||||
|
if result.probability then amt = amt * result.probability end
|
||||||
|
sum = sum + amt
|
||||||
|
end
|
||||||
|
return sum
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.add_productivity(recipe)
|
||||||
|
data.raw.recipe[recipe].allow_productivity = true
|
||||||
|
end
|
||||||
|
|
||||||
|
return util
|
9
Tantalite2/data.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
require("prototypes.tantalite-ore")
|
||||||
|
require("prototypes.thorium-ore")
|
||||||
|
require("prototypes.tantalum-recipe")
|
||||||
|
require("prototypes.niobium-recipe")
|
||||||
|
require("prototypes.technology")
|
||||||
|
|
||||||
|
require("prototypes.tantalite-enriched") -- Enriched Al for Krastorio 2
|
||||||
|
require("prototypes.tantalite-recipe-se") -- Space Exploration
|
||||||
|
require("prototypes.tantalite-248k") -- 248k-Redux
|
BIN
Tantalite2/graphics/entity/ores/hr-tantalite-ore.png
Normal file
After Width: | Height: | Size: 224 KiB |
BIN
Tantalite2/graphics/entity/ores/hr-thorium-ore.png
Normal file
After Width: | Height: | Size: 224 KiB |
BIN
Tantalite2/graphics/icons/advanced-multi-cylinder-engine.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
Tantalite2/graphics/icons/automation-core-2.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
Tantalite2/graphics/icons/crt.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
Tantalite2/graphics/icons/electron-gun.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
Tantalite2/graphics/icons/enriched-tantalite.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
Tantalite2/graphics/icons/fi-arc-pure-niobium.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
Tantalite2/graphics/icons/fi-arc-pure-tantalum.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
Tantalite2/graphics/icons/fi-materials-pure-niobium.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
Tantalite2/graphics/icons/fi-materials-pure-tantalum.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
Tantalite2/graphics/icons/heatsink.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
Tantalite2/graphics/icons/molten-tantalite.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
Tantalite2/graphics/icons/niobium-ingot.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
Tantalite2/graphics/icons/niobium-ore.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
Tantalite2/graphics/icons/niobium-plate.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
Tantalite2/graphics/icons/niobium-tin-cable.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
Tantalite2/graphics/icons/tantalite-ore.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
Tantalite2/graphics/icons/tantalum-capacitor.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Tantalite2/graphics/icons/tantalum-ingot.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
Tantalite2/graphics/icons/tantalum-ore.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
Tantalite2/graphics/icons/tantalum-plate.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
Tantalite2/graphics/icons/tantalum-titanium-beam.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
Tantalite2/graphics/icons/thoriated-filament.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
Tantalite2/graphics/icons/thorium-ore.png
Normal file
After Width: | Height: | Size: 9 KiB |
35
Tantalite2/info.json
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"name": "Tantalite2",
|
||||||
|
"version": "2.0.0",
|
||||||
|
"factorio_version": "2.0",
|
||||||
|
"title": "Tantalite",
|
||||||
|
"author": "Timeken, cackling fiend",
|
||||||
|
"homepage": "https://discord.gg/ufvFUJtVwk",
|
||||||
|
"dependencies": [
|
||||||
|
"base >= 2.0.0",
|
||||||
|
"? 248k-Redux",
|
||||||
|
"? aai-industry",
|
||||||
|
"? aai-vehicles-miner",
|
||||||
|
"? angelsaddons-cab",
|
||||||
|
"? bismuth",
|
||||||
|
"? bobassembly",
|
||||||
|
"? BrassTacks-Updated",
|
||||||
|
"? bzaluminum",
|
||||||
|
"? bzcarbon",
|
||||||
|
"? bzgold",
|
||||||
|
"? bzlead",
|
||||||
|
"? bztin",
|
||||||
|
"? bztitanium",
|
||||||
|
"? bztungsten",
|
||||||
|
"? bzzirconium",
|
||||||
|
"? EndgameCombat",
|
||||||
|
"? FluidMustFlow",
|
||||||
|
"? IfNickel-Updated",
|
||||||
|
"? Krastorio2",
|
||||||
|
"? LasingAround-Updated",
|
||||||
|
"? manganese",
|
||||||
|
"? MDbobelectronics2",
|
||||||
|
"? space-exploration"
|
||||||
|
],
|
||||||
|
"description": "Tantalite is a mod adding tantalum and niobium.\n\nThis mod is inspired by Brevven's BZ mods."
|
||||||
|
}
|
73
Tantalite2/locale/en/Tantalite.cfg
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
[technology-name]
|
||||||
|
electron-emitter=Electron emitter
|
||||||
|
cathode-ray-tube=Cathode ray tube
|
||||||
|
advanced-multi-cylinder-engine=Advanced multi cylinder engine
|
||||||
|
energy-pyroflux=Energy pyroflux
|
||||||
|
advanced-tantalum-processing=Advanced tantalum processing
|
||||||
|
targeted-tantalite-refining=Targeted tantalite refining
|
||||||
|
|
||||||
|
[technology-description]
|
||||||
|
|
||||||
|
[autoplace-control-names]
|
||||||
|
niobium-ore=[item=niobium-ore] Niobium ore
|
||||||
|
tantalite-ore=[item=tantalite-ore] Tantalite ore
|
||||||
|
thorium-ore=[item=thorium-ore] Thorium ore
|
||||||
|
|
||||||
|
[item-name]
|
||||||
|
niobium-ore=Niobium ore
|
||||||
|
tantalum-ore=Tantalum ore
|
||||||
|
tantalite-ore=Tantalite ore
|
||||||
|
thorium-ore=Thorium ore
|
||||||
|
niobium-plate=Niobium plate
|
||||||
|
tantalum-plate=Tantalum plate
|
||||||
|
enriched-tantalite=Enriched tantalite
|
||||||
|
tantalum-ingot=Tantalum ingot
|
||||||
|
niobium-ingot=Niobium ingot
|
||||||
|
|
||||||
|
thoriated-filament=Thoriated filament
|
||||||
|
electron-gun=Electron gun
|
||||||
|
crt=CRT
|
||||||
|
|
||||||
|
automation-core-2=Automation core MK2
|
||||||
|
heatsink=Heatsink
|
||||||
|
advanced-multi-cylinder-engine=Advanced multi cylinder engine
|
||||||
|
|
||||||
|
advanced-electronic-components=Advanced electronic components
|
||||||
|
tantalum-capacitor=Tantalum capacitors
|
||||||
|
niobium-tin-cable=Niobium tin cable
|
||||||
|
|
||||||
|
fi-materials-pure-tantalum=Pure tantalum
|
||||||
|
fi-materials-pure-niobium=Pure niobium
|
||||||
|
|
||||||
|
tantalum-titanium-beam=Tantalum titanium beam
|
||||||
|
|
||||||
|
[item-description]
|
||||||
|
niobium-tin-cable=It has superconducting properties
|
||||||
|
|
||||||
|
[fluid-name]
|
||||||
|
molten-tantalite=Molten tantalite
|
||||||
|
fi-arc-pure-tantalum=Molten tantalum
|
||||||
|
fi-arc-pure-niobium=Molten niobium
|
||||||
|
|
||||||
|
[entity-name]
|
||||||
|
tantalite-ore=Tantalite ore
|
||||||
|
thorium-ore=Thorium ore
|
||||||
|
|
||||||
|
[mod-setting-name]
|
||||||
|
|
||||||
|
[mod-setting-description]
|
||||||
|
|
||||||
|
[recipe-name]
|
||||||
|
dirty-water-filtration-tantalite=Filter dirty water [item=tantalite-ore]
|
||||||
|
tantalite-smelting=Tantalite smelting
|
||||||
|
enriched-tantalite=Enriched tantalite
|
||||||
|
tantalite-ingot=Tantalite casting
|
||||||
|
fi-purify-tantalite-recipe=Purify tantalite
|
||||||
|
fi-arc-pure-tantalum-recipe=Molten tantalum
|
||||||
|
fi-cast-pure-tantalum-recipe=Cast pure tantalum
|
||||||
|
fi-arc-pure-niobium-recipe=Molten niobium
|
||||||
|
fi-cast-pure-niobium-recipe=Cast pure niobium
|
||||||
|
energy-pyroflux=Energy pyroflux
|
||||||
|
tantalum-titanium-beam=Tantalum titanium beam
|
||||||
|
|
||||||
|
[recipe-description]
|
168
Tantalite2/prototypes/niobium-recipe.lua
Normal file
|
@ -0,0 +1,168 @@
|
||||||
|
local util = require("data-util")
|
||||||
|
|
||||||
|
data:extend({{
|
||||||
|
type = "item-subgroup",
|
||||||
|
name = "cable",
|
||||||
|
group = "intermediate-products",
|
||||||
|
order = "a"
|
||||||
|
}})
|
||||||
|
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "niobium-plate",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/niobium-plate.png",
|
||||||
|
icon_size = 64,
|
||||||
|
subgroup = "intermediate-product",
|
||||||
|
order = "b[niobium-plate]",
|
||||||
|
stack_size = 100
|
||||||
|
},
|
||||||
|
})
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "heatsink",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/heatsink.png",
|
||||||
|
icon_size = 64,
|
||||||
|
subgroup = "intermediate-product",
|
||||||
|
order = "h",
|
||||||
|
stack_size = 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "heatsink",
|
||||||
|
category = "crafting",
|
||||||
|
order = "h",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 5,
|
||||||
|
ingredients = {{type="item", name="tantalum-plate", amount=2}, {type="item", name="niobium-plate", amount=2}},
|
||||||
|
results = {{type="item", name="heatsink", amount=1}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local niobium_tin_cable_ingredients = {{type="item", name="niobium-plate", amount=1}}
|
||||||
|
if data.raw.item["tin-plate"] then
|
||||||
|
table.insert(niobium_tin_cable_ingredients, {type="item", name="tin-plate", amount=1})
|
||||||
|
end
|
||||||
|
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "niobium-tin-cable",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/niobium-tin-cable.png",
|
||||||
|
icon_size = 64,
|
||||||
|
subgroup = "cable",
|
||||||
|
order = "n",
|
||||||
|
stack_size = 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "niobium-tin-cable",
|
||||||
|
category = "crafting",
|
||||||
|
order = "n",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 2,
|
||||||
|
ingredients = niobium_tin_cable_ingredients,
|
||||||
|
results = {{type="item", name="niobium-tin-cable", amount=2}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local advanced_multi_cylinder_engine_ingredients = {{type="item", name="engine-unit", amount=2}, {type="item", name="heatsink", amount=2}}
|
||||||
|
if mods["IfNickel-Updated"] and data.raw.item["advanced-flow-controller"] then
|
||||||
|
table.insert(advanced_multi_cylinder_engine_ingredients, {type="item", name="advanced-flow-controller", amount=1})
|
||||||
|
end
|
||||||
|
local advanced_multi_cylinder_engine_subgroup = "intermediate-product"
|
||||||
|
if mods["IfNickel-Updated"] then
|
||||||
|
advanced_multi_cylinder_engine_subgroup = "engine-components"
|
||||||
|
end
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "advanced-multi-cylinder-engine",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/advanced-multi-cylinder-engine.png",
|
||||||
|
icon_size = 64,
|
||||||
|
group = "intermediate-product",
|
||||||
|
subgroup = advanced_multi_cylinder_engine_subgroup,
|
||||||
|
order = "f",
|
||||||
|
stack_size = 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "advanced-multi-cylinder-engine",
|
||||||
|
category = "crafting",
|
||||||
|
order = "f",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 10,
|
||||||
|
ingredients = advanced_multi_cylinder_engine_ingredients,
|
||||||
|
results = {{type="item", name="advanced-multi-cylinder-engine", amount=1}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local automation_core2_ingredients = {{type="item", name="copper-plate", amount=10}, {type="item", name="niobium-plate", amount=10}}
|
||||||
|
local automation_core2_subgroup = "intermediate-product"
|
||||||
|
if (mods["BrassTacks-Updated"] and data.raw.item["gearbox"]) and (mods["IfNickel-Updated"] and data.raw.item["flow-controller"]) then --check for hardmode
|
||||||
|
automation_core2_ingredients = {{type="item", name="gearbox", amount=1}, {type="item", name="motorized-articulator", amount=2}, {type="item", name="machining-tool", amount=1}, {type="item", name="flow-controller", amount=1}, {type="item", name="niobium-plate", amount=4}}
|
||||||
|
automation_core2_subgroup = "articulated-components"
|
||||||
|
end
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "automation-core-2",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/automation-core-2.png",
|
||||||
|
icon_size = 64,
|
||||||
|
group = "intermediate-product",
|
||||||
|
subgroup = automation_core2_subgroup,
|
||||||
|
order = "d",
|
||||||
|
stack_size = 50,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "automation-core-2",
|
||||||
|
category = "crafting",
|
||||||
|
order = "d",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 5,
|
||||||
|
ingredients = automation_core2_ingredients,
|
||||||
|
results = {{type="item", name="automation-core-2", amount=1}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if mods["248k-Redux"] and mods["space-exploration"] then
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "energy-pyroflux",
|
||||||
|
icons = {
|
||||||
|
{ icon = "__space-exploration-graphics__/graphics/icons/fluid/pyroflux.png", icon_size = 64},
|
||||||
|
{ icon = "__248k-Redux__/ressources/fusion/fu_materials/fu_materials_energy_crystal.png", icon_size = 64, scale=0.3, shift= {-8, -8}},
|
||||||
|
},
|
||||||
|
category = "chemistry",
|
||||||
|
order = "h",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 8,
|
||||||
|
ingredients = {{type="item", name="niobium-plate", amount = 1}, {type="item", name="fu_materials_energy_crystal", amount=1}, { type = "fluid", name = "se-liquid-rocket-fuel", amount = 10 }},
|
||||||
|
results = {{ type = "fluid", name = "se-pyroflux", amount = 10 }},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "niobium-refining",
|
||||||
|
category = "smelting",
|
||||||
|
order = "h",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 8,
|
||||||
|
ingredients = {{type="item", name="tantalite-ore", amount=10}},
|
||||||
|
results = {{type="item", name="niobium-plate", amount=7}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
util.add_productivity("niobium-refining")
|
||||||
|
end
|
||||||
|
|
||||||
|
util.add_productivity("automation-core-2")
|
||||||
|
util.add_productivity("heatsink")
|
||||||
|
util.add_productivity("advanced-multi-cylinder-engine")
|
||||||
|
util.add_productivity("niobium-tin-cable")
|
152
Tantalite2/prototypes/tantalite-248k.lua
Normal file
|
@ -0,0 +1,152 @@
|
||||||
|
local util = require("data-util")
|
||||||
|
|
||||||
|
if mods["248k-Redux"] then
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "fluid",
|
||||||
|
name = "fi-arc-pure-tantalum",
|
||||||
|
default_temperature = 3000,
|
||||||
|
max_temperature = 5450,
|
||||||
|
heat_capacity = "100kJ",
|
||||||
|
base_color = { r=0.92, g=0.29, b=0.22 },
|
||||||
|
flow_color = { r=0.92, g=0.29, b=0.22 },
|
||||||
|
pressure_to_speed_ratio = 0.400,
|
||||||
|
flow_to_energy_ratio = 0,
|
||||||
|
icon = "__Tantalite2__/graphics/icons/fi-arc-pure-tantalum.png",
|
||||||
|
icon_size = 64, icon_mipmaps = 4,
|
||||||
|
order = "a-a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "fi-materials-pure-tantalum",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/fi-materials-pure-tantalum.png",
|
||||||
|
icon_size = 64,
|
||||||
|
stack_size = 100,
|
||||||
|
subgroup = "fi_item_subgroup_a-c",
|
||||||
|
order = "b-a",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "fluid",
|
||||||
|
name = "fi-arc-pure-niobium",
|
||||||
|
default_temperature = 2500,
|
||||||
|
max_temperature = 4750,
|
||||||
|
heat_capacity = "100kJ",
|
||||||
|
base_color = { r=0.92, g=0.29, b=0.22 },
|
||||||
|
flow_color = { r=0.92, g=0.29, b=0.22 },
|
||||||
|
pressure_to_speed_ratio = 0.400,
|
||||||
|
flow_to_energy_ratio = 0,
|
||||||
|
icon = "__Tantalite2__/graphics/icons/fi-arc-pure-niobium.png",
|
||||||
|
icon_size = 64, icon_mipmaps = 4,
|
||||||
|
order = "a-a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "fi-materials-pure-niobium",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/fi-materials-pure-niobium.png",
|
||||||
|
icon_size = 64,
|
||||||
|
stack_size = 100,
|
||||||
|
subgroup = "fi_item_subgroup_a-c",
|
||||||
|
order = "b-a",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "fi-purify-tantalite-recipe",
|
||||||
|
enabled = false,
|
||||||
|
category = "el_purifier_category",
|
||||||
|
main_product = "el_dirty_water",
|
||||||
|
ingredients = {
|
||||||
|
{type="fluid", name="water", amount=100},
|
||||||
|
{type="item", name="tantalite-ore", amount=20}
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="fluid", name="el_dirty_water", amount=100},
|
||||||
|
{type="item", name="fi-materials-pure-tantalum", amount=5},
|
||||||
|
{type="item", name="fi-materials-pure-niobium", amount=5},
|
||||||
|
},
|
||||||
|
energy_required = 1,
|
||||||
|
always_show_made_in = true,
|
||||||
|
icon_size = 64,
|
||||||
|
icons = (mods["Krastorio2"] and
|
||||||
|
{
|
||||||
|
{ icon = "__248k-Redux__/ressources/fluids/el_dirty_water.png", icon_size = 64},
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/tantalite-ore.png", icon_size = 64, scale=0.2, shift= {-8, -8}},
|
||||||
|
} or {
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/tantalite-ore.png", icon_size = 64},
|
||||||
|
}),
|
||||||
|
group = "fi_item_group",
|
||||||
|
subgroup = "fi_item_subgroup_f",
|
||||||
|
order = "f-a",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "fi-arc-pure-tantalum-recipe",
|
||||||
|
enabled = false,
|
||||||
|
category = "el_arc_furnace_category",
|
||||||
|
ingredients = {
|
||||||
|
{type="item", name="fi-materials-pure-tantalum", amount=1},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="fluid", name="fi-arc-pure-tantalum", amount=200},
|
||||||
|
},
|
||||||
|
energy_required = 0.2,
|
||||||
|
order = "a-b",
|
||||||
|
group = "fi_item_group",
|
||||||
|
subgroup = "fi_item_subgroup_f",
|
||||||
|
always_show_made_in = true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "fi-cast-pure-tantalum-recipe",
|
||||||
|
enabled = false,
|
||||||
|
category = "el_caster_category",
|
||||||
|
ingredients = {
|
||||||
|
{type="fluid", name="fi-arc-pure-tantalum", amount=100},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="item", name="tantalum-plate", amount=1},
|
||||||
|
},
|
||||||
|
energy_required = 0.2,
|
||||||
|
order = "a-b",
|
||||||
|
always_show_made_in = true,
|
||||||
|
allow_decomposition = false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "fi-arc-pure-niobium-recipe",
|
||||||
|
enabled = false,
|
||||||
|
category = "el_arc_furnace_category",
|
||||||
|
ingredients = {
|
||||||
|
{type="item", name="fi-materials-pure-niobium", amount=1},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="fluid", name="fi-arc-pure-niobium", amount=200},
|
||||||
|
},
|
||||||
|
energy_required = 0.2,
|
||||||
|
order = "a-b",
|
||||||
|
group = "fi_item_group",
|
||||||
|
subgroup = "fi_item_subgroup_f",
|
||||||
|
always_show_made_in = true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "fi-cast-pure-niobium-recipe",
|
||||||
|
enabled = false,
|
||||||
|
category = "el_caster_category",
|
||||||
|
ingredients = {
|
||||||
|
{type="fluid", name="fi-arc-pure-niobium", amount=100},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="item", name="niobium-plate", amount=1},
|
||||||
|
},
|
||||||
|
energy_required = 0.2,
|
||||||
|
order = "a-b",
|
||||||
|
always_show_made_in = true,
|
||||||
|
allow_decomposition = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
util.add_unlock("fi_caster_tech","fi-arc-pure-tantalum-recipe")
|
||||||
|
util.add_unlock("fi_caster_tech","fi-cast-pure-tantalum-recipe")
|
||||||
|
util.add_unlock("fi_purifier_tech","fi-purify-tantalite-recipe")
|
||||||
|
util.add_unlock("fi_caster_tech","fi-arc-pure-niobium-recipe")
|
||||||
|
util.add_unlock("fi_caster_tech","fi-cast-pure-niobium-recipe")
|
||||||
|
end
|
118
Tantalite2/prototypes/tantalite-enriched.lua
Normal file
|
@ -0,0 +1,118 @@
|
||||||
|
local util = require("data-util")
|
||||||
|
|
||||||
|
if mods["Krastorio2"] then
|
||||||
|
data:extend(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "enriched-tantalite",
|
||||||
|
icon_size = 64,
|
||||||
|
icon = "__Tantalite2__/graphics/icons/enriched-tantalite.png",
|
||||||
|
subgroup = "raw-resource",
|
||||||
|
order = "e",
|
||||||
|
stack_size = 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "enriched-tantalite",
|
||||||
|
main_product="enriched-tantalite",
|
||||||
|
icons =
|
||||||
|
{
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/enriched-tantalite.png", icon_size = 64 },
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/tantalite-ore.png", icon_size = 64, scale=0.15, shift= {-8, -8}},
|
||||||
|
},
|
||||||
|
category = "chemistry",
|
||||||
|
energy_required = 3,
|
||||||
|
enabled = false,
|
||||||
|
always_show_made_in = true,
|
||||||
|
always_show_products = true,
|
||||||
|
subgroup = "raw-resource",
|
||||||
|
ingredients =
|
||||||
|
{
|
||||||
|
{type = "fluid", name = "kr-hydrogen-chloride", amount = 3},
|
||||||
|
{type = "fluid", name = "water", amount = 25, ignored_by_productivity = 25, ignored_by_stats = 25},
|
||||||
|
{type = "item", name = "tantalite-ore", amount = 9}
|
||||||
|
},
|
||||||
|
results =
|
||||||
|
{
|
||||||
|
{type = "item", name = "enriched-tantalite", amount = 6},
|
||||||
|
{type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25, ignored_by_stats = 25}
|
||||||
|
},
|
||||||
|
crafting_machine_tint =
|
||||||
|
{
|
||||||
|
primary = {r = 0.721, g = 0.525, b = 0.043, a = 0.000},
|
||||||
|
secondary = {r = 0.200, g = 0.680, b = 0.300, a = 0.357},
|
||||||
|
tertiary = {r = 0.690, g = 0.768, b = 0.870, a = 0.000},
|
||||||
|
quaternary = {r = 0.0, g = 0.980, b = 0.603, a = 0.900}
|
||||||
|
},
|
||||||
|
order = "e03[enriched-tantalite]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "enriched-tantalite-smelting",
|
||||||
|
main_product="tantalum-plate",
|
||||||
|
icons =
|
||||||
|
{
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/tantalum-plate.png", icon_size = 64 },
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/enriched-tantalite.png", icon_size = 64, scale=0.125, shift= {-8, -8}},
|
||||||
|
},
|
||||||
|
subgroup = "raw-resource",
|
||||||
|
category = "smelting",
|
||||||
|
energy_required = 16,
|
||||||
|
enabled = false,
|
||||||
|
always_show_made_in = true,
|
||||||
|
always_show_products = true,
|
||||||
|
ingredients = { {type="item", name="enriched-tantalite", amount=5} },
|
||||||
|
results = { {type="item", name="tantalum-plate", 5}, {"niobium-plate", amount=5} },
|
||||||
|
order = "a",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "dirty-water-filtration-tantalite",
|
||||||
|
category = "kr-fluid-filtration",
|
||||||
|
main_product="tantalite-ore",
|
||||||
|
icons =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
icon = data.raw.fluid["kr-dirty-water"].icon,
|
||||||
|
icon_size = data.raw.fluid["kr-dirty-water"].icon_size
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon = data.raw.item["tantalite-ore"].icon,
|
||||||
|
icon_size = data.raw.item["tantalite-ore"].icon_size,
|
||||||
|
scale = 0.20 * (data.raw.fluid["kr-dirty-water"].icon_size/data.raw.item["tantalite-ore"].icon_size),
|
||||||
|
shift = {0, 4}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
icon_size = data.raw.fluid["kr-dirty-water"].icon_size,
|
||||||
|
energy_required = 2,
|
||||||
|
enabled = false,
|
||||||
|
allow_as_intermediate = false,
|
||||||
|
always_show_made_in = true,
|
||||||
|
always_show_products = true,
|
||||||
|
ingredients =
|
||||||
|
{
|
||||||
|
{type = "fluid", name = "kr-dirty-water", amount = 100, ignored_by_productivity = 100, ignored_by_stats = 100},
|
||||||
|
},
|
||||||
|
results =
|
||||||
|
{
|
||||||
|
{type = "fluid", name = "water", amount = 90, ignored_by_productivity = 90, ignored_by_stats = 90},
|
||||||
|
{type = "item", name = "stone", probability = 0.40, amount = 1},
|
||||||
|
{type = "item", name = "tantalite-ore", probability = 0.10, amount = 1},
|
||||||
|
},
|
||||||
|
crafting_machine_tint =
|
||||||
|
{
|
||||||
|
primary = {r = 0.60, g = 0.20, b = 0, a = 0.6},
|
||||||
|
secondary = {r = 1.0, g = 0.843, b = 0.0, a = 0.9}
|
||||||
|
},
|
||||||
|
group ="raw-material",
|
||||||
|
subgroup = "raw-resource",
|
||||||
|
order = "w013[dirty-water-filtration-tantalite]"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
util.add_effect("kr-enriched-ores", { type = "unlock-recipe", recipe = "enriched-tantalite" })
|
||||||
|
util.add_effect("kr-enriched-ores", { type = "unlock-recipe", recipe = "enriched-tantalite-smelting" })
|
||||||
|
|
||||||
|
util.add_productivity("enriched-tantalite")
|
||||||
|
|
||||||
|
end
|
105
Tantalite2/prototypes/tantalite-ore.lua
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
local resource_autoplace = require('resource-autoplace');
|
||||||
|
local item_sounds = require('__base__.prototypes.item_sounds')
|
||||||
|
local util = require("data-util")
|
||||||
|
|
||||||
|
data.raw.planet.nauvis.map_gen_settings.autoplace_controls["tantalite-ore"] = {}
|
||||||
|
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["tantalite-ore"] = {}
|
||||||
|
resource_autoplace.initialize_patch_set("tantalite-ore", true)
|
||||||
|
|
||||||
|
local subgroup = "raw-resource"
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
subgroup = "tantalite"
|
||||||
|
end
|
||||||
|
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "autoplace-control",
|
||||||
|
category = "resource",
|
||||||
|
name = "tantalite-ore",
|
||||||
|
richness = true,
|
||||||
|
order = "b-e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "resource",
|
||||||
|
icon_size = 64,
|
||||||
|
icon_mipmaps = 3,
|
||||||
|
name = "tantalite-ore",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/tantalum-ore.png",
|
||||||
|
flags = { "placeable-neutral" },
|
||||||
|
order = "a-b-a",
|
||||||
|
map_color = { r = 0.30, g = 0.30, b = 0.60 },
|
||||||
|
minable =
|
||||||
|
{
|
||||||
|
hardness = 1,
|
||||||
|
mining_particle = "copper-ore-particle",
|
||||||
|
mining_time = 1,
|
||||||
|
fluid_amount = 3,
|
||||||
|
required_fluid = "sulfuric-acid",
|
||||||
|
result = "tantalite-ore"
|
||||||
|
},
|
||||||
|
collision_box = { { -0.1, -0.1 }, { 0.1, 0.1 } },
|
||||||
|
selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
|
||||||
|
|
||||||
|
autoplace = resource_autoplace.resource_autoplace_settings {
|
||||||
|
name = "tantalite-ore",
|
||||||
|
order = "b-z",
|
||||||
|
base_density = 2,
|
||||||
|
base_spots_per_km2 = 1,
|
||||||
|
has_starting_area_placement = false,
|
||||||
|
regular_rq_factor_multiplier = 1.0,
|
||||||
|
starting_rq_factor_multiplier = 1.0,
|
||||||
|
},
|
||||||
|
|
||||||
|
stage_counts = { 15000, 9500, 5500, 2900, 1300, 400, 150, 80 },
|
||||||
|
stages =
|
||||||
|
{
|
||||||
|
sheet =
|
||||||
|
{
|
||||||
|
filename = "__Tantalite2__/graphics/entity/ores/hr-tantalite-ore.png",
|
||||||
|
priority = "extra-high",
|
||||||
|
size = 128,
|
||||||
|
frame_count = 8,
|
||||||
|
variation_count = 8,
|
||||||
|
scale = 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "tantalite-ore",
|
||||||
|
icon_size = 64,
|
||||||
|
icon_mipmaps = 3,
|
||||||
|
icon = "__Tantalite2__/graphics/icons/tantalite-ore.png",
|
||||||
|
subgroup = "raw-resource",
|
||||||
|
order = "t-c-a",
|
||||||
|
stack_size = 50,
|
||||||
|
weight = 20 * kg,
|
||||||
|
inventory_move_sound = item_sounds.resource_inventory_move,
|
||||||
|
pick_sound = item_sounds.resource_inventory_pickup,
|
||||||
|
drop_sound = item_sounds.resource_inventory_move
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "tantalite-smelting",
|
||||||
|
category = "smelting",
|
||||||
|
subgroup = subgroup,
|
||||||
|
order = "d[tantalum-plate]",
|
||||||
|
icons = (mods["Krastorio2"] and
|
||||||
|
{
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/tantalum-plate.png", icon_size = 64 },
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/tantalite-ore.png", icon_size = 64, scale = 0.2, shift = { -8, -8 } },
|
||||||
|
} or {
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/tantalum-plate.png", icon_size = 64 },
|
||||||
|
}),
|
||||||
|
main_product = "tantalum-plate",
|
||||||
|
enabled = true,
|
||||||
|
energy_required = 12,
|
||||||
|
ingredients = { { type = "item", name = "tantalite-ore", amount = 20 } },
|
||||||
|
results = {
|
||||||
|
{ type = "item", name = "tantalum-plate", amount = 5 },
|
||||||
|
{ type = "item", name = "niobium-plate", amount = 5 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
util.add_productivity("tantalite-smelting")
|
155
Tantalite2/prototypes/tantalite-recipe-se.lua
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
-- Additional recipes if Space Exploration mod is enabled
|
||||||
|
local util = require("data-util")
|
||||||
|
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
se_delivery_cannon_recipes["tantalite-ore"] = {name= "tantalite-ore"}
|
||||||
|
se_delivery_cannon_recipes["tantalum-plate"] = {name= "tantalum-plate"}
|
||||||
|
se_delivery_cannon_recipes["niobium-plate"] = {name= "niobium-plate"}
|
||||||
|
util.se_landfill({ore="tantalite-ore"})
|
||||||
|
|
||||||
|
util.se_matter({ore="tantalite-ore", energy_required=1, quant_out=10, stream_out=60})
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item-subgroup",
|
||||||
|
name = "niobium",
|
||||||
|
group = "resources",
|
||||||
|
order = "a-h-z-a",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "item-subgroup",
|
||||||
|
name = "tantalum",
|
||||||
|
group = "resources",
|
||||||
|
order = "a-h-z-a",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "item-subgroup",
|
||||||
|
name = "tantalite",
|
||||||
|
group = "resources",
|
||||||
|
order = "a-h-z-a",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
util.set_item_subgroup("tantalum-plate", "tantalum")
|
||||||
|
util.set_item_subgroup("niobium-plate", "niobium")
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "tantalum-ingot",
|
||||||
|
icons = {{icon = "__Tantalite2__/graphics/icons/tantalum-ingot.png", icon_size = 64}},
|
||||||
|
order = "b-b",
|
||||||
|
stack_size = 50,
|
||||||
|
subgroup = "tantalum",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "niobium-ingot",
|
||||||
|
icons = {{icon = "__Tantalite2__/graphics/icons/niobium-ingot.png", icon_size = 64}},
|
||||||
|
order = "b-b",
|
||||||
|
stack_size = 50,
|
||||||
|
subgroup = "niobium",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "fluid",
|
||||||
|
name = "molten-tantalite",
|
||||||
|
default_temperature = 232,
|
||||||
|
max_temperature = 232,
|
||||||
|
base_color = {r=191, g=219, b=233},
|
||||||
|
flow_color = {r=191, g=219, b=233},
|
||||||
|
icons = {{icon = "__Tantalite2__/graphics/icons/molten-tantalite.png", icon_size = 64}},
|
||||||
|
order = "a[molten]-a",
|
||||||
|
pressure_to_speed_ratio = 0.4,
|
||||||
|
flow_to_energy_ratio = 0.59,
|
||||||
|
auto_barrel = false,
|
||||||
|
subgroup = "fluid",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
category = "smelting",
|
||||||
|
name = "molten-tantalite",
|
||||||
|
subgroup = "tantalite",
|
||||||
|
results = {
|
||||||
|
{type = "fluid", name = "molten-tantalite", amount = mods["Krastorio2"] and 750 or 900},
|
||||||
|
},
|
||||||
|
energy_required = 45,
|
||||||
|
ingredients = {
|
||||||
|
{type = "item", name = mods["Krastorio2"] and "enriched-tantalite" or "tantalite-ore", amount = 24},
|
||||||
|
{type = "fluid", name = "se-pyroflux", amount = 10},
|
||||||
|
},
|
||||||
|
enabled = false,
|
||||||
|
always_show_made_in = true,
|
||||||
|
allow_as_intermediate = false,
|
||||||
|
order = "a-a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "tantalite-ingot",
|
||||||
|
subgroup = "tantalite",
|
||||||
|
icons = {{icon = "__Tantalite2__/graphics/icons/tantalum-ingot.png", icon_size = 64}},
|
||||||
|
category = "casting",
|
||||||
|
main_porduct = "tantalum-ingot",
|
||||||
|
results = {{type="item", name="tantalum-ingot", amount=1}, {type="item", name="niobium-ingot", amount=1}},
|
||||||
|
energy_required = 20,
|
||||||
|
ingredients = {
|
||||||
|
{type = "fluid", name = "molten-tantalite", amount = 500},
|
||||||
|
},
|
||||||
|
enabled = false,
|
||||||
|
always_show_made_in = true,
|
||||||
|
allow_as_intermediate = false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
category = "crafting",
|
||||||
|
name = "tantalum-ingot-to-plate",
|
||||||
|
icons = {
|
||||||
|
{icon = "__Tantalite2__/graphics/icons/tantalum-plate.png", icon_size = 64},
|
||||||
|
{icon = "__Tantalite2__/graphics/icons/tantalum-ingot.png", icon_size = 32, scale = 0.125, shift = {-8, -8}},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="item", name = "tantalum-plate", amount = 10},
|
||||||
|
},
|
||||||
|
energy_required = 3.75,
|
||||||
|
ingredients = {
|
||||||
|
{type="item", name = "tantalum-ingot", amount = 1}
|
||||||
|
},
|
||||||
|
enabled = false,
|
||||||
|
always_show_made_in = true,
|
||||||
|
allow_decomposition = false,
|
||||||
|
order = "a-c-b",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
category = "crafting",
|
||||||
|
name = "niobium-ingot-to-plate",
|
||||||
|
icons = {
|
||||||
|
{icon = "__Tantalite2__/graphics/icons/niobium-plate.png", icon_size = 64},
|
||||||
|
{icon = "__Tantalite2__/graphics/icons/niobium-ingot.png", icon_size = 32, scale = 0.125, shift = {-8, -8}},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="item", name = "niobium-plate", amount = 10},
|
||||||
|
},
|
||||||
|
energy_required = 3.75,
|
||||||
|
ingredients = {
|
||||||
|
{type="item", name = "niobium-ingot", amount = 1}
|
||||||
|
},
|
||||||
|
enabled = false,
|
||||||
|
always_show_made_in = true,
|
||||||
|
allow_decomposition = false,
|
||||||
|
order = "a-c-b"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "molten-tantalite"})
|
||||||
|
util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "tantalite-ingot"})
|
||||||
|
util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "tantalum-ingot-to-plate"})
|
||||||
|
util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "niobium-ingot-to-plate"})
|
||||||
|
util.add_effect("se-vulcanite-smelting", {type = "unlock-recipe", recipe= "molten-tantalite"})
|
||||||
|
util.add_effect("se-vulcanite-smelting", {type = "unlock-recipe", recipe= "tantalite-ingot"})
|
||||||
|
util.add_effect("se-vulcanite-smelting", {type = "unlock-recipe", recipe= "tantalum-ingot-to-plate"})
|
||||||
|
util.add_effect("se-vulcanite-smelting", {type = "unlock-recipe", recipe= "niobium-ingot-to-plate"})
|
||||||
|
if mods["Krastorio2"] then
|
||||||
|
util.set_item_subgroup("enriched-tantalite", "tantalite")
|
||||||
|
data.raw.recipe["enriched-tantalite-smelting"].order= "d[tantalum-plate]"
|
||||||
|
se_delivery_cannon_recipes["enriched-tantalite"] = {name= "enriched-tantalite"}
|
||||||
|
end
|
||||||
|
se_delivery_cannon_recipes["tantalum-ingot"] = {name= "tantalum-ingot"}
|
||||||
|
se_delivery_cannon_recipes["niobium-ingot"] = {name= "niobium-ingot"}
|
||||||
|
|
||||||
|
end
|
232
Tantalite2/prototypes/tantalum-recipe.lua
Normal file
|
@ -0,0 +1,232 @@
|
||||||
|
local util = require("data-util")
|
||||||
|
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "tantalum-plate",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/tantalum-plate.png",
|
||||||
|
icon_size = 64,
|
||||||
|
subgroup = "intermediate-product",
|
||||||
|
order = "b[tantalum-plate]",
|
||||||
|
stack_size = 100
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local thoriated_filament_ingredients = {{type="item", name="uranium-238", amount=1},{type="item", name="iron-plate", amount=1}}
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
thoriated_filament_ingredients = {{type="item", name="uranium-ore", amount=1},{type="item", name="iron-plate", amount=1}}
|
||||||
|
end
|
||||||
|
if mods["248k-Redux"] then
|
||||||
|
thoriated_filament_ingredients = {{type="item", name="thorium-ore", amount=1}}
|
||||||
|
if mods["bztungsten"] then
|
||||||
|
table.insert({type="item", name="tungsten-plate", amount=1})
|
||||||
|
end
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "thorium-processing",
|
||||||
|
category = "centrifuging",
|
||||||
|
order = "t",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 14,
|
||||||
|
ingredients = {{type="item", name="thorium-ore", amount=10}},
|
||||||
|
results = {{type="item", name="fi_thorium232_item", amount=1}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
util.add_unlock("uranium-processing", "thorium-processing") --maybe add its own tech later
|
||||||
|
end
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "thoriated-filament",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/thoriated-filament.png",
|
||||||
|
icon_size = 128,
|
||||||
|
subgroup = "intermediate-product",
|
||||||
|
order = "b[thoriated-filament]",
|
||||||
|
stack_size = 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "thoriated-filament",
|
||||||
|
category = "advanced-crafting",
|
||||||
|
order = "d[thoriated-filament]",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 2,
|
||||||
|
ingredients = thoriated_filament_ingredients,
|
||||||
|
results = {{type="item", name="thoriated-filament", amount=1}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local electron_gun_ingredients = {{type="item", name="tantalum-plate", amount=1}, {type="item", name="thoriated-filament", amount=1}, {type="item", name="electronic-circuit", amount=2}}
|
||||||
|
if mods["bismuth"] then
|
||||||
|
table.insert(electron_gun_ingredients, {type="item", name="pcb-solder", amount=2})
|
||||||
|
end
|
||||||
|
if data.raw.item["glass"] then
|
||||||
|
table.insert(electron_gun_ingredients, {type="item", name="glass", amount=2})
|
||||||
|
end
|
||||||
|
if mods["LasingAround-Updated"] then
|
||||||
|
electron_gun_ingredients = {{type="item", name="tantalum-plate", amount=1}, {type="item", name="thoriated-filament", amount=1}, {type="item", name="electronic-circuit", amount=2}, {type="item", name="empty-amplifier-tube", amount=1}}
|
||||||
|
if mods["bismuth"] then
|
||||||
|
table.insert(electron_gun_ingredients, {type="item", name="pcb-solder", amount=2})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local electron_gun_subgroup = "intermediate-product"
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
electron_gun_subgroup = "electronic"
|
||||||
|
end
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "electron-gun",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/electron-gun.png",
|
||||||
|
icon_size = 128,
|
||||||
|
category = "intermediate-product",
|
||||||
|
subgroup = electron_gun_subgroup,
|
||||||
|
order = "e[electron-gun]",
|
||||||
|
stack_size = 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "electron-gun",
|
||||||
|
category = "advanced-crafting",
|
||||||
|
order = "e[electron-gun]",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 8,
|
||||||
|
ingredients = electron_gun_ingredients,
|
||||||
|
results = {{type="item", name="electron-gun", amount=1}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local crt_ingredients = {{type="item", name="electron-gun", amount=1}, {type="item", name="coal", amount=1}, {type="item", name="advanced-circuit", amount=3}}
|
||||||
|
if data.raw.item["glass"] then
|
||||||
|
table.insert(crt_ingredients, {type="item", name="glass", amount=3})
|
||||||
|
end
|
||||||
|
if data.raw.item["kr-glass"] then
|
||||||
|
table.insert(crt_ingredients, {type="item", name="kr-glass", amount=3})
|
||||||
|
end
|
||||||
|
local crt_subgroup = "intermediate-product"
|
||||||
|
if mods["bzcarbon"] then
|
||||||
|
crt_ingredients = {{type="item", name="electron-gun", amount=1}, {type="item", name="graphene", amount=1}, {type="item", name="advanced-circuit", amount=3}}
|
||||||
|
if data.raw.item["glass"] then
|
||||||
|
table.insert(crt_ingredients, {type="item", name="glass", amount=3})
|
||||||
|
end
|
||||||
|
if data.raw.item["kr-glass"] then
|
||||||
|
table.insert(crt_ingredients, {type="item", name="kr-glass", amount=3})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if mods["bzcarbon"] and mods["bismuth"] and mods["bzaluminum"] then
|
||||||
|
crt_ingredients = {{type="item", name="electron-gun", amount=1}, {type="item", name="graphene", amount=1}, {type="item", name="advanced-circuit", amount=3}, {type="item", name="pcb-solder", amount=3}, {type="item", name="aluminum-plate", amount=5}}
|
||||||
|
if data.raw.item["glass"] then
|
||||||
|
table.insert(crt_ingredients, {type="item", name="glass", amount=3})
|
||||||
|
end
|
||||||
|
if data.raw.item["kr-glass"] then
|
||||||
|
table.insert(crt_ingredients, {type="item", name="kr-glass", amount=3})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
crt_subgroup = "electronic"
|
||||||
|
end
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "crt",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/crt.png",
|
||||||
|
icon_size = 64,
|
||||||
|
category = "intermediate-product",
|
||||||
|
subgroup = crt_subgroup,
|
||||||
|
order = "c[crt]",
|
||||||
|
stack_size = 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "crt",
|
||||||
|
category = "advanced-crafting",
|
||||||
|
order = "c[crt]",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 12,
|
||||||
|
ingredients = crt_ingredients,
|
||||||
|
results = {{type="item", name="crt", amount=1}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local tantalum_capacitor_ingredients = {{type="item", name="tantalum-plate", amount=1},{type="item", name="copper-cable", amount=1}}
|
||||||
|
local tantalum_capacitor_subgroup = "intermediate-product"
|
||||||
|
if mods["bzlead"] or mods["manganese"] then
|
||||||
|
tantalum_capacitor_ingredients = {{type="item", name="tantalum-plate", amount=1}}
|
||||||
|
if mods["bzlead"] then
|
||||||
|
table.insert({type="item", name="lead-plate", amount = 1})
|
||||||
|
end
|
||||||
|
if mods["manganese"] then
|
||||||
|
table.insert(tantalum_capacitor_ingredients, {type="item", name="manganese-plate", amount=1})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
tantalum_capacitor_subgroup = "electronic"
|
||||||
|
end
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "tantalum-capacitor",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/tantalum-capacitor.png",
|
||||||
|
icon_size = 64,
|
||||||
|
subgroup = tantalum_capacitor_subgroup,
|
||||||
|
order = "t",
|
||||||
|
stack_size = 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "tantalum-titanium-beam",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/tantalum-titanium-beam.png",
|
||||||
|
icon_size = 64,
|
||||||
|
subgroup = "intermediate-product",
|
||||||
|
order = "t",
|
||||||
|
stack_size = 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "tantalum-capacitor",
|
||||||
|
category = "advanced-crafting",
|
||||||
|
order = "t",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 2,
|
||||||
|
ingredients = tantalum_capacitor_ingredients,
|
||||||
|
results = {{type="item", name="tantalum-capacitor", amount=5}},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "tantalum-titanium-beam",
|
||||||
|
category = "crafting",
|
||||||
|
order = "t",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 2,
|
||||||
|
ingredients = {{type="item", name="tantalum-plate", amount=2}, (data.raw.item["titanium-plate"] and {type="item", name="titanium-plate", amount=1}) or {type="item", name="iron-plate", amount=1}},
|
||||||
|
results = {{type="item", name="tantalum-titanium-beam", amount=1}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
util.add_unlock("advanced-circuit", "tantalum-capacitor")
|
||||||
|
if mods["Krastorio2"] then
|
||||||
|
util.add_ingredient("kr-electronic-components", "tantalum-capacitor", 2)
|
||||||
|
else
|
||||||
|
util.add_ingredient("advanced-circuit", "tantalum-capacitor", 2)
|
||||||
|
end
|
||||||
|
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "recipe",
|
||||||
|
name = "tantalum-refining",
|
||||||
|
category = "smelting",
|
||||||
|
order = "h",
|
||||||
|
enabled = false,
|
||||||
|
energy_required = 8,
|
||||||
|
ingredients = {{type="item", name="tantalite-ore", amount=10}},
|
||||||
|
results = {{type="item", name="tantalum-plate", amount=7}},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
util.add_productivity("tantalum-refining")
|
||||||
|
end
|
||||||
|
|
||||||
|
util.add_productivity("thoriated-filament")
|
||||||
|
util.add_productivity("electron-gun")
|
||||||
|
util.add_productivity("crt")
|
||||||
|
util.add_productivity("tantalum-capacitor")
|
216
Tantalite2/prototypes/technology.lua
Normal file
|
@ -0,0 +1,216 @@
|
||||||
|
local util = require("data-util")
|
||||||
|
|
||||||
|
local electron_emitter_prerequisites = {"laser"}
|
||||||
|
if mods["248k-Redux"] then
|
||||||
|
electron_emitter_prerequisites = {"fi_purifier_2_tech", "laser"}
|
||||||
|
end
|
||||||
|
|
||||||
|
data:extend(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
type = "technology",
|
||||||
|
name = "electron-emitter",
|
||||||
|
icons = {
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/electron-gun.png", icon_size = 128}
|
||||||
|
},
|
||||||
|
prerequisites = electron_emitter_prerequisites,
|
||||||
|
effects = {
|
||||||
|
{
|
||||||
|
type = "unlock-recipe",
|
||||||
|
recipe = "electron-gun",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "unlock-recipe",
|
||||||
|
recipe = "thoriated-filament",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
unit =
|
||||||
|
{
|
||||||
|
count = 200,
|
||||||
|
ingredients =
|
||||||
|
{
|
||||||
|
{ "automation-science-pack", 1 },
|
||||||
|
{ "logistic-science-pack", 1 },
|
||||||
|
{ "chemical-science-pack", 1 }
|
||||||
|
},
|
||||||
|
time = 30
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
util.add_prerequisite("laser-turret", "electron-emitter")
|
||||||
|
|
||||||
|
local crt_prerequisites = {"electron-emitter"}
|
||||||
|
if mods["bzcarbon"] then
|
||||||
|
crt_prerequisites = {"graphene", "electron-emitter"}
|
||||||
|
end
|
||||||
|
data:extend(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
type = "technology",
|
||||||
|
name = "cathode-ray-tube",
|
||||||
|
icons = {
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/crt.png", icon_size = 64}
|
||||||
|
},
|
||||||
|
prerequisites = crt_prerequisites,
|
||||||
|
effects = {
|
||||||
|
{
|
||||||
|
type = "unlock-recipe",
|
||||||
|
recipe = "crt",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
unit =
|
||||||
|
{
|
||||||
|
count = 300,
|
||||||
|
ingredients =
|
||||||
|
{
|
||||||
|
{ "automation-science-pack", 1 },
|
||||||
|
{ "logistic-science-pack", 1 },
|
||||||
|
{ "chemical-science-pack", 1 }
|
||||||
|
},
|
||||||
|
time = 30
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
util.add_prerequisite("rocket-control-unit", "cathode-ray-tube")
|
||||||
|
|
||||||
|
local advanced_multi_cylinder_engine_tech = {"chemical-science-pack"}
|
||||||
|
local advanced_tantalum_processing_pre = {"chemical-science-pack"}
|
||||||
|
if mods["IfNickel-Updated"] and data.raw.item["advanced-flow-controller"] then
|
||||||
|
advanced_multi_cylinder_engine_tech = {"advanced-flow-controller"}
|
||||||
|
end
|
||||||
|
if mods["bztitanium"] then
|
||||||
|
advanced_tantalum_processing_pre = {"titanium-processing"}
|
||||||
|
end
|
||||||
|
data:extend(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
type = "technology",
|
||||||
|
name = "advanced-multi-cylinder-engine",
|
||||||
|
icons = {
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/advanced-multi-cylinder-engine.png", icon_size = 64}
|
||||||
|
},
|
||||||
|
prerequisites = advanced_multi_cylinder_engine_tech,
|
||||||
|
effects = {
|
||||||
|
{
|
||||||
|
type = "unlock-recipe",
|
||||||
|
recipe = "advanced-multi-cylinder-engine",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "unlock-recipe",
|
||||||
|
recipe = "heatsink",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
unit =
|
||||||
|
{
|
||||||
|
count = 250,
|
||||||
|
ingredients = {
|
||||||
|
{ "automation-science-pack", 1 },
|
||||||
|
{ "logistic-science-pack", 1 },
|
||||||
|
{ "chemical-science-pack", 1 }
|
||||||
|
},
|
||||||
|
time = 30
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "technology",
|
||||||
|
name = "advanced-tantalum-processing",
|
||||||
|
icons = {
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/tantalum-titanium-beam.png", icon_size = 64}
|
||||||
|
},
|
||||||
|
prerequisites = advanced_tantalum_processing_pre,
|
||||||
|
effects = {
|
||||||
|
{
|
||||||
|
type = "unlock-recipe",
|
||||||
|
recipe = "tantalum-titanium-beam",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
unit =
|
||||||
|
{
|
||||||
|
count = 200,
|
||||||
|
ingredients = {
|
||||||
|
{ "automation-science-pack", 1 },
|
||||||
|
{ "logistic-science-pack", 1 },
|
||||||
|
{ "chemical-science-pack", 1 }
|
||||||
|
},
|
||||||
|
time = 30
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if mods["248k-Redux"] and mods["space-exploration"] then
|
||||||
|
data:extend(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
type = "technology",
|
||||||
|
name = "energy-pyroflux",
|
||||||
|
icons = {
|
||||||
|
{ icon = "__space-exploration-graphics__/graphics/icons/fluid/pyroflux.png", icon_size = 64},
|
||||||
|
{ icon = "__248k-Redux__/ressources/fusion/fu_materials/fu_materials_energy_crystal.png", icon_size = 64, scale=0.3, shift= {-8, -8}},
|
||||||
|
},
|
||||||
|
prerequisites = {"se-energy-science-pack-1"},
|
||||||
|
effects = {
|
||||||
|
{
|
||||||
|
type = "unlock-recipe",
|
||||||
|
recipe = "energy-pyroflux",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
unit =
|
||||||
|
{
|
||||||
|
count = 100,
|
||||||
|
ingredients =
|
||||||
|
{
|
||||||
|
{ "automation-science-pack", 1 },
|
||||||
|
{ "logistic-science-pack", 1 },
|
||||||
|
{ "chemical-science-pack", 1 },
|
||||||
|
{"se-rocket-science-pack", 1},
|
||||||
|
{"space-science-pack", 1},
|
||||||
|
{"production-science-pack", 1},
|
||||||
|
{"utility-science-pack", 1},
|
||||||
|
{"se-energy-science-pack-1", 1}
|
||||||
|
},
|
||||||
|
time = 60
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
data:extend(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
type = "technology",
|
||||||
|
name = "targeted-tantalite-refining",
|
||||||
|
icons = {
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/tantalite-ore.png", icon_size = 64},
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/niobium-plate.png", icon_size = 64, scale=0.3, shift= {-8, -8}},
|
||||||
|
{ icon = "__Tantalite2__/graphics/icons/tantalum-plate.png", icon_size = 64, scale=0.3, shift= {8, -8}},
|
||||||
|
},
|
||||||
|
prerequisites = {"se-material-science-pack-1"},
|
||||||
|
effects = {
|
||||||
|
{
|
||||||
|
type = "unlock-recipe",
|
||||||
|
recipe = "tantalum-refining",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "unlock-recipe",
|
||||||
|
recipe = "niobium-refining",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
unit =
|
||||||
|
{
|
||||||
|
count = 100,
|
||||||
|
ingredients =
|
||||||
|
{
|
||||||
|
{"automation-science-pack", 1 },
|
||||||
|
{"logistic-science-pack", 1 },
|
||||||
|
{"chemical-science-pack", 1 },
|
||||||
|
{"se-rocket-science-pack", 1},
|
||||||
|
{"space-science-pack", 1},
|
||||||
|
{"production-science-pack", 1},
|
||||||
|
{"utility-science-pack", 1},
|
||||||
|
{"se-material-science-pack-1", 1}
|
||||||
|
},
|
||||||
|
time = 60
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
82
Tantalite2/prototypes/thorium-ore.lua
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
local resource_autoplace = require('resource-autoplace');
|
||||||
|
local item_sounds = require('__base__.prototypes.item_sounds')
|
||||||
|
|
||||||
|
if mods["248k-Redux"] then
|
||||||
|
data.raw.planet.nauvis.map_gen_settings.autoplace_controls["thorium-ore"] = {}
|
||||||
|
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["thorium-ore"] = {}
|
||||||
|
resource_autoplace.initialize_patch_set("thorium-ore", true)
|
||||||
|
|
||||||
|
local fluid_type = "sulfuric-acid"
|
||||||
|
if mods["Krastorio2"] then
|
||||||
|
fluid_type = "kr-hydrogen-chloride"
|
||||||
|
end
|
||||||
|
|
||||||
|
data:extend({
|
||||||
|
{
|
||||||
|
type = "autoplace-control",
|
||||||
|
category = "resource",
|
||||||
|
name = "thorium-ore",
|
||||||
|
richness = true,
|
||||||
|
order = "b-e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "item",
|
||||||
|
name = "thorium-ore",
|
||||||
|
icon_size = 64,
|
||||||
|
icon_mipmaps = 3,
|
||||||
|
icon = "__Tantalite2__/graphics/icons/thorium-ore.png",
|
||||||
|
subgroup = "raw-resource",
|
||||||
|
order = "t-c-a",
|
||||||
|
stack_size = 50,
|
||||||
|
weight = 20 * kg,
|
||||||
|
inventory_move_sound = item_sounds.resource_inventory_move,
|
||||||
|
pick_sound = item_sounds.resource_inventory_pickup,
|
||||||
|
drop_sound = item_sounds.resource_inventory_move
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "resource",
|
||||||
|
icon_size = 64,
|
||||||
|
icon_mipmaps = 3,
|
||||||
|
name = "thorium-ore",
|
||||||
|
icon = "__Tantalite2__/graphics/icons/thorium-ore.png",
|
||||||
|
flags = { "placeable-neutral" },
|
||||||
|
order = "a-b-a",
|
||||||
|
map_color = { r = 0.50, g = 0.50, b = 0.90 },
|
||||||
|
minable =
|
||||||
|
{
|
||||||
|
hardness = 1,
|
||||||
|
mining_particle = "copper-ore-particle",
|
||||||
|
mining_time = 1,
|
||||||
|
fluid_amount = 3,
|
||||||
|
required_fluid = fluid_type,
|
||||||
|
result = "thorium-ore"
|
||||||
|
},
|
||||||
|
collision_box = { { -0.1, -0.1 }, { 0.1, 0.1 } },
|
||||||
|
selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
|
||||||
|
|
||||||
|
autoplace = resource_autoplace.resource_autoplace_settings {
|
||||||
|
name = "thorium-ore",
|
||||||
|
order = "b-z",
|
||||||
|
base_density = 2,
|
||||||
|
base_spots_per_km2 = 1,
|
||||||
|
has_starting_area_placement = false,
|
||||||
|
regular_rq_factor_multiplier = 1.0,
|
||||||
|
starting_rq_factor_multiplier = 1.0,
|
||||||
|
},
|
||||||
|
|
||||||
|
stage_counts = { 15000, 9500, 5500, 2900, 1300, 400, 150, 80 },
|
||||||
|
stages =
|
||||||
|
{
|
||||||
|
sheet =
|
||||||
|
{
|
||||||
|
filename = "__Tantalite2__/graphics/entity/ores/hr-thorium-ore.png",
|
||||||
|
priority = "extra-high",
|
||||||
|
size = 128,
|
||||||
|
frame_count = 8,
|
||||||
|
variation_count = 8,
|
||||||
|
scale = 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
15
Tantalite2/recipe-final-fix.lua
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
local util = require("data-util")
|
||||||
|
|
||||||
|
util.remove_ingredient("rocket-control-unit", "glass")
|
||||||
|
util.remove_ingredient("rocket-control-unit", "advanced-circuit")
|
||||||
|
util.add_ingredient("rocket-control-unit", "advanced-circuit", 2)
|
||||||
|
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
util.add_product("se-core-fragment-omni",{ type = "item", name = "tantalite-ore", amount = 1 })
|
||||||
|
end
|
||||||
|
|
||||||
|
if mods["bzaluminum"] then
|
||||||
|
--stop bz aluminum from replacing electronic circuit. Not sure why it does that
|
||||||
|
util.replace_ingredient("electron-gun", "aluminum-cable", "electronic-circuit")
|
||||||
|
util.remove_ingredient("rocket-control-unit", "aluminum-plate")
|
||||||
|
end
|
161
Tantalite2/recipe-modify.lua
Normal file
|
@ -0,0 +1,161 @@
|
||||||
|
local util = require("data-util")
|
||||||
|
|
||||||
|
-- Main vanilla changes
|
||||||
|
util.replace_ingredient("laser-turret", "electronic-circuit", "electron-gun", 5)
|
||||||
|
util.remove_ingredient("laser-turret", "glass")
|
||||||
|
|
||||||
|
util.add_ingredient("rocket-control-unit", "crt", 1)
|
||||||
|
util.remove_ingredient("rocket-control-unit", "glass")
|
||||||
|
|
||||||
|
util.replace_ingredient("heat-exchanger", "copper-plate", "tantalum-plate",50)
|
||||||
|
util.replace_ingredient("heat-pipe", "copper-plate", "tantalum-plate",20)
|
||||||
|
|
||||||
|
util.add_ingredient("assembling-machine-2", "automation-core-2", 1)
|
||||||
|
|
||||||
|
util.add_unlock("processing-unit", "niobium-tin-cable")
|
||||||
|
util.add_unlock("automation-2","automation-core-2")
|
||||||
|
-- Mod changes
|
||||||
|
if mods["bismuth"] then
|
||||||
|
util.remove_ingredient("laser-turret", "pcb-solder")
|
||||||
|
util.remove_ingredient("rocket-control-unit", "pcb-solder")
|
||||||
|
end
|
||||||
|
|
||||||
|
if mods["bzcarbon"] then
|
||||||
|
util.remove_ingredient("rocket-control-unit", "graphene")
|
||||||
|
end
|
||||||
|
|
||||||
|
if mods["MDbobelectronics2"] then
|
||||||
|
util.remove_ingredient("superior-circuit-board", "gold-ingot")
|
||||||
|
util.remove_ingredient("superior-circuit-board", "tin-plate")
|
||||||
|
util.remove_ingredient("superior-circuit-board", "advanced-circuit")
|
||||||
|
util.add_ingredient("superior-circuit-board", "circuit-board", 10)
|
||||||
|
util.add_ingredient("superior-circuit-board", "niobium-tin-cable", 20)
|
||||||
|
|
||||||
|
util.replace_ingredient("multi-layer-circuit-board", "copper-plate", "superior-circuit-board", 2)
|
||||||
|
util.replace_ingredient("multi-layer-circuit-board", "tin-plate", "intergrated-electronics", 2)
|
||||||
|
end
|
||||||
|
|
||||||
|
if mods["aai-industry"] then
|
||||||
|
if mods["Krastorio2"] then
|
||||||
|
util.remove_ingredient("kr-atmospheric-condenser", mods["IfNickel-Updated"] and "flow-controller")
|
||||||
|
util.replace_ingredient("kr-atmospheric-condenser", "engine-unit", "advanced-multi-cylinder-engine")
|
||||||
|
end
|
||||||
|
if mods["aai-vehicles-miner"] then
|
||||||
|
util.replace_ingredient("vehicle-miner-mk4", "electric-engine-unit", "advanced-multi-cylinder-engine", 10)
|
||||||
|
end
|
||||||
|
if mods["EndgameCombat"] then
|
||||||
|
util.replace_ingredient("better-tank", "engine-unit", "advanced-multi-cylinder-engine", 12)
|
||||||
|
end
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
if mods["bzaluminum"] then
|
||||||
|
util.remove_ingredient("se-fluid-burner-generator", "spark-plug")
|
||||||
|
end
|
||||||
|
util.replace_ingredient("se-fluid-burner-generator", "electric-motor", "advanced-multi-cylinder-engine", 5)
|
||||||
|
end
|
||||||
|
if mods["248k-Redux"] then
|
||||||
|
util.replace_ingredient("fi_refinery_recipe", "engine-unit", "advanced-multi-cylinder-engine", 10)
|
||||||
|
util.remove_ingredient("fi_refinery_recipe",mods["IfNickel-Updated"] and "advanced-flow-controller")
|
||||||
|
end
|
||||||
|
if mods["FluidMustFlow"] then
|
||||||
|
util.replace_ingredient("duct-end-point-intake", "engine-unit", "advanced-multi-cylinder-engine", 3)
|
||||||
|
util.remove_ingredient("duct-end-point-intake",mods["IfNickel-Updated"] and "advanced-flow-controller")
|
||||||
|
|
||||||
|
util.replace_ingredient("duct-end-point-outtake", "engine-unit", "advanced-multi-cylinder-engine", 3)
|
||||||
|
util.remove_ingredient("duct-end-point-outtake",mods["IfNickel-Updated"] and "advanced-flow-controller")
|
||||||
|
end
|
||||||
|
if mods["angelsaddons-cab"] then
|
||||||
|
util.replace_ingredient("angels-cab", "engine-unit", "advanced-multi-cylinder-engine", 10)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if mods["248k-Redux"] then
|
||||||
|
util.add_ingredient("fi_robo_port_recipe", "tantalum-titanium-beam", 10)
|
||||||
|
end
|
||||||
|
|
||||||
|
if mods["bobassembly"] then
|
||||||
|
--chemical plant 2
|
||||||
|
util.add_ingredient("chemical-plant-2", "advanced-multi-cylinder-engine", 2)
|
||||||
|
util.add_prerequisite("chemical-plant-2", "advanced-multi-cylinder-engine")
|
||||||
|
--oil refinery 2
|
||||||
|
util.add_ingredient("oil-refinery-2", "advanced-multi-cylinder-engine", 4)
|
||||||
|
util.add_prerequisite("oil-processing-2", "advanced-multi-cylinder-engine")
|
||||||
|
|
||||||
|
util.remove_ingredient("chemical-plant-4", "steel-plate")
|
||||||
|
util.add_ingredient("chemical-plant-4", "tantalum-titanium-beam", 10)
|
||||||
|
|
||||||
|
util.add_ingredient("bob-area-mining-drill-4", "tantalum-titanium-beam", 8)
|
||||||
|
util.add_ingredient("bob-mining-drill-4", "tantalum-titanium-beam", 8)
|
||||||
|
|
||||||
|
util.remove_ingredient("electronics-machine-3", "tungsten-carbide")
|
||||||
|
util.add_ingredient("electronics-machine-3", "cobalt-carbide", 1)
|
||||||
|
|
||||||
|
util.remove_ingredient("centrifuge-3", "steel-plate")
|
||||||
|
util.add_ingredient("centrifuge-3", "tantalum-titanium-beam", 50)
|
||||||
|
|
||||||
|
util.remove_ingredient("oil-refinery-4", "titanium-plate")
|
||||||
|
util.add_ingredient("oil-refinery-4", "tantalum-titanium-beam", 15)
|
||||||
|
|
||||||
|
util.remove_ingredient("bob-pumpjack-4", "steel-plate")
|
||||||
|
util.add_ingredient("bob-pumpjack-4", "tantalum-titanium-beam", 20)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if mods["Krastorio2"] then
|
||||||
|
util.replace_ingredient("kr-portable-generator-equipment", "engine-unit", "advanced-multi-cylinder-engine",1)
|
||||||
|
|
||||||
|
if mods["BrassTacks-Updated"] then
|
||||||
|
util.remove_ingredient("assembling-machine-2", mods["BrassTacks-Updated"] and "gearbox")
|
||||||
|
util.remove_ingredient("assembling-machine-2", mods["BrassTacks-Updated"] and "motorized-articulator")
|
||||||
|
end
|
||||||
|
|
||||||
|
if mods["IfNickel-Updated"] then
|
||||||
|
util.remove_ingredient("assembling-machine-2", mods["IfNickel-Updated"] and "machining-tool")
|
||||||
|
util.remove_ingredient("assembling-machine-2", mods["IfNickel-Updated"] and "flow-controller")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if mods["space-exploration"] then
|
||||||
|
util.add_product(mods["space-exploration"] and "se-scrap-recycling", {name="tantalite-ore", amount=1, probability=0.05})
|
||||||
|
util.remove_ingredient("se-superconductive-cable", "tin-plate")
|
||||||
|
util.add_ingredient("se-superconductive-cable", "niobium-tin-cable", 2)
|
||||||
|
|
||||||
|
util.add_ingredient("se-conductivity-data","tantalum-plate", 1)
|
||||||
|
util.set_ingredient("se-conductivity-data", "se-empty-data", 2)
|
||||||
|
util.set_product_amount("se-conductivity-data", "se-conductivity-data", 2)
|
||||||
|
|
||||||
|
util.add_ingredient("se-hot-thermodynamics-data","tantalum-plate", 1)
|
||||||
|
util.set_ingredient("se-hot-thermodynamics-data", "se-empty-data", 4)
|
||||||
|
util.set_product_amount("se-hot-thermodynamics-data", "se-hot-thermodynamics-data", 4)
|
||||||
|
|
||||||
|
util.remove_ingredient("se-space-rail", "titanium-plate-plate")
|
||||||
|
util.add_ingredient("se-space-rail","tantalum-titanium-beam", 50)
|
||||||
|
|
||||||
|
util.remove_ingredient("se-space-platform-scaffold", "steel-plate")
|
||||||
|
util.remove_ingredient("se-space-platform-scaffold", "titanium-plate")
|
||||||
|
util.add_ingredient("se-space-platform-scaffold", "tantalum-titanium-beam", 1)
|
||||||
|
|
||||||
|
util.set_ingredient("se-heavy-girder", "se-iridium-plate", 3)
|
||||||
|
util.add_ingredient("se-heavy-girder", "tantalum-plate", 1)
|
||||||
|
|
||||||
|
util.remove_ingredient("se-energy-beam-defence", "steel-plate")
|
||||||
|
util.add_ingredient("se-energy-beam-defence", "tantalum-titanium-beam", 200)
|
||||||
|
|
||||||
|
util.set_ingredient("se-material-science-pack-1","se-iridium-plate", 10)
|
||||||
|
util.add_ingredient("se-material-science-pack-1", "niobium-plate", 10)
|
||||||
|
|
||||||
|
util.set_ingredient("se-material-science-pack-2","se-heavy-girder", 5)
|
||||||
|
util.add_ingredient("se-material-science-pack-2", "tantalum-titanium-beam", 10)
|
||||||
|
|
||||||
|
util.add_ingredient("se-heavy-bearing", "niobium-plate", 10)
|
||||||
|
util.add_time("se-heavy-bearing", 10)
|
||||||
|
util.set_product_amount("se-heavy-bearing", "se-heavy-bearing", 10)
|
||||||
|
|
||||||
|
util.set_ingredient("se-energy-science-pack-1","se-holmium-plate", 10)
|
||||||
|
util.add_ingredient("se-energy-science-pack-1", "niobium-tin-cable", 10)
|
||||||
|
|
||||||
|
if mods["Krastorio2"] then
|
||||||
|
util.remove_ingredient("kr-advanced-solar-panel", "solar-panel")
|
||||||
|
util.add_ingredient("kr-advanced-solar-panel", "niobium-tin-cable", 4)
|
||||||
|
util.add_ingredient("bio-advanced-solar-panel", "niobium-tin-cable", 4)
|
||||||
|
end
|
||||||
|
end
|
BIN
Tantalite2/thumbnail.png
Normal file
After Width: | Height: | Size: 9.6 KiB |