mirror of
https://github.com/t-affeldt/regional_weather.git
synced 2025-07-14 22:40:32 +02:00
Improve snow and rain performance, nerf block update speed
This commit is contained in:
@ -4,6 +4,7 @@ if not minetest.get_modpath("fire") then return end
|
||||
climate_api.register_abm({
|
||||
label = "extinguish fire at high humidity",
|
||||
nodenames = { "fire:basic_flame" },
|
||||
neighbors = { "air" },
|
||||
interval = 10,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
|
@ -25,8 +25,8 @@ climate_api.register_abm({
|
||||
label = "freeze river water",
|
||||
nodenames = { "default:river_water_source" },
|
||||
neighbors = { "air" },
|
||||
interval = 10,
|
||||
chance = 2,
|
||||
interval = 25,
|
||||
chance = 3,
|
||||
catch_up = false,
|
||||
|
||||
conditions = {
|
||||
@ -44,8 +44,7 @@ climate_api.register_abm({
|
||||
climate_api.register_abm({
|
||||
label = "unfreeze river water",
|
||||
nodenames = { BLOCK_NAME },
|
||||
neighbors = { "air" },
|
||||
interval = 15,
|
||||
interval = 25,
|
||||
chance = 4,
|
||||
catch_up = true,
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
local BLOCK_PREFIX = "regional_weather:puddle_"
|
||||
local VARIANT_COUNT = 30
|
||||
local MIN_DISTANCE = 2
|
||||
local VARIANT_COUNT = 39
|
||||
local MIN_DISTANCE = 4
|
||||
|
||||
if not regional_weather.settings.puddles then
|
||||
for i=1,VARIANT_COUNT do
|
||||
@ -20,7 +20,9 @@ for i = 1,VARIANT_COUNT do
|
||||
for rotation = 0,270,90 do
|
||||
for flip = 0,1 do
|
||||
local name = BLOCK_PREFIX .. i .. "_" .. rotation
|
||||
local texture = "weather_puddle." .. i .. ".png^[opacity:128"
|
||||
local index = i
|
||||
if i < 10 then index = "0" .. i end
|
||||
local texture = "weather_puddle_" .. index .. ".png^[opacity:128"
|
||||
if flip == 1 or rotation > 0 then
|
||||
texture = texture .. "^[transform"
|
||||
end
|
||||
@ -81,7 +83,7 @@ climate_api.register_abm({
|
||||
label = "create rain puddles",
|
||||
nodenames = { "group:soil", "group:stone" },
|
||||
neighbors = { "air" },
|
||||
interval = 10,
|
||||
interval = 15,
|
||||
chance = 50,
|
||||
catch_up = false,
|
||||
|
||||
@ -109,8 +111,8 @@ climate_api.register_abm({
|
||||
climate_api.register_abm({
|
||||
label = "remove rain puddles",
|
||||
nodenames = { "group:regional_weather_puddle" },
|
||||
interval = 5,
|
||||
chance = 5,
|
||||
interval = 10,
|
||||
chance = 3,
|
||||
catch_up = true,
|
||||
|
||||
action = function (pos, node, env)
|
||||
|
@ -60,8 +60,8 @@ climate_api.register_abm({
|
||||
"group:coverable_by_snow"
|
||||
},
|
||||
neighbors = { "air" },
|
||||
interval = 15,
|
||||
chance = 30,
|
||||
interval = 25,
|
||||
chance = 40,
|
||||
catch_up = false,
|
||||
|
||||
conditions = {
|
||||
@ -95,8 +95,9 @@ climate_api.register_abm({
|
||||
"group:plant",
|
||||
"group:regional_weather_snow_cover"
|
||||
},
|
||||
interval = 15,
|
||||
chance = 25,
|
||||
neighbors = { "air" },
|
||||
interval = 25,
|
||||
chance = 30,
|
||||
catch_up = false,
|
||||
|
||||
conditions = {
|
||||
@ -120,7 +121,7 @@ climate_api.register_abm({
|
||||
climate_api.register_abm({
|
||||
label = "melt snow covers",
|
||||
nodenames = { "group:regional_weather_snow_cover" },
|
||||
interval = 15,
|
||||
interval = 25,
|
||||
chance = 10,
|
||||
catch_up = true,
|
||||
|
||||
|
Reference in New Issue
Block a user