Elaztek Developer Hub
Blamite Game Engine - blam!  00310.02.05.21.0336.blamite
The core library for the Blamite Game Engine.
version.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../console.h"
4 
9 #include "version_data.h"
10 
12 {
22  {
23  public:
25  {
26  name = "version";
27  description = "Show engine version information.";
28  aliases = { "ver" };
29 
31  }
32 
34  {
35 
36  }
37 
38  BlamCommandResult onCommand(std::vector<std::string> arguments)
39  {
41  Blam::Logger::LogEventForce("minor version " + std::to_string(TAG_FIELDSET_VERSION) + " cache file language " + std::to_string(CACHE_FILE_LANGUAGE), WSV_NONE);
42  Blam::Logger::LogEventForce("git commit " + std::string(CURRENT_COMMIT), WSV_NONE);
43  //Blam::Logger::LogEventForce("the above message is a placeholder taken from halo 2 pc sapien editor", WSV_ERROR);
44 
45  return BlamCommandResult::Ok;
46  }
47  };
48 }
Blam::Resources::Console::VersionCommand
Class for the version command.
Definition: version.hpp:21
Blam::Resources::Console::VersionCommand::VersionCommand
VersionCommand()
Definition: version.hpp:24
BlamConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:57
logger.h
BlamCommandResult::Ok
@ Ok
The command was run without error.
version_data.h
tags.h
Blam::Resources::Console::VersionCommand::~VersionCommand
~VersionCommand()
Definition: version.hpp:33
BlamConsoleCommand
Class used to represent a console command.
Definition: console.h:54
Console
@ Console
Console widget.
Definition: render_stack.h:77
TAG_FIELDSET_VERSION
#define TAG_FIELDSET_VERSION
Macro defining the tag fieldset version.
Definition: tags.h:22
cache_files.h
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message, BlamLogLevel severity)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:286
CACHE_FILE_LANGUAGE
#define CACHE_FILE_LANGUAGE
Macro specifiying cache file language/version.
Definition: cache_files.h:13
BlamConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:56
WSV_NONE
#define WSV_NONE
Macro for 'None' log seveirty. Original pre-enum value was 0.
Definition: logger.h:16
CURRENT_COMMIT
#define CURRENT_COMMIT
Definition: version_data.h:14
Blam::EngineDefs::GetVersionBuildString
BLAM std::string GetVersionBuildString(VersionStringDisplayMode display_mode)
Retrieves the build string of the engine.
Definition: engine_definitions.cpp:11
engine_definitions.h
Blam::Resources::Console::VersionCommand::onCommand
BlamCommandResult onCommand(std::vector< std::string > arguments)
Called upon command execution.
Definition: version.hpp:38
BlamConsoleCommand::type
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition: console.h:61
BlamCommandType::Builtin
@ Builtin
A command that is hard-coded into the engine.
BlamCommandResult
BlamCommandResult
Indicates the return state of a console command.
Definition: console.h:22
BlamConsoleCommand::aliases
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:59
Blam::Resources::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5