fluid amount setting
This commit is contained in:
parent
ebd7cc7303
commit
ed662ac656
4 changed files with 30 additions and 1 deletions
|
|
@ -17,6 +17,15 @@ function util.fe_plus(sub)
|
|||
end
|
||||
end
|
||||
|
||||
function util.fluid_amount()
|
||||
if mods["Krastorio2"] then
|
||||
local amt = util.get_setting("bztungsten-mining-fluid-amount-k2")
|
||||
return amt and amt or 1
|
||||
end
|
||||
local amt = util.get_setting("bztungsten-mining-fluid-amount")
|
||||
return amt and amt or 10
|
||||
end
|
||||
|
||||
|
||||
function util.get_setting(name)
|
||||
if settings.startup[name] == nil then
|
||||
|
|
|
|||
|
|
@ -53,8 +53,12 @@ dirty-water-filtration-tungsten=Filter dirty water, giving wolframite [item=tung
|
|||
bztungsten-recipe-bypass=Bypass recipes
|
||||
bztungsten-avoid-military=Avoid military science pack
|
||||
bztungsten-advanced-carbon-furnace=Enable the advanced carbon furnace
|
||||
bztungsten-mining-fluid-amount=Mining fluid amount
|
||||
bztungsten-mining-fluid-amount-k2=Mining fluid amount for Krastorio2
|
||||
|
||||
[mod-setting-description]
|
||||
bztungsten-recipe-bypass=Skip modifying these recipes (comma-separated list).
|
||||
bztungsten-avoid-military=If 'yes', rocketry will no longer require military science.
|
||||
bztungsten-advanced-carbon-furnace=A furnace to smelt tungsten carbide quickly. Meant only for very large factories.
|
||||
bztungsten-mining-fluid-amount=Amount of fluid (water) needed to mine, default 10. Note, this is displayed as 1/10th the value in some parts of the game.
|
||||
bztungsten-mining-fluid-amount-k2=Mining fluid amount for Krastorio2, default 1. Note, this is displayed as 1/10th the value in some parts of the game.
|
||||
|
|
|
|||
16
settings.lua
16
settings.lua
|
|
@ -20,4 +20,20 @@ data:extend({
|
|||
default_value = "no",
|
||||
allowed_values = {"yes", "no"},
|
||||
},
|
||||
mods["Krastorio2"] and
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "bztungsten-mining-fluid-amount-k2",
|
||||
setting_type = "startup",
|
||||
default_value = 1,
|
||||
minimum_value = 1,
|
||||
maximum_value = 1000,
|
||||
} or {
|
||||
type = "int-setting",
|
||||
name = "bztungsten-mining-fluid-amount",
|
||||
setting_type = "startup",
|
||||
default_value = 10,
|
||||
minimum_value = 1,
|
||||
maximum_value = 1000,
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ data:extend({
|
|||
hardness = 1,
|
||||
mining_particle = "tungsten-ore-particle",
|
||||
mining_time = 2,
|
||||
fluid_amount=(mods["Krastorio2"] and 1 or 10),
|
||||
fluid_amount = util.fluid_amount(),
|
||||
required_fluid=(mods["Krastorio2"] and "mineral-water" or "water"),
|
||||
result = "tungsten-ore"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue