diff --git a/changelog.txt b/changelog.txt index fcd94d4..229889e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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: diff --git a/info.json b/info.json index 0321fed..50153c4 100644 --- a/info.json +++ b/info.json @@ -1,5 +1,5 @@ { "name": "bztungsten", - "version": "0.5.5", + "version": "0.5.6", "factorio_version": "1.1", "title": "Tungsten", "author": "Brevven", diff --git a/locale/en/tungsten.cfg b/locale/en/tungsten.cfg index b419df5..e289b9c 100644 --- a/locale/en/tungsten.cfg +++ b/locale/en/tungsten.cfg @@ -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. diff --git a/me.lua b/me.lua index cbb871b..f3ea2e3 100644 --- a/me.lua +++ b/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") diff --git a/settings.lua b/settings.lua index 65fa88a..3f14b19 100644 --- a/settings.lua +++ b/settings.lua @@ -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", diff --git a/tungsten-ore.lua b/tungsten-ore.lua index 9d15ea7..be40d51 100644 --- a/tungsten-ore.lua +++ b/tungsten-ore.lua @@ -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)