This file is indexed.

/usr/share/games/minetest/mods/mobf/mobf_settings/settings.lua is in minetest-mod-mobf-core 2.5.1-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
--------------------------------------------------------------------------------
-- Mob Framework Settings Mod by Sapier
--
-- You may copy, use, modify or do nearly anything except removing this
-- copyright notice.
-- And of course you are NOT allowed to pretend you have written it.
--
--! @file settings_v3.lua
--! @brief settings gui for mobf
--! @copyright Sapier
--! @author Sapier
--! @date 2014-05-30
--
-- Contact sapier a t gmx net
--------------------------------------------------------------------------------

--!version
local mobf_settings_version = "1.9.0"

--!path of mod
local modpath = minetest.get_modpath("mobf_settings")

--!basepath of tools
--TODO remove included fstk once minetest is updated
--local basepath = core.get_builtin_path()
local basepath = modpath

--!unique id of ui
local unique_id = "mobf_settings"

dofile(basepath .. DIR_DELIM .. "fstk" .. DIR_DELIM .. "dialog.lua")
dofile(basepath .. DIR_DELIM .. "fstk" .. DIR_DELIM .. "tabview.lua")
dofile(basepath .. DIR_DELIM .. "fstk" .. DIR_DELIM .. "ui_mod.lua")

dofile(modpath .. DIR_DELIM .. "common.lua")
dofile(modpath .. DIR_DELIM .. "tab_main.lua")
dofile(modpath .. DIR_DELIM .. "tab_info.lua")
dofile(modpath .. DIR_DELIM .. "tab_feature_config.lua")
dofile(modpath .. DIR_DELIM .. "tab_factions.lua")
dofile(modpath .. DIR_DELIM .. "tab_mobs.lua")
dofile(modpath .. DIR_DELIM .. "tab_restore_mobs.lua")
dofile(modpath .. DIR_DELIM .. "tab_path_manager.lua")


local function is_admin(playername)
	local privcheck = core.check_player_privs(playername, {mobfw_admin=true})

	return privcheck or (playername == "singleplayer")
end

--------------------------------------------------------------------------------
local function init_player_ui(playername, param)

	local playerui = get_ui_by_unique_id(playername, unique_id)

	if not playerui then
		playerui = create_ui(playername, unique_id)

		assert( playerui ~= nil)

		local tv_main = tabview_create("mainview",{x=8,y=9},{x=0,y=0}, playerui)

		tv_main:add(mobf_settings_tab_main)

		if is_admin(playername) then
			tv_main:add(mobf_settings_tab_features, { is_admin=is_admin(playername) })
			tv_main:add(mobf_settings_tab_mobs, { is_admin=is_admin(playername) })
		end

		tv_main:add(mobf_settings_tab_info)

		if mobf_rtd.factions_available then
			tv_main:add(mobf_settings_tab_factions,
				{
					is_admin   = is_admin(playername),
					playername = playername
				})
		end

		tv_main:add(mobf_settings_tab_preserve,
				{
					is_admin   = is_admin(playername),
					playername = playername
				})

		tv_main:add(mobf_settings_tab_paths,
				{
					is_admin   = is_admin(playername),
					playername = playername
				})
	end

	playerui:hide()

	local main_tab = playerui:find_by_name("mainview")

	if not main_tab then
		return
	end

	main_tab:show()
	playerui:update()
end

--------------------------------------------------------------------------------
minetest.register_chatcommand("mobf",
	{
		params		= "",
		description = "show mobf settings" ,
		privs		= {},
		func		= init_player_ui
	})
minetest.log("action","MOD: mobf_settings mod           version "..mobf_settings_version.." loaded")