start_level(),
enable_script_debugger(),
start_demo(),
- record_demo()
+ record_demo(),
+ developer_mode()
{
}
" --noconsole Disable ingame scripting console\n"
" --show-fps Display framerate in levels\n"
" --no-show-fps Do not display framerate in levels\n"
+ " --developer Switch on developer feature\n"
" -s, --debug-scripts Enable script debugger.\n"
"\n"
"Demo Recording Options:\n"
{
show_fps = false;
}
+ else if (arg == "--developer")
+ {
+ developer_mode = true;
+ }
else if (arg == "--console")
{
console_enabled = true;
merge_option(enable_script_debugger);
merge_option(start_demo);
merge_option(record_demo);
+ merge_option(developer_mode);
#undef merge_option
}
boost::optional<std::string> start_demo;
boost::optional<std::string> record_demo;
+ boost::optional<bool> developer_mode;
+
// boost::optional<std::string> locale;
public:
on_escape_press();
}
- if(InputManager::current()->get_controller()->pressed(Controller::CHEAT_MENU))
+ if(InputManager::current()->get_controller()->pressed(Controller::CHEAT_MENU) &&
+ g_config->developer_mode)
{
if (!MenuManager::instance().is_active())
{
locale(),
keyboard_config(),
joystick_config(),
- disabled_addon_filenames()
+ disabled_addon_filenames(),
+ developer_mode(false)
{
}
config_lisp->get("profile", profile);
config_lisp->get("show_fps", show_fps);
config_lisp->get("console", console_enabled);
+ config_lisp->get("developer", developer_mode);
config_lisp->get("locale", locale);
config_lisp->get("random_seed", random_seed);
writer.write("profile", profile);
writer.write("show_fps", show_fps);
writer.write("console", console_enabled);
+ writer.write("developer", developer_mode);
writer.write("locale", locale);
writer.start_list("video");
JoystickConfig joystick_config;
std::vector<std::string> disabled_addon_filenames;
+
+ bool developer_mode;
};
#endif
g_config->console_enabled = true;
g_config->save();
}
+ else if (event.key.keysym.sym == SDLK_F2 &&
+ event.key.keysym.mod & KMOD_CTRL)
+ {
+ g_config->developer_mode = !g_config->developer_mode;
+ log_info << "developer mode: " << g_config->developer_mode << std::endl;
+ }
break;
}
}
#include "sprite/sprite.hpp"
#include "sprite/sprite_manager.hpp"
#include "supertux/game_session.hpp"
+#include "supertux/gameconfig.hpp"
#include "supertux/globals.hpp"
#include "supertux/menu/menu_storage.hpp"
#include "supertux/menu/options_menu.hpp"
#include "worldmap/tux.hpp"
#include "worldmap/worldmap.hpp"
-
static const float CAMERA_PAN_SPEED = 5.0;
namespace worldmap {
on_escape_press();
}
- if(controller->pressed(Controller::CHEAT_MENU))
+ if(controller->pressed(Controller::CHEAT_MENU) &&
+ g_config->developer_mode)
{
MenuManager::instance().set_menu(MenuStorage::WORLDMAP_CHEAT_MENU);
}