From fa180c3c45ebe068a5f620dcae63e275b8ed3854 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Mon, 9 Oct 2017 11:17:34 +0100 Subject: Updating to 0.4.16+ functions --- init.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 2d3e6f5..51f2ee0 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,6 @@ --[[ - Minetest Ethereal Mod (1st March 2017) + Minetest Ethereal Mod Created by ChinChow @@ -9,7 +9,7 @@ ]] ethereal = {} -- DO NOT change settings below, use the settings.conf file -ethereal.version = "1.22" +ethereal.version = "1.24" ethereal.leaftype = 0 -- 0 for 2D plantlike, 1 for 3D allfaces ethereal.leafwalk = false -- true for walkable leaves, false to fall through ethereal.cavedirt = true -- caves chop through dirt when true @@ -72,6 +72,12 @@ ethereal.intllib = S -- Falling node function ethereal.check_falling = minetest.check_for_falling or nodeupdate +-- creative check +local creative_mode_cache = minetest.settings:get_bool("creative_mode") +function ethereal.check_creative(name) + return creative_mode_cache or minetest.check_player_privs(name, {creative = true}) +end + dofile(path .. "/plantlife.lua") dofile(path .. "/mushroom.lua") dofile(path .. "/onion.lua") -- cgit v1.2.3