From f3e6d48b9791dfc17cfebc945a5e9c6fb00a1063 Mon Sep 17 00:00:00 2001 From: Till Affeldt Date: Thu, 8 Oct 2020 22:03:00 +0200 Subject: [PATCH] use improved indoors check --- abms/fire.lua | 3 ++- abms/ice.lua | 6 ++++-- abms/pedology.lua | 3 ++- abms/puddle.lua | 3 ++- abms/snow_cover.lua | 18 +++++++++--------- abms/soil.lua | 6 ++++-- ca_weathers/hail.lua | 2 +- ca_weathers/pollen.lua | 2 +- ca_weathers/rain.lua | 2 +- ca_weathers/rain_heavy.lua | 2 +- ca_weathers/snow.lua | 2 +- ca_weathers/snow_heavy.lua | 2 +- ca_weathers/storm.lua | 2 +- 13 files changed, 30 insertions(+), 23 deletions(-) diff --git a/abms/fire.lua b/abms/fire.lua index 646b041..1249a29 100644 --- a/abms/fire.lua +++ b/abms/fire.lua @@ -14,7 +14,8 @@ climate_api.register_abm({ max_height = regional_weather.settings.max_height, min_humidity = 55, max_heat = 85, - daylight = 15 + daylight = 15, + indoors = false }, action = function (pos, node, env) diff --git a/abms/ice.lua b/abms/ice.lua index 9f314d5..a134a07 100644 --- a/abms/ice.lua +++ b/abms/ice.lua @@ -43,7 +43,8 @@ climate_api.register_abm({ min_height = regional_weather.settings.min_height, max_height = regional_weather.settings.max_height, max_heat = 25, - daylight = 15 + daylight = 15, + indoors = false }, action = function (pos, node, env) @@ -62,7 +63,8 @@ climate_api.register_abm({ min_height = regional_weather.settings.min_height, max_height = regional_weather.settings.max_height, min_heat = 40, - daylight = 15 + daylight = 15, + indoors = false }, action = function (pos, node, env) diff --git a/abms/pedology.lua b/abms/pedology.lua index 5efdc0e..fb39728 100644 --- a/abms/pedology.lua +++ b/abms/pedology.lua @@ -14,7 +14,8 @@ climate_api.register_abm({ min_height = regional_weather.settings.min_height, max_height = regional_weather.settings.max_height, min_heat = 25, - min_light = 15 + daylight = 15, + indoors = false, }, action = function (pos, node, env) diff --git a/abms/puddle.lua b/abms/puddle.lua index 0c6f943..a450aa2 100644 --- a/abms/puddle.lua +++ b/abms/puddle.lua @@ -119,7 +119,8 @@ climate_api.register_abm({ max_height = regional_weather.settings.max_height, min_humidity = 55, min_heat = 30, - daylight = 15 + daylight = 15, + indoors = false }, pos_override = function(pos) diff --git a/abms/snow_cover.lua b/abms/snow_cover.lua index c66d6a4..09e0818 100644 --- a/abms/snow_cover.lua +++ b/abms/snow_cover.lua @@ -66,7 +66,7 @@ climate_api.register_abm({ }, neighbors = { "air" }, interval = 25, - chance = 40, + chance = 80, catch_up = false, conditions = { @@ -74,7 +74,6 @@ climate_api.register_abm({ max_height = regional_weather.settings.max_height, min_humidity = 55, max_heat = 30, - daylight = 15, not_biome = { "cold_desert", "cold_desert_ocean", @@ -82,7 +81,9 @@ climate_api.register_abm({ "desert_ocean", "sandstone_desert", "sandstone_desert_ocean" - } + }, + daylight = 15, + indoors = false }, pos_override = function(pos) @@ -114,7 +115,7 @@ if regional_weather.settings.snow_griefing then }, neighbors = { "air" }, interval = 25, - chance = 120, + chance = 160, catch_up = false, conditions = { @@ -122,7 +123,6 @@ if regional_weather.settings.snow_griefing then max_height = regional_weather.settings.max_height, min_humidity = 55, max_heat = 30, - daylight = 15, not_biome = { "cold_desert", "cold_desert_ocean", @@ -130,7 +130,9 @@ if regional_weather.settings.snow_griefing then "desert_ocean", "sandstone_desert", "sandstone_desert_ocean" - } + }, + daylight = 15, + indoors = false }, action = function (pos, node, env) @@ -157,13 +159,11 @@ if regional_weather.settings.snow_griefing then }) end -local chance = 50 -if regional_weather.settings.snow_griefing then chance = 30 end climate_api.register_abm({ label = "melt snow covers", nodenames = { "group:weather_snow_cover" }, interval = 25, - chance = chance, + chance = 85, catch_up = true, action = function (pos, node, env) diff --git a/abms/soil.lua b/abms/soil.lua index 93a393f..25ef827 100644 --- a/abms/soil.lua +++ b/abms/soil.lua @@ -14,7 +14,8 @@ if farming ~= nil and farming.mod == "redo" then max_height = regional_weather.settings.max_height, min_humidity = 55, min_heat = 30, - min_light = 15 + daylight = 15, + indoors = false }, action = function (pos, node, env) @@ -35,7 +36,8 @@ else max_height = regional_weather.settings.max_height, min_humidity = 55, min_heat = 30, - min_light = 15 + daylight = 15, + indoors = false }, action = function (pos, node, env) diff --git a/ca_weathers/hail.lua b/ca_weathers/hail.lua index 48132e3..3f0f420 100644 --- a/ca_weathers/hail.lua +++ b/ca_weathers/hail.lua @@ -7,7 +7,7 @@ local conditions = { max_heat = 45, min_humidity = 65, min_windspeed = 2.5, - daylight = 15, + indoors = false, not_biome = { "cold_desert", "cold_desert_ocean", diff --git a/ca_weathers/pollen.lua b/ca_weathers/pollen.lua index 331ea7f..fb8d840 100644 --- a/ca_weathers/pollen.lua +++ b/ca_weathers/pollen.lua @@ -7,7 +7,7 @@ local conditions = { min_humidity = 30, max_humidity = 40, max_windspeed = 2, - daylight = 15, + indoors = false, has_biome = { "default", "deciduous_forest", diff --git a/ca_weathers/rain.lua b/ca_weathers/rain.lua index 5ca032a..30ae08c 100644 --- a/ca_weathers/rain.lua +++ b/ca_weathers/rain.lua @@ -6,7 +6,7 @@ local conditions = { min_heat = 35, min_humidity = 50, max_humidity = 65, - daylight = 15 + indoors = false } local effects = {} diff --git a/ca_weathers/rain_heavy.lua b/ca_weathers/rain_heavy.lua index 4230cb0..7cbaf3b 100644 --- a/ca_weathers/rain_heavy.lua +++ b/ca_weathers/rain_heavy.lua @@ -5,7 +5,7 @@ local conditions = { max_height = regional_weather.settings.max_height, min_heat = 40, min_humidity = 65, - daylight = 15 + indoors = false } local effects = {} diff --git a/ca_weathers/snow.lua b/ca_weathers/snow.lua index 36adf67..b5375bd 100644 --- a/ca_weathers/snow.lua +++ b/ca_weathers/snow.lua @@ -6,7 +6,7 @@ local conditions = { max_heat = 35, min_humidity = 50, max_humidity = 65, - daylight = 15, + indoors = false, not_biome = { "cold_desert", "cold_desert_ocean", diff --git a/ca_weathers/snow_heavy.lua b/ca_weathers/snow_heavy.lua index 61f276c..2475633 100644 --- a/ca_weathers/snow_heavy.lua +++ b/ca_weathers/snow_heavy.lua @@ -5,7 +5,7 @@ local conditions = { max_height = regional_weather.settings.max_height, max_heat = 30, min_humidity = 65, - daylight = 15, + indoors = false, not_biome = { "cold_desert", "cold_desert_ocean", diff --git a/ca_weathers/storm.lua b/ca_weathers/storm.lua index 77f0265..1236f8d 100644 --- a/ca_weathers/storm.lua +++ b/ca_weathers/storm.lua @@ -4,7 +4,7 @@ local conditions = { min_height = regional_weather.settings.min_height, max_height = regional_weather.settings.max_height, min_windspeed = 3, - daylight = 15 + indoors = false, } local effects = {}