SaveCommand.cpp 368 B

12345678910111213141516
  1. #include "SaveCommand.h"
  2. #include "Chat.h"
  3. #include "Game.h"
  4. SaveCommand::SaveCommand()
  5. : ChatCommand("save", "Saves the game", 0)
  6. {}
  7. void SaveCommand::execute(
  8. Framework::RCArray<Framework::Text> params, Entity* zActor) const
  9. {
  10. Game::INSTANCE->save();
  11. Game::INSTANCE->zChat()->broadcastMessage(
  12. "The game was saved.", Chat::CHANNEL_INFO);
  13. }