SaveCommand.cpp 386 B

1234567891011121314151617
  1. #include "SaveCommand.h"
  2. #include "Chat.h"
  3. #include "Game.h"
  4. SaveCommand::SaveCommand()
  5. : ChatCommand("save", "Saves the game", 0)
  6. {}
  7. bool 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. return true;
  14. }