 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file. 1 #include "../console.h"
3 #include <Strings/components/utils/io/io.h>
20 void ShowTagDataFolderList(std::string levels_root)
22 std::vector<std::string> file_list = BlamStrings::Utils::IO::GetDeepFileList(levels_root);
23 int scenario_count = 0;
25 for (std::string
file : file_list)
27 if (
file.ends_with(
".scenario"))
34 if (scenario_count == 0)
45 aliases = {
"listlevels",
"list_scenarios",
"listscenarios",
"list_maps",
"listmaps" };
52 std::vector<std::string> scenario_list = std::vector<std::string>();
60 std::vector<std::string> file_list = BlamStrings::Utils::IO::GetFileList(cache_file_root);
61 int scenario_count = 0;
63 for (std::string
file : file_list)
65 if (
file.ends_with(
".map"))
72 if (scenario_count == 0)
81 ShowTagDataFolderList(levels_root_engine);
85 ShowTagDataFolderList(levels_root_user);
89 Blam::Logger::LogEvent(
"could not build scenario list, build is using an unknown runtime configuration?", WSV_NONE);
@ Cache
The engine will load all content from cache files.
@ Builtin
A command that is hard-coded into the engine.
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:59
@ Tags
Directory used for reading engine tags. Defaults to ./tags/
Class used to represent a console command.
Definition: console.h:56
#define USER_DATA_PATH(path)
Macro to quickly access a user data folder.
Definition: config.h:43
ListLevelsCommand()
Definition: list_levels.hpp:41
@ Tags
The engine will load all content from tags.
BlamCommandResult
Indicates the return state of a console command.
Definition: console.h:22
#define ENGINE_DATA_PATH(path)
Macro to quickly access a game engine data folder.
Definition: config.h:36
BlamCommandResult onCommand(std::vector< std::string > arguments)
Called upon command execution.
Definition: list_levels.hpp:50
std::string name
The name of the console command.
Definition: console.h:58
@ Maps
Directory used for storing built-in cache files. Defaults to ./maps/
sock planetquake com All rights reserved Quake III Arena is a registered trademark of id Inc This level may be electronically distributed only at NO CHARGE to the recipient in its current MUST include this txt file
Definition: chiropteraDM.txt:95
BLAM BlamContentSource GetContentSource()
Retrieves the current content source.
Definition: engine_definitions.cpp:32
Class for the list_levels command.
Definition: list_levels.hpp:17
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition: console.h:63
std::vector< std::string > aliases
A list of aliases for the command. Executing any of these instead of the command name will behave the...
Definition: console.h:61
@ Tags
Directory storing user-created tags. Defaults to {DataRoot}/tags/.
@ Ok
The command was run without error.
Namespace for things relating to the debug console.
Definition: abort.hpp:5