From 22170e030efdeadc1dfbd548a8f0b24b0e10ceee Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 19 Jan 2012 15:00:41 -0700 Subject: Errors on bad commands make sense now. --- src/gamestate.cpp | 6 +++++- src/interfaceconsole.cpp | 7 ------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/gamestate.cpp b/src/gamestate.cpp index 10cfafa..ec6bf72 100644 --- a/src/gamestate.cpp +++ b/src/gamestate.cpp @@ -4,6 +4,8 @@ #include "astleaf.h" #include "astleafliteral.h" +#include "smlnode.h" +#include "interface.h" #include @@ -287,7 +289,9 @@ void GameState::execCommand( const Bu::String &sCmd ) { if( !pGame->execCommand( *this, lCmd ) ) { - sio << "I don't understand that command." << sio.nl; + pIface->display( SmlNode::parse( + "I don't understand that command." + ) ); return; } } diff --git a/src/interfaceconsole.cpp b/src/interfaceconsole.cpp index e07bffe..49be5c1 100644 --- a/src/interfaceconsole.cpp +++ b/src/interfaceconsole.cpp @@ -38,13 +38,6 @@ void InterfaceConsole::run( Game *pGame ) fgets( buf, 1024, stdin ); gs.execCommand( buf ); - - Gats::Object *pObj = gs.toGats(); - File fOut( Bu::String("test-%1.save").arg( iStep++ ), File::WriteNew ); - Gats::GatsStream gs( fOut ); - gs.writeObject( pObj ); - - delete pObj; } } -- cgit v1.2.3