diff --git a/README.md b/README.md index a4361a46..99e6ff7f 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,6 @@ The following mods are also included: * [vector_extras][] ([WTFPL](mods/vector_extras/LICENSE.txt)) * weather/ * [lightning][] ([LGPL/CC-BY-SA](mods/weather/lightning/README.md)) - * [weather][] ([LGPL/WTFPL/CC-BY-SA](mods/weather/weather/README)) * world/ * [ambience][ambience_ultralite] (WTFPL / [CC-BY / CC-BY-SA / CC-BY-NC-SA / CC0](mods/world/ambience/sounds/SoundLicenses.txt)) * [areas][] ([LGPL](mods/world/areas/LICENSE.txt)) diff --git a/mods/weather/weather/README b/mods/weather/weather/README deleted file mode 100644 index d77a4bae..00000000 --- a/mods/weather/weather/README +++ /dev/null @@ -1,7 +0,0 @@ -Weather mod for Minetest (http://minetest.net/) - -License: -- Code: LGPL -- Textures: - - Snow cover: WTFPL - - Rain / Snow: CC-BY-SA 3.0, credit goes to TeddyDesTodes, from his weather branch at https://github.com/TeddyDesTodes/minetest/tree/weather diff --git a/mods/weather/weather/command.lua b/mods/weather/weather/command.lua deleted file mode 100644 index b9c4a09b..00000000 --- a/mods/weather/weather/command.lua +++ /dev/null @@ -1,15 +0,0 @@ -minetest.register_privilege("weather", { - description = "Change the weather", - give_to_singleplayer = false -}) - --- Set weather -minetest.register_chatcommand("setweather", { - params = "", - description = "Set weather to rain, snow or none", -- full description - privs = {weather = true}, - func = function(name, param) - weather = param - save_weather() - end -}) diff --git a/mods/weather/weather/init.lua b/mods/weather/weather/init.lua deleted file mode 100644 index 37777d7b..00000000 --- a/mods/weather/weather/init.lua +++ /dev/null @@ -1,50 +0,0 @@ --- Weather: --- * rain --- * snow --- * wind (not implemented) - -assert(minetest.add_particlespawner, "I told you to run the latest GitHub!") - -addvectors = function (v1, v2) - return {x=v1.x+v2.x, y=v1.y+v2.y, z=v1.z+v2.z} -end - -save_weather = function () - local file = io.open(minetest.get_worldpath().."/weather", "w+") - file:write(weather) - file:close() -end - -read_weather = function () - local file = io.open(minetest.get_worldpath().."/weather", "r") - if not file then return end - local readweather = file:read() - file:close() - return readweather -end - -weather = read_weather() - -minetest.register_globalstep(function(dtime) - if weather == "rain" or weather == "snow" then - if math.random(1, 10000) == 1 then - weather = "none" - save_weather() - end - else - if math.random(1, 50000) == 1 then - weather = "rain" - save_weather() - end - if math.random(1, 50000) == 2 then - weather = "snow" - save_weather() - end - end -end) - -dofile(minetest.get_modpath("weather").."/rain.lua") -dofile(minetest.get_modpath("weather").."/snow.lua") -dofile(minetest.get_modpath("weather").."/command.lua") - - diff --git a/mods/weather/weather/rain.lua b/mods/weather/weather/rain.lua deleted file mode 100644 index 4b20da15..00000000 --- a/mods/weather/weather/rain.lua +++ /dev/null @@ -1,24 +0,0 @@ --- Rain -minetest.register_globalstep(function(dtime) - if weather ~= "rain" then return end - for _, player in ipairs(minetest.get_connected_players()) do - local ppos = player:getpos() - - -- Make sure player is not in a cave/house... - if minetest.env:get_node_light(ppos, 0.5) ~= 15 then return end - - local minp = addvectors(ppos, {x=-9, y=7, z=-9}) - local maxp = addvectors(ppos, {x= 9, y=7, z= 9}) - - local vel = {x=0, y= -4, z=0} - local acc = {x=0, y=-9.81, z=0} - - minetest.add_particlespawner({amount=25, time=0.5, - minpos=minp, maxpos=maxp, - minvel=vel, maxvel=vel, - minacc=acc, maxacc=acc, - minexptime=0.8, maxexptime=0.8, - minsize=25, maxsize=25, - collisiondetection=false, vertical=true, texture="weather_rain.png", player=player:get_player_name()}) - end -end) diff --git a/mods/weather/weather/snow.lua b/mods/weather/weather/snow.lua deleted file mode 100644 index cbd5586f..00000000 --- a/mods/weather/weather/snow.lua +++ /dev/null @@ -1,73 +0,0 @@ --- Snow -minetest.register_globalstep(function(dtime) - if weather ~= "snow" then return end - for _, player in ipairs(minetest.get_connected_players()) do - local ppos = player:getpos() - - -- Make sure player is not in a cave/house... - if minetest.env:get_node_light(ppos, 0.5) ~= 15 then return end - - local minp = addvectors(ppos, {x=-9, y=7, z=-9}) - local maxp = addvectors(ppos, {x= 9, y=7, z= 9}) - - local minp_deep = addvectors(ppos, {x=-10, y=3.2, z=-10}) - local maxp_deep = addvectors(ppos, {x= 10, y=2.6, z= 10}) - - local vel = {x=0, y= -0.5, z=0} - local acc = {x=0, y= -0.5, z=0} - - minetest.add_particlespawner(5, 0.5, - minp, maxp, - vel, vel, - acc, acc, - 5, 5, - 25, 25, - false, "weather_snow.png", player:get_player_name()) - - minetest.add_particlespawner(4, 0.5, - minp_deep, maxp_deep, - vel, vel, - acc, acc, - 4, 4, - 25, 25, - false, "weather_snow.png", player:get_player_name()) - end -end) - -local snow_box = -{ - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5} -} - --- Snow cover -minetest.register_node("weather:snow_cover", { - tiles = {"weather_snow_cover.png"}, - drawtype = "nodebox", - paramtype = "light", - node_box = snow_box, - selection_box = snow_box, - groups = {not_in_creative_inventory = 1, crumbly = 3, attached_node = 1}, - drop = {} -}) - ---[[ Enable this section if you have a very fast PC -minetest.register_abm({ - nodenames = {"group:crumbly", "group:snappy", "group:cracky", "group:choppy"}, - neighbors = {"default:air"}, - interval = 10.0, - chance = 80, - action = function (pos, node, active_object_count, active_object_count_wider) - if weather == "snow" then - if minetest.registered_nodes[node.name].drawtype == "normal" - or minetest.registered_nodes[node.name].drawtype == "allfaces_optional" then - local np = addvectors(pos, {x=0, y=1, z=0}) - if minetest.env:get_node_light(np, 0.5) == 15 - and minetest.env:get_node(np).name == "air" then - minetest.env:add_node(np, {name="weather:snow_cover"}) - end - end - end - end -}) -]] diff --git a/mods/weather/weather/textures/weather_rain.png b/mods/weather/weather/textures/weather_rain.png deleted file mode 100644 index 39b153c4..00000000 Binary files a/mods/weather/weather/textures/weather_rain.png and /dev/null differ diff --git a/mods/weather/weather/textures/weather_snow.png b/mods/weather/weather/textures/weather_snow.png deleted file mode 100644 index 8c44f7af..00000000 Binary files a/mods/weather/weather/textures/weather_snow.png and /dev/null differ diff --git a/mods/weather/weather/textures/weather_snow_cover.png b/mods/weather/weather/textures/weather_snow_cover.png deleted file mode 100644 index 9221a5ae..00000000 Binary files a/mods/weather/weather/textures/weather_snow_cover.png and /dev/null differ