allow some choice of mining fluid
This commit is contained in:
parent
2229c44448
commit
9a9641b85c
6 changed files with 47 additions and 2 deletions
|
|
@ -1,4 +1,9 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.5.3
|
||||||
|
Date: 2020-09-20
|
||||||
|
Settings:
|
||||||
|
- Allow some choice of mining fluid.
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.5.2
|
Version: 0.5.2
|
||||||
Date: 2020-09-20
|
Date: 2020-09-20
|
||||||
Features:
|
Features:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bztitanium",
|
"name": "bztitanium",
|
||||||
"version": "0.5.2",
|
"version": "0.5.3",
|
||||||
"factorio_version": "1.0",
|
"factorio_version": "1.0",
|
||||||
"title": "Titanium",
|
"title": "Titanium",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
|
|
|
||||||
|
|
@ -24,3 +24,16 @@ enriched-titanium=Enrich titanium to efficiently produce titanium plates
|
||||||
[recipe-name]
|
[recipe-name]
|
||||||
enriched-titanium=__ITEM__enriched-titanium__
|
enriched-titanium=__ITEM__enriched-titanium__
|
||||||
dirty-water-filtration-titanium=Filter dirty water [item=titanium-ore]
|
dirty-water-filtration-titanium=Filter dirty water [item=titanium-ore]
|
||||||
|
|
||||||
|
|
||||||
|
# Settings
|
||||||
|
|
||||||
|
[mod-setting-name]
|
||||||
|
bztitanium-mining-fluid=Experimental: Titanium mining fluid
|
||||||
|
|
||||||
|
[mod-setting-description]
|
||||||
|
tbzitanium-mining-fluid=Choose which fluid to use when mining Titanium.\n[color=orange]Lubricant is recommended![/color]\n[color=red]This setting is experimental and might not be compatible.[/color]
|
||||||
|
[string-mod-setting]
|
||||||
|
bztitanium-mining-fluid-lubricant=Lubricant
|
||||||
|
bztitanium-mining-fluid-sulfuric-acid=Sulfuric Acid
|
||||||
|
bztitanium-mining-fluid-chlorine=Chlorine
|
||||||
|
|
|
||||||
11
settings.lua
Normal file
11
settings.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
data:extend(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
type = "string-setting",
|
||||||
|
name = "bztitanium-mining-fluid",
|
||||||
|
setting_type = "startup",
|
||||||
|
default_value = "lubricant",
|
||||||
|
allowed_values = (mods["Krastorio2"] and {"lubricant", "sulfuric-acid", "chlorine"} or {"lubricant", "sulfuric-acid"}),
|
||||||
|
order = "a1",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
@ -27,7 +27,7 @@ data:extend(
|
||||||
mining_particle = "titanium-ore-particle",
|
mining_particle = "titanium-ore-particle",
|
||||||
mining_time = 2,
|
mining_time = 2,
|
||||||
fluid_amount=3,
|
fluid_amount=3,
|
||||||
required_fluid= "lubricant",
|
required_fluid=(settings.startup["bztitanium-mining-fluid"] and settings.startup["bztitanium-mining-fluid"].value or "lubricant"),
|
||||||
result = "titanium-ore"
|
result = "titanium-ore"
|
||||||
},
|
},
|
||||||
collision_box = {{ -0.1, -0.1}, {0.1, 0.1}},
|
collision_box = {{ -0.1, -0.1}, {0.1, 0.1}},
|
||||||
|
|
|
||||||
|
|
@ -78,4 +78,20 @@ if data.raw.item["memory-unit"] then
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Finalize tech tree based on settings and other dependent mods.
|
||||||
|
local mining_fluid
|
||||||
|
if settings.startup["bztitanium-mining-fluid"] then
|
||||||
|
mining_fluid = settings.startup["bztitanium-mining-fluid"].value
|
||||||
|
end
|
||||||
|
|
||||||
|
if mining_fluid == "chlorine" and data.raw.fluid["chlorine"] and mods["Krastorio2"] then
|
||||||
|
data.raw.technology["titanium-processing"].prerequisites = {"kr-fluids-chemistry"}
|
||||||
|
data.raw.technology["titanium-processing"].unit.ingredients = {
|
||||||
|
{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}
|
||||||
|
elseif mining_fluid == "sulfuric-acid" then
|
||||||
|
data.raw.technology["titanium-processing"].prerequisites = {"sulfur-processing"}
|
||||||
|
data.raw.technology["titanium-processing"].unit.ingredients = {
|
||||||
|
{"automation-science-pack", 1}, {"logistic-science-pack", 1}}
|
||||||
|
else
|
||||||
|
data.raw.technology["titanium-processing"].prerequisites = {"lubricant"}
|
||||||
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue