forked from mtcontrib/factions
Remove: optional_depends
This commit is contained in:
parent
c531294335
commit
0dd50e7141
@ -123,14 +123,6 @@ factions.register_command = function(cmd_name, cmd, ignore_param_count, or_perm,
|
||||
end
|
||||
end
|
||||
|
||||
factions.register_commands = function(cmd_names, cmd, ignore_param_count, or_perm)
|
||||
local hide = false
|
||||
for k, v in pairs(cmd_names) do
|
||||
factions.register_command(k, cmd, ignore_param_count, or_perm, hide)
|
||||
hide = true
|
||||
end
|
||||
end
|
||||
|
||||
local init_commands
|
||||
init_commands = function()
|
||||
|
||||
@ -1670,9 +1662,9 @@ local premade_help = ""
|
||||
|
||||
local premade_help_admin = ""
|
||||
|
||||
local a_z = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
|
||||
local a_z = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
|
||||
|
||||
minetest.register_on_mods_loaded(function()
|
||||
function factions.create_help_text()
|
||||
for l, j in pairs(a_z) do
|
||||
for k, v in pairs(factions.commands) do
|
||||
if k:sub(1, 1) == j then
|
||||
@ -1685,7 +1677,10 @@ minetest.register_on_mods_loaded(function()
|
||||
end
|
||||
end
|
||||
end
|
||||
a_z = nil
|
||||
end
|
||||
|
||||
minetest.register_on_mods_loaded(function()
|
||||
factions.create_help_text()
|
||||
end)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
@ -12,28 +12,6 @@ factions.player_ips = factions.root.sub_database("ips")
|
||||
-- Memory only storage.
|
||||
factions.onlineplayers = {}
|
||||
|
||||
-- Table hook functions.
|
||||
|
||||
-- Hook function to add or delete from the faction table.
|
||||
function factions.on_create_faction_table(table)
|
||||
return table
|
||||
end
|
||||
|
||||
-- Hook function to add or delete from the ip table.
|
||||
function factions.on_create_ip_table(table)
|
||||
return table
|
||||
end
|
||||
|
||||
-- Hook function to add or delete from the player table.
|
||||
function factions.on_create_player_table(table)
|
||||
return table
|
||||
end
|
||||
|
||||
-- Hook function to add or delete from the claim table.
|
||||
function factions.on_create_parcel_table(table)
|
||||
return table
|
||||
end
|
||||
|
||||
-- Table creation.
|
||||
|
||||
-- Create a empty faction.
|
||||
@ -87,7 +65,7 @@ function factions.create_faction_table()
|
||||
--! @brief access table
|
||||
access = {players = {}, factions = {}},
|
||||
}
|
||||
return factions.on_create_faction_table(table)
|
||||
return table
|
||||
end
|
||||
|
||||
-- Create a empty ip table.
|
||||
@ -95,7 +73,7 @@ function factions.create_ip_table()
|
||||
local table = {
|
||||
ip = ""
|
||||
}
|
||||
return factions.on_create_ip_table(table)
|
||||
return table
|
||||
end
|
||||
|
||||
-- Create a empty player table.
|
||||
@ -103,7 +81,7 @@ function factions.create_player_table()
|
||||
local table = {
|
||||
faction = ""
|
||||
}
|
||||
return factions.on_create_player_table(table)
|
||||
return table
|
||||
end
|
||||
|
||||
-- Create a empty claim table.
|
||||
@ -111,7 +89,7 @@ function factions.create_parcel_table()
|
||||
local table = {
|
||||
faction = ""
|
||||
}
|
||||
return factions.on_create_parcel_table(table)
|
||||
return table
|
||||
end
|
||||
|
||||
-- helper functions
|
||||
|
3
mod.conf
3
mod.conf
@ -1,4 +1,3 @@
|
||||
name = factions
|
||||
description = Mod for handling in game factions and reputation.
|
||||
description = Mc style faction system.
|
||||
depends = colddb
|
||||
optional_depends = default, doors, xdecor, ts_doors
|
||||
|
@ -12,6 +12,7 @@ function factions.can_use_node(pos, player, permission)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_on_mods_loaded(function()
|
||||
-- Make default chest the faction chest.
|
||||
if minetest.registered_nodes["default:chest"] then
|
||||
local dc = minetest.registered_nodes["default:chest"]
|
||||
@ -201,6 +202,8 @@ for i, l in ipairs(all_items) do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end)
|
||||
-- Code below was copied from TenPlus1's protector mod(MIT) and changed up a bit.
|
||||
|
||||
local x = math.floor(factions_config.parcel_size / 2.1)
|
||||
|
Loading…
Reference in New Issue
Block a user