k2 finite fluids

This commit is contained in:
Brevven 2022-07-25 00:21:50 -07:00
parent b28f7d3c4b
commit d3f3956af7
5 changed files with 35 additions and 8 deletions

View file

@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.0.8
Date: 2022-07-25
Features:
- K2: Respect finite fluids setting.
---------------------------------------------------------------------------------------------------
Version: 0.0.7
Date: 2022-07-25
Changes:

View file

@ -1,6 +1,6 @@
{
"name": "bzgas",
"version": "0.0.7",
"version": "0.0.8",
"factorio_version": "1.1",
"title": "Natural Gas",
"author": "Brevven",

4
me.lua
View file

@ -3,6 +3,10 @@ local me = {}
me.name = "bzgas"
me.list = {}
function me.finite() -- Krastorio 2
return me.get_setting("kr-finite-oil")
end
function me.use_boiler()
return me.get_setting("bzgas-boiler")
end

View file

@ -86,7 +86,7 @@ data:extend({
}
},
energy_usage = "90kW",
mining_speed = 1,
mining_speed = util.me.finite() and 2 or 1,
resource_searching_radius = 0.49,
vector_to_place_result = {0, 0},
module_specification =

View file

@ -51,9 +51,9 @@ data:extend({
-- walking_sound = sounds.oil,
collision_box = {{-1.4, -1.4}, {1.4, 1.4}},
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
map_color = {0.9, 0.7, 0.2},
map_color = {0.9, 0.75, 0.2},
map_grid = false,
autoplace = resource_autoplace.resource_autoplace_settings
autoplace = resource_autoplace.resource_autoplace_settings(
{
name = "gas",
order = "c-g",
@ -61,11 +61,11 @@ data:extend({
base_spots_per_km2 = 1.8,
random_probability = 1/48,
random_spot_size_minimum = 1,
random_spot_size_maximum = 1, -- don't randomize spot size
additional_richness = 220000, -- this increases the total everywhere, so base_density needs to be decreased to compensate
random_spot_size_maximum = 1,
additional_richness = 220000,
has_starting_area_placement = true,
regular_rq_factor_multiplier = 1
},
regular_rq_factor_multiplier = 1,
}),
stage_counts = {0},
stages =
{
@ -140,3 +140,21 @@ data:extend({
order = "a[fluid]-f[gas]"
},
})
if util.me.finite() then
data.raw.resource["gas"].infinite = false
data.raw.resource["gas"].minimum = 20000
data.raw.resource["gas"].normal = 80000
data.raw.resource["crude-oil"].minable = {
mining_time = 1,
results = {
{
type = "fluid",
name = "gas",
amount_min = 20,
amount_max = 20,
probability = 1,
},
},
}
end