diff --git a/mods/weather/README.txt b/mods/weather/README.txt index cda44fd..fb8a776 100644 --- a/mods/weather/README.txt +++ b/mods/weather/README.txt @@ -5,7 +5,6 @@ By Kaadmy, for Pixture Texture license: CC BY-SA 4.0 Sound license: weather_storm.ogg: GPLv2 (see GPL_v2.txt) - weather_snowstorm.ogg: GPLv2 (see GPL_v2.txt) Source license: LGPLv2.1 Note: The weather sounds sound be replaced in a later version. diff --git a/mods/weather/init.lua b/mods/weather/init.lua index 4373656..ebb82c0 100644 --- a/mods/weather/init.lua +++ b/mods/weather/init.lua @@ -7,7 +7,7 @@ local S = minetest.get_translator("weather") weather = {} weather.weather = "clear" -weather.types = {"storm", "snowstorm", "clear"} +weather.types = {"storm", "clear"} local sound_handles = {} @@ -15,8 +15,6 @@ local function addvec(v1, v2) return {x = v1.x + v2.x, y = v1.y + v2.y, z = v1.z + v2.z} end -local snow_enable = minetest.settings:get_bool("weather_snow_enable") or false - local mapseed = minetest.get_mapgen_setting("seed") local weather_pr=PseudoRandom(mapseed + 2387) @@ -41,20 +39,6 @@ local function play_sound() end end end ---[[ elseif weather.weather == "snowstorm" then - for _, player in ipairs(minetest.get_connected_players()) do - if player:get_pos().y > sound_min_height then - weather_soundspec = minetest.sound_play( - { - name = "weather_snowstorm", - to_player = player:get_player_name(), - loop = true, - } - ) - end - end - return -]] else for _, player in ipairs(minetest.get_connected_players()) do local name = player:get_player_name() @@ -93,14 +77,11 @@ minetest.register_globalstep( -- on avg., every 1800 frames the weather.weather will change to one of: -- 13/20 chance of clear weather -- 6/20 chance or stormy weather - -- 1/20 chance of snowstorm weather if weathertype < 13 then weather.weather = "clear" - elseif weathertype < 19 then + elseif weathertype < 20 then weather.weather = "storm" - elseif weathertype < 20 and snow_enable then - weather.weather = "snowstorm" end end end @@ -116,7 +97,7 @@ minetest.register_globalstep( local skycol = math.floor(light * 190) for _, player in ipairs(minetest.get_connected_players()) do - if weather.weather == "storm" or weather.weather == "snowstorm" then + if weather.weather == "storm" then player:set_sky({r = skycol, g = skycol, b = skycol * 1.2}, "plain", {}, true) if default_cloud_state == nil then @@ -169,42 +150,6 @@ minetest.register_globalstep( } ) end - elseif weather.weather == "snowstorm" then - if math.random(0, 6000*dtime) <= 1 then - local hp = player:get_hp() - - if minetest.get_node_light(p) == 15 then - player:set_hp(hp-1) - end - end - - if minetest.get_node_light({x=p.x, y=p.y+15, z=p.z}, 0.5) == 15 then - local minpos = addvec(player:get_pos(), {x = -30, y = 20, z = -30}) - local maxpos = addvec(player:get_pos(), {x = 30, y = 15, z = 30}) - local vel = {x = 16.0, y = -8, z = 13.0} - local acc = {x = -16.0, y = -8, z = -13.0} - minetest.add_particlespawner( - { - amount = 8, - time = 0.4, - minpos = minpos, - maxpos = maxpos, - minvel = {x=-vel.x, y=vel.y, z=-vel.z}, - maxvel = vel, - minacc = acc, - maxacc = acc, - minexptime = 1.0, - maxexptime = 1.4, - minsize = 3, - maxsize = 4, - collisiondetection = true, - collision_removal = true, - vertical = false, - texture = "weather_snowflake.png", - playername = player:get_player_name() - } - ) - end end end end @@ -220,13 +165,13 @@ minetest.register_privilege( minetest.register_chatcommand( "weather", { - params = "storm | snowstorm | clear", + params = "storm | clear", description = S("Change the weather"), privs = {weather = true}, func = function(name, param) local weather_set = setweather_type(param) if not weather_set then - return false, S("Incorrect weather. Valid weathers are “storm”, “snowstorm” and “clear”.") + return false, S("Incorrect weather. Valid weathers are “storm” and “clear”.") else return true, S("Weather changed.") end diff --git a/mods/weather/locale/template.txt b/mods/weather/locale/template.txt index e3b47bd..cb651f6 100644 --- a/mods/weather/locale/template.txt +++ b/mods/weather/locale/template.txt @@ -1,5 +1,5 @@ # textdomain: weather Can change the weather using the /weather command= Change the weather= -Incorrect weather. Valid weathers are “storm”, “snowstorm” and “clear”.= +Incorrect weather. Valid weathers are “storm” and “clear”.= Weather changed.= diff --git a/mods/weather/locale/weather.de.tr b/mods/weather/locale/weather.de.tr index d39da83..b359535 100644 --- a/mods/weather/locale/weather.de.tr +++ b/mods/weather/locale/weather.de.tr @@ -1,5 +1,5 @@ # textdomain: weather Can change the weather using the /weather command=Kann das Wetter mit dem „/weather“-Befehl ändern Change the weather=Das Wetter ändern -Incorrect weather. Valid weathers are “storm”, “snowstorm” and “clear”.=Ungültiges Wetter. Gültige Wetter sind „storm“ (Sturm), „sandstorm“ (Sandsturm) und „clear“ (klar) +Incorrect weather. Valid weathers are “storm” and “clear”.=Ungültiges Wetter. Gültige Wetter sind „storm“ (Sturm) und „clear“ (klar). Weather changed.=Wetter geändert. diff --git a/mods/weather/sounds/weather_snowstorm.ogg b/mods/weather/sounds/weather_snowstorm.ogg deleted file mode 100644 index da8e31c..0000000 Binary files a/mods/weather/sounds/weather_snowstorm.ogg and /dev/null differ diff --git a/mods/weather/textures/weather_ice.png b/mods/weather/textures/weather_ice.png deleted file mode 100644 index 026b791..0000000 Binary files a/mods/weather/textures/weather_ice.png and /dev/null differ diff --git a/mods/weather/textures/weather_ice.xcf b/mods/weather/textures/weather_ice.xcf deleted file mode 100644 index a0e7520..0000000 Binary files a/mods/weather/textures/weather_ice.xcf and /dev/null differ diff --git a/mods/weather/textures/weather_snow.png b/mods/weather/textures/weather_snow.png deleted file mode 100644 index dbfc6b3..0000000 Binary files a/mods/weather/textures/weather_snow.png and /dev/null differ diff --git a/mods/weather/textures/weather_snow.xcf b/mods/weather/textures/weather_snow.xcf deleted file mode 100644 index 7924642..0000000 Binary files a/mods/weather/textures/weather_snow.xcf and /dev/null differ diff --git a/mods/weather/textures/weather_snowflake.png b/mods/weather/textures/weather_snowflake.png deleted file mode 100644 index 65374c8..0000000 Binary files a/mods/weather/textures/weather_snowflake.png and /dev/null differ diff --git a/mods/weather/textures/weather_snowflake.xcf b/mods/weather/textures/weather_snowflake.xcf deleted file mode 100644 index 740cc5d..0000000 Binary files a/mods/weather/textures/weather_snowflake.xcf and /dev/null differ