Browse Source

return from unified_inventory craftguide

main
Hendrik Langer 5 years ago
parent
commit
3cd724f002
  1. 3
      init.lua
  2. 2
      mod.conf

3
init.lua

@ -112,6 +112,9 @@ function toggle_areas:player_enter_area(player, privstring)
minetest.chat_send_player(name, "You entered creative mode") minetest.chat_send_player(name, "You entered creative mode")
toggle_areas:save_player_inventory(player, "saved_survival") toggle_areas:save_player_inventory(player, "saved_survival")
toggle_areas:restore_player_inventory(player, "saved_creative") toggle_areas:restore_player_inventory(player, "saved_creative")
if minetest.get_modpath("unified_inventory") then
unified_inventory.set_inventory_formspec(player, unified_inventory.default)
end
elseif has_creative and privs_revoke.creative then elseif has_creative and privs_revoke.creative then
minetest.chat_send_player(name, "You entered survival mode") minetest.chat_send_player(name, "You entered survival mode")
toggle_areas:save_player_inventory(player, "saved_creative") toggle_areas:save_player_inventory(player, "saved_creative")

2
mod.conf

@ -1,4 +1,4 @@
name = toggle_areas name = toggle_areas
description = Toggle privs in areas description = Toggle privs in areas
depends = default, sfinv depends = default, sfinv
optional_depends = areas, hunger_ng optional_depends = areas, unified_inventory, hunger_ng

Loading…
Cancel
Save