Blamite Game Engine - Blam (Core)
nou.hpp
Go to the documentation of this file.
1 #include "../console.h"
3 #include "core.h"
4 
5 namespace Blam::Console
6 {
12  class NoUCommand : public ConsoleCommand
13  {
14  public:
16  {
17  name = "nou";
18  description = "A joke command that prints \"no u\" to the log";
19  aliases = { "no_u" };
20 
22  }
23 
25  {
26  delete this;
27  }
28 
29  CommandStatus onCommand(std::vector<std::string> arguments)
30  {
31  using namespace Blam::Logger;
32 
33  BlamColor color;
34  color.r = 0;
35  color.g = 255;
36  color.b = 0;
37 
38  LogEventForce("no u", color);
39 
40  return CMD_OK;
41  }
42  };
43 }
Blam::Console::ConsoleCommand::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:75
Blam::Console::ConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:73
Blam::Console::NoUCommand::~NoUCommand
~NoUCommand()
Definition: nou.hpp:24
Blam::Console::ConsoleCommand::type
CommandType type
The type of command this is. See Blam::Console::CommandType for more information.
Definition: console.h:77
Blam::Console::CommandStatus
CommandStatus
Indicates the return state of a console command.
Definition: console.h:28
logger.h
BlamColor::g
short g
The Green value of the color.
Definition: colors.h:22
Blam::Console::Builtin
@ Builtin
A command that is hard-coded into the engine.
Definition: console.h:41
Blam::Console::ConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:70
Blam::Console::NoUCommand::NoUCommand
NoUCommand()
Definition: nou.hpp:15
BlamColor::r
short r
The Red value of the color.
Definition: colors.h:21
Blam::Console::NoUCommand
Class for the nou command.
Definition: nou.hpp:12
BlamColor::b
short b
The Blue value of the color.
Definition: colors.h:23
Blam::Console::NoUCommand::onCommand
CommandStatus onCommand(std::vector< std::string > arguments)
Called upon command execution.
Definition: nou.hpp:29
Blam::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5
Blam::Console::ConsoleCommand
Class used to represent a console command.
Definition: console.h:50
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message, LogSeverity severity)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:137
CMD_OK
#define CMD_OK
Macro for OK command status. See Blam::Console::Ok for more details.
Definition: console.h:9
core.h
Blam::Logger
Namespace containing things related to the Blamite Logger.
Definition: logger.h:44
BlamColor
Structure representing a color.
Definition: colors.h:18