Compare commits
10 commits
4c6345cdbc
...
f82be366da
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f82be366da | ||
|
|
921ab7907e | ||
|
|
5d217e1140 | ||
|
|
7966b7191a | ||
|
|
a76870aed7 | ||
|
|
038e666ae8 | ||
|
|
b5beff4ea4 | ||
|
|
cf55cefdee | ||
|
|
a310f28860 | ||
|
|
205f56337e |
3
.editorconfig
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
1
.github/CODEOWNERS
vendored
|
|
@ -1 +0,0 @@
|
||||||
* brevven
|
|
||||||
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
.idea
|
||||||
|
*.zip
|
||||||
37
Makefile
|
|
@ -1,37 +0,0 @@
|
||||||
# General makefile for factorio mods.
|
|
||||||
#
|
|
||||||
# Presumes the development work is done in a <factoriodir>/dev/<modname>/
|
|
||||||
# directory where this makefile resides. This directory must be parallel to
|
|
||||||
# the <factoriodir>/mods/ directory where mods are installed. Run `make
|
|
||||||
# install` from dev/<modname> to install the mod as a zip file. That zip file
|
|
||||||
# should also be ready to upload to the mod portal
|
|
||||||
|
|
||||||
.PHONY: copy lint-changelog install
|
|
||||||
|
|
||||||
libdir = "../bzlib"
|
|
||||||
libfiles = $(shell ls $(libdir)/*.lua | grep -o '[^/]*.lua')
|
|
||||||
pwd = $(shell pwd)
|
|
||||||
v = $(shell basename "$(pwd)")_$(shell jq -r .version info.json)
|
|
||||||
|
|
||||||
link:
|
|
||||||
for f in $(libfiles) ; do \
|
|
||||||
echo "using $(libdir)/$$f" ;\
|
|
||||||
cp $(libdir)/$$f .; \
|
|
||||||
done;
|
|
||||||
|
|
||||||
copy: link
|
|
||||||
rm -rf ../$(v)
|
|
||||||
mkdir -p ../$(v)
|
|
||||||
cp -rf * ../$(v)
|
|
||||||
rm -f ../$(v).zip
|
|
||||||
cd ..; zip -9 -r -y $(v).zip $(v) -x "*.xcf" -x "*.git*" -x "*.bak" -x "*.blend*"
|
|
||||||
|
|
||||||
install: lint-changelog copy
|
|
||||||
cp -f ../$(v).zip ../../mods/
|
|
||||||
|
|
||||||
lint-changelog: copy
|
|
||||||
python3 ../da-changelog-tools_0.0.14/changelog-checker.py --changelog ../$(v).zip
|
|
||||||
|
|
||||||
zorro:
|
|
||||||
python3 ../da-changelog-tools_0.0.14/changelog-checker.py --zorro --changelog ../$(v).zip
|
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
local futil = require("util");
|
local futil = require("util");
|
||||||
local util = require("__bztungsten__.data-util");
|
local util = require("data-util");
|
||||||
|
|
||||||
if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mods.Krastorio2 and not mods.bzfoundry then
|
if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mods.Krastorio2 and not mods.bzfoundry2 then
|
||||||
log("Using advanced carbon furnace")
|
log("Using advanced carbon furnace")
|
||||||
data:extend({
|
data:extend({
|
||||||
{
|
{
|
||||||
|
|
@ -20,8 +20,8 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "advanced-carbon-furnace",
|
name = "advanced-carbon-furnace",
|
||||||
ingredients = {{"steel-furnace", 2}, {"stone-brick", 5}, {"tungsten-plate", 5}},
|
ingredients = {{type="item", name="steel-furnace", amount=2}, {type="item", name="stone-brick", amount=5}, {type="item", name="tungsten-plate", amount=5}},
|
||||||
result = "advanced-carbon-furnace",
|
results = {{type="item", name="advanced-carbon-furnace", amount=1}},
|
||||||
energy_required = 6,
|
energy_required = 6,
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
|
|
@ -102,9 +102,9 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo
|
||||||
energy_source =
|
energy_source =
|
||||||
{
|
{
|
||||||
type = "burner",
|
type = "burner",
|
||||||
fuel_category = "chemical",
|
fuel_categories = {"chemical"},
|
||||||
effectivity = 1,
|
effectivity = 1,
|
||||||
emissions_per_minute = 4,
|
emissions_per_minute = {["pollution"] = 4},
|
||||||
fuel_inventory_size = 1,
|
fuel_inventory_size = 1,
|
||||||
light_flicker =
|
light_flicker =
|
||||||
{
|
{
|
||||||
|
|
@ -130,42 +130,22 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo
|
||||||
{
|
{
|
||||||
filename = "__base__/graphics/entity/steel-furnace/steel-furnace.png",
|
filename = "__base__/graphics/entity/steel-furnace/steel-furnace.png",
|
||||||
priority = "high",
|
priority = "high",
|
||||||
width = 85,
|
width = 171,
|
||||||
height = 87,
|
|
||||||
frame_count = 1,
|
|
||||||
shift = futil.by_pixel(-1.5, 1.5),
|
|
||||||
tint = {a = 1, r = .55, g = .6, b = .6},
|
|
||||||
hr_version =
|
|
||||||
{
|
|
||||||
filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace.png",
|
|
||||||
priority = "high",
|
|
||||||
width = 171,
|
|
||||||
height = 174,
|
height = 174,
|
||||||
frame_count = 1,
|
frame_count = 1,
|
||||||
shift = futil.by_pixel(-1.25, 2),
|
shift = futil.by_pixel(-1.25, 2),
|
||||||
scale = 0.5,
|
scale = 0.5,
|
||||||
tint = {a = 1, r = .55, g = .6, b = .6},
|
tint = {a = 1, r = .55, g = .6, b = .6},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-shadow.png",
|
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-shadow.png",
|
||||||
priority = "high",
|
priority = "high",
|
||||||
width = 139,
|
width = 277,
|
||||||
height = 43,
|
|
||||||
frame_count = 1,
|
|
||||||
draw_as_shadow = true,
|
|
||||||
shift = futil.by_pixel(39.5, 11.5),
|
|
||||||
hr_version =
|
|
||||||
{
|
|
||||||
filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-shadow.png",
|
|
||||||
priority = "high",
|
|
||||||
width = 277,
|
|
||||||
height = 85,
|
height = 85,
|
||||||
frame_count = 1,
|
frame_count = 1,
|
||||||
draw_as_shadow = true,
|
draw_as_shadow = true,
|
||||||
shift = futil.by_pixel(39.25, 11.25),
|
shift = futil.by_pixel(39.25, 11.25),
|
||||||
scale = 0.5
|
scale = 0.5
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -181,24 +161,12 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo
|
||||||
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-fire.png",
|
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-fire.png",
|
||||||
priority = "high",
|
priority = "high",
|
||||||
line_length = 8,
|
line_length = 8,
|
||||||
width = 29,
|
|
||||||
height = 40,
|
|
||||||
frame_count = 48,
|
|
||||||
direction_count = 1,
|
|
||||||
shift = futil.by_pixel(-0.5, 6),
|
|
||||||
hr_version =
|
|
||||||
{
|
|
||||||
animation_speed = 0.25,
|
|
||||||
filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-fire.png",
|
|
||||||
priority = "high",
|
|
||||||
line_length = 8,
|
|
||||||
width = 57,
|
width = 57,
|
||||||
height = 81,
|
height = 81,
|
||||||
frame_count = 48,
|
frame_count = 48,
|
||||||
direction_count = 1,
|
direction_count = 1,
|
||||||
shift = futil.by_pixel(-0.75, 5.75),
|
shift = futil.by_pixel(-0.75, 5.75),
|
||||||
scale = 0.5
|
scale = 0.5
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -225,17 +193,6 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo
|
||||||
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-working.png",
|
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-working.png",
|
||||||
priority = "high",
|
priority = "high",
|
||||||
line_length = 1,
|
line_length = 1,
|
||||||
width = 64,
|
|
||||||
height = 74,
|
|
||||||
frame_count = 1,
|
|
||||||
direction_count = 1,
|
|
||||||
shift = futil.by_pixel(0, -4),
|
|
||||||
blend_mode = "additive",
|
|
||||||
hr_version =
|
|
||||||
{
|
|
||||||
filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-working.png",
|
|
||||||
priority = "high",
|
|
||||||
line_length = 1,
|
|
||||||
width = 128,
|
width = 128,
|
||||||
height = 150,
|
height = 150,
|
||||||
frame_count = 1,
|
frame_count = 1,
|
||||||
|
|
@ -243,7 +200,6 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo
|
||||||
shift = futil.by_pixel(0, -5),
|
shift = futil.by_pixel(0, -5),
|
||||||
blend_mode = "additive",
|
blend_mode = "additive",
|
||||||
scale = 0.5,
|
scale = 0.5,
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -256,18 +212,6 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo
|
||||||
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-ground-light.png",
|
filename = "__base__/graphics/entity/steel-furnace/steel-furnace-ground-light.png",
|
||||||
priority = "high",
|
priority = "high",
|
||||||
line_length = 1,
|
line_length = 1,
|
||||||
draw_as_sprite = false,
|
|
||||||
width = 78,
|
|
||||||
height = 64,
|
|
||||||
frame_count = 1,
|
|
||||||
direction_count = 1,
|
|
||||||
shift = futil.by_pixel(0, 48),
|
|
||||||
blend_mode = "additive",
|
|
||||||
hr_version =
|
|
||||||
{
|
|
||||||
filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-ground-light.png",
|
|
||||||
priority = "high",
|
|
||||||
line_length = 1,
|
|
||||||
draw_as_sprite = false,
|
draw_as_sprite = false,
|
||||||
width = 152,
|
width = 152,
|
||||||
height = 126,
|
height = 126,
|
||||||
|
|
@ -276,7 +220,6 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo
|
||||||
shift = futil.by_pixel(1, 48),
|
shift = futil.by_pixel(1, 48),
|
||||||
blend_mode = "additive",
|
blend_mode = "additive",
|
||||||
scale = 0.5,
|
scale = 0.5,
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -1,4 +1,16 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.7.13
|
||||||
|
Date: 2024-03-18
|
||||||
|
Fixes:
|
||||||
|
- Fix soft lock when used with both Omnimatter and Krastorio 2
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.7.12
|
||||||
|
Date: 2023-12-22
|
||||||
|
Fixes:
|
||||||
|
- Fix a softlock when used with Bob's MCI (bobplates) thanks to KiwiHawk
|
||||||
|
Localization:
|
||||||
|
- ja updates thanks to Sakuro
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.7.11
|
Version: 0.7.11
|
||||||
Date: 2023-04-10
|
Date: 2023-04-10
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
local util = require("__bztungsten__.data-util");
|
local util = require("data-util");
|
||||||
|
|
||||||
if mods["248k"] then
|
if mods["248k-Redux"] then
|
||||||
local cuw = util.me.cuw() and "cuw" or "tungsten-plate"
|
local cuw = util.me.cuw() and "cuw" or "tungsten-plate"
|
||||||
util.add_ingredient("fu_ingot_recipe", cuw, 20)
|
util.add_ingredient("fu_ingot_recipe", cuw, 20)
|
||||||
util.add_ingredient("fu_plasma_recipe", cuw, 40)
|
util.add_ingredient("fu_plasma_recipe", cuw, 40)
|
||||||
86
bztungsten2/control-util.lua
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
local me = require("me")
|
||||||
|
|
||||||
|
local util = {}
|
||||||
|
util.me = me
|
||||||
|
|
||||||
|
function decode(data)
|
||||||
|
if type(data) == "string" then return data end
|
||||||
|
local str = {}
|
||||||
|
for i = 2, #data do
|
||||||
|
str[i-1] = decode(data[i])
|
||||||
|
end
|
||||||
|
return table.concat(str, "")
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.get_list()
|
||||||
|
local p = game.item_prototypes[me.name.."-list"]
|
||||||
|
if p then
|
||||||
|
data = p.localised_description
|
||||||
|
return decode(data)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function util.force_enable_recipe(event, recipe_name)
|
||||||
|
if game.players[event.player_index].force.recipes[recipe_name] then
|
||||||
|
game.players[event.player_index].force.recipes[recipe_name].enabled=true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function util.warptorio2_expansion_helper()
|
||||||
|
if script.active_mods["warptorio2_expansion"] then
|
||||||
|
function check_container_for_items(container,items)
|
||||||
|
local has_all =true
|
||||||
|
for k=1,#items do
|
||||||
|
if container.get_item_count(items[k].name)<items[k].count then has_all=false break end
|
||||||
|
end
|
||||||
|
return has_all
|
||||||
|
end
|
||||||
|
|
||||||
|
function remove_items_from_container(container,items)
|
||||||
|
for k=1,#items do
|
||||||
|
container.remove_item(items[k])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
script.on_nth_tick(60, function (event)
|
||||||
|
if global.done then return end
|
||||||
|
local fix_items={
|
||||||
|
{name='iron-plate',count=100},
|
||||||
|
{name='iron-gear-wheel',count=100},
|
||||||
|
{name='repair-pack',count=50},
|
||||||
|
}
|
||||||
|
local entities = {}
|
||||||
|
for i=1,100 do
|
||||||
|
if game.surfaces[i] then
|
||||||
|
local lentities= game.surfaces[i].find_entities_filtered{area = {{-100, -100}, {100, 100}}, name = "wpe_broken_lab"}
|
||||||
|
for j, entity in pairs(lentities) do
|
||||||
|
table.insert(entities, entity)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #entities == 0 then
|
||||||
|
if global.checking then
|
||||||
|
-- The lab has already been fixed
|
||||||
|
global.done = true
|
||||||
|
else
|
||||||
|
-- Check that the lab doesn't reappear due to a warp
|
||||||
|
global.checking = true
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if check_container_for_items(entities[1],fix_items) then
|
||||||
|
remove_items_from_container(entities[1],fix_items)
|
||||||
|
local lab = entities[1].surface.create_entity({name='wpe_repaired_lab', position=entities[1].position, force = game.forces.player})
|
||||||
|
lab.destructible=false
|
||||||
|
lab.minable=false
|
||||||
|
entities[1].destroy()
|
||||||
|
global.done = true
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return util
|
||||||
|
|
@ -5,7 +5,7 @@ require("tungsten-recipe-final-rrr")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local util = require("__bztungsten__.data-util");
|
local util = require("data-util");
|
||||||
|
|
||||||
-- Only burners can make tungsten carbide in vanilla
|
-- Only burners can make tungsten carbide in vanilla
|
||||||
for i, entity in pairs(data.raw.furnace) do
|
for i, entity in pairs(data.raw.furnace) do
|
||||||
|
|
@ -29,7 +29,7 @@ if mods["space-exploration"] then
|
||||||
-- core mining balancing
|
-- core mining balancing
|
||||||
util.add_to_product("se-core-fragment-omni", "tungsten-ore", -3)
|
util.add_to_product("se-core-fragment-omni", "tungsten-ore", -3)
|
||||||
|
|
||||||
if string.sub(mods["space-exploration"], 1, 3) == "0.6" then
|
if util.se6() then
|
||||||
util.add_prerequisite("rocket-silo", "rocketry")
|
util.add_prerequisite("rocket-silo", "rocketry")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -44,7 +44,7 @@ if get_setting("bz-recipe-bypass") then
|
||||||
end
|
end
|
||||||
|
|
||||||
function util.is_foundry()
|
function util.is_foundry()
|
||||||
return mods.bzfoundry and not me.get_setting("bzfoundry-minimal")
|
return mods.bzfoundry2 and not me.get_setting("bzfoundry-minimal")
|
||||||
end
|
end
|
||||||
|
|
||||||
function should_force(options)
|
function should_force(options)
|
||||||
|
|
@ -64,17 +64,7 @@ function util.fe_plus(sub)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function util.get_stack_size(default)
|
function util.k2assets()
|
||||||
if mods.Krastorio2 then
|
|
||||||
local size = get_setting("kr-stack-size")
|
|
||||||
if size and tonumber(size) then
|
|
||||||
return tonumber(size)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return default
|
|
||||||
end
|
|
||||||
|
|
||||||
function util.k2assets()
|
|
||||||
if mods["Krastorio2Assets"] then
|
if mods["Krastorio2Assets"] then
|
||||||
return "__Krastorio2Assets__"
|
return "__Krastorio2Assets__"
|
||||||
end
|
end
|
||||||
|
|
@ -111,8 +101,8 @@ function util.se_landfill(params)
|
||||||
category = "hard-recycling",
|
category = "hard-recycling",
|
||||||
order = "z-b-"..params.ore,
|
order = "z-b-"..params.ore,
|
||||||
subgroup = "terrain",
|
subgroup = "terrain",
|
||||||
result = "landfill",
|
results = {{type="item", name="landfill", amount=1}},
|
||||||
ingredients = {{params.ore, 50}},
|
ingredients = {{type="item", name=params.ore, amount=50}},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
util.add_unlock("se-recycling-facility", lname)
|
util.add_unlock("se-recycling-facility", lname)
|
||||||
|
|
@ -123,7 +113,7 @@ end
|
||||||
-- k2 matter
|
-- k2 matter
|
||||||
-- params: {k2matter}, k2baseicon , {icon}
|
-- params: {k2matter}, k2baseicon , {icon}
|
||||||
function util.k2matter(params)
|
function util.k2matter(params)
|
||||||
local matter = require("__Krastorio2__/lib/public/data-stages/matter-util")
|
local matter = require("__Krastorio2__/prototypes/libraries/matter")
|
||||||
if mods["space-exploration"] then
|
if mods["space-exploration"] then
|
||||||
params.k2matter.need_stabilizer = true
|
params.k2matter.need_stabilizer = true
|
||||||
end
|
end
|
||||||
|
|
@ -131,6 +121,13 @@ function util.k2matter(params)
|
||||||
params.k2matter.minimum_conversion_quantity = 10
|
params.k2matter.minimum_conversion_quantity = 10
|
||||||
end
|
end
|
||||||
if not data.raw.technology[params.k2matter.unlocked_by_technology] then
|
if not data.raw.technology[params.k2matter.unlocked_by_technology] then
|
||||||
|
local icon = ""
|
||||||
|
if params.k2baseicon then
|
||||||
|
icon = util.k2assets().."/technologies/matter-"..params.k2baseicon..".png"
|
||||||
|
else
|
||||||
|
icon = util.k2assets().."/technologies/backgrounds/matter.png"
|
||||||
|
end
|
||||||
|
|
||||||
data:extend(
|
data:extend(
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|
@ -139,7 +136,7 @@ function util.k2matter(params)
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
icon = util.k2assets().."/technologies/matter-"..params.k2baseicon..".png",
|
icon = icon,
|
||||||
icon_size = 256,
|
icon_size = 256,
|
||||||
},
|
},
|
||||||
params.icon,
|
params.icon,
|
||||||
|
|
@ -148,18 +145,29 @@ function util.k2matter(params)
|
||||||
unit =
|
unit =
|
||||||
{
|
{
|
||||||
count = 350,
|
count = 350,
|
||||||
ingredients =
|
ingredients = mods["space-exploration"] and
|
||||||
|
{
|
||||||
|
{"automation-science-pack", 1},
|
||||||
|
{"logistic-science-pack", 1},
|
||||||
|
{"chemical-science-pack", 1},
|
||||||
|
{"se-astronomic-science-pack-4", 1},
|
||||||
|
{"se-energy-science-pack-4", 1},
|
||||||
|
{"se-material-science-pack-4", 1},
|
||||||
|
{"se-deep-space-science-pack-2", 1},
|
||||||
|
{"se-kr-matter-science-pack-2", 1},
|
||||||
|
} or
|
||||||
{
|
{
|
||||||
{"production-science-pack", 1},
|
{"production-science-pack", 1},
|
||||||
{"utility-science-pack", 1},
|
{"utility-science-pack", 1},
|
||||||
{"matter-tech-card", 1}
|
{"kr-matter-tech-card", 1}
|
||||||
},
|
},
|
||||||
time = 45,
|
time = 45,
|
||||||
}
|
},
|
||||||
|
localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
matter.createMatterRecipe(params.k2matter)
|
matter.make_recipes(params.k2matter)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -193,16 +201,16 @@ function util.se_matter(params)
|
||||||
energy_required = params.energy_required,
|
energy_required = params.energy_required,
|
||||||
enabled = false,
|
enabled = false,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{sedata, 1},
|
{type="item", name=sedata, amount=1},
|
||||||
{type="fluid", name="se-particle-stream", amount=50},
|
{type="fluid", name="se-particle-stream", amount=50},
|
||||||
{type="fluid", name="se-space-coolant-supercooled", amount=25},
|
{type="fluid", name="se-space-coolant-supercooled", amount=25},
|
||||||
},
|
},
|
||||||
results = {
|
results = {
|
||||||
{params.ore, params.quant_out},
|
{type="item", name=params.ore, amount=params.quant_out},
|
||||||
{"se-contaminated-scrap", 1},
|
{type="item", name="se-contaminated-scrap", amount=1},
|
||||||
{type=item, name=sedata, amount=1, probability=.99},
|
{type="item", name=sedata, amount=1, probability=.99},
|
||||||
{type=item, name=sejunk, amount=1, probability=.01},
|
{type="item", name=sejunk, amount=1, probability=.01},
|
||||||
{type="fluid", name="se-space-coolant-hot", amount=25, catalyst_amount=25},
|
{type="fluid", name="se-space-coolant-hot", amount=25, ignored_by_productivity=25, ignored_by_stats=25},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -232,14 +240,14 @@ function util.se_matter(params)
|
||||||
energy_required = 30,
|
energy_required = 30,
|
||||||
enabled = false,
|
enabled = false,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{"se-kr-matter-liberation-data", 1},
|
{type="item", name="se-kr-matter-liberation-data", amount=1},
|
||||||
{params.ore, params.quant_in},
|
{type="item", name=params.ore, amount=params.quant_in},
|
||||||
{type="fluid", name="se-particle-stream", amount=50},
|
{type="fluid", name="se-particle-stream", amount=50},
|
||||||
},
|
},
|
||||||
results = {
|
results = {
|
||||||
{type=item, name="se-kr-matter-liberation-data", amount=1, probability=.99},
|
{type="item", name="se-kr-matter-liberation-data", amount=1, probability=.99},
|
||||||
{type=item, name=sejunk, amount=1, probability=.01},
|
{type="item", name=sejunk, amount=1, probability=.01},
|
||||||
{type="fluid", name="se-particle-stream", amount=params.stream_out, catalyst_amount=50},
|
{type="fluid", name="se-particle-stream", amount=params.stream_out, ignored_by_productivity=50, ignored_by_stats=50},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -266,7 +274,7 @@ function util.se_matter(params)
|
||||||
{"se-astronomic-science-pack-4", 1},
|
{"se-astronomic-science-pack-4", 1},
|
||||||
{"se-energy-science-pack-4", 1},
|
{"se-energy-science-pack-4", 1},
|
||||||
{"se-material-science-pack-4", 1},
|
{"se-material-science-pack-4", 1},
|
||||||
{"matter-tech-card", 1},
|
{"kr-matter-tech-card", 1},
|
||||||
{"se-deep-space-science-pack-1", 1},
|
{"se-deep-space-science-pack-1", 1},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -280,18 +288,6 @@ function util.se_matter(params)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Get the normal prototype for a recipe -- either .normal or the recipe itself
|
|
||||||
function util.get_normal(recipe_name)
|
|
||||||
if data.raw.recipe[recipe_name] then
|
|
||||||
recipe = data.raw.recipe[recipe_name]
|
|
||||||
if recipe.normal and recipe.normal.ingredients then
|
|
||||||
return recipe.normal
|
|
||||||
elseif recipe.ingredients then
|
|
||||||
return recipe
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Set/override a technology's prerequisites
|
-- Set/override a technology's prerequisites
|
||||||
function util.set_prerequisite(technology_name, prerequisites)
|
function util.set_prerequisite(technology_name, prerequisites)
|
||||||
local technology = data.raw.technology[technology_name]
|
local technology = data.raw.technology[technology_name]
|
||||||
|
|
@ -358,7 +354,7 @@ function util.add_unlock(technology_name, recipe)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Check if a tech unlocks a recipe
|
-- Check if a tech unlocks a recipe
|
||||||
function util.check_unlock(technology_name, recipe_name)
|
function util.check_unlock(technology_name, recipe)
|
||||||
local technology = data.raw.technology[technology_name]
|
local technology = data.raw.technology[technology_name]
|
||||||
if technology and technology.effects then
|
if technology and technology.effects then
|
||||||
for i, effect in pairs(technology.effects) do
|
for i, effect in pairs(technology.effects) do
|
||||||
|
|
@ -403,17 +399,13 @@ end
|
||||||
|
|
||||||
function util.set_enabled(recipe_name, enabled)
|
function util.set_enabled(recipe_name, enabled)
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
if data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].normal.enabled = enabled end
|
data.raw.recipe[recipe_name].enabled = enabled
|
||||||
if data.raw.recipe[recipe_name].expensive then data.raw.recipe[recipe_name].expensive.enabled = enabled end
|
|
||||||
if not data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].enabled = enabled end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function util.set_hidden(recipe_name)
|
function util.set_hidden(recipe_name)
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
if data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].normal.hidden = true end
|
data.raw.recipe[recipe_name].hidden = true
|
||||||
if data.raw.recipe[recipe_name].expensive then data.raw.recipe[recipe_name].expensive.hidden = true end
|
|
||||||
if not data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].hidden = true end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -423,8 +415,6 @@ function util.add_or_add_to_ingredient(recipe_name, ingredient, quantity, option
|
||||||
if data.raw.recipe[recipe_name] and data.raw.item[ingredient] then
|
if data.raw.recipe[recipe_name] and data.raw.item[ingredient] then
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
add_or_add_to_ingredient(data.raw.recipe[recipe_name], ingredient, quantity)
|
add_or_add_to_ingredient(data.raw.recipe[recipe_name], ingredient, quantity)
|
||||||
add_or_add_to_ingredient(data.raw.recipe[recipe_name].normal, ingredient, quantity)
|
|
||||||
add_or_add_to_ingredient(data.raw.recipe[recipe_name].expensive, ingredient, quantity)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -447,8 +437,6 @@ function util.add_ingredient(recipe_name, ingredient, quantity, options)
|
||||||
if data.raw.recipe[recipe_name] and (data.raw.item[ingredient] or is_fluid) then
|
if data.raw.recipe[recipe_name] and (data.raw.item[ingredient] or is_fluid) then
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
add_ingredient(data.raw.recipe[recipe_name], ingredient, quantity, is_fluid)
|
add_ingredient(data.raw.recipe[recipe_name], ingredient, quantity, is_fluid)
|
||||||
add_ingredient(data.raw.recipe[recipe_name].normal, ingredient, quantity, is_fluid)
|
|
||||||
add_ingredient(data.raw.recipe[recipe_name].expensive, ingredient, quantity, is_fluid)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -462,7 +450,7 @@ function add_ingredient(recipe, ingredient, quantity, is_fluid)
|
||||||
if is_fluid then
|
if is_fluid then
|
||||||
table.insert(recipe.ingredients, {type="fluid", name=ingredient, amount=quantity})
|
table.insert(recipe.ingredients, {type="fluid", name=ingredient, amount=quantity})
|
||||||
else
|
else
|
||||||
table.insert(recipe.ingredients, {ingredient, quantity})
|
table.insert(recipe.ingredients, {type="item", name=ingredient, amount=quantity})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -473,8 +461,6 @@ function util.add_ingredient_raw(recipe_name, ingredient, options)
|
||||||
if data.raw.recipe[recipe_name] and (data.raw.item[ingredient.name] or data.raw.item[ingredient[1]]) then
|
if data.raw.recipe[recipe_name] and (data.raw.item[ingredient.name] or data.raw.item[ingredient[1]]) then
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
add_ingredient_raw(data.raw.recipe[recipe_name], ingredient)
|
add_ingredient_raw(data.raw.recipe[recipe_name], ingredient)
|
||||||
add_ingredient_raw(data.raw.recipe[recipe_name].normal, ingredient)
|
|
||||||
add_ingredient_raw(data.raw.recipe[recipe_name].expensive, ingredient)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -496,56 +482,45 @@ end
|
||||||
function util.set_ingredient(recipe_name, ingredient, quantity, options)
|
function util.set_ingredient(recipe_name, ingredient, quantity, options)
|
||||||
if not should_force(options) and bypass(recipe_name) then return end
|
if not should_force(options) and bypass(recipe_name) then return end
|
||||||
if data.raw.recipe[recipe_name] and data.raw.item[ingredient] then
|
if data.raw.recipe[recipe_name] and data.raw.item[ingredient] then
|
||||||
|
local is_fluid = not not data.raw.fluid[ingredient]
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
set_ingredient(data.raw.recipe[recipe_name], ingredient, quantity)
|
set_ingredient(data.raw.recipe[recipe_name], ingredient, quantity, is_fluid)
|
||||||
set_ingredient(data.raw.recipe[recipe_name].normal, ingredient, quantity)
|
|
||||||
set_ingredient(data.raw.recipe[recipe_name].expensive, ingredient, quantity)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function set_ingredient(recipe, ingredient, quantity)
|
function set_ingredient(recipe, ingredient, quantity, is_fluid)
|
||||||
if recipe ~= nil and recipe.ingredients ~= nil then
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
for i, existing in pairs(recipe.ingredients) do
|
for i, existing in pairs(recipe.ingredients) do
|
||||||
if existing[1] == ingredient then
|
if existing.name == ingredient then
|
||||||
existing[2] = quantity
|
|
||||||
return
|
|
||||||
elseif existing.name == ingredient then
|
|
||||||
existing.amount = quantity
|
existing.amount = quantity
|
||||||
existing.amount_min = nil
|
existing.amount_min = nil
|
||||||
existing.amount_max = nil
|
existing.amount_max = nil
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
table.insert(recipe.ingredients, {ingredient, quantity})
|
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
|
||||||
end
|
end
|
||||||
-- Add a given quantity of product to a given recipe.
|
-- Add a given quantity of product to a given recipe.
|
||||||
-- Only works for recipes with multiple products
|
-- Only works for recipes with multiple products
|
||||||
function util.add_product(recipe_name, product, options)
|
function util.add_product(recipe_name, product, options)
|
||||||
if not should_force(options) and bypass(recipe_name) then return end
|
if not should_force(options) and bypass(recipe_name) then return end
|
||||||
if data.raw.recipe[recipe_name] and
|
if data.raw.recipe[recipe_name] and
|
||||||
(data.raw.item[product[1]] or data.raw.item[product.name] or
|
(data.raw.item[product.name] or data.raw.fluid[product.name]) then
|
||||||
data.raw.fluid[product[1]] or data.raw.fluid[product.name]
|
|
||||||
) then
|
|
||||||
add_product(data.raw.recipe[recipe_name], product)
|
add_product(data.raw.recipe[recipe_name], product)
|
||||||
add_product(data.raw.recipe[recipe_name].normal, product)
|
|
||||||
add_product(data.raw.recipe[recipe_name].expensive, product)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function add_product(recipe, product)
|
function add_product(recipe, product)
|
||||||
if recipe ~= nil then
|
if recipe ~= nil then
|
||||||
if (product[1] and data.raw.item[product[1]]) or
|
if recipe.results == nil then
|
||||||
(product.name and data.raw[product.type][product.name]) then
|
recipe.results = {}
|
||||||
if not recipe.normal then
|
|
||||||
if recipe.results == nil then
|
|
||||||
recipe.results = {{recipe.result, recipe.result_count and recipe.result_count or 1}}
|
|
||||||
end
|
|
||||||
recipe.result = nil
|
|
||||||
recipe.result_count = nil
|
|
||||||
table.insert(recipe.results, product)
|
|
||||||
end
|
end
|
||||||
end
|
table.insert(recipe.results, product)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -553,18 +528,13 @@ end
|
||||||
function util.get_ingredient_amount(recipe_name, ingredient_name)
|
function util.get_ingredient_amount(recipe_name, ingredient_name)
|
||||||
local recipe = data.raw.recipe[recipe_name]
|
local recipe = data.raw.recipe[recipe_name]
|
||||||
if recipe then
|
if recipe then
|
||||||
if recipe.normal and recipe.normal.ingredients then
|
if recipe.ingredients then
|
||||||
for i, ingredient in pairs(recipe.normal.ingredients) do
|
|
||||||
if ingredient[1] == ingredient_name then return ingredient[2] end
|
|
||||||
if ingredient.name == ingredient_name then return ingredient.amount end
|
|
||||||
end
|
|
||||||
elseif recipe.ingredients then
|
|
||||||
for i, ingredient in pairs(recipe.ingredients) do
|
for i, ingredient in pairs(recipe.ingredients) do
|
||||||
if ingredient[1] == ingredient_name then return ingredient[2] end
|
if ingredient[1] == ingredient_name then return ingredient[2] end
|
||||||
if ingredient.name == ingredient_name then return ingredient.amount end
|
if ingredient.name == ingredient_name then return ingredient.amount end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return 0
|
return 1
|
||||||
end
|
end
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
@ -574,14 +544,7 @@ function util.get_amount(recipe_name, product)
|
||||||
if not product then product = recipe_name end
|
if not product then product = recipe_name end
|
||||||
local recipe = data.raw.recipe[recipe_name]
|
local recipe = data.raw.recipe[recipe_name]
|
||||||
if recipe then
|
if recipe then
|
||||||
if recipe.normal and recipe.normal.results then
|
if recipe.results then
|
||||||
for i, result in pairs(recipe.normal.results) do
|
|
||||||
if result[1] == product then return result[2] end
|
|
||||||
if result.name == product then return result.amount end
|
|
||||||
end
|
|
||||||
elseif recipe.normal and recipe.normal.result_count then
|
|
||||||
return recipe.normal.result_count
|
|
||||||
elseif recipe.results then
|
|
||||||
for i, result in pairs(recipe.results) do
|
for i, result in pairs(recipe.results) do
|
||||||
if result[1] == product then return result[2] end
|
if result[1] == product then return result[2] end
|
||||||
if result.name == product then return result.amount end
|
if result.name == product then return result.amount end
|
||||||
|
|
@ -599,9 +562,7 @@ function util.get_result_count(recipe_name, product)
|
||||||
if not product then product = recipe_name end
|
if not product then product = recipe_name end
|
||||||
local recipe = data.raw.recipe[recipe_name]
|
local recipe = data.raw.recipe[recipe_name]
|
||||||
if recipe then
|
if recipe then
|
||||||
if recipe.normal and recipe.normal.results then
|
if recipe.results then
|
||||||
return #(recipe.normal.results)
|
|
||||||
elseif recipe.results then
|
|
||||||
return #(recipe.results)
|
return #(recipe.results)
|
||||||
end
|
end
|
||||||
return 1
|
return 1
|
||||||
|
|
@ -616,8 +577,6 @@ function util.replace_ingredient(recipe_name, old, new, amount, multiply, option
|
||||||
if data.raw.recipe[recipe_name] and (data.raw.item[new] or data.raw.fluid[new]) then
|
if data.raw.recipe[recipe_name] and (data.raw.item[new] or data.raw.fluid[new]) then
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
replace_ingredient(data.raw.recipe[recipe_name], old, new, amount, multiply)
|
replace_ingredient(data.raw.recipe[recipe_name], old, new, amount, multiply)
|
||||||
replace_ingredient(data.raw.recipe[recipe_name].normal, old, new, amount, multiply)
|
|
||||||
replace_ingredient(data.raw.recipe[recipe_name].expensive, old, new, amount, multiply)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -659,8 +618,6 @@ function util.remove_ingredient(recipe_name, old, options)
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
remove_ingredient(data.raw.recipe[recipe_name], old)
|
remove_ingredient(data.raw.recipe[recipe_name], old)
|
||||||
remove_ingredient(data.raw.recipe[recipe_name].normal, old)
|
|
||||||
remove_ingredient(data.raw.recipe[recipe_name].expensive, old)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -686,28 +643,23 @@ function util.replace_some_product(recipe_name, old, old_amount, new, new_amount
|
||||||
if data.raw.recipe[recipe_name] and (data.raw.item[new] or is_fluid) then
|
if data.raw.recipe[recipe_name] and (data.raw.item[new] or is_fluid) then
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
replace_some_product(data.raw.recipe[recipe_name], old, old_amount, new, new_amount, is_fluid)
|
replace_some_product(data.raw.recipe[recipe_name], old, old_amount, new, new_amount, is_fluid)
|
||||||
replace_some_product(data.raw.recipe[recipe_name].normal, old, old_amount, new, new_amount, is_fluid)
|
|
||||||
replace_some_product(data.raw.recipe[recipe_name].expensive, old, old_amount, new, new_amount, is_fluid)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function replace_some_product(recipe, old, old_amount, new, new_amount)
|
function replace_some_product(recipe, old, old_amount, new, new_amount, is_fluid)
|
||||||
if recipe ~= nil then
|
if recipe ~= nil then
|
||||||
if recipe.result == new then return end
|
if recipe.result == new then return end
|
||||||
if recipe.results then
|
if recipe.results then
|
||||||
for i, existing in pairs(recipe.results) do
|
for i, existing in pairs(recipe.results) do
|
||||||
if existing[1] == new or existing.name == new then
|
if existing.name == new then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
add_product(recipe, {new, new_amount})
|
add_product(recipe, {type=is_fluid and "fluid" or "item", name=new, amount=new_amount})
|
||||||
for i, product in pairs(recipe.results) do
|
for i, product in pairs(recipe.results) do
|
||||||
if product.name == old then
|
if product.name == old then
|
||||||
product.amount = math.max(1, product.amount - old_amount)
|
product.amount = math.max(1, product.amount - old_amount)
|
||||||
end
|
|
||||||
if product[1] == old then
|
|
||||||
product[2] = math.max(1, product[2] - old_amount)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -720,8 +672,6 @@ function util.replace_some_ingredient(recipe_name, old, old_amount, new, new_amo
|
||||||
if data.raw.recipe[recipe_name] and (data.raw.item[new] or is_fluid) then
|
if data.raw.recipe[recipe_name] and (data.raw.item[new] or is_fluid) then
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
replace_some_ingredient(data.raw.recipe[recipe_name], old, old_amount, new, new_amount, is_fluid)
|
replace_some_ingredient(data.raw.recipe[recipe_name], old, old_amount, new, new_amount, is_fluid)
|
||||||
replace_some_ingredient(data.raw.recipe[recipe_name].normal, old, old_amount, new, new_amount, is_fluid)
|
|
||||||
replace_some_ingredient(data.raw.recipe[recipe_name].expensive, old, old_amount, new, new_amount, is_fluid)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -750,8 +700,6 @@ function util.set_product_amount(recipe_name, product, amount, options)
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
set_product_amount(data.raw.recipe[recipe_name], product, amount)
|
set_product_amount(data.raw.recipe[recipe_name], product, amount)
|
||||||
set_product_amount(data.raw.recipe[recipe_name].normal, product, amount)
|
|
||||||
set_product_amount(data.raw.recipe[recipe_name].expensive, product, amount)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -790,8 +738,6 @@ function util.multiply_recipe(recipe_name, multiple, options)
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
multiply_recipe(data.raw.recipe[recipe_name], multiple)
|
multiply_recipe(data.raw.recipe[recipe_name], multiple)
|
||||||
multiply_recipe(data.raw.recipe[recipe_name].normal, multiple)
|
|
||||||
multiply_recipe(data.raw.recipe[recipe_name].expensive, multiple)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -799,8 +745,6 @@ function multiply_recipe(recipe, multiple)
|
||||||
if recipe then
|
if recipe then
|
||||||
if recipe.energy_required then
|
if recipe.energy_required then
|
||||||
recipe.energy_required = recipe.energy_required * multiple
|
recipe.energy_required = recipe.energy_required * multiple
|
||||||
else
|
|
||||||
recipe.energy_required = 0.5 * multiple -- 0.5 is factorio default
|
|
||||||
end
|
end
|
||||||
if recipe.result_count then
|
if recipe.result_count then
|
||||||
recipe.result_count = recipe.result_count * multiple
|
recipe.result_count = recipe.result_count * multiple
|
||||||
|
|
@ -815,8 +759,11 @@ function multiply_recipe(recipe, multiple)
|
||||||
result.amount_min = result.amount_min * multiple
|
result.amount_min = result.amount_min * multiple
|
||||||
result.amount_max = result.amount_max * multiple
|
result.amount_max = result.amount_max * multiple
|
||||||
end
|
end
|
||||||
if result.catalyst_amount then
|
if result.ignored_by_productivity then
|
||||||
result.catalyst_amount = result.catalyst_amount * multiple
|
result.ignored_by_productivity = result.ignored_by_productivity * multiple
|
||||||
|
end
|
||||||
|
if result.ignored_by_stats then
|
||||||
|
result.ignored_by_stats = result.ignored_by_stats * multiple
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if result[1] then
|
if result[1] then
|
||||||
|
|
@ -843,9 +790,8 @@ end
|
||||||
|
|
||||||
-- Returns true if a recipe has an ingredient
|
-- Returns true if a recipe has an ingredient
|
||||||
function util.has_ingredient(recipe_name, ingredient)
|
function util.has_ingredient(recipe_name, ingredient)
|
||||||
return data.raw.recipe[recipe_name] and (
|
return data.raw.recipe[recipe_name] and
|
||||||
has_ingredient(data.raw.recipe[recipe_name], ingredient) or
|
has_ingredient(data.raw.recipe[recipe_name], ingredient)
|
||||||
has_ingredient(data.raw.recipe[recipe_name].normal, ingredient))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function has_ingredient(recipe, ingredient)
|
function has_ingredient(recipe, ingredient)
|
||||||
|
|
@ -865,8 +811,6 @@ function util.remove_product(recipe_name, old, options)
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
remove_product(data.raw.recipe[recipe_name], old)
|
remove_product(data.raw.recipe[recipe_name], old)
|
||||||
remove_product(data.raw.recipe[recipe_name].normal, old)
|
|
||||||
remove_product(data.raw.recipe[recipe_name].expensive, old)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -889,8 +833,6 @@ function util.set_main_product(recipe_name, product, options)
|
||||||
if not should_force(options) and bypass(recipe_name) then return end
|
if not should_force(options) and bypass(recipe_name) then return end
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
set_main_product(data.raw.recipe[recipe_name], product)
|
set_main_product(data.raw.recipe[recipe_name], product)
|
||||||
set_main_product(data.raw.recipe[recipe_name].normal, product)
|
|
||||||
set_main_product(data.raw.recipe[recipe_name].expensive, product)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -904,13 +846,11 @@ end
|
||||||
function util.replace_product(recipe_name, old, new, options)
|
function util.replace_product(recipe_name, old, new, options)
|
||||||
if not should_force(options) and bypass(recipe_name) then return end
|
if not should_force(options) and bypass(recipe_name) then return end
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
replace_product(data.raw.recipe[recipe_name], old, new, options)
|
replace_product(data.raw.recipe[recipe_name], old, new)
|
||||||
replace_product(data.raw.recipe[recipe_name].normal, old, new, options)
|
|
||||||
replace_product(data.raw.recipe[recipe_name].expensive, old, new, options)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function replace_product(recipe, old, new, options)
|
function replace_product(recipe, old, new)
|
||||||
if recipe then
|
if recipe then
|
||||||
if recipe.main_product == old then
|
if recipe.main_product == old then
|
||||||
recipe.main_product = new
|
recipe.main_product = new
|
||||||
|
|
@ -950,8 +890,6 @@ function util.set_recipe_time(recipe_name, time, options)
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
set_recipe_time(data.raw.recipe[recipe_name], time)
|
set_recipe_time(data.raw.recipe[recipe_name], time)
|
||||||
set_recipe_time(data.raw.recipe[recipe_name].normal, time)
|
|
||||||
set_recipe_time(data.raw.recipe[recipe_name].expensive, time)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -969,8 +907,6 @@ function util.multiply_time(recipe_name, factor, options)
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
multiply_time(data.raw.recipe[recipe_name], factor)
|
multiply_time(data.raw.recipe[recipe_name], factor)
|
||||||
multiply_time(data.raw.recipe[recipe_name].normal, factor)
|
|
||||||
multiply_time(data.raw.recipe[recipe_name].expensive, factor)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -988,8 +924,6 @@ function util.add_time(recipe_name, amount, options)
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
add_time(data.raw.recipe[recipe_name], amount)
|
add_time(data.raw.recipe[recipe_name], amount)
|
||||||
add_time(data.raw.recipe[recipe_name].normal, amount)
|
|
||||||
add_time(data.raw.recipe[recipe_name].expensive, amount)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -1013,7 +947,7 @@ end
|
||||||
-- Set recipe subgroup
|
-- Set recipe subgroup
|
||||||
function util.set_subgroup(recipe_name, subgroup, options)
|
function util.set_subgroup(recipe_name, subgroup, options)
|
||||||
if not should_force(options) and bypass(recipe_name) then return end
|
if not should_force(options) and bypass(recipe_name) then return end
|
||||||
if data.raw.recipe[recipe_name] and data.raw["item-subgroup"][subgroup] then
|
if data.raw.recipe[recipe_name] then
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
data.raw.recipe[recipe_name].subgroup = subgroup
|
data.raw.recipe[recipe_name].subgroup = subgroup
|
||||||
end
|
end
|
||||||
|
|
@ -1032,34 +966,16 @@ function util.add_icon(recipe_name, icon, options)
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
me.add_modified(recipe_name)
|
me.add_modified(recipe_name)
|
||||||
if not (data.raw.recipe[recipe_name].icons and #(data.raw.recipe[recipe_name].icons) > 0) then
|
if not (data.raw.recipe[recipe_name].icons and #(data.raw.recipe[recipe_name].icons) > 0) then
|
||||||
if data.raw.recipe[recipe_name].icon then
|
data.raw.recipe[recipe_name].icons = {}
|
||||||
data.raw.recipe[recipe_name].icons = {{
|
if data.raw.recipe[recipe_name].icon then
|
||||||
icon=data.raw.recipe[recipe_name].icon,
|
data.raw.recipe[recipe_name].icons = {{
|
||||||
icon_size=data.raw.recipe[recipe_name].icon_size,
|
icon=data.raw.recipe[recipe_name].icon,
|
||||||
icon_mipmaps=data.raw.recipe[recipe_name].icon_mipmaps,
|
icon_size=data.raw.recipe[recipe_name].icon_size,
|
||||||
}}
|
icon_mipmaps=data.raw.recipe[recipe_name].icon_mipmaps,
|
||||||
elseif data.raw.item[data.raw.recipe[recipe_name].main_product] then
|
}}
|
||||||
data.raw.recipe[recipe_name].icons = {{
|
data.raw.recipe[recipe_name].icon = nil
|
||||||
icon=data.raw.item[data.raw.recipe[recipe_name].main_product].icon,
|
data.raw.recipe[recipe_name].icon_size = nil
|
||||||
icon_size=data.raw.item[data.raw.recipe[recipe_name].main_product].icon_size,
|
end
|
||||||
icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].main_product].icon_mipmaps,
|
|
||||||
}}
|
|
||||||
elseif data.raw.item[data.raw.recipe[recipe_name].result] then
|
|
||||||
data.raw.recipe[recipe_name].icons = {{
|
|
||||||
icon=data.raw.item[data.raw.recipe[recipe_name].result].icon,
|
|
||||||
icon_size=data.raw.item[data.raw.recipe[recipe_name].result].icon_size,
|
|
||||||
icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].result].icon_mipmaps,
|
|
||||||
}}
|
|
||||||
elseif data.raw.recipe[recipe_name].normal and
|
|
||||||
data.raw.item[data.raw.recipe[recipe_name].normal.result] then
|
|
||||||
data.raw.recipe[recipe_name].icons = {{
|
|
||||||
icon=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon,
|
|
||||||
icon_size=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon_size,
|
|
||||||
icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon_mipmaps,
|
|
||||||
}}
|
|
||||||
end
|
|
||||||
data.raw.recipe[recipe_name].icon = nil
|
|
||||||
data.raw.recipe[recipe_name].icon_size = nil
|
|
||||||
end
|
end
|
||||||
table.insert(data.raw.recipe[recipe_name].icons, icon)
|
table.insert(data.raw.recipe[recipe_name].icons, icon)
|
||||||
end
|
end
|
||||||
|
|
@ -1119,8 +1035,6 @@ function util.add_to_ingredient(recipe, ingredient, amount, options)
|
||||||
if not should_force(options) and bypass(recipe_name) then return end
|
if not should_force(options) and bypass(recipe_name) then return end
|
||||||
if data.raw.recipe[recipe] then
|
if data.raw.recipe[recipe] then
|
||||||
add_to_ingredient(data.raw.recipe[recipe], ingredient, amount)
|
add_to_ingredient(data.raw.recipe[recipe], ingredient, amount)
|
||||||
add_to_ingredient(data.raw.recipe[recipe].normal, ingredient, amount)
|
|
||||||
add_to_ingredient(data.raw.recipe[recipe].expensive, ingredient, amount)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -1143,8 +1057,6 @@ function util.add_to_product(recipe_name, product, amount, options)
|
||||||
if not should_force(options) and bypass(recipe_name) then return end
|
if not should_force(options) and bypass(recipe_name) then return end
|
||||||
if data.raw.recipe[recipe_name] then
|
if data.raw.recipe[recipe_name] then
|
||||||
add_to_product(data.raw.recipe[recipe_name], product, amount)
|
add_to_product(data.raw.recipe[recipe_name], product, amount)
|
||||||
add_to_product(data.raw.recipe[recipe_name].normal, product, amount)
|
|
||||||
add_to_product(data.raw.recipe[recipe_name].expensive, product, amount)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -1267,10 +1179,8 @@ function remove_prior_unlocks(tech, recipe)
|
||||||
util.remove_recipe_effect(tech, recipe)
|
util.remove_recipe_effect(tech, recipe)
|
||||||
if technology.prerequisites then
|
if technology.prerequisites then
|
||||||
for i, prerequisite in pairs(technology.prerequisites) do
|
for i, prerequisite in pairs(technology.prerequisites) do
|
||||||
if string.sub(prerequisite, 1, 3) ~= 'ei_' then
|
-- log("BZZZ removing prior unlocks for " .. tech ..", checking " .. prerequisite) -- Handy Debug :|
|
||||||
-- log("BZZZ removing prior unlocks for " .. recipe .. " from " .. tech ..", checking " .. prerequisite) -- Handy Debug :|
|
remove_prior_unlocks(prerequisite, recipe)
|
||||||
remove_prior_unlocks(prerequisite, recipe)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -1312,9 +1222,7 @@ function replace_ingredients_prior_to(tech, old, new, multiplier)
|
||||||
if technology.prerequisites then
|
if technology.prerequisites then
|
||||||
for i, prerequisite in pairs(technology.prerequisites) do
|
for i, prerequisite in pairs(technology.prerequisites) do
|
||||||
-- log("BZZZ checking " .. prerequisite) -- Handy Debug :|
|
-- log("BZZZ checking " .. prerequisite) -- Handy Debug :|
|
||||||
if string.sub(prerequisite, 1, 3) ~= 'ei_' then
|
replace_ingredients_prior_to(prerequisite, old, new, multiplier)
|
||||||
replace_ingredients_prior_to(prerequisite, old, new, multiplier)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 812 B After Width: | Height: | Size: 812 B |
|
Before Width: | Height: | Size: 711 B After Width: | Height: | Size: 711 B |
|
Before Width: | Height: | Size: 572 B After Width: | Height: | Size: 572 B |
|
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 627 B |
|
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
|
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 202 B |
|
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 203 B |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "bztungsten",
|
"name": "bztungsten2",
|
||||||
"version": "0.7.11",
|
"version": "2.0.0",
|
||||||
"factorio_version": "1.1",
|
"factorio_version": "2.0",
|
||||||
"title": "Tungsten",
|
"title": "Tungsten",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
"contact": "",
|
"contact": "",
|
||||||
"homepage": "",
|
"homepage": "",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"base >= 1.1.0",
|
"base >= 2.0",
|
||||||
"? space-exploration",
|
"? space-exploration",
|
||||||
"? Krastorio2",
|
"? Krastorio2",
|
||||||
"? deadlock-beltboxes-loaders",
|
"? deadlock-beltboxes-loaders",
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
local me = {}
|
local me = {}
|
||||||
|
|
||||||
me.name = "bztungsten"
|
me.name = "bztungsten2"
|
||||||
me.tungsten_ore = "tungsten-ore"
|
me.tungsten_ore = "tungsten-ore"
|
||||||
me.tungsten_plate = "tungsten-plate"
|
me.tungsten_plate = "tungsten-plate"
|
||||||
me.tungsten_carbide_recipe = "tungsten-carbide"
|
me.tungsten_carbide_recipe = "tungsten-carbide"
|
||||||
9
bztungsten2/modules.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
-- Enable prod modules for all tungsten plate and ore recipes
|
||||||
|
local util = require("data-util");
|
||||||
|
|
||||||
|
|
||||||
|
for i, recipe in pairs(util.me.recipes) do
|
||||||
|
if data.raw.recipe[recipe] then
|
||||||
|
data.raw.recipe[recipe].allow_productivity = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -29,7 +29,7 @@ data:extend({
|
||||||
setting_type = "startup",
|
setting_type = "startup",
|
||||||
default_value = "no",
|
default_value = "no",
|
||||||
allowed_values = {"yes", "no"},
|
allowed_values = {"yes", "no"},
|
||||||
hidden = not not (mods.Krastorio2 or mods.bzfoundry),
|
hidden = not not (mods.Krastorio2 or mods.bzfoundry2),
|
||||||
order = "aea",
|
order = "aea",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
@ -40,8 +40,8 @@ if mods.Krastorio2 then
|
||||||
type = "string-setting",
|
type = "string-setting",
|
||||||
name = "bztungsten-mining-fluid-k2",
|
name = "bztungsten-mining-fluid-k2",
|
||||||
setting_type = "startup",
|
setting_type = "startup",
|
||||||
default_value = "mineral-water",
|
default_value = "kr-mineral-water",
|
||||||
allowed_values = {"mineral-water", "water"},
|
allowed_values = {"kr-mineral-water", "water"},
|
||||||
order = "aga",
|
order = "aga",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
local util = require("__bztungsten__.data-util");
|
local util = require("__bztungsten2__.data-util");
|
||||||
|
|
||||||
|
|
||||||
local ore = "tungsten-ore"
|
local ore = "tungsten-ore"
|
||||||
local ore_icon = "__bztungsten__/graphics/icons/tungsten-ore.png"
|
local ore_icon = "__bztungsten2__/graphics/icons/tungsten-ore.png"
|
||||||
|
|
||||||
if mods["StrangeMatter"] then
|
if mods["StrangeMatter"] then
|
||||||
data:extend({
|
data:extend({
|
||||||
|
|
@ -16,7 +16,7 @@ data:extend({
|
||||||
enabled = false,
|
enabled = false,
|
||||||
energy_required = 1,
|
energy_required = 1,
|
||||||
ingredients = {{type="fluid", name="strange-matter", amount = 2}},
|
ingredients = {{type="fluid", name="strange-matter", amount = 2}},
|
||||||
result = ore,
|
results = {{type="item", name=ore, amount=1}},
|
||||||
category = "crafting-with-fluid",
|
category = "crafting-with-fluid",
|
||||||
subgroup = "synthesis",
|
subgroup = "synthesis",
|
||||||
},
|
},
|
||||||
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
|
@ -24,7 +24,7 @@ if simpleCompress then
|
||||||
tungstenRecipe.results = {
|
tungstenRecipe.results = {
|
||||||
{type="item", name = "tungsten-plate", amount=simpleCompress.CompressedSmeltAmount},
|
{type="item", name = "tungsten-plate", amount=simpleCompress.CompressedSmeltAmount},
|
||||||
}
|
}
|
||||||
tungstenRecipe.icons = {{ icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128 }}
|
tungstenRecipe.icons = {{ icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128 }}
|
||||||
tungstenRecipe.subgroup = "raw-material"
|
tungstenRecipe.subgroup = "raw-material"
|
||||||
tungstenRecipe.order = "d[tungsten-plate]"
|
tungstenRecipe.order = "d[tungsten-plate]"
|
||||||
end
|
end
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
-- Enriched Titanium for Krastorio2
|
-- Enriched Titanium for Krastorio2
|
||||||
local util = require("__bztungsten__.data-util");
|
local util = require("data-util");
|
||||||
|
|
||||||
if mods["Krastorio2"] then
|
if mods["Krastorio2"] then
|
||||||
data:extend({
|
data:extend({
|
||||||
|
|
@ -9,20 +9,20 @@ data:extend({
|
||||||
icon_size = 64, icon_mipmaps = 3,
|
icon_size = 64, icon_mipmaps = 3,
|
||||||
icon = "__bztungsten__/graphics/icons/enriched-tungsten.png",
|
icon = "__bztungsten__/graphics/icons/enriched-tungsten.png",
|
||||||
pictures = {
|
pictures = {
|
||||||
{filename="__bztungsten__/graphics/icons/enriched-tungsten.png", size=64, scale=0.25},
|
{filename="__bztungsten2__/graphics/icons/enriched-tungsten.png", size=64, scale=0.5},
|
||||||
{filename="__bztungsten__/graphics/icons/enriched-tungsten-2.png", size=64, scale=0.25},
|
{filename="__bztungsten2__/graphics/icons/enriched-tungsten-2.png", size=64, scale=0.5},
|
||||||
{filename="__bztungsten__/graphics/icons/enriched-tungsten-3.png", size=64, scale=0.25},
|
{filename="__bztungsten2__/graphics/icons/enriched-tungsten-3.png", size=64, scale=0.5},
|
||||||
{filename="__bztungsten__/graphics/icons/enriched-tungsten-4.png", size=64, scale=0.25},
|
{filename="__bztungsten2__/graphics/icons/enriched-tungsten-4.png", size=64, scale=0.5},
|
||||||
},
|
},
|
||||||
subgroup = "raw-material",
|
subgroup = "raw-material",
|
||||||
order = "e05-a[enriched-ores]-a1[enriched-tungsten]",
|
order = "e05-a[enriched-ores]-a1[enriched-tungsten]",
|
||||||
stack_size = util.get_stack_size(100),
|
stack_size = 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "enriched-tungsten",
|
name = "enriched-tungsten",
|
||||||
main_product = "enriched-tungsten",
|
main_product = "enriched-tungsten",
|
||||||
icon = "__bztungsten__/graphics/icons/enriched-tungsten.png",
|
icon = "__bztungsten2__/graphics/icons/enriched-tungsten.png",
|
||||||
icon_size = 64,
|
icon_size = 64,
|
||||||
category = "chemistry",
|
category = "chemistry",
|
||||||
energy_required = 3,
|
energy_required = 3,
|
||||||
|
|
@ -33,14 +33,14 @@ data:extend({
|
||||||
subgroup = "raw-material",
|
subgroup = "raw-material",
|
||||||
ingredients =
|
ingredients =
|
||||||
{
|
{
|
||||||
{type = "fluid", name = "ammonia", amount = 10},
|
{type = "fluid", name = "kr-ammonia", amount = 10},
|
||||||
{type = "fluid", name = "water", amount = 25, catalyst_amount = 25},
|
{type = "fluid", name = "water", amount = 25, catalyst_amount = 25},
|
||||||
{type = "item", name = "tungsten-ore", amount = 9}
|
{type = "item", name = "tungsten-ore", amount = 9}
|
||||||
},
|
},
|
||||||
results =
|
results =
|
||||||
{
|
{
|
||||||
{type = "item", name = "enriched-tungsten", amount = 6},
|
{type = "item", name = "enriched-tungsten", amount = 6},
|
||||||
{type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25}
|
{type = "fluid", name = "kr-dirty-water", amount = 25, catalyst_amount = 25}
|
||||||
},
|
},
|
||||||
crafting_machine_tint =
|
crafting_machine_tint =
|
||||||
{
|
{
|
||||||
|
|
@ -56,8 +56,8 @@ data:extend({
|
||||||
name = "enriched-tungsten-plate",
|
name = "enriched-tungsten-plate",
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
{ icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3, },
|
{ icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3, },
|
||||||
{ icon = "__bztungsten__/graphics/icons/enriched-tungsten.png", icon_size = 64, scale=0.25, shift= {-8, -8}},
|
{ icon = "__bztungsten2__/graphics/icons/enriched-tungsten.png", icon_size = 64, scale=0.25, shift= {-8, -8}},
|
||||||
},
|
},
|
||||||
category = "smelting",
|
category = "smelting",
|
||||||
energy_required = 24,
|
energy_required = 24,
|
||||||
|
|
@ -67,30 +67,29 @@ data:extend({
|
||||||
allow_productivity = true,
|
allow_productivity = true,
|
||||||
ingredients =
|
ingredients =
|
||||||
{
|
{
|
||||||
{"enriched-tungsten", 15}
|
{type="item", name="enriched-tungsten", amount=15}
|
||||||
},
|
},
|
||||||
result = "tungsten-plate",
|
results = {{type="item", name="tungsten-plate", amount=10}},
|
||||||
result_count = 10,
|
|
||||||
order = "b[tungsten-plate]-b[enriched-tungsten-plate]"
|
order = "b[tungsten-plate]-b[enriched-tungsten-plate]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "dirty-water-filtration-tungsten",
|
name = "dirty-water-filtration-tungsten",
|
||||||
category = "fluid-filtration",
|
category = "kr-fluid-filtration",
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
icon = data.raw.fluid["dirty-water"].icon,
|
icon = data.raw.fluid["kr-dirty-water"].icon,
|
||||||
icon_size = data.raw.fluid["dirty-water"].icon_size
|
icon_size = data.raw.fluid["kr-dirty-water"].icon_size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon = data.raw.item["tungsten-ore"].icon,
|
icon = data.raw.item["tungsten-ore"].icon,
|
||||||
icon_size = data.raw.item["tungsten-ore"].icon_size,
|
icon_size = data.raw.item["tungsten-ore"].icon_size,
|
||||||
scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["tungsten-ore"].icon_size),
|
scale = 0.20,
|
||||||
shift = {0, 4}
|
shift = {0, 4}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon_size = data.raw.fluid["dirty-water"].icon_size,
|
icon_size = data.raw.fluid["kr-dirty-water"].icon_size,
|
||||||
energy_required = 2,
|
energy_required = 2,
|
||||||
enabled = false,
|
enabled = false,
|
||||||
allow_as_intermediate = false,
|
allow_as_intermediate = false,
|
||||||
|
|
@ -98,7 +97,7 @@ data:extend({
|
||||||
always_show_products = true,
|
always_show_products = true,
|
||||||
ingredients =
|
ingredients =
|
||||||
{
|
{
|
||||||
{type = "fluid", name = "dirty-water", amount = 100, catalyst_amount = 100},
|
{type = "fluid", name = "kr-dirty-water", amount = 100, catalyst_amount = 100},
|
||||||
},
|
},
|
||||||
results =
|
results =
|
||||||
{
|
{
|
||||||
22
bztungsten2/tungsten-matter.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
-- Matter recipes for Krastorio2
|
||||||
|
if mods["Krastorio2"] then
|
||||||
|
local util = require("data-util");
|
||||||
|
local matter = require("__Krastorio2__/prototypes/libraries/matter")
|
||||||
|
|
||||||
|
matter.make_recipes({
|
||||||
|
material = { type = "item", name = "tungsten-ore", amount = 1 },
|
||||||
|
matter_count = 6,
|
||||||
|
energy_required = 1,
|
||||||
|
need_stabilizer = false,
|
||||||
|
unlocked_by_technology = "tungsten-matter-processing",
|
||||||
|
icon = {icon = "__bztungsten2__/graphics/icons/tungsten-ore.png", icon_size = 64, scale = 1.25}
|
||||||
|
})
|
||||||
|
|
||||||
|
matter.make_recipes({
|
||||||
|
material = { type = "item", name = "tungsten-plate", amount = 1 },
|
||||||
|
matter_count = 10,
|
||||||
|
energy_required = 2,
|
||||||
|
need_stabilizer = false,
|
||||||
|
unlocked_by_technology = "tungsten-matter-processing",
|
||||||
|
})
|
||||||
|
end
|
||||||
80
bztungsten2/tungsten-ore-particle.lua
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
data:extend(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
type = "optimized-particle",
|
||||||
|
name = "tungsten-ore-particle",
|
||||||
|
flags = {"not-on-map"},
|
||||||
|
life_time = 180,
|
||||||
|
pictures =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
filename = "__bztungsten2__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-1.png",
|
||||||
|
priority = "extra-high",
|
||||||
|
width = 32,
|
||||||
|
height = 32,
|
||||||
|
frame_count = 1,
|
||||||
|
scale = 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filename = "__bztungsten2__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-2.png",
|
||||||
|
priority = "extra-high",
|
||||||
|
width = 32,
|
||||||
|
height = 32,
|
||||||
|
frame_count = 1,
|
||||||
|
scale = 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filename = "__bztungsten2__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-3.png",
|
||||||
|
priority = "extra-high",
|
||||||
|
width = 32,
|
||||||
|
height = 32,
|
||||||
|
frame_count = 1,
|
||||||
|
scale = 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filename = "__bztungsten2__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-4.png",
|
||||||
|
priority = "extra-high",
|
||||||
|
width = 32,
|
||||||
|
height = 32,
|
||||||
|
frame_count = 1,
|
||||||
|
scale = 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
shadows =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
filename = "__bztungsten2__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-1.png",
|
||||||
|
priority = "extra-high",
|
||||||
|
width = 32,
|
||||||
|
height = 32,
|
||||||
|
frame_count = 1,
|
||||||
|
scale = 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filename = "__bztungsten2__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-2.png",
|
||||||
|
priority = "extra-high",
|
||||||
|
width = 32,
|
||||||
|
height = 32,
|
||||||
|
frame_count = 1,
|
||||||
|
scale = 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filename = "__bztungsten2__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-3.png",
|
||||||
|
priority = "extra-high",
|
||||||
|
width = 32,
|
||||||
|
height = 32,
|
||||||
|
frame_count = 1,
|
||||||
|
scale = 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filename = "__bztungsten2__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-4.png",
|
||||||
|
priority = "extra-high",
|
||||||
|
width = 32,
|
||||||
|
height = 32,
|
||||||
|
frame_count = 1,
|
||||||
|
scale = 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
local resource_autoplace = require('resource-autoplace');
|
local resource_autoplace = require('resource-autoplace');
|
||||||
local noise = require('noise');
|
local item_sounds = require('__base__.prototypes.item_sounds')
|
||||||
|
local util = require("data-util");
|
||||||
|
|
||||||
|
data.raw.planet.nauvis.map_gen_settings.autoplace_controls["tungsten-ore"] = {}
|
||||||
|
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["tungsten-ore"] = {}
|
||||||
|
resource_autoplace.initialize_patch_set("tungsten-ore", true)
|
||||||
|
|
||||||
local util = require("__bztungsten__.data-util");
|
|
||||||
|
|
||||||
data:extend({
|
data:extend({
|
||||||
{
|
{
|
||||||
|
|
@ -12,10 +16,6 @@ data:extend({
|
||||||
order = "b-e"
|
order = "b-e"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "noise-layer",
|
|
||||||
name = "tungsten-ore"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = "resource",
|
type = "resource",
|
||||||
icon_size = 64, icon_mipmaps = 3,
|
icon_size = 64, icon_mipmaps = 3,
|
||||||
name = "tungsten-ore",
|
name = "tungsten-ore",
|
||||||
|
|
@ -51,45 +51,37 @@ data:extend({
|
||||||
{
|
{
|
||||||
sheet =
|
sheet =
|
||||||
{
|
{
|
||||||
filename = "__bztungsten__/graphics/entity/ores/tungsten-ore.png",
|
filename = "__bztungsten2__/graphics/entity/ores/tungsten-ore.png",
|
||||||
priority = "extra-high",
|
priority = "extra-high",
|
||||||
size = 64,
|
size = 128,
|
||||||
frame_count = 8,
|
frame_count = 8,
|
||||||
variation_count = 8,
|
variation_count = 8,
|
||||||
hr_version =
|
scale = 0.5,
|
||||||
{
|
|
||||||
filename = "__bztungsten__/graphics/entity/ores/hr-tungsten-ore.png",
|
|
||||||
priority = "extra-high",
|
|
||||||
size = 128,
|
|
||||||
frame_count = 8,
|
|
||||||
variation_count = 8,
|
|
||||||
scale = 0.5
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "item",
|
type = "item",
|
||||||
name = "tungsten-ore",
|
name = "tungsten-ore",
|
||||||
icon_size = 64, icon_mipmaps = 3,
|
icon_size = 64, icon_mipmaps = 3,
|
||||||
icon = "__bztungsten__/graphics/icons/tungsten-ore.png",
|
icon = "__bztungsten2__/graphics/icons/tungsten-ore.png",
|
||||||
pictures = {
|
pictures = {
|
||||||
{filename="__bztungsten__/graphics/icons/tungsten-ore.png", size=64, scale=0.25},
|
{filename="__bztungsten2__/graphics/icons/tungsten-ore.png", size=64, scale=0.5},
|
||||||
{filename="__bztungsten__/graphics/icons/tungsten-ore-2.png", size=64, scale=0.25},
|
{filename="__bztungsten2__/graphics/icons/tungsten-ore-2.png", size=64, scale=0.5},
|
||||||
{filename="__bztungsten__/graphics/icons/tungsten-ore-3.png", size=64, scale=0.25},
|
{filename="__bztungsten2__/graphics/icons/tungsten-ore-3.png", size=64, scale=0.5},
|
||||||
{filename="__bztungsten__/graphics/icons/tungsten-ore-4.png", size=64, scale=0.25},
|
{filename="__bztungsten2__/graphics/icons/tungsten-ore-4.png", size=64, scale=0.5},
|
||||||
},
|
},
|
||||||
subgroup = "raw-resource",
|
subgroup = "raw-resource",
|
||||||
order = "t-c-a",
|
order = "t-c-a",
|
||||||
stack_size = util.get_stack_size(50)
|
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
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Wolframite becomes 20% richer past 1000 tiles, 60% richer past 10000 tiles. Very close to start, it's 25% richness
|
-- Wolframite becomes 20% richer past 1000 tiles, 60% richer past 10000 tiles. Very close to start, it's 25% richness
|
||||||
local richness = data.raw.resource["tungsten-ore"].autoplace.richness_expression
|
local richness = data.raw.resource["tungsten-ore"].autoplace.richness_expression
|
||||||
data.raw.resource["tungsten-ore"].autoplace.richness_expression =
|
data.raw.resource["tungsten-ore"].autoplace.richness_expression = richness ..
|
||||||
richness * noise.if_else_chain(
|
"* if(distance_from_nearest_point(x, y, starting_positions) < 100, 0.25, if(distance_from_nearest_point(x, y, starting_positions) < 1000, 1, if(distance_from_nearest_point(x, y, starting_positions) < 100, 1.2, 1.6)))"
|
||||||
noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(100)), 0.25,
|
|
||||||
noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(1000)), 1,
|
|
||||||
noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(10000)), 1.2,
|
|
||||||
1.6)
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local util = require("__bztungsten__.data-util");
|
local util = require("data-util");
|
||||||
|
|
||||||
if mods["5dim_core"] then
|
if mods["5dim_core"] then
|
||||||
|
|
||||||
|
|
@ -21,9 +21,8 @@ if mods["5dim_core"] then
|
||||||
icon_size = 128, icon_mipmaps = 3,
|
icon_size = 128, icon_mipmaps = 3,
|
||||||
enabled = true,
|
enabled = true,
|
||||||
energy_required = 50,
|
energy_required = 50,
|
||||||
ingredients = {{"tungsten-ore", 85}},
|
ingredients = {{type="item", name="tungsten-ore", amount=85}},
|
||||||
result = "tungsten-plate",
|
results = {{type="item", name="tungsten-plate", amount=50}},
|
||||||
result_count = 50,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
@ -37,14 +36,14 @@ if mods["5dim_core"] then
|
||||||
name = "tungsten-dust",
|
name = "tungsten-dust",
|
||||||
subgroup = "plates-dust",
|
subgroup = "plates-dust",
|
||||||
order = "d[tungsten-plate]",
|
order = "d[tungsten-plate]",
|
||||||
icon = "__bztungsten__/graphics/icons/tungsten-powder.png",
|
icon = "__bztungsten2__/graphics/icons/tungsten-powder.png",
|
||||||
icon_size = 64, icon_mipmaps = 3,
|
icon_size = 64, icon_mipmaps = 3,
|
||||||
stack_size = 200
|
stack_size = 200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "tungsten-plate-dust",
|
name = "tungsten-plate-dust",
|
||||||
icon = "__bztungsten__/graphics/icons/tungsten-plate.png",
|
icon = "__bztungsten2__/graphics/icons/tungsten-plate.png",
|
||||||
icon_size = 128, icon_mipmaps = 3,
|
icon_size = 128, icon_mipmaps = 3,
|
||||||
subgroup = "plates-plates2",
|
subgroup = "plates-plates2",
|
||||||
order = "d[tungsten-plate]",
|
order = "d[tungsten-plate]",
|
||||||
|
|
@ -52,14 +51,14 @@ if mods["5dim_core"] then
|
||||||
energy_required = 32/15,
|
energy_required = 32/15,
|
||||||
enabled = true,
|
enabled = true,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{"tungsten-dust", 2}
|
{type="item", name="tungsten-dust", amount=2}
|
||||||
},
|
},
|
||||||
result = "tungsten-plate",
|
results = {{type="item", name="tungsten-plate", amount=1}},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "tungsten-dust",
|
name = "tungsten-dust",
|
||||||
icon = "__bztungsten__/graphics/icons/tungsten-powder.png",
|
icon = "__bztungsten2__/graphics/icons/tungsten-powder.png",
|
||||||
icon_size = 64, icon_mipmaps = 3,
|
icon_size = 64, icon_mipmaps = 3,
|
||||||
category = "mashering",
|
category = "mashering",
|
||||||
subgroup = "",
|
subgroup = "",
|
||||||
|
|
@ -67,7 +66,7 @@ if mods["5dim_core"] then
|
||||||
energy_required = 3.2,
|
energy_required = 3.2,
|
||||||
enabled = true,
|
enabled = true,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{"tungsten-ore", 1}
|
{type="item", name="tungsten-ore", amount=1}
|
||||||
},
|
},
|
||||||
results = {
|
results = {
|
||||||
{type="item", name = "tungsten-dust", amount=2},
|
{type="item", name = "tungsten-dust", amount=2},
|
||||||
|
|
@ -79,13 +78,12 @@ if mods["5dim_core"] then
|
||||||
category = "industrial-furnace",
|
category = "industrial-furnace",
|
||||||
subgroup = "plates-industrial-dust",
|
subgroup = "plates-industrial-dust",
|
||||||
order = "ad[tungsten-plate]",
|
order = "ad[tungsten-plate]",
|
||||||
icon = "__bztungsten__/graphics/icons/tungsten-plate.png",
|
icon = "__bztungsten2__/graphics/icons/tungsten-plate.png",
|
||||||
icon_size = 128, icon_mipmaps = 3,
|
icon_size = 128, icon_mipmaps = 3,
|
||||||
enabled = true,
|
enabled = true,
|
||||||
energy_required = 50,
|
energy_required = 50,
|
||||||
ingredients = {{"tungsten-dust", 85}},
|
ingredients = {{type="item", name="tungsten-dust", amount=85}},
|
||||||
result = util.me.tungsten_plate,
|
results = {{type="item", name=util.me.tungsten_plate, amount=50}},
|
||||||
result_count = 50,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
|
|
@ -93,13 +91,12 @@ if mods["5dim_core"] then
|
||||||
category = "industrial-furnace",
|
category = "industrial-furnace",
|
||||||
subgroup = "plates-industrial-ore",
|
subgroup = "plates-industrial-ore",
|
||||||
order = "ae[tungsten-carbide]",
|
order = "ae[tungsten-carbide]",
|
||||||
icon = "__bztungsten__/graphics/icons/tungsten-carbide.png",
|
icon = "__bztungsten2__/graphics/icons/tungsten-carbide.png",
|
||||||
icon_size = 128, icon_mipmaps = 3,
|
icon_size = 128, icon_mipmaps = 3,
|
||||||
enabled = true,
|
enabled = true,
|
||||||
energy_required = 500,
|
energy_required = 500,
|
||||||
ingredients = {{"tungsten-plate", 85}},
|
ingredients = {{type="item", name="tungsten-plate", amount=85}},
|
||||||
result = util.me.tungsten_plate,
|
results = {{type="item", name=util.me.tungsten_plate, amount=20}},
|
||||||
result_count = 20,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local util = require("__bztungsten__.data-util");
|
local util = require("data-util");
|
||||||
|
|
||||||
if mods["Rich-Rocks-Requiem"] then
|
if mods["Rich-Rocks-Requiem"] then
|
||||||
if data.raw.recipe["rrr-stone-processing"] then
|
if data.raw.recipe["rrr-stone-processing"] then
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
-- Deadlock stacking recipes
|
-- Deadlock stacking recipes
|
||||||
|
|
||||||
local util = require("__bztungsten__.data-util");
|
local util = require("data-util");
|
||||||
|
|
||||||
if deadlock then
|
if deadlock then
|
||||||
deadlock.add_stack("tungsten-ore", "__bztungsten__/graphics/icons/stacked/tungsten-ore-stacked.png", "deadlock-stacking-2", 64)
|
deadlock.add_stack("tungsten-ore", "__bztungsten__/graphics/icons/stacked/tungsten-ore-stacked.png", "deadlock-stacking-2", 64)
|
||||||
deadlock.add_stack("tungsten-plate", "__bztungsten__/graphics/icons/stacked/tungsten-plate-stacked.png" , "deadlock-stacking-2", 128)
|
deadlock.add_stack("tungsten-plate", "__bztungsten2__/graphics/icons/stacked/tungsten-plate-stacked.png" , "deadlock-stacking-2", 128)
|
||||||
deadlock.add_stack("tungsten-carbide", "__bztungsten__/graphics/icons/stacked/tungsten-carbide-stacked.png" , "deadlock-stacking-2", 128)
|
deadlock.add_stack("tungsten-carbide", "__bztungsten2__/graphics/icons/stacked/tungsten-carbide-stacked.png" , "deadlock-stacking-2", 128)
|
||||||
deadlock.add_stack("rocket-engine-nozzle", "__bztungsten__/graphics/icons/stacked/rocket-engine-nozzle-stacked.png" , "deadlock-stacking-2", 128)
|
deadlock.add_stack("rocket-engine-nozzle", "__bztungsten2__/graphics/icons/stacked/rocket-engine-nozzle-stacked.png" , "deadlock-stacking-2", 128)
|
||||||
if mods["Krastorio2"] then
|
if mods["Krastorio2"] then
|
||||||
deadlock.add_stack("enriched-tungsten", "__bztungsten__/graphics/icons/stacked/enriched-tungsten-stacked.png" , "deadlock-stacking-2", 64)
|
deadlock.add_stack("enriched-tungsten", "__bztungsten2__/graphics/icons/stacked/enriched-tungsten-stacked.png" , "deadlock-stacking-2", 64)
|
||||||
end
|
end
|
||||||
if data.raw.item["tungsten-ingot"] then
|
if data.raw.item["tungsten-ingot"] then
|
||||||
deadlock.add_stack("tungsten-ingot", nil, "deadlock-stacking-2", nil)
|
deadlock.add_stack("tungsten-ingot", nil, "deadlock-stacking-2", nil)
|
||||||
end
|
end
|
||||||
if util.me.cuw() then
|
if util.me.cuw() then
|
||||||
deadlock.add_stack("cuw", "__bztungsten__/graphics/icons/stacked/cuw-stacked.png" , "deadlock-stacking-2", 128)
|
deadlock.add_stack("cuw", "__bztungsten2__/graphics/icons/stacked/cuw-stacked.png" , "deadlock-stacking-2", 128)
|
||||||
end
|
end
|
||||||
if data.raw.item["tungsten-powder"] then
|
if data.raw.item["tungsten-powder"] then
|
||||||
deadlock.add_stack("tungsten-powder", nil, "deadlock-stacking-2", nil)
|
deadlock.add_stack("tungsten-powder", nil, "deadlock-stacking-2", nil)
|
||||||
|
|
@ -28,7 +28,7 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then
|
||||||
{
|
{
|
||||||
type = "item",
|
type = "item",
|
||||||
name = "tungsten-ingot",
|
name = "tungsten-ingot",
|
||||||
icons = {{icon = "__bztungsten__/graphics/icons/tungsten-ingot.png", icon_size = 128}},
|
icons = {{icon = "__bztungsten2__/graphics/icons/tungsten-ingot.png", icon_size = 128}},
|
||||||
order = "b-b",
|
order = "b-b",
|
||||||
stack_size = 50,
|
stack_size = 50,
|
||||||
subgroup = "tungsten",
|
subgroup = "tungsten",
|
||||||
|
|
@ -37,10 +37,10 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then
|
||||||
util.me.sinter() and {
|
util.me.sinter() and {
|
||||||
type = "item",
|
type = "item",
|
||||||
name = "tungsten-powder",
|
name = "tungsten-powder",
|
||||||
icons = {{icon = "__bztungsten__/graphics/icons/tungsten-powder.png", icon_size = 64, icon_mipmaps = 3}},
|
icons = {{icon = "__bztungsten2__/graphics/icons/tungsten-powder.png", icon_size = 64, icon_mipmaps = 3}},
|
||||||
order = "b-a-x",
|
order = "b-a-x",
|
||||||
subgroup = "tungsten",
|
subgroup = "tungsten",
|
||||||
stack_size = util.get_stack_size(200),
|
stack_size = 200,
|
||||||
} or {
|
} or {
|
||||||
type = "fluid",
|
type = "fluid",
|
||||||
name = "molten-tungsten",
|
name = "molten-tungsten",
|
||||||
|
|
@ -48,7 +48,7 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then
|
||||||
max_temperature = 3422,
|
max_temperature = 3422,
|
||||||
base_color = {r=255, g=160, b=60},
|
base_color = {r=255, g=160, b=60},
|
||||||
flow_color = {r=255, g=160, b=60},
|
flow_color = {r=255, g=160, b=60},
|
||||||
icons = {{icon = "__bztungsten__/graphics/icons/molten-tungsten.png", icon_size = 128}},
|
icons = {{icon = "__bztungsten2__/graphics/icons/molten-tungsten.png", icon_size = 128}},
|
||||||
order = "a[molten]-a",
|
order = "a[molten]-a",
|
||||||
pressure_to_speed_ratio = 0.4,
|
pressure_to_speed_ratio = 0.4,
|
||||||
flow_to_energy_ratio = 0.59,
|
flow_to_energy_ratio = 0.59,
|
||||||
|
|
@ -65,7 +65,7 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then
|
||||||
},
|
},
|
||||||
energy_required = 60,
|
energy_required = 60,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{name = mods.Krastorio2 and "enriched-tungsten" or "tungsten-ore", amount = 24},
|
{type="item", name = mods.Krastorio2 and "enriched-tungsten" or "tungsten-ore", amount = 24},
|
||||||
{type = "fluid", name = "se-pyroflux", amount = 10},
|
{type = "fluid", name = "se-pyroflux", amount = 10},
|
||||||
},
|
},
|
||||||
enabled = false,
|
enabled = false,
|
||||||
|
|
@ -82,7 +82,7 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then
|
||||||
},
|
},
|
||||||
energy_required = 60,
|
energy_required = 60,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{name = mods.Krastorio2 and "enriched-tungsten" or "tungsten-ore", amount = 24},
|
{type="item", name = mods.Krastorio2 and "enriched-tungsten" or "tungsten-ore", amount = 24},
|
||||||
{type = "fluid", name = "se-pyroflux", amount = 10},
|
{type = "fluid", name = "se-pyroflux", amount = 10},
|
||||||
},
|
},
|
||||||
enabled = false,
|
enabled = false,
|
||||||
|
|
@ -94,7 +94,7 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "tungsten-ingot",
|
name = "tungsten-ingot",
|
||||||
category = "casting",
|
category = "casting",
|
||||||
results = {{"tungsten-ingot", 1}},
|
results = {{type="item", name="tungsten-ingot", amount=1}},
|
||||||
energy_required = 18,
|
energy_required = 18,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
util.me.sinter() and {type = "item", name = "tungsten-powder", amount = 15} or
|
util.me.sinter() and {type = "item", name = "tungsten-powder", amount = 15} or
|
||||||
|
|
@ -109,17 +109,16 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then
|
||||||
name = "tungsten-carbide-casting",
|
name = "tungsten-carbide-casting",
|
||||||
category = "casting",
|
category = "casting",
|
||||||
icons = {
|
icons = {
|
||||||
{icon = "__bztungsten__/graphics/icons/tungsten-carbide.png", icon_size = 128},
|
{icon = "__bztungsten2__/graphics/icons/tungsten-carbide.png", icon_size = 128},
|
||||||
util.me.sinter() and
|
util.me.sinter() and
|
||||||
{icon = "__bztungsten__/graphics/icons/tungsten-powder.png", icon_size = 64, scale = 0.25, shift = {-8, -8}} or
|
{icon = "__bztungsten2__/graphics/icons/tungsten-powder.png", icon_size = 64, scale = 0.25, shift = {-8, -8}} or
|
||||||
{icon = "__bztungsten__/graphics/icons/molten-tungsten.png", icon_size = 128, scale = 0.125, shift = {-8, -8}},
|
{icon = "__bztungsten2__/graphics/icons/molten-tungsten.png", icon_size = 128, scale = 0.125, shift = {-8, -8}},
|
||||||
},
|
},
|
||||||
results = {{"tungsten-carbide", 4}},
|
results = {{type="item", name="tungsten-carbide", amount=4}},
|
||||||
energy_required = 40,
|
energy_required = 40,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
data.raw.item["coke"] and {"coke", 8} or {"coal", 16},
|
data.raw.item["kr-coke"] and {type="item", name="kr-coke", amount=8} or {type="item", name="coal", amount=16},
|
||||||
util.me.sinter() and {type = "item", name = "tungsten-powder", amount = 15} or
|
util.me.sinter() and {type = "item", name = "tungsten-powder", amount = 15} or {type = "fluid", name = "molten-tungsten", amount = 375},
|
||||||
{type = "fluid", name = "molten-tungsten", amount = 375},
|
|
||||||
},
|
},
|
||||||
enabled = false,
|
enabled = false,
|
||||||
always_show_made_in = true,
|
always_show_made_in = true,
|
||||||
|
|
@ -130,15 +129,15 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then
|
||||||
category = "crafting",
|
category = "crafting",
|
||||||
name = "tungsten-ingot-to-plate",
|
name = "tungsten-ingot-to-plate",
|
||||||
icons = {
|
icons = {
|
||||||
{icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128},
|
{icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128},
|
||||||
{icon = "__bztungsten__/graphics/icons/tungsten-ingot.png", icon_size = 128, scale = 0.125, shift = {-8, -8}},
|
{icon = "__bztungsten2__/graphics/icons/tungsten-ingot.png", icon_size = 128, scale = 0.125, shift = {-8, -8}},
|
||||||
},
|
},
|
||||||
results = {
|
results = {
|
||||||
{name = "tungsten-plate", amount = 10},
|
{type="item", name = "tungsten-plate", amount = 10},
|
||||||
},
|
},
|
||||||
energy_required = 5,
|
energy_required = 5,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{name = "tungsten-ingot", amount = 1}
|
{type="item", name = "tungsten-ingot", amount = 1}
|
||||||
},
|
},
|
||||||
enabled = false,
|
enabled = false,
|
||||||
always_show_made_in = true,
|
always_show_made_in = true,
|
||||||
|
|
@ -178,15 +177,15 @@ else
|
||||||
always_show_made_in = true,
|
always_show_made_in = true,
|
||||||
allow_as_intermediate = false,
|
allow_as_intermediate = false,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{name = "enriched-tungsten", amount = 8},
|
{type="item", name = "enriched-tungsten", amount = 8},
|
||||||
{name = "se-vulcanite-block", amount = 1},
|
{type="item", name = "se-vulcanite-block", amount = 1},
|
||||||
},
|
},
|
||||||
results = {
|
results = {
|
||||||
{name = util.me.tungsten_plate, amount = 8},
|
{type="item", name = util.me.tungsten_plate, amount = 8},
|
||||||
},
|
},
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
{ icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3 },
|
{ icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3 },
|
||||||
{ icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
|
{ icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -207,15 +206,15 @@ else
|
||||||
always_show_made_in = true,
|
always_show_made_in = true,
|
||||||
allow_as_intermediate = false,
|
allow_as_intermediate = false,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{name = "tungsten-ore", amount = 16},
|
{type="item", name = "tungsten-ore", amount = 16},
|
||||||
{name = "se-vulcanite-block", amount = 1},
|
{type="item", name = "se-vulcanite-block", amount = 1},
|
||||||
},
|
},
|
||||||
results = {
|
results = {
|
||||||
{name = util.me.tungsten_plate, amount = 12},
|
{type="item", name = util.me.tungsten_plate, amount = 12},
|
||||||
},
|
},
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
{ icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3,},
|
{ icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3,},
|
||||||
{ icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
|
{ icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -225,7 +224,7 @@ else
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if mods["aai-industry"] and not mods["Krastorio2"] and not mods.bzfoundry then
|
if mods["aai-industry"] and not mods["Krastorio2"] and not mods.bzfoundry2 then
|
||||||
data:extend({
|
data:extend({
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
|
|
@ -234,22 +233,13 @@ if mods["aai-industry"] and not mods["Krastorio2"] and not mods.bzfoundry then
|
||||||
order = "z[tungsten-carbide]",
|
order = "z[tungsten-carbide]",
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
{ icon = "__bztungsten__/graphics/icons/tungsten-carbide.png", icon_size = 128 },
|
{ icon = "__bztungsten2__/graphics/icons/tungsten-carbide.png", icon_size = 128 },
|
||||||
{ icon = "__base__/graphics/icons/coal.png", icon_size = 64, icon_mipmaps=4, scale=0.25, shift= {-10, -10}},
|
{ icon = "__base__/graphics/icons/coal.png", icon_size = 64, icon_mipmaps=4, scale=0.25, shift= {-10, -10}},
|
||||||
},
|
},
|
||||||
normal = {
|
enabled = false,
|
||||||
enabled = false,
|
energy_required = 50,
|
||||||
energy_required = 50,
|
ingredients = {{type="item", name="tungsten-plate", amount=4}, {type="item", name="coal", amount=1}},
|
||||||
ingredients = {{"tungsten-plate", 4}, {"coal", 1}},
|
results = {{type="item", name="tungsten-carbide", amount=2}},
|
||||||
result = "tungsten-carbide",
|
|
||||||
result_count = 2,
|
|
||||||
},
|
|
||||||
expensive = {
|
|
||||||
enabled = false,
|
|
||||||
energy_required = 50,
|
|
||||||
ingredients = {{"tungsten-plate", 4}, {"coal", 1}},
|
|
||||||
result = "tungsten-carbide",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
util.add_effect(util.me.tungsten_processing, {type = "unlock-recipe", recipe= "tungsten-carbide-coal"})
|
util.add_effect(util.me.tungsten_processing, {type = "unlock-recipe", recipe= "tungsten-carbide-coal"})
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local util = require("__bztungsten__.data-util");
|
local util = require("data-util");
|
||||||
|
|
||||||
local cuw = "tungsten-plate"
|
local cuw = "tungsten-plate"
|
||||||
if util.me.cuw() then cuw = "cuw" end
|
if util.me.cuw() then cuw = "cuw" end
|
||||||
|
|
@ -22,7 +22,7 @@ util.replace_ingredient("cannon-shell", "copper-plate", "tungsten-plate")
|
||||||
|
|
||||||
-- Tooling
|
-- Tooling
|
||||||
util.add_prerequisite("automation-2", util.me.tungsten_processing)
|
util.add_prerequisite("automation-2", util.me.tungsten_processing)
|
||||||
if mods.bzaluminum or mods.bzcarbon or mods.bzgas then
|
if mods.bzaluminum2 or mods.bzcarbon or mods.bzgas2 then
|
||||||
util.replace_ingredient("assembling-machine-2", "steel-plate", "tungsten-carbide")
|
util.replace_ingredient("assembling-machine-2", "steel-plate", "tungsten-carbide")
|
||||||
else
|
else
|
||||||
util.replace_some_ingredient("assembling-machine-2", "steel-plate", 1, "tungsten-carbide", 1)
|
util.replace_some_ingredient("assembling-machine-2", "steel-plate", 1, "tungsten-carbide", 1)
|
||||||
|
|
@ -30,7 +30,8 @@ end
|
||||||
util.add_ingredient("assembling-machine-3", "tungsten-carbide", 4)
|
util.add_ingredient("assembling-machine-3", "tungsten-carbide", 4)
|
||||||
util.add_ingredient("electric-furnace", "tungsten-carbide", 1)
|
util.add_ingredient("electric-furnace", "tungsten-carbide", 1)
|
||||||
|
|
||||||
if not mods.MoreScience or data.raw["assembling-machine"]["basic-chemical-plant"] then
|
if (not mods.MoreScience or data.raw["assembling-machine"]["basic-chemical-plant"])
|
||||||
|
and (not (mods.omnimatter and mods.Krastorio2)) then
|
||||||
util.add_ingredient("chemical-plant", "tungsten-carbide", 2)
|
util.add_ingredient("chemical-plant", "tungsten-carbide", 2)
|
||||||
util.add_ingredient("chemical-plant", cuw, 5)
|
util.add_ingredient("chemical-plant", cuw, 5)
|
||||||
end
|
end
|
||||||
|
|
@ -101,13 +102,14 @@ util.add_ingredient("deadlock-floor-lamp", "tungsten-plate", 2)
|
||||||
|
|
||||||
---- K2
|
---- K2
|
||||||
if mods["Krastorio2"] then
|
if mods["Krastorio2"] then
|
||||||
util.set_tech_recipe("engine", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
util.set_tech_recipe("engine", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
||||||
util.set_tech_recipe("fluid-handling", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
util.set_tech_recipe("fluid-handling", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
||||||
util.set_tech_recipe("optics", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
util.set_tech_recipe("optics", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
||||||
util.set_tech_recipe("oil-processing", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
-- TODO: Fix
|
||||||
util.set_tech_recipe("plastics", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
--util.set_tech_recipe("oil-processing", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
||||||
|
util.set_tech_recipe("plastics", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
||||||
if util.me.get_setting("bztungsten-avoid-military") == "yes" then
|
if util.me.get_setting("bztungsten-avoid-military") == "yes" then
|
||||||
util.set_tech_recipe("rocketry", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
util.set_tech_recipe("rocketry", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
||||||
end
|
end
|
||||||
util.remove_prerequisite("kr-sentinel", "optics")
|
util.remove_prerequisite("kr-sentinel", "optics")
|
||||||
|
|
||||||
|
|
@ -121,7 +123,7 @@ if mods["Krastorio2"] then
|
||||||
-- Heat related
|
-- Heat related
|
||||||
util.add_ingredient("kr-fusion-reactor", cuw, 350)
|
util.add_ingredient("kr-fusion-reactor", cuw, 350)
|
||||||
util.add_ingredient("energy-control-unit", cuw, 3)
|
util.add_ingredient("energy-control-unit", cuw, 3)
|
||||||
util.replace_some_ingredient("kr-advanced-furnace", "rare-metals", 40, cuw, 40)
|
util.replace_some_ingredient("kr-advanced-furnace", "kr-rare-metals", 40, cuw, 40)
|
||||||
|
|
||||||
-- Other
|
-- Other
|
||||||
if mods.bzzirconium then
|
if mods.bzzirconium then
|
||||||
|
|
@ -144,7 +146,7 @@ if mods["Krastorio2"] then
|
||||||
-- Tooling
|
-- Tooling
|
||||||
util.add_ingredient("kr-electric-mining-drill-mk2", "tungsten-carbide", 5)
|
util.add_ingredient("kr-electric-mining-drill-mk2", "tungsten-carbide", 5)
|
||||||
util.add_ingredient("kr-quarry-drill", "tungsten-carbide", 20)
|
util.add_ingredient("kr-quarry-drill", "tungsten-carbide", 20)
|
||||||
util.replace_some_ingredient("kr-advanced-chemical-plant", "rare-metals", 40, "tungsten-carbide", 20)
|
util.replace_some_ingredient("kr-advanced-chemical-plant", "kr-rare-metals", 40, "tungsten-carbide", 20)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -11,20 +11,20 @@ data:extend({
|
||||||
{
|
{
|
||||||
type = "item",
|
type = "item",
|
||||||
name = "tungsten-carbide",
|
name = "tungsten-carbide",
|
||||||
icon = "__bztungsten__/graphics/icons/tungsten-carbide.png",
|
icon = "__bztungsten2__/graphics/icons/tungsten-carbide.png",
|
||||||
icon_size = 128,
|
icon_size = 128,
|
||||||
subgroup = "raw-material",
|
subgroup = "raw-material",
|
||||||
order = "z[tungsten-carbide]",
|
order = "z[tungsten-carbide]",
|
||||||
stack_size = util.get_stack_size(100)
|
stack_size = 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "item",
|
type = "item",
|
||||||
name = util.me.tungsten_plate,
|
name = util.me.tungsten_plate,
|
||||||
icon = "__bztungsten__/graphics/icons/tungsten-plate.png",
|
icon = "__bztungsten2__/graphics/icons/tungsten-plate.png",
|
||||||
icon_size = 128, icon_mipmaps = 3,
|
icon_size = 128, icon_mipmaps = 3,
|
||||||
subgroup = "raw-material",
|
subgroup = "raw-material",
|
||||||
order = "b[tungsten-plate]",
|
order = "b[tungsten-plate]",
|
||||||
stack_size = util.get_stack_size(100)
|
stack_size = 100
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
@ -33,46 +33,22 @@ data:extend({
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = util.me.tungsten_plate,
|
name = util.me.tungsten_plate,
|
||||||
main_product = util.me.tungsten_plate,
|
--main_product = util.me.tungsten_plate,
|
||||||
category = "smelting",
|
category = "smelting",
|
||||||
order = "d[tungsten-plate]",
|
order = "d[tungsten-plate]",
|
||||||
icons = (mods["Krastorio2"] and {
|
icons = (mods["Krastorio2"] and {
|
||||||
{ icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3, },
|
{ icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3, },
|
||||||
{ icon = "__bztungsten__/graphics/icons/tungsten-ore.png", icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-8, -8}},
|
{ icon = "__bztungsten2__/graphics/icons/tungsten-ore.png", icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-8, -8}},
|
||||||
} or mods.bobplates and {
|
} or mods.bobplates and {
|
||||||
{ icon = "__bobplates__/graphics/icons/plate/tungsten-plate.png", icon_size = 32},
|
{ icon = "__bobplates__/graphics/icons/plate/tungsten-plate.png", icon_size = 32},
|
||||||
} or
|
} or
|
||||||
{
|
{
|
||||||
{ icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128},
|
{ icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128},
|
||||||
}),
|
|
||||||
normal = (mods["Krastorio2"] and
|
|
||||||
{
|
|
||||||
enabled = false,
|
|
||||||
energy_required = 24,
|
|
||||||
ingredients = {{"tungsten-ore", 15}},
|
|
||||||
result = util.me.tungsten_plate,
|
|
||||||
result_count = 5,
|
|
||||||
} or
|
|
||||||
{
|
|
||||||
enabled = false,
|
|
||||||
energy_required = 32/15,
|
|
||||||
ingredients = {{"tungsten-ore", mods.bobplates and 4 or 2}},
|
|
||||||
result = util.me.tungsten_plate,
|
|
||||||
}),
|
|
||||||
expensive = (mods["Krastorio2"] and
|
|
||||||
{
|
|
||||||
enabled = false,
|
|
||||||
energy_required = 32,
|
|
||||||
ingredients = {{"tungsten-ore", 20}},
|
|
||||||
result = util.me.tungsten_plate,
|
|
||||||
result_count = 5,
|
|
||||||
} or
|
|
||||||
{
|
|
||||||
enabled = false,
|
|
||||||
energy_required = 48/15,
|
|
||||||
ingredients = {{"tungsten-ore", mods.bobplates and 6 or 3}},
|
|
||||||
result = util.me.tungsten_plate,
|
|
||||||
}),
|
}),
|
||||||
|
enabled = false,
|
||||||
|
energy_required = mods["Krastorio2"] and 24 or 32/15,
|
||||||
|
ingredients = {{type="item", name="tungsten-ore", amount=mods["Krastorio2"] and 15 or (mods.bobplates and 4 or 2)}},
|
||||||
|
results = {{type="item", name=util.me.tungsten_plate, amount=mods["Krastorio2"] and 5 or 1}}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "technology",
|
type = "technology",
|
||||||
|
|
@ -80,7 +56,7 @@ data:extend({
|
||||||
icons = {{ icon =
|
icons = {{ icon =
|
||||||
mods.bobplates
|
mods.bobplates
|
||||||
and "__bobplates__/graphics/icons/technology/tungsten-processing.png"
|
and "__bobplates__/graphics/icons/technology/tungsten-processing.png"
|
||||||
or "__bztungsten__/graphics/technology/tungsten-processing.png",
|
or "__bztungsten2__/graphics/technology/tungsten-processing.png",
|
||||||
icon_size = mods.bobplates and 64 or 256,
|
icon_size = mods.bobplates and 64 or 256,
|
||||||
}},
|
}},
|
||||||
effects =
|
effects =
|
||||||
|
|
@ -114,28 +90,14 @@ data:extend({
|
||||||
mods["TheBigFurnace"] and {
|
mods["TheBigFurnace"] and {
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "big-tungsten-plate",
|
name = "big-tungsten-plate",
|
||||||
icons = { { icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128 }, },
|
icons = { { icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128 }, },
|
||||||
subgroup = "raw-material",
|
subgroup = "raw-material",
|
||||||
category = "big-smelting",
|
category = "big-smelting",
|
||||||
order = "d[tungsten-plate]",
|
order = "d[tungsten-plate]",
|
||||||
normal =
|
enabled = false,
|
||||||
{
|
energy_required = 6, --TODO
|
||||||
enabled = false,
|
ingredients = {{type="item", name="tungsten-ore", amount=100}},
|
||||||
energy_required = 6, --TODO
|
results = {{type="item", name = util.me.tungsten_plate, amount=50}}
|
||||||
ingredients = {{"tungsten-ore", 100}},
|
|
||||||
results = {
|
|
||||||
{type="item", name = util.me.tungsten_plate, amount=50},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
expensive =
|
|
||||||
{
|
|
||||||
enabled = false,
|
|
||||||
energy_required = 15, --TODO
|
|
||||||
ingredients = {{"tungsten-ore", 99}},
|
|
||||||
results = {
|
|
||||||
{type="item", name = util.me.tungsten_plate, amount=33},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} or nil,
|
} or nil,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -174,40 +136,17 @@ data:extend({
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = util.me.tungsten_carbide_recipe,
|
name = util.me.tungsten_carbide_recipe,
|
||||||
main_product = util.me.tungsten_carbide_recipe,
|
--main_product = util.me.tungsten_carbide_recipe,
|
||||||
category = (mods["Krastorio2"] and "smelting" or "smelting-carbon"),
|
category = (mods["Krastorio2"] and "smelting" or "smelting-carbon"),
|
||||||
order = "z[tungsten-carbide]",
|
order = "z[tungsten-carbide]",
|
||||||
icons = { mods.bobplates and
|
icons = { mods.bobplates and
|
||||||
{ icon = "__bobplates__/graphics/icons/plate/tungsten-carbide-plate.png", icon_size = 64}
|
{ icon = "__bobplates__/graphics/icons/plate/tungsten-carbide-plate.png", icon_size = 64}
|
||||||
or { icon = "__bztungsten__/graphics/icons/tungsten-carbide.png", icon_size = 128}
|
or { icon = "__bztungsten2__/graphics/icons/tungsten-carbide.png", icon_size = 128}
|
||||||
},
|
},
|
||||||
normal = (mods["Krastorio2"] and
|
enabled = false,
|
||||||
{
|
energy_required = mods["Krastorio2"] and 48 or 64/3,
|
||||||
enabled = false,
|
ingredients = {{type="item", name="tungsten-plate", amount=mods["Krastorio2"] and 10 or 5}, mods["Krastorio2"] and {type="item", name="kr-coke", amount=5} or nil},
|
||||||
energy_required = 48,
|
results = {{type="item", name="tungsten-carbide", amount=mods["Krastorio2"] and 4 or 2}}
|
||||||
ingredients = {{"tungsten-plate", 10}, {"coke", 5}},
|
|
||||||
result = "tungsten-carbide",
|
|
||||||
result_count = 4,
|
|
||||||
} or {
|
|
||||||
enabled = false,
|
|
||||||
energy_required = 64/3,
|
|
||||||
ingredients = {{"tungsten-plate", 5}},
|
|
||||||
result = "tungsten-carbide",
|
|
||||||
result_count = 2,
|
|
||||||
}),
|
|
||||||
expensive = (mods["Krastorio2"] and
|
|
||||||
{
|
|
||||||
enabled = false,
|
|
||||||
energy_required = 48,
|
|
||||||
ingredients = {{"tungsten-plate", 10}, {"coke", 5}},
|
|
||||||
result = "tungsten-carbide",
|
|
||||||
result_count = 2,
|
|
||||||
} or {
|
|
||||||
enabled = false,
|
|
||||||
energy_required = 64/3,
|
|
||||||
ingredients = {{"tungsten-plate", 5}},
|
|
||||||
result = "tungsten-carbide",
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -215,11 +154,11 @@ data:extend({
|
||||||
{
|
{
|
||||||
type = "item",
|
type = "item",
|
||||||
name = "rocket-engine-nozzle",
|
name = "rocket-engine-nozzle",
|
||||||
icon = "__bztungsten__/graphics/icons/rocket-engine-nozzle.png",
|
icon = "__bztungsten2__/graphics/icons/rocket-engine-nozzle.png",
|
||||||
icon_size = 128,
|
icon_size = 128,
|
||||||
subgroup = "intermediate-product",
|
subgroup = "intermediate-product",
|
||||||
order = "z[rocket-engine-nozzle]",
|
order = "z[rocket-engine-nozzle]",
|
||||||
stack_size = util.get_stack_size(100)
|
stack_size = 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
|
|
@ -228,12 +167,12 @@ data:extend({
|
||||||
subgroup = "intermediate-product",
|
subgroup = "intermediate-product",
|
||||||
order = "z[rocket-engine-nozzle]",
|
order = "z[rocket-engine-nozzle]",
|
||||||
icons = {
|
icons = {
|
||||||
{ icon = "__bztungsten__/graphics/icons/rocket-engine-nozzle.png", icon_size = 128}
|
{ icon = "__bztungsten2__/graphics/icons/rocket-engine-nozzle.png", icon_size = 128}
|
||||||
},
|
},
|
||||||
enabled = false,
|
enabled = false,
|
||||||
energy_required = 5,
|
energy_required = 5,
|
||||||
ingredients = {{"tungsten-plate", 2}},
|
ingredients = {{type="item", name="tungsten-plate", amount=2}},
|
||||||
results = {{"rocket-engine-nozzle", 1}},
|
results = {{type="item", name="rocket-engine-nozzle", amount=1}},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -242,11 +181,11 @@ if util.me.cuw() then
|
||||||
{
|
{
|
||||||
type = "item",
|
type = "item",
|
||||||
name = "cuw",
|
name = "cuw",
|
||||||
icon = "__bztungsten__/graphics/icons/cuw.png",
|
icon = "__bztungsten2__/graphics/icons/cuw.png",
|
||||||
icon_size = 128,
|
icon_size = 128,
|
||||||
subgroup = "raw-material",
|
subgroup = "raw-material",
|
||||||
order = "z[cuw]",
|
order = "z[cuw]",
|
||||||
stack_size = util.get_stack_size(100),
|
stack_size = 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
|
|
@ -256,10 +195,10 @@ if util.me.cuw() then
|
||||||
enabled = false,
|
enabled = false,
|
||||||
energy_required = 80,
|
energy_required = 80,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{"tungsten-plate", 15},
|
{type="item", name="tungsten-plate", amount=15},
|
||||||
{"copper-plate", 5},
|
{type="item", name="copper-plate", amount=5},
|
||||||
},
|
},
|
||||||
results = {{"cuw", 20}},
|
results = {{type="item", name="cuw", amount=20}},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
util.add_unlock(util.me.tungsten_processing, "cuw")
|
util.add_unlock(util.me.tungsten_processing, "cuw")
|
||||||
|
|
@ -279,8 +218,8 @@ data:extend({
|
||||||
category = "double-smelting-carbon",
|
category = "double-smelting-carbon",
|
||||||
enabled = false,
|
enabled = false,
|
||||||
energy_required = 32/3,
|
energy_required = 32/3,
|
||||||
ingredients = {{"tungsten-ore", 5}},
|
ingredients = {{type="item", name="tungsten-ore", amount=5}},
|
||||||
results = {{"tungsten-carbide", 1}},
|
results = {{type="item", name="tungsten-carbide", amount=1}},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
util.add_effect(util.me.tungsten_processing, {type = "unlock-recipe", recipe = "double-tungsten"})
|
util.add_effect(util.me.tungsten_processing, {type = "unlock-recipe", recipe = "double-tungsten"})
|
||||||
|
|
@ -11,13 +11,13 @@
|
||||||
if (not mods["bobplates"] and not mods["angelssmelting"]) then
|
if (not mods["bobplates"] and not mods["angelssmelting"]) then
|
||||||
data.raw["utility-constants"]["default"].main_menu_simulations["tungsten-nozzle"] = {
|
data.raw["utility-constants"]["default"].main_menu_simulations["tungsten-nozzle"] = {
|
||||||
checkboard = false,
|
checkboard = false,
|
||||||
save = "__bztungsten__/menu-simulations/tungsten-nozzle-sim.zip", length = 15*60,
|
save = "__bztungsten2__/menu-simulations/tungsten-nozzle-sim.zip", length = 15*60,
|
||||||
init =
|
init =
|
||||||
[[
|
[[
|
||||||
local logo = game.surfaces.nauvis.find_entities_filtered{
|
local logo = game.surfaces.nauvis.find_entities_filtered{
|
||||||
name = "factorio-logo-11tiles", limit = 1}[1]
|
name = "factorio-logo-11tiles", limit = 1}[1]
|
||||||
game.camera_position = {logo.position.x, logo.position.y+8}
|
game.simulation.camera_position = {logo.position.x, logo.position.y+8}
|
||||||
game.camera_zoom = 1.5
|
game.simulation.camera_zoom = 1.5
|
||||||
game.tick_paused = false
|
game.tick_paused = false
|
||||||
game.surfaces.nauvis.daytime = 1
|
game.surfaces.nauvis.daytime = 1
|
||||||
]],
|
]],
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
local me = require("me")
|
|
||||||
|
|
||||||
local util = {}
|
|
||||||
util.me = me
|
|
||||||
|
|
||||||
function decode(data)
|
|
||||||
if type(data) == "string" then return data end
|
|
||||||
local str = {}
|
|
||||||
for i = 2, #data do
|
|
||||||
str[i-1] = decode(data[i])
|
|
||||||
end
|
|
||||||
return table.concat(str, "")
|
|
||||||
end
|
|
||||||
|
|
||||||
function util.get_list()
|
|
||||||
local p = game.item_prototypes[me.name.."-list"]
|
|
||||||
if p then
|
|
||||||
data = p.localised_description
|
|
||||||
return decode(data)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function util.force_enable_recipe(event, recipe_name)
|
|
||||||
if game.players[event.player_index].force.recipes[recipe_name] then
|
|
||||||
game.players[event.player_index].force.recipes[recipe_name].enabled=true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return util
|
|
||||||
|
Before Width: | Height: | Size: 608 KiB |
|
Before Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 342 B |
|
Before Width: | Height: | Size: 310 B |
|
Before Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 148 B |
|
Before Width: | Height: | Size: 127 B |
|
Before Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 122 B |
17
modules.lua
|
|
@ -1,17 +0,0 @@
|
||||||
-- Enable prod modules for all tungsten plate and ore recipes
|
|
||||||
local util = require("data-util");
|
|
||||||
|
|
||||||
|
|
||||||
for i, recipe in pairs(util.me.recipes) do
|
|
||||||
if data.raw.recipe[recipe] then
|
|
||||||
for j, module in pairs(data.raw.module) do
|
|
||||||
if module.effect then
|
|
||||||
for effect_name, effect in pairs(module.effect) do
|
|
||||||
if effect_name == "productivity" and effect.bonus > 0 and module.limitation and #module.limitation > 0 then
|
|
||||||
table.insert(module.limitation, recipe)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||