]> git.lizzy.rs Git - crafter_client.git/commitdiff
Stop client from crashing if there are restrictions on the server
authoroilboi <47129783+oilboi@users.noreply.github.com>
Tue, 9 Jun 2020 16:32:59 +0000 (12:32 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Tue, 9 Jun 2020 16:32:59 +0000 (12:32 -0400)
init.lua

index bf07b14318bd3caefadb2a6d0439559ab18c45f5..696faa3031e1a66a2e68bca3660d3ddaf324c85f 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -1,3 +1,10 @@
+--don't crash if not in crafter client
+for _,r in pairs(minetest.get_csm_restrictions()) do 
+       if r == true then
+               return
+       end
+end
+
 --declare globals
 weather_intake = nil
 weather = nil