From aea9867ae9a5823bf73cd60ad2be0b0a93a5724d Mon Sep 17 00:00:00 2001 From: luk3yx Date: Tue, 12 Nov 2019 09:25:01 +1300 Subject: [PATCH] Add minetest.get_csm_restrictions() --- sscsm_init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sscsm_init.lua b/sscsm_init.lua index b1fadda..5eca403 100644 --- a/sscsm_init.lua +++ b/sscsm_init.lua @@ -176,3 +176,11 @@ sscsm.restrictions = { lookup_nodes_limit = math.floor(flags / 16) % 2 == 1, read_playerinfo = math.floor(flags / 32) % 2 == 1, } +sscsm.restrictions.lookup_nodes = sscsm.restrictions.lookup_nodes_limit + +-- Add minetest.get_csm_restrictions() if it doesn't exist already. +if not minetest.get_csm_restrictions then + function minetest.get_csm_restrictions() + return table.copy(sscsm.restrictions) + end +end