Compare commits

...

6 Commits

Author SHA1 Message Date
Elkien3 1bf4418444 Add /apply
thanks to AKryukov92 I had the base code to tweak to my liking
2018-02-05 18:24:11 -06:00
Elkien3 8dd3a0b439 Fixed diplo scrolling
you only see 4, not 5
2017-10-19 09:06:26 -05:00
Elkien3 f82495b539 Update with kingdoms_game version
previous to this will be quite outdated
2017-10-19 08:28:29 -05:00
Elkien3 64a762383c Merge branch 'master' of https://github.com/Elkien3/ctf_pvp_engine 2017-06-25 20:48:26 -05:00
Elkien3 f0f3f5c0b3 Fixed player join/leave
Fixed both saving new recruits, and also the /teamleave function
2017-06-25 20:48:02 -05:00
Elkien3 15b19022d8 added server settings
yep
2017-06-14 14:38:46 -05:00
7 changed files with 633 additions and 55 deletions

View File

@ -245,7 +245,8 @@ function ctf.save()
if file then
local out = {
teams = ctf.teams,
players = ctf.players
players = ctf.players,
applications = ctf.applications
}
for i = 1, #ctf.registered_on_save do

View File

@ -55,7 +55,7 @@ function ctf.gui.get_tabs(name, tname)
local result = ""
local id = 1
local function addtab(name,text)
result = result .. "button[" .. (id*2-1) .. ",0;2,1;" .. name .. ";" .. text .. "]"
result = result .. "button[" .. (id*1.5-1) .. ",0;1.5,1;" .. name .. ";" .. text .. "]"
id = id + 1
end
@ -99,8 +99,6 @@ ctf.gui.register_tab("news", "News", function(name, tname)
end
result = result .. "button[6," .. height .. ";1,1;btn_y" .. i .. ";Yes]"
result = result .. "button[7," .. height .. ";1,1;btn_n" .. i .. ";No]"
else
result = result .. "label[0.5," .. height .. ";RANDOM REQUEST TYPE]"
end
end
else
@ -131,6 +129,37 @@ ctf.gui.register_tab("news", "News", function(name, tname)
result)
end)
ctf.gui.register_tab("applications","Applications", function(name, tname)
local result = ""
local data = {}
result = result .. "label[0.5,1;Applicants to join " .. tname .. "]"
for key, value in pairs(ctf.teams) do
if key == tname then
local height = 1.5
for key, value in pairs(value.applications) do
result = result .. "label[0.5.75," .. height .. ";" .. value .. "]"
if ctf.player(name).auth or ctf.player(name).recruit then
result = result .. "button[2.5," .. height .. ";2,1;player_" ..
value .. ";Accept]"
result = result .. "button[4.5," .. height .. ";2,1;player_" ..
value .. ";Reject]"
end
height = height + 1
end
end
end
minetest.show_formspec(name, "ctf:applications",
"size[10,7]" ..
ctf.gui.get_tabs(name, tname) ..
result
)
end)
local scroll_diplomacy = 0
local scroll_max = 0
-- Team interface
ctf.gui.register_tab("diplo", "Diplomacy", function(name, tname)
local result = ""
@ -150,7 +179,24 @@ ctf.gui.register_tab("diplo", "Diplomacy", function(name, tname)
end
result = result .. "label[1,1;Diplomacy from the perspective of " .. tname .. "]"
scroll_max = 0
for i = 1, #data do
scroll_max = i
end
scroll_max = scroll_max - 4
if scroll_diplomacy > (scroll_max+4) then
scroll_diplomacy = (scroll_max+4)
end
if scroll_diplomacy > 0 then
result = result .. "button[9.2,0.44;1,3;scroll_up;Up]"
end
if scroll_diplomacy < scroll_max then
result = result .. "button[9.2,3.8;1,3;scroll_down;Down]"
end
for i = 1, #data do
amount = i
local height = (i*1)+0.5
@ -159,35 +205,37 @@ ctf.gui.register_tab("diplo", "Diplomacy", function(name, tname)
break
end
local L = i + scroll_diplomacy
result = result .. "background[1," .. height .. ";8.2,1;diplo_" ..
data[i].state .. ".png]"
data[L].state .. ".png]"
result = result .. "button[1.25," .. height .. ";2,1;team_" ..
data[i].team .. ";" .. data[i].team .. "]"
result = result .. "label[3.75," .. height .. ";" .. data[i].state
data[L].team .. ";" .. data[L].team .. "]"
result = result .. "label[3.75," .. height .. ";" .. data[L].state
.. "]"
if ctf.can_mod(name, tname) and ctf.player(name).team == tname then
if not data[i].from and not data[i].to then
if data[i].state == "war" then
if not data[L].from and not data[L].to then
if data[L].state == "war" then
result = result .. "button[7.5," .. height ..
";1.5,1;peace_" .. data[i].team .. ";Peace]"
elseif data[i].state == "peace" then
";1.5,1;peace_" .. data[L].team .. ";Peace]"
elseif data[L].state == "peace" then
result = result .. "button[6," .. height ..
";1.5,1;war_" .. data[i].team .. ";War]"
";1.5,1;war_" .. data[L].team .. ";War]"
result = result .. "button[7.5," .. height ..
";1.5,1;alli_" .. data[i].team .. ";Alliance]"
elseif data[i].state == "alliance" then
";1.5,1;alli_" .. data[L].team .. ";Alliance]"
elseif data[L].state == "alliance" then
result = result .. "button[6," .. height ..
";1.5,1;peace_" .. data[i].team .. ";Peace]"
";1.5,1;peace_" .. data[L].team .. ";Peace]"
end
elseif data[i].from ~= nil then
elseif data[L].from ~= nil then
result = result .. "label[6," .. height ..
";request recieved]"
elseif data[i].to ~= nil then
elseif data[L].to ~= nil then
result = result .. "label[5.5," .. height ..
";request sent]"
result = result .. "button[7.5," .. height ..
";1.5,1;cancel_" .. data[i].team .. ";Cancel]"
";1.5,1;cancel_" .. data[L].team .. ";Cancel]"
end
end
end
@ -207,7 +255,19 @@ local function formspec_is_ctf_tab(fsname)
end
return false
end
function remove_application_log_entry(tname, pname)
local entries = ctf.team(tname).log
if not entries then
return
end
for i = 1, #entries do
if entries[i].mode == "applications" and entries[i].player == pname then
table.remove(entries, i)
return
end
end
end
minetest.register_on_player_receive_fields(function(player, formname, fields)
if not formspec_is_ctf_tab(formname) then
return false
@ -246,40 +306,76 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local tname = tplayer.team
local team = ctf.team(tname)
if not team then
if not team or formname ~= "ctf:news" then
return false
end
if formname == "ctf:news" then
for key, field in pairs(fields) do
local ok, id = string.match(key, "btn_([yn])([0123456789]+)")
if ok and id then
if ok == "y" then
ctf.diplo.set(tname, team.log[tonumber(id)].team, team.log[tonumber(id)].msg)
for key, field in pairs(fields) do
local ok, id = string.match(key, "btn_([yn])([0123456789]+)")
if ok and id then
if ok == "y" then
ctf.diplo.set(tname, team.log[tonumber(id)].team, team.log[tonumber(id)].msg)
-- Post to acceptor's log
ctf.post(tname, {
msg = "You have accepted the " ..
team.log[tonumber(id)].msg .. " request from " ..
team.log[tonumber(id)].team })
-- Post to acceptor's log
ctf.post(tname, {
msg = "You have accepted the " ..
team.log[tonumber(id)].msg .. " request from " ..
team.log[tonumber(id)].team })
-- Post to request's log
ctf.post(team.log[tonumber(id)].team, {
msg = tname .. " has accepted your " ..
team.log[tonumber(id)].msg .. " request" })
-- Post to request's log
ctf.post(team.log[tonumber(id)].team, {
msg = tname .. " has accepted your " ..
team.log[tonumber(id)].msg .. " request" })
id = id + 1
end
id = id + 1
end
table.remove(team.log, id)
ctf.needs_save = true
ctf.gui.show(name, "news")
table.remove(team.log, id)
ctf.needs_save = true
ctf.gui.show(name, "news")
return true
end
local applicant_name, id = string.match(key, "player_([^_]+)_([0123456789]+)")
if applicant_name then
local acceptor_name = name
local team_name = tname
local decision = field
ctf.decide_application(
applicant_name,
acceptor_name,
team_name,
decision)
return true
end
end
end)
minetest.register_on_player_receive_fields(function(player, formname, fields)
local acceptor_name = player:get_player_name()
local team_name = ctf.player(acceptor_name).team
local team = ctf.team(team_name)
if not team or formname ~= "ctf:applications" then
return false
end
for key, field in pairs(fields) do
if ctf.player(acceptor_name).auth or ctf.player(acceptor_name).recruit then
local applicant_name = string.match(key, "player_(.+)")
if applicant_name then
local decision = field
ctf.decide_application(
applicant_name,
acceptor_name,
team_name,
decision)
ctf.gui.show(acceptor_name, "applications")
return true
end
end
end
end)
local cur_team = nil
minetest.register_on_player_receive_fields(function(player, formname, fields)
local name = player:get_player_name()
local tplayer = ctf.player(name)
@ -287,13 +383,35 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local team = ctf.team(tname)
if not team or formname ~= "ctf:diplo" then
cur_team = nil
return false
end
if cur_team == nil then
cur_team = tname
end
if fields.scroll_up then
if scroll_diplomacy > 0 then
scroll_diplomacy = scroll_diplomacy - 1
else
scroll_diplomacy = 0
end
ctf.gui.show(name, "diplo", cur_team)
end
if fields.scroll_down then
if scroll_diplomacy < (scroll_max) then
scroll_diplomacy = scroll_diplomacy + 1
else
scroll_diplomacy = scroll_max
end
ctf.gui.show(name, "diplo", cur_team)
end
for key, field in pairs(fields) do
local tname2 = string.match(key, "team_(.+)")
if tname2 and ctf.team(tname2) then
ctf.gui.show(name, "diplo", tname2)
cur_team = tname2
return true
end
@ -325,8 +443,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
ctf.diplo.set(tname, tname2, "war")
ctf.post(tname, {
msg = "You have declared war on " .. tname2 })
irc:say(tname .. "has declared war on " .. tname2 .. "!")
minetest.chat_send_all(tname .. "has declared war on " .. tname2 .. "!")
irc:say(tname .. " has declared war on " .. tname2 .. "!")
minetest.chat_send_all(tname .. " has declared war on " .. tname2 .. "!")
ctf.post(tname2, {
msg = tname .. " has declared war on you" })
ctf.gui.show(name, "diplo")

View File

@ -13,6 +13,10 @@ function ctf.team(name)
else
local team = ctf.teams[name]
if team then
--Migration to version with applications
if not team.applications then
team.applications = {}
end
if not team.data or not team.players then
ctf.warning("team", "Assertion failed, data{} or players{} not " ..
"found in team{}")
@ -33,7 +37,8 @@ function ctf.create_team(name, data)
ctf.teams[name] = {
data = data,
spawn = nil,
players = {}
players = {},
applications = {}
}
for i = 1, #ctf.registered_on_new_team do
@ -125,6 +130,7 @@ function ctf.remove_player(name)
team.players[name] = nil
end
ctf.players[name] = nil
ctf.needs_save = true
return true
else
return false
@ -141,6 +147,90 @@ end
-- Player joins team
-- Called by /join, /team join or auto allocate.
ctf.registered_on_join_team = {}
function ctf.register_on_join_team(func)
if ctf._mt_loaded then
error("You can't register callbacks at game time!")
end
table.insert(ctf.registered_on_join_team, func)
end
-- Player makes an application to team manager to join a team
-- Called by /apply
function ctf.application_join(name, tname)
if not name or name == "" or not tname or tname == "" then
ctf.log("teams", "Missing parameters to ctf.request_join")
end
local player = ctf.player(name)
if player.team and player.team == tname then
minetest.chat_send_player(name, "You are already a member of team " .. tname)
return false
end
if not ctf.setting("players_can_change_team") and player.team and ctf.team(player.team) then
ctf.action("teams", name .. " requested to change to " .. tname)
minetest.chat_send_player(name, "You are not allowed to switch teams, traitor!")
return false
end
local team_data = ctf.team(tname)
if not team_data then
minetest.chat_send_player(name, "No such team.")
ctf.list_teams(name)
minetest.log("action", name .. " requested to join to " .. tname .. ", which doesn't exist")
return false
end
table.insert(team_data.applications,name)
--ctf.post(tname, {msg = name .. " has applied to join!" })
ctf.needs_save = true
return true
end
function ctf.decide_application(applicant_name, acceptor_name, team_name, decision)
if not applicant_name then
return false
end
local applicant = ctf.player(applicant_name)
if not applicant then
return false
end
if decision == "Accept" then
if applicant.team and ctf.setting("players_can_change_team") then
minetest.chat_send_player(acceptor_name, "Player " .. applicant_name .. " already a member of team " .. applicant.team)
else
ctf.join(applicant_name, team_name, true, acceptor_name)
table.insert(ctf.teams[ctf.players[acceptor_name].team].log,{msg=applicant_name .. " was recruited " .. acceptor_name .. "!"})
end
end
for key, field in pairs(ctf.teams) do
ctf.delete_application(applicant_name, key)
end
remove_application_log_entry(team_name, applicant_name)
end
function ctf.delete_application(name, tname)
if not name or name == "" or not tname or tname == "" then
ctf.log("teams", "Missing parameters to ctf.delete_application")
end
local team = ctf.team(tname)
if not team then
minetest.chat_send_player(name, "No such team.")
return false
end
for key, field in pairs(team.applications) do
if field == name then
table.remove(team.applications, key)
ctf.needs_save = true
return true
end
end
return false
end
-- Player joins team
-- Called by /join, /team join, auto allocate or by response of the team manager.
function ctf.join(name, team, force, by)
if not name or name == "" or not team or team == "" then
ctf.log("team", "Missing parameters to ctf.join")
@ -193,10 +283,11 @@ function ctf.join(name, team, force, by)
player.team = team
team_data.players[player.name] = player
ctf.needs_save = true
minetest.log("action", name .. " joined team " .. team)
minetest.chat_send_all(name.." has joined team "..team)
minetest.get_player_privs(name).initial_team_join = false
for i = 1, #ctf.registered_on_join_team do
ctf.registered_on_join_team[i](name, team)

View File

@ -1,3 +1,4 @@
ctf
chatplus?
irc?
inventory_plus

View File

@ -71,6 +71,9 @@ minetest.register_chatcommand("team", {
if value.auth then
minetest.chat_send_player(name, count .. ">> " .. value.name
.. " (team owner)")
elseif value.recruit then
minetest.chat_send_player(name, count .. ">> " .. value.name
.. " (team recruiter)")
else
minetest.chat_send_player(name, count .. ">> " .. value.name)
end
@ -83,6 +86,9 @@ minetest.register_chatcommand("team", {
if ctf.player(test).auth then
return true, test ..
" is in team " .. ctf.player(test).team.." (team owner)"
elseif ctf.player(test).recruit then
return true, test ..
" is in team " .. ctf.player(test).team.." (team recruiter)"
else
return true, test ..
" is in team " .. ctf.player(test).team
@ -138,6 +144,18 @@ minetest.register_chatcommand("team", {
end
})
minetest.register_chatcommand("apply", {
params = "team name",
description = "Petition to join to team",
func = function(name, param)
if ctf.petition_join(name, param) then
return true, "Petition was successfully sent to team " .. param .. "!"
else
return false, "Failed to apply to team!"
end
end
})
minetest.register_chatcommand("join", {
params = "player name",
description = "Add to team",
@ -148,14 +166,14 @@ minetest.register_chatcommand("join", {
elseif ctf.player(param).team then
return false, param .. " is already in a team!"
else
if ctf.player(name).auth then
if ctf.player(name).auth or ctf.player(name).recruit then
if ctf.join(param, team, false, name) then
return true, "Joined " .. param .. " to " .. team .. "!"
else
return false, "Failed to join team!"
end
else
return false, "You are not the team owner!"
return false, "You are not a team owner/recuiter!"
end
end
end
@ -168,25 +186,28 @@ minetest.register_chatcommand("teamkick", {
if ctf.player(param).team ~= team then
return false, param .. " is not in your team!"
else
if ctf.player(name).auth then
if ctf.player(name).auth or ctf.player(name).recruit then
if ctf.player(param).auth or ctf.player(param).recuiter then
return false, param.. " is a team owner or recruiter!"
else
if ctf.remove_player(param) then
return true, "Kicked " .. param .. " from " .. team .. "!"
else
return false, "Failed to kick " .. param.. "!"
end
else
return false, "You are not the team owner!"
end
else
return false, "You are not the team owner!"
end
end
})
end})
minetest.register_chatcommand("teamleave", {
params = "none",
description = "Leave your team",
func = function(name, param)
local team = ctf.player(name).team
if ctf.player(param).team ~= nil then
if ctf.remove_player(param) then
if ctf.player(name).team ~= nil then
if ctf.remove_player(name) then
return true, "You have left " .. team .. "!"
else
return false, "Failed to leave " .. team.. "!"
@ -276,11 +297,33 @@ minetest.register_chatcommand("team_owner", {
end
})
minetest.register_chatcommand("team_recruiter", {
params = "player name",
description = "Make player able to recruit",
func = function(name, param)
if ctf.player(name).auth or minetest.get_player_privs(name).ctf_admin then
if ctf and ctf.players and ctf.player(param) and ctf.player(param).team and ctf.team(ctf.player(param).team) then
if ctf.player(param).recruit == true then
ctf.player(param).recruit = false
return true, param.." was downgraded from team recruiter status"
else
ctf.player(param).recruit = true
return true, param.." was upgraded to a recruiter of "..ctf.player(name).team
end
ctf.needs_save = true
else
return false, "Unable to do that :/ "..param.." does not exist, or is not part of a valid team."
end
else
return false, "You are not the team owner!"
end
end
})
minetest.register_chatcommand("post", {
params = "message",
description = "Post a message on your team's message board",
func = function(name, param)
if ctf and ctf.players and ctf.players[name] and ctf.players[name].team and ctf.teams[ctf.players[name].team] then
if not ctf.player(name).auth then
minetest.chat_send_player(name, "You do not own that team")
@ -397,3 +440,11 @@ if minetest.global_exists("chatplus") then
return false
end)
end
minetest.register_on_joinplayer(function(player)
inventory_plus.register_button(player,"ctf", "ctf")
end)
minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields.ctf then
ctf.gui.show(player:get_player_name())
end
end)

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

316
minetest_kingdoms.conf Normal file
View File

@ -0,0 +1,316 @@
name = sparky
#
# Server stuff
#
# Network port to listen (UDP)
port = 30000
#Bind address
bind_address = 0.0.0.0
# Name of server
server_name = Persistent Kingdoms [City vs City]
# Description of server
server_description = Meet and Join other players in an dynamic kingdom-based environment! Team flag protection only. Changed nametags, 0.4.14+ required.
# Domain name of server
server_address = elkien3.com
# Homepage of server
server_url = https://forum.minetest.net/viewtopic.php?f=10&t=14587
# Automaticaly report to masterserver
server_announce = 1
# Announce to this masterserver.
# If you want to announce your ipv6 address - use serverlist_url = v6.servers.minetest.net.
serverlist_url = servers.minetest.net
# Default game (default when creating a new world)
default_game = minetest_kingdoms
# World directory (everything in the world is stored here)
#map-dir = /custom/world
# Message of the Day
motd = Welcome! Use /rules to take or review the interact test or rules. bookshelf at spawn inn (0,0,50) use "/report <message>" to contact an admin.
# Maximum number of players connected simultaneously
max_users = 100
# Set to true to disallow old clients from connecting
strict_protocol_version_checking = true
# Time in seconds for item entity to live. Default value: 900s.
# Setting it to -1 disables the feature.
item_entity_ttl = 900
# Set to true to enable creative mode (unlimited inventory)
creative_mode = false
# Enable players getting damage and dying
enable_damage = true
# A chosen map seed for a new map, leave empty for random
#fixed_map_seed =
# Gives some stuff to players at the beginning
give_initial_stuff = true
# New users need to input this password
#default_password =
# Available privileges: interact, shout, teleport, settime, privs, ...
# See /privs in game for a full list on your server and mod configuration.
default_privs = shout
# Whether players are shown to clients without any range limit.
# Deprecated, use the setting player_transfer_distance instead.
#unlimited_player_transfer_distance = false
# Defines the maximal player transfer distance in blocks (0 = unlimited)
player_transfer_distance = 6
# Whether to enable players killing each other
enable_pvp = true
# If this is set, players will always (re)spawn at the given position
#static_spawnpoint = 0, 10, 0
# If true, new players cannot join with an empty password
disallow_empty_password = true
# If true, disable cheat prevention in multiplayer
disable_anticheat = true
# If true, actions are recorded for rollback
# This option is only read when server starts
enable_rollback_recording = true
# Handling for deprecated lua api calls:
# "legacy" = (try to) mimic old behaviour (default for release).
# "log" = mimic and log backtrace of deprecated call (default for debug).
# "error" = abort on usage of deprecated call (suggested for mod developers).
#deprecated_lua_api_handling = legacy
#kick_msg_shutdown = Server shutting down.
# A message to be displayed to all clients when the server shuts down
#kick_msg_crash = This server has experienced an internal error. You will now be disconnected. Server should be back up in a few minutes.
# A message to be displayed to all clients when the server crashes
#ask_reconnect_on_crash = yes
# Whether to ask clients to reconnect after a (lua) crash.
# Set this to true if your server is set up to restart automatically.
# Mod profiler
#mod_profiling = false
# Detailed mod profile data
#detailed_profiling = false
# Profiler data print interval. #0 = disable.
#profiler_print_interval = 0
#enable_mapgen_debug_info = false
# From how far client knows about objects
active_object_send_range_blocks = 3
# How large area of blocks are subject to the active block stuff.
# Active = objects are loaded and ABMs run.
active_block_range = 2
# How many blocks are flying in the wire simultaneously per client
max_simultaneous_block_sends_per_client = 10
# How many blocks are flying in the wire simultaneously per server
max_simultaneous_block_sends_server_total = 200
# From how far blocks are sent to clients, stated in mapblocks (16 nodes)
max_block_send_distance = 6
# From how far blocks are generated for clients, stated in mapblocks (16 nodes)
max_block_generate_distance = 2
# Where the map generator stops.
# Please note:
# * Limited to 31000 (setting above has no effect)
# * The map generator works in groups of 80x80x80 nodes (5x5x5 MapBlocks).
# * Those groups have an offset of -32, -32 nodes from the origin.
# * Only groups which are within the map_generation_limit are generated
#map_generation_limit = 31000
# Number of extra blocks that can be loaded by /clearobjects at once.
# This is a trade-off between sqlite transaction overhead and
# memory consumption (4096=100MB, as a rule of thumb).
max_clearobjects_extra_loaded_blocks = 122880 #(3000 MB)
# Maximum number of forceloaded blocks
max_forceloaded_blocks = 2
# Interval of sending time of day to clients
time_send_interval = 10
# Controls length of day/night cycle.
# 72=20min, 360=4min, 1=24hour, 0=day/night/whatever stays unchanged.
time_speed = 12
server_unload_unused_data_timeout = 86400
# Maximum number of statically stored objects in a block
max_objects_per_block = 49
# Interval of saving important changes in the world, stated in seconds
server_map_save_interval = 15.3
# http://www.sqlite.org/pragma.html#pragma_synchronous only numeric values: 0 1 2
sqlite_synchronous = 2
# To reduce lag, block transfers are slowed down when a player is building something.
# This determines how long they are slowed down after placing or removing a node.
#full_block_send_enable_min_time_from_building = 2.0
# Length of a server tick and the interval at which objects are generally updated over network
dedicated_server_step = 0.1
# Can be set to true to disable shutting down on invalid world data
#ignore_world_load_errors = false
# Specifies URL from which client fetches media instead of using UDP.
# $filename should be accessible from $remote_media$filename via cURL
# (obviously, remote_media should end with a slash).
# Files that are not present would be fetched the usual way.
#remote_media =
# Level of logging to be written to debug.txt:
# 0 = none, 1 = errors and debug, 2 = action, 3 = info, 4 = verbose.
#debug_log_level = 2
# Maximum number of blocks that can be queued for loading
emergequeue_limit_total = 128 #default 256
# Maximum number of blocks to be queued that are to be loaded from file.
# Set to blank for an appropriate amount to be chosen automatically.
#emergequeue_limit_diskonly = 32
# Maximum number of blocks to be queued that are to be generated.
# Set to blank for an appropriate amount to be chosen automatically.
#emergequeue_limit_generate = 32
# Number of emerge threads to use. Make this field blank, or increase this number
# to use multiple threads. On multiprocessor systems, this will improve mapgen speed greatly
# at the cost of slightly buggy caves.
num_emerge_threads = 4
# Maximum number of packets sent per send step, if you have a slow connection
# try reducing it, but don't reduce it to a number below double of targeted
# client number.
#max_packets_per_iteration = 1024
# Enable/disable IPv6
enable_ipv6 = false
# Enable/disable running an IPv6 server. An IPv6 server may be restricted
# to IPv6 clients, depending on system configuration.
# Ignored if bind_address is set.
ipv6_server = false
#main_menu_script =
#main_menu_game_mgr = 0
#main_menu_mod_mgr = 1
#modstore_download_url = https://forum.minetest.net/media/
#modstore_listmods_url = https://forum.minetest.net/mmdb/mods/
#modstore_details_url = https://forum.minetest.net/mmdb/mod/*/
# Makes DirectX work with LuaJIT. Disable if it causes troubles.
#high_precision_fpu = true
# Override language. When no value is provided (default) system language is used.
# Check "locale" directory for the list of available translations.
#language =
#
# Physics stuff
#
#movement_acceleration_default = 2
#movement_acceleration_air = 2
#movement_acceleration_fast = 10
#movement_speed_walk = 2
#movement_speed_crouch = 1.35
#movement_speed_fast = 20
#movement_speed_climb = 2
#movement_speed_jump = 6.5
#movement_speed_descend = 6
#movement_liquid_fluidity = 1
#movement_liquid_fluidity_smooth = 0.5
#movement_liquid_sink = 10
#movement_gravity = 9.81
#
# Mapgen stuff
#
# Name of map generator to be used. Currently supported: v5, v6, v7, singlenode.
mg_name = v7
# Water surface level of map
#water_level = 1
# Size of chunks to be generated, stated in mapblocks (16 nodes)
#chunksize = 5
# Global map generation attributes. Currently supported: trees, caves, flat, dungeons, light.
# Flags that are not specified in the flag string are not modified from the default.
# To explicitly turn off a flag, prepend "no" to the beginning, e.g. nolight.
#mg_flags = trees, caves, dungeons, light
# Enable/disable floating dungeons and dungeon slices
#enable_floating_dungeons = true
# Map generation attributes specific to Mapgen V6.
# Currently supported: jungles, biomeblend, mudflow, snowbiomes.
# When snowbiomes are enabled jungles are enabled and the jungles flag is ignored.
#mgv6_spflags = jungles, biomeblend, mudflow, snowbiomes
# Controls size of deserts and beaches in Mapgen V6
# When snowbiomes are enabled 'mgv6_freq_desert' is ignored.
#mgv6_freq_desert = 0.45
#mgv6_freq_beach = 0.15
# Map generation attributes specific to Mapgen V7.
# Currently supported: mountains, ridges.
#mgv7_spflags = mountains, ridges
# Perlin noise attributes for different map generation parameters.
# Noise parameters can be specified as a set of positional values:
# Offset, scale, (spread factors), seed offset, number of octaves, persistence, lacunarity.
#mgv6_np_terrain_base = -4, 20, (250, 250, 250), 82341, 5, 0.6, 2.0
# Or the new group format can be used instead, for example:
#mgv6_np_terrain_base = {
# offset = -4
# scale = 20
# spread = (250, 250, 250)
# seed = 82341
# octaves = 5
# persistence = 0.6
# lacunarity = 2.0
# flags = "defaults"
#}
# Only the group format supports noise flags which are needed for eased noise.
# Mgv5 uses eased noise for np_ground so this is shown in group format,
# other noise parameters are shown in positional format to save space.
# Noise parameters for biome API temperature, humidity and biome blend
#mg_biome_np_heat = 50, 50, (1000, 1000, 1000), 5349, 3, 0.5, 2.0
#mg_biome_np_heat_blend = 0, 1.5, (8, 8, 8), 13, 2, 1.0, 2.0
#mg_biome_np_humidity = 50, 50, (1000, 1000, 1000), 842, 3, 0.5, 2.0
#mg_biome_np_humidity_blend = 0, 1.5, (8, 8, 8), 90003, 2, 1.0, 2.0
#mgv5_np_filler_depth = 0, 1, (150, 150, 150), 261, 4, 0.7, 2.0
#mgv5_np_factor = 0, 1, (250, 250, 250), 920381, 3, 0.45, 2.0
#mgv5_np_height = 0, 10, (250, 250, 250), 84174, 4, 0.5, 2.0
#mgv5_np_cave1 = 0, 12, (50, 50, 50), 52534, 4, 0.5, 2.0
#mgv5_np_cave2 = 0, 12, (50, 50, 50), 10325, 4, 0.5, 2.0
#mgv5_np_ground = {
# offset = 0
# scale = 40
# spread = (80, 80, 80)
# seed = 983240
# octaves = 4
# persistence = 0.55
# lacunarity = 2.0
# flags = "eased"
#}
#mgv6_np_terrain_base = -4, 20, (250, 250, 250), 82341, 5, 0.6, 2.0
#mgv6_np_terrain_higher = 20, 16, (500, 500, 500), 85039, 5, 0.6, 2.0
#mgv6_np_steepness = 0.85, 0.5, (125, 125, 125), -932, 5, 0.7, 2.0
#mgv6_np_height_select = 0.5, 1, (250, 250, 250), 4213, 5, 0.69, 2.0
#mgv6_np_mud = 4, 2, (200, 200, 200), 91013, 3, 0.55, 2.0
#mgv6_np_beach = 0, 1, (250, 250, 250), 59420, 3, 0.50, 2.0
#mgv6_np_biome = 0, 1, (500, 500, 500), 9130, 3, 0.50, 2.0
#mgv6_np_cave = 6, 6, (250, 250, 250), 34329, 3, 0.50, 2.0
#mgv6_np_humidity = 0.5, 0.5, (500, 500, 500), 72384, 3, 0.50, 2.0
#mgv6_np_trees = 0, 1, (125, 125, 125), 2, 4, 0.66, 2.0
#mgv6_np_apple_trees = 0, 1, (100, 100, 100), 342902, 3, 0.45, 2.0
#mgv7_np_terrain_base = 4, 70, (600, 600, 600), 82341, 5, 0.6, 2.0
#mgv7_np_terrain_alt = 4, 25, (600, 600, 600), 5934, 5, 0.6, 2.0
#mgv7_np_terrain_persist = 0.6, 0.1, (2000, 2000, 2000), 539, 3, 0.6, 2.0
#mgv7_np_height_select = -12, 24, (500, 500, 500), 4213, 6, 0.7, 2.0
#mgv7_np_filler_depth = 0, 1.2, (150, 150, 150), 261, 3, 0.7, 2.0
#mgv7_np_mount_height = 256, 112, (1000, 1000, 1000), 72449, 3, 0.6, 2.0
#mgv7_np_ridge_uwater = 0, 1, (1000, 1000, 1000), 85039, 5, 0.6, 2.0
#mgv7_np_mountain = -0.6, 1, (250, 350, 250), 5333, 5, 0.63, 2.0
#mgv7_np_ridge = 0, 1, (100, 100, 100), 6467, 4, 0.75, 2.0
#mgv7_np_cave1 = 0, 12, (100, 100, 100), 52534, 4, 0.5, 2.0
#mgv7_np_cave2 = 0, 12, (100, 100, 100), 10325, 4, 0.5, 2.0
# Prevent mods from doing insecure things like running shell commands.
#secure.enable_security = false
# Comma-separated list of trusted mods that are allowed to access insecure
# functions even when mod security is on (via request_insecure_environment()).
#secure.trusted_mods =
cache_block_before_spawn = true
media_fetch_threads = 8
bones_mode = bones
share_bones_time = 10
# IRC
irc.nick = PK-BOT
irc.server = irc.oldcoder.org
irc.channel = #minetest-kingdoms
ctf.flag.waypoints = false
ctf.colors.skins = true
ctf.players_can_change_team = false
ctf.flag.alerts = false
ctf.flag.nobuild_radius = 3
ctf.gui.team.teleport_to_flag = false
ctf.gui.tab.flags = false
ctf.chat.global_channel = false
ctf.chat.team_channel = false
ctf.diplomacy = true
ctf.flag.protect_distance = 64
ctf.friendly_fire = true