starting patch setting
This commit is contained in:
parent
35c9487ae6
commit
f64b9a0398
6 changed files with 25 additions and 5 deletions
|
|
@ -1,4 +1,9 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.5.6
|
||||
Date: 2022-02-09
|
||||
Features:
|
||||
- New setting to enable starting Wolframite in vanilla. (K2 still has by default)
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.5.5
|
||||
Date: 2022-02-02
|
||||
Changes:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{ "name": "bztungsten",
|
||||
"version": "0.5.5",
|
||||
"version": "0.5.6",
|
||||
"factorio_version": "1.1",
|
||||
"title": "Tungsten",
|
||||
"author": "Brevven",
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ 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
|
||||
bztungsten-starting-patch=Starting wolframite patch
|
||||
|
||||
[mod-setting-description]
|
||||
bztungsten-recipe-bypass=Skip modifying these recipes (comma-separated list).
|
||||
|
|
@ -62,3 +63,4 @@ bztungsten-avoid-military=If 'yes', rocketry will no longer require military sci
|
|||
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.
|
||||
bztungsten-starting-patch=Whether a new game should have a starting wolframite patch. Disabled by default in vanilla, AAI, etc.
|
||||
|
|
|
|||
4
me.lua
4
me.lua
|
|
@ -11,6 +11,10 @@ if mods.bobplates then
|
|||
me.tungsten_carbide_recipe = "bz-tungsten-carbide"
|
||||
end
|
||||
|
||||
function me.starting_patch()
|
||||
return mods["Krastorio2"] or me.get_setting("bztungsten-starting-patch")
|
||||
end
|
||||
|
||||
function me.fluid_amount()
|
||||
if mods["Krastorio2"] then
|
||||
local amt = me.get_setting("bztungsten-mining-fluid-amount-k2")
|
||||
|
|
|
|||
|
|
@ -21,6 +21,14 @@ data:extend({
|
|||
allowed_values = {"yes", "no"},
|
||||
hidden = not not (mods.Krastorio2 or mods.bzfoundry),
|
||||
},
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "bztungsten-starting-patch",
|
||||
setting_type = "startup",
|
||||
default_value = false,
|
||||
allowed_values = {"yes", "no"},
|
||||
hidden = not not mods.Krastorio2,
|
||||
},
|
||||
mods["Krastorio2"] and
|
||||
{
|
||||
type = "int-setting",
|
||||
|
|
|
|||
|
|
@ -39,8 +39,9 @@ data:extend({
|
|||
name = "tungsten-ore",
|
||||
order = "b-z",
|
||||
base_density = 4,
|
||||
has_starting_area_placement = mods["Krastorio2"] and true,
|
||||
regular_rq_factor_multiplier = 1.2
|
||||
has_starting_area_placement = util.me.starting_patch() and true,
|
||||
regular_rq_factor_multiplier = 1.2,
|
||||
starting_rq_factor_multiplier = 1.0,
|
||||
},
|
||||
|
||||
stage_counts = {15000, 9500, 5500, 2900, 1300, 400, 150, 80},
|
||||
|
|
@ -82,11 +83,11 @@ data:extend({
|
|||
},
|
||||
})
|
||||
|
||||
-- Wolframite becomes 20% richer past 1000 tiles, 60% richer past 10000 tiles. Very close to start, it's 50% less rich
|
||||
-- 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
|
||||
data.raw.resource["tungsten-ore"].autoplace.richness_expression =
|
||||
richness * noise.if_else_chain(
|
||||
noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(100)), 0.5,
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue