Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.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 
31  {
32 
33  }
34 
35  BlamCommandResult onCommand(std::vector<std::string> arguments)
36  {
37  std::string minor_version = std::to_string(TAG_FIELDSET_VERSION);
39  std::string git_commit = std::string(CURRENT_COMMIT);
40 
41  cache_file_language = BlamStrings::Utils::String::ToLower(cache_file_language);
42 
44  Blam::Logger::LogEventForce("minor version " + minor_version + " cache file language " + cache_file_language, WSV_NONE);
45  Blam::Logger::LogEventForce("git commit " + git_commit, WSV_NONE);
46  //Blam::Logger::LogEventForce("the above message is a placeholder taken from halo 2 pc sapien editor", WSV_ERROR);
47 
48  return BlamCommandResult::Ok;
49  }
50  };
51 }
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
Class for the version command.
Definition: version.hpp:18
BlamCommandType::Builtin
@ Builtin
A command that is hard-coded into the engine.
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:59
logger.h
version_data.h
Blam::Resources::Console::VersionCommand::~VersionCommand
~VersionCommand()
Definition: version.hpp:30
BlamConsoleCommand
Class used to represent a console command.
Definition: console.h:56
BlamVersionStringDisplayMode::Console
@ Console
Indicates the build string should be formatted for the in-game console.
cache_files.h
Blam::EngineDefs::GetVersionBuildString
BLAM std::string GetVersionBuildString(BlamVersionStringDisplayMode display_mode)
Retrieves the build string of the engine.
Definition: engine_definitions.cpp:53
BlamCommandResult
BlamCommandResult
Indicates the return state of a console command.
Definition: console.h:22
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:58
CURRENT_COMMIT
#define CURRENT_COMMIT
Definition: version_data.h:14
engine_definitions.h
Blam::Resources::Console::VersionCommand::onCommand
BlamCommandResult onCommand(std::vector< std::string > arguments)
Called upon command execution.
Definition: version.hpp:35
BlamConsoleCommand::type
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition: console.h:63
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:274
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:61
BlamCommandResult::Ok
@ Ok
The command was run without error.
Blam::Resources::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5