Elaztek Developer Hub
Blamite Game Engine - blam!  00423.10.27.24.0533.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 {
19  {
20  public:
22  {
23  name = "version";
24  description = "Show engine version information.";
25  aliases = { "ver" };
26 
28  }
29 
30  BlamResult Execute(std::vector<std::string> arguments)
31  {
32  std::string minor_version = std::to_string(TAG_FIELDSET_VERSION);
34  std::string git_commit = std::string(CURRENT_COMMIT);
35 
36  cache_file_language = BlamStrings::Utils::String::ToLower(cache_file_language);
37 
39  Blam::Logger::LogEventForce("minor version " + minor_version + " cache file language " + cache_file_language, WSV_NONE);
40  Blam::Logger::LogEventForce("git commit " + git_commit, WSV_NONE);
41  //Blam::Logger::LogEventForce("the above message is a placeholder taken from halo 2 pc sapien editor", WSV_ERROR);
42 
43  return BlamResult::Success_OK;
44  }
45  };
46 }
Blam::Content::CacheFiles::GetCacheFileLanguageString
BLAM std::string GetCacheFileLanguageString(BlamCacheFileLanguage language)
Retrieves the current cache file language as a string.
Definition: cache_files.cpp:10
Blam::Resources::Console::VersionCommand::Execute
BlamResult Execute(std::vector< std::string > arguments)
Called upon command execution.
Definition: version.hpp:30
Blam::Resources::Console::VersionCommand
Class for the version command.
Definition: version.hpp:18
Blam::Resources::Console::VersionCommand::VersionCommand
VersionCommand()
Definition: version.hpp:21
BlamConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:36
logger.h
version_data.h
BlamConsoleCommand
Class used to represent a console command.
Definition: console.h:33
BlamVersionStringDisplayMode::Console
@ Console
Indicates the build string should be formatted for the in-game console.
cache_files.h
CACHE_FILE_LANGUAGE
#define CACHE_FILE_LANGUAGE
Macro specifiying cache file language.
Definition: cache_files.h:18
BlamConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:35
CURRENT_COMMIT
#define CURRENT_COMMIT
Definition: version_data.h:14
engine_definitions.h
BlamConsoleCommand::type
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition: console.h:40
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:262
tags.h
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:38
Blam::BuildInfo::GetVersionBuildString
BLAM std::string GetVersionBuildString(BlamVersionStringDisplayMode display_mode)
Retrieves the build string of the engine.
Definition: engine_definitions.cpp:76
Blam::Resources::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5
BlamCommandType::Builtin
@ Builtin
A command that is hard-coded into the engine.