2010-12-20 13:04:31 +01:00
|
|
|
/*
|
|
|
|
Minetest-c55
|
|
|
|
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along
|
|
|
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2011-10-12 12:53:38 +02:00
|
|
|
#include "settings.h"
|
2010-12-20 13:04:31 +01:00
|
|
|
|
2011-10-12 12:53:38 +02:00
|
|
|
void set_default_settings(Settings *settings)
|
2010-12-20 13:04:31 +01:00
|
|
|
{
|
2011-02-08 00:12:55 +01:00
|
|
|
// Client and server
|
2011-05-14 14:43:26 +02:00
|
|
|
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("port", "");
|
|
|
|
settings->setDefault("name", "");
|
|
|
|
settings->setDefault("footprints", "false");
|
2011-02-08 00:12:55 +01:00
|
|
|
|
2010-12-20 13:04:31 +01:00
|
|
|
// Client stuff
|
2011-05-14 14:43:26 +02:00
|
|
|
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("keymap_forward", "KEY_KEY_W");
|
|
|
|
settings->setDefault("keymap_backward", "KEY_KEY_S");
|
|
|
|
settings->setDefault("keymap_left", "KEY_KEY_A");
|
|
|
|
settings->setDefault("keymap_right", "KEY_KEY_D");
|
|
|
|
settings->setDefault("keymap_jump", "KEY_SPACE");
|
|
|
|
settings->setDefault("keymap_sneak", "KEY_LSHIFT");
|
2011-11-27 04:01:38 +01:00
|
|
|
settings->setDefault("keymap_drop", "KEY_KEY_Q");
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("keymap_inventory", "KEY_KEY_I");
|
2011-10-17 19:40:55 +02:00
|
|
|
settings->setDefault("keymap_special1", "KEY_KEY_E");
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("keymap_chat", "KEY_KEY_T");
|
|
|
|
settings->setDefault("keymap_cmd", "/");
|
2011-12-03 09:01:14 +01:00
|
|
|
settings->setDefault("keymap_console", "KEY_F10");
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("keymap_rangeselect", "KEY_KEY_R");
|
|
|
|
settings->setDefault("keymap_freemove", "KEY_KEY_K");
|
|
|
|
settings->setDefault("keymap_fastmove", "KEY_KEY_J");
|
|
|
|
settings->setDefault("keymap_screenshot", "KEY_F12");
|
2012-02-01 00:56:30 +01:00
|
|
|
settings->setDefault("keymap_toggle_hud", "KEY_F1");
|
|
|
|
settings->setDefault("keymap_toggle_chat", "KEY_F2");
|
2011-10-18 20:08:31 +02:00
|
|
|
settings->setDefault("keymap_toggle_force_fog_off", "KEY_F3");
|
2011-11-02 17:13:56 +01:00
|
|
|
settings->setDefault("keymap_toggle_update_camera", "KEY_F4");
|
2012-02-01 00:56:30 +01:00
|
|
|
settings->setDefault("keymap_toggle_debug", "KEY_F5");
|
|
|
|
settings->setDefault("keymap_toggle_profiler", "KEY_F6");
|
2012-03-12 20:27:29 +01:00
|
|
|
settings->setDefault("keymap_increase_viewing_range_min", "+");
|
|
|
|
settings->setDefault("keymap_decrease_viewing_range_min", "-");
|
2011-05-14 14:43:26 +02:00
|
|
|
// Some (temporary) keys for debugging
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("keymap_print_debug_stacks", "KEY_KEY_P");
|
2012-03-12 20:27:29 +01:00
|
|
|
settings->setDefault("keymap_quicktune_prev", "KEY_HOME");
|
|
|
|
settings->setDefault("keymap_quicktune_next", "KEY_END");
|
|
|
|
settings->setDefault("keymap_quicktune_dec", "KEY_NEXT");
|
|
|
|
settings->setDefault("keymap_quicktune_inc", "KEY_PRIOR");
|
2011-05-14 14:43:26 +02:00
|
|
|
|
2012-02-01 00:56:30 +01:00
|
|
|
// Show debug info by default?
|
|
|
|
#ifdef NDEBUG
|
|
|
|
settings->setDefault("show_debug", "false");
|
|
|
|
#else
|
|
|
|
settings->setDefault("show_debug", "true");
|
|
|
|
#endif
|
|
|
|
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("wanted_fps", "30");
|
|
|
|
settings->setDefault("fps_max", "60");
|
2012-02-03 01:24:36 +01:00
|
|
|
// A bit more than the server will send around the player, to make fog blend well
|
2012-02-06 16:26:48 +01:00
|
|
|
settings->setDefault("viewing_range_nodes_min", "35");
|
2012-03-16 15:34:30 +01:00
|
|
|
settings->setDefault("viewing_range_nodes_max", "160");
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("screenW", "800");
|
|
|
|
settings->setDefault("screenH", "600");
|
|
|
|
settings->setDefault("address", "");
|
|
|
|
settings->setDefault("random_input", "false");
|
|
|
|
settings->setDefault("client_unload_unused_data_timeout", "600");
|
|
|
|
settings->setDefault("enable_fog", "true");
|
|
|
|
settings->setDefault("fov", "72");
|
|
|
|
settings->setDefault("view_bobbing", "true");
|
|
|
|
settings->setDefault("new_style_water", "false");
|
2011-11-02 11:50:21 +01:00
|
|
|
settings->setDefault("new_style_leaves", "false");
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("smooth_lighting", "true");
|
|
|
|
settings->setDefault("enable_texture_atlas", "true");
|
|
|
|
settings->setDefault("texture_path", "");
|
|
|
|
settings->setDefault("video_driver", "opengl");
|
|
|
|
settings->setDefault("free_move", "false");
|
|
|
|
settings->setDefault("continuous_forward", "false");
|
|
|
|
settings->setDefault("fast_move", "false");
|
|
|
|
settings->setDefault("invert_mouse", "false");
|
|
|
|
settings->setDefault("enable_farmesh", "false");
|
|
|
|
settings->setDefault("enable_clouds", "true");
|
|
|
|
settings->setDefault("screenshot_path", ".");
|
2011-10-15 15:32:24 +02:00
|
|
|
settings->setDefault("view_bobbing_amount", "1.0");
|
2011-11-02 11:50:21 +01:00
|
|
|
settings->setDefault("enable_3d_clouds", "false");
|
2011-11-03 22:06:57 +01:00
|
|
|
settings->setDefault("opaque_water", "false");
|
2011-12-03 09:01:14 +01:00
|
|
|
settings->setDefault("console_color", "(0,0,0)");
|
|
|
|
settings->setDefault("console_alpha", "200");
|
2012-03-11 19:45:14 +01:00
|
|
|
|
2010-12-20 13:04:31 +01:00
|
|
|
// Server stuff
|
2011-10-15 14:02:28 +02:00
|
|
|
// "map-dir" doesn't exist by default.
|
2012-03-11 19:45:14 +01:00
|
|
|
settings->setDefault("default_game", "mesetint");
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("motd", "");
|
2012-01-24 11:02:40 +01:00
|
|
|
settings->setDefault("max_users", "100");
|
2011-10-15 14:02:28 +02:00
|
|
|
settings->setDefault("strict_protocol_version_checking", "true");
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("creative_mode", "false");
|
|
|
|
settings->setDefault("enable_damage", "true");
|
2011-10-16 10:52:33 +02:00
|
|
|
settings->setDefault("only_peaceful_mobs", "false");
|
2011-10-15 14:02:28 +02:00
|
|
|
settings->setDefault("fixed_map_seed", "");
|
2011-11-26 02:49:46 +01:00
|
|
|
settings->setDefault("give_initial_stuff", "false");
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("default_password", "");
|
|
|
|
settings->setDefault("default_privs", "build, shout");
|
2011-12-02 10:22:09 +01:00
|
|
|
settings->setDefault("unlimited_player_transfer_distance", "true");
|
2011-12-02 10:25:47 +01:00
|
|
|
settings->setDefault("enable_pvp", "true");
|
2011-10-15 14:02:28 +02:00
|
|
|
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("profiler_print_interval", "0");
|
|
|
|
settings->setDefault("enable_mapgen_debug_info", "false");
|
2011-10-15 01:28:57 +02:00
|
|
|
settings->setDefault("active_object_send_range_blocks", "3");
|
2011-10-17 23:41:17 +02:00
|
|
|
settings->setDefault("active_block_range", "2");
|
2011-10-12 12:53:38 +02:00
|
|
|
//settings->setDefault("max_simultaneous_block_sends_per_client", "1");
|
2011-06-26 02:14:52 +02:00
|
|
|
// This causes frametime jitter on client side, or does it?
|
2012-03-16 15:34:30 +01:00
|
|
|
settings->setDefault("max_simultaneous_block_sends_per_client", "4");
|
|
|
|
settings->setDefault("max_simultaneous_block_sends_server_total", "20");
|
|
|
|
settings->setDefault("max_block_send_distance", "10");
|
|
|
|
settings->setDefault("max_block_generate_distance", "6");
|
|
|
|
settings->setDefault("time_send_interval", "5");
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("time_speed", "96");
|
2011-12-02 00:20:54 +01:00
|
|
|
settings->setDefault("server_unload_unused_data_timeout", "29");
|
|
|
|
settings->setDefault("server_map_save_interval", "5.3");
|
2011-10-12 12:53:38 +02:00
|
|
|
settings->setDefault("full_block_send_enable_min_time_from_building", "2.0");
|
2011-10-15 14:02:28 +02:00
|
|
|
settings->setDefault("enable_experimental", "false");
|
2012-03-07 20:44:53 +01:00
|
|
|
settings->setDefault("dedicated_server_step", "0.05");
|
2010-12-20 13:04:31 +01:00
|
|
|
}
|
|
|
|
|