From 8b8a627dea969130e18f3cd98e14be948c7eaf22 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Fri, 26 Nov 2021 16:41:13 +0100 Subject: [PATCH] hunger_ng integration --- player.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/player.lua b/player.lua index a04dec2..115b266 100644 --- a/player.lua +++ b/player.lua @@ -111,9 +111,17 @@ function creative_regions:player_enter_region(player, new_privs_table) if minetest.get_modpath("unified_inventory") then unified_inventory.set_inventory_formspec(player, unified_inventory.default) end + if minetest.get_modpath("hunger_ng") then +-- player:get_meta():set_string("hunger_ng:hunger_disabled", 1) + hunger_ng.configure_hunger(name, 'disable') + end elseif new_mode == "arena" then local inv = player:get_inventory() inv:set_list("main", {}) + elseif new_mode == "survival" then + if minetest.get_modpath("hunger_ng") then + hunger_ng.configure_hunger(name, 'enable') + end end end