From dcddd19fb1b2c897107b0acdb43e012872232b13 Mon Sep 17 00:00:00 2001 From: DannyDark Date: Tue, 11 Dec 2012 18:47:33 +0000 Subject: [PATCH] Change settime to be privilege based This makes it so anyone with the privilege settime can change the time no matter what game mode is currently active. --- unified_inventory/unified_inventory/api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unified_inventory/unified_inventory/api.lua b/unified_inventory/unified_inventory/api.lua index db0a069..752bf89 100644 --- a/unified_inventory/unified_inventory/api.lua +++ b/unified_inventory/unified_inventory/api.lua @@ -197,7 +197,7 @@ unified_inventory.get_formspec = function(player,page) formspec=formspec.."label[4,.9;Home set to:]" formspec=formspec.."label[5.7,.9;("..math.floor(home.x)..","..math.floor(home.y)..","..math.floor(home.z)..")]" end - if minetest.setting_getbool("creative_mode") then + if minetest.check_player_privs(player_name, {settime=true}) then formspec=formspec.."button[0,2;2,0.5;misc_set_day;Set Day]" formspec=formspec.."button[2,2;2,0.5;misc_set_night;Set Night]" end