forked from mtcontrib/regional_weather
		
	use improved indoors check
This commit is contained in:
		| @@ -14,7 +14,8 @@ climate_api.register_abm({ | |||||||
| 		 max_height		= regional_weather.settings.max_height, | 		 max_height		= regional_weather.settings.max_height, | ||||||
| 		 min_humidity	= 55, | 		 min_humidity	= 55, | ||||||
| 		 max_heat			= 85, | 		 max_heat			= 85, | ||||||
| 		 daylight			= 15 | 		 daylight			= 15, | ||||||
|  | 		 indoors			= false | ||||||
| 	 }, | 	 }, | ||||||
|  |  | ||||||
| 	 action = function (pos, node, env) | 	 action = function (pos, node, env) | ||||||
|   | |||||||
| @@ -43,7 +43,8 @@ climate_api.register_abm({ | |||||||
| 		 min_height		= regional_weather.settings.min_height, | 		 min_height		= regional_weather.settings.min_height, | ||||||
| 		 max_height		= regional_weather.settings.max_height, | 		 max_height		= regional_weather.settings.max_height, | ||||||
| 		 max_heat			= 25, | 		 max_heat			= 25, | ||||||
| 		 daylight			= 15 | 		 daylight			= 15, | ||||||
|  | 		 indoors			= false | ||||||
| 	 }, | 	 }, | ||||||
|  |  | ||||||
| 	 action = function (pos, node, env) | 	 action = function (pos, node, env) | ||||||
| @@ -62,7 +63,8 @@ climate_api.register_abm({ | |||||||
| 		 min_height		= regional_weather.settings.min_height, | 		 min_height		= regional_weather.settings.min_height, | ||||||
| 		 max_height		= regional_weather.settings.max_height, | 		 max_height		= regional_weather.settings.max_height, | ||||||
| 		 min_heat			= 40, | 		 min_heat			= 40, | ||||||
| 		 daylight			= 15 | 		 daylight			= 15, | ||||||
|  | 		 indoors			= false | ||||||
| 	 }, | 	 }, | ||||||
|  |  | ||||||
| 	 action = function (pos, node, env) | 	 action = function (pos, node, env) | ||||||
|   | |||||||
| @@ -14,7 +14,8 @@ climate_api.register_abm({ | |||||||
| 		min_height		= regional_weather.settings.min_height, | 		min_height		= regional_weather.settings.min_height, | ||||||
| 		max_height		= regional_weather.settings.max_height, | 		max_height		= regional_weather.settings.max_height, | ||||||
| 		min_heat			= 25, | 		min_heat			= 25, | ||||||
| 		min_light			= 15 | 		daylight			= 15, | ||||||
|  | 		indoors				= false, | ||||||
| 	}, | 	}, | ||||||
|  |  | ||||||
| 	action = function (pos, node, env) | 	action = function (pos, node, env) | ||||||
|   | |||||||
| @@ -119,7 +119,8 @@ climate_api.register_abm({ | |||||||
| 		 max_height		= regional_weather.settings.max_height, | 		 max_height		= regional_weather.settings.max_height, | ||||||
| 		 min_humidity	= 55, | 		 min_humidity	= 55, | ||||||
| 		 min_heat			= 30, | 		 min_heat			= 30, | ||||||
| 		 daylight			= 15 | 		 daylight			= 15, | ||||||
|  | 		 indoors			= false | ||||||
| 	 }, | 	 }, | ||||||
|  |  | ||||||
| 	 pos_override = function(pos) | 	 pos_override = function(pos) | ||||||
|   | |||||||
| @@ -66,7 +66,7 @@ climate_api.register_abm({ | |||||||
| 	}, | 	}, | ||||||
| 	neighbors	= { "air" }, | 	neighbors	= { "air" }, | ||||||
| 	interval	= 25, | 	interval	= 25, | ||||||
| 	chance		= 40, | 	chance		= 80, | ||||||
| 	catch_up	= false, | 	catch_up	= false, | ||||||
|  |  | ||||||
| 	 conditions	= { | 	 conditions	= { | ||||||
| @@ -74,7 +74,6 @@ climate_api.register_abm({ | |||||||
| 		 max_height		= regional_weather.settings.max_height, | 		 max_height		= regional_weather.settings.max_height, | ||||||
| 		 min_humidity	= 55, | 		 min_humidity	= 55, | ||||||
| 		 max_heat			= 30, | 		 max_heat			= 30, | ||||||
| 		 daylight			= 15, |  | ||||||
| 		 not_biome		= { | 		 not_biome		= { | ||||||
| 			"cold_desert", | 			"cold_desert", | ||||||
| 			"cold_desert_ocean", | 			"cold_desert_ocean", | ||||||
| @@ -82,7 +81,9 @@ climate_api.register_abm({ | |||||||
| 			"desert_ocean", | 			"desert_ocean", | ||||||
| 			"sandstone_desert", | 			"sandstone_desert", | ||||||
| 			"sandstone_desert_ocean" | 			"sandstone_desert_ocean" | ||||||
| 		} | 		}, | ||||||
|  | 		daylight = 15, | ||||||
|  | 		indoors = false | ||||||
| 	 }, | 	 }, | ||||||
|  |  | ||||||
| 	 pos_override = function(pos) | 	 pos_override = function(pos) | ||||||
| @@ -114,7 +115,7 @@ if regional_weather.settings.snow_griefing then | |||||||
| 		}, | 		}, | ||||||
| 		neighbors	= { "air" }, | 		neighbors	= { "air" }, | ||||||
| 		interval	= 25, | 		interval	= 25, | ||||||
| 		chance		= 120, | 		chance		= 160, | ||||||
| 		catch_up	= false, | 		catch_up	= false, | ||||||
|  |  | ||||||
| 		 conditions	= { | 		 conditions	= { | ||||||
| @@ -122,7 +123,6 @@ if regional_weather.settings.snow_griefing then | |||||||
| 			 max_height		= regional_weather.settings.max_height, | 			 max_height		= regional_weather.settings.max_height, | ||||||
| 			 min_humidity	= 55, | 			 min_humidity	= 55, | ||||||
| 			 max_heat			= 30, | 			 max_heat			= 30, | ||||||
| 			 daylight			= 15, |  | ||||||
| 			 not_biome		= { | 			 not_biome		= { | ||||||
| 				"cold_desert", | 				"cold_desert", | ||||||
| 				"cold_desert_ocean", | 				"cold_desert_ocean", | ||||||
| @@ -130,7 +130,9 @@ if regional_weather.settings.snow_griefing then | |||||||
| 				"desert_ocean", | 				"desert_ocean", | ||||||
| 				"sandstone_desert", | 				"sandstone_desert", | ||||||
| 				"sandstone_desert_ocean" | 				"sandstone_desert_ocean" | ||||||
| 			} | 			}, | ||||||
|  | 			daylight = 15, | ||||||
|  | 			indoors = false | ||||||
| 		 }, | 		 }, | ||||||
|  |  | ||||||
| 	   action = function (pos, node, env) | 	   action = function (pos, node, env) | ||||||
| @@ -157,13 +159,11 @@ if regional_weather.settings.snow_griefing then | |||||||
| 	}) | 	}) | ||||||
| end | end | ||||||
|  |  | ||||||
| local chance = 50 |  | ||||||
| if regional_weather.settings.snow_griefing then chance = 30 end |  | ||||||
| climate_api.register_abm({ | climate_api.register_abm({ | ||||||
| 	label			= "melt snow covers", | 	label			= "melt snow covers", | ||||||
| 	nodenames	= { "group:weather_snow_cover" }, | 	nodenames	= { "group:weather_snow_cover" }, | ||||||
| 	interval	= 25, | 	interval	= 25, | ||||||
| 	chance		= chance, | 	chance		= 85, | ||||||
| 	catch_up	= true, | 	catch_up	= true, | ||||||
|  |  | ||||||
|    action = function (pos, node, env) |    action = function (pos, node, env) | ||||||
|   | |||||||
| @@ -14,7 +14,8 @@ if farming ~= nil and farming.mod == "redo" then | |||||||
| 			 max_height		= regional_weather.settings.max_height, | 			 max_height		= regional_weather.settings.max_height, | ||||||
| 			 min_humidity	= 55, | 			 min_humidity	= 55, | ||||||
| 			 min_heat			= 30, | 			 min_heat			= 30, | ||||||
| 			 min_light		= 15 | 			 daylight			= 15, | ||||||
|  | 			 indoors			= false | ||||||
| 		 }, | 		 }, | ||||||
|  |  | ||||||
| 	   action = function (pos, node, env) | 	   action = function (pos, node, env) | ||||||
| @@ -35,7 +36,8 @@ else | |||||||
| 			 max_height		= regional_weather.settings.max_height, | 			 max_height		= regional_weather.settings.max_height, | ||||||
| 			 min_humidity	= 55, | 			 min_humidity	= 55, | ||||||
| 			 min_heat			= 30, | 			 min_heat			= 30, | ||||||
| 			 min_light		= 15 | 			 daylight			= 15, | ||||||
|  | 			 indoors			= false | ||||||
| 		 }, | 		 }, | ||||||
|  |  | ||||||
| 	   action = function (pos, node, env) | 	   action = function (pos, node, env) | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ local conditions = { | |||||||
| 	max_heat				= 45, | 	max_heat				= 45, | ||||||
| 	min_humidity		= 65, | 	min_humidity		= 65, | ||||||
| 	min_windspeed		= 2.5, | 	min_windspeed		= 2.5, | ||||||
| 	daylight				= 15, | 	indoors					= false, | ||||||
| 	not_biome				= { | 	not_biome				= { | ||||||
| 		"cold_desert", | 		"cold_desert", | ||||||
| 		"cold_desert_ocean", | 		"cold_desert_ocean", | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ local conditions = { | |||||||
| 	min_humidity		= 30, | 	min_humidity		= 30, | ||||||
| 	max_humidity		= 40, | 	max_humidity		= 40, | ||||||
| 	max_windspeed		= 2, | 	max_windspeed		= 2, | ||||||
| 	daylight				= 15, | 	indoors					= false, | ||||||
| 	has_biome				= { | 	has_biome				= { | ||||||
| 		"default", | 		"default", | ||||||
| 		"deciduous_forest", | 		"deciduous_forest", | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ local conditions = { | |||||||
| 	min_heat			= 35, | 	min_heat			= 35, | ||||||
| 	min_humidity	= 50, | 	min_humidity	= 50, | ||||||
| 	max_humidity	= 65, | 	max_humidity	= 65, | ||||||
| 	daylight			= 15 | 	indoors				= false | ||||||
| } | } | ||||||
|  |  | ||||||
| local effects = {} | local effects = {} | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ local conditions = { | |||||||
| 	max_height		= regional_weather.settings.max_height, | 	max_height		= regional_weather.settings.max_height, | ||||||
| 	min_heat			= 40, | 	min_heat			= 40, | ||||||
| 	min_humidity	= 65, | 	min_humidity	= 65, | ||||||
| 	daylight			= 15 | 	indoors				= false | ||||||
| } | } | ||||||
|  |  | ||||||
| local effects = {} | local effects = {} | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ local conditions = { | |||||||
| 	max_heat				= 35, | 	max_heat				= 35, | ||||||
| 	min_humidity		= 50, | 	min_humidity		= 50, | ||||||
| 	max_humidity		= 65, | 	max_humidity		= 65, | ||||||
| 	daylight				= 15, | 	indoors					= false, | ||||||
| 	not_biome				= { | 	not_biome				= { | ||||||
| 		"cold_desert", | 		"cold_desert", | ||||||
| 		"cold_desert_ocean", | 		"cold_desert_ocean", | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ local conditions = { | |||||||
| 	max_height = regional_weather.settings.max_height, | 	max_height = regional_weather.settings.max_height, | ||||||
| 	max_heat				= 30, | 	max_heat				= 30, | ||||||
| 	min_humidity		= 65, | 	min_humidity		= 65, | ||||||
| 	daylight				= 15, | 	indoors					= false, | ||||||
| 	not_biome				= { | 	not_biome				= { | ||||||
| 		"cold_desert", | 		"cold_desert", | ||||||
| 		"cold_desert_ocean", | 		"cold_desert_ocean", | ||||||
|   | |||||||
| @@ -4,7 +4,7 @@ local conditions = { | |||||||
| 	min_height 		= regional_weather.settings.min_height, | 	min_height 		= regional_weather.settings.min_height, | ||||||
| 	max_height 		= regional_weather.settings.max_height, | 	max_height 		= regional_weather.settings.max_height, | ||||||
| 	min_windspeed	= 3, | 	min_windspeed	= 3, | ||||||
| 	daylight			= 15 | 	indoors				= false, | ||||||
| } | } | ||||||
|  |  | ||||||
| local effects = {} | local effects = {} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user