From bd9355956892a7fbbd500b14cb9db5f89293cf9e Mon Sep 17 00:00:00 2001 From: Izzy Date: Sun, 9 Jun 2019 12:47:58 -0600 Subject: [PATCH] regular snow --- init.lua | 27 +++++++++++++++++++++++++-- textures/storms_snowflake.png | Bin 0 -> 153 bytes 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 textures/storms_snowflake.png diff --git a/init.lua b/init.lua index d1d89ea..a3cbefb 100644 --- a/init.lua +++ b/init.lua @@ -250,6 +250,29 @@ local function spawn_rain(pos, vel, sz, lvl) }) end +local function spawn_snow(pos, vel, sz, lvl) + local offht = 10 + local ht = 10 + + minetest.add_particlespawner({ + amount = lvl * 1000, + time = 5, + minpos = {x=pos.x-sz, y=pos.y+offht, z=pos.z-sz}, + maxpos = {x=pos.x+sz, y=pos.y+offht+ht, z=pos.z+sz}, + minvel = {x=vel.x, y=-20, z=vel.z}, + maxvel = {x=vel.x, y=-20, z=vel.z}, + minacc = {x=-0.1, y=0.1, z=-0.1}, + maxacc = {x=0.1, y=0.3, z=0.1}, + collisiondetection = true, + collision_removal = true, + minexptime = 2, + maxexptime = 7, + minsize = 10, + maxsize = 15, + texture = "storms_snowflake.png", + }) +end + local function spawn_lightning(pos, amount, sz) local offht = 60 @@ -286,7 +309,7 @@ biome_spawners.tundra = function(pos, dir, lvl) end biome_spawners.taiga = function(pos, dir, lvl) - spawn_blizzard(pos, dir, 15, lvl) + spawn_snow(pos, {x=0, y=0, z=0}, 20, lvl) end biome_spawners.grassland = function(pos, dir, lvl) @@ -396,7 +419,7 @@ minetest.register_craftitem("storms:rainstick", { if not fn then print("missing spawner biome: "..biome) end - fn(pos) + fn(pos, {x=20, y=0, x=10}, 1) -- set_biome_storm_sky(player, biome) diff --git a/textures/storms_snowflake.png b/textures/storms_snowflake.png new file mode 100644 index 0000000000000000000000000000000000000000..2c3938bb8ae46a37fd64b347a07276364e39079f GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkEEr|n*2A)U{{MOU9|Rr; oA8zvh^z-s^p7ZX93so2xPJZCdt8+Z_5vYT~)78&qol`;+0B9&JxBvhE literal 0 HcmV?d00001