aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-12-11 17:53:19 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-12-11 17:53:19 +0100
commita862678af22bf004a3fc3d1abf0519a370001d61 (patch)
tree47456505d14a2304a2bd5c6a31020906e4ce96bd
downloadnoweather-a862678af22bf004a3fc3d1abf0519a370001d61.tar.xz
Initial Commit
-rw-r--r--README2
-rw-r--r--init.lua13
-rw-r--r--mod.conf4
-rw-r--r--settingtypes.txt1
4 files changed, 20 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
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
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
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
index 0000000..0aba06f
--- /dev/null
+++ b/settingtypes.txt
@@ -0,0 +1 @@
+noweather (NoWeather) bool false