]> git.lizzy.rs Git - noweather.git/commitdiff
Initial Commit
authorElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 11 Dec 2020 16:53:19 +0000 (17:53 +0100)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 11 Dec 2020 16:53:19 +0000 (17:53 +0100)
README [new file with mode: 0644]
init.lua [new file with mode: 0644]
mod.conf [new file with mode: 0644]
settingtypes.txt [new file with mode: 0644]

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..de00f4d
--- /dev/null
+++ b/README
@@ -0,0 +1,2 @@
+# noweather 
+A dragonfire CSM to disable weather effects
diff --git a/init.lua b/init.lua
new file mode 100644 (file)
index 0000000..ac52910
--- /dev/null
+++ b/init.lua
@@ -0,0 +1,13 @@
+minetest.register_on_spawn_particle(function(particle)
+       if minetest.settings:get_bool("noweather") and particle.texture:sub(1, 12) == "weather_pack" then
+               return true
+       end
+end)
+
+minetest.register_on_play_sound(function(sound)
+       if minetest.settings:get_bool("noweather") and sound.name == "weather_rain" then
+               return true
+       end
+end)
+minetest.register_cheat("NoWeather", "Render", "noweather")
diff --git a/mod.conf b/mod.conf
new file mode 100644 (file)
index 0000000..aeb4128
--- /dev/null
+++ b/mod.conf
@@ -0,0 +1,4 @@
+name = noweather
+author = Fleckenstein
+description = A dragonfire CSM to disable weather effects
diff --git a/settingtypes.txt b/settingtypes.txt
new file mode 100644 (file)
index 0000000..0aba06f
--- /dev/null
@@ -0,0 +1 @@
+noweather (NoWeather) bool false