diff options
Diffstat (limited to 'src/gamestate.cpp')
-rw-r--r-- | src/gamestate.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gamestate.cpp b/src/gamestate.cpp index ec6bf72..0a82b99 100644 --- a/src/gamestate.cpp +++ b/src/gamestate.cpp | |||
@@ -233,6 +233,11 @@ Variable GameState::gatsToVariable( Gats::List *pLst ) const | |||
233 | throw Bu::ExceptionBase("Type unknown: %d", dynamic_cast<Gats::Integer *>(*i)->getValue() ); | 233 | throw Bu::ExceptionBase("Type unknown: %d", dynamic_cast<Gats::Integer *>(*i)->getValue() ); |
234 | } | 234 | } |
235 | 235 | ||
236 | class Situation *GameState::getCurSituation() | ||
237 | { | ||
238 | return pGame->getSituation( sCurSituation ); | ||
239 | } | ||
240 | |||
236 | void GameState::parse( class AstBranch *pAst ) | 241 | void GameState::parse( class AstBranch *pAst ) |
237 | { | 242 | { |
238 | if( pAst->getType() != AstNode::tScope ) | 243 | if( pAst->getType() != AstNode::tScope ) |
@@ -297,6 +302,11 @@ void GameState::execCommand( const Bu::String &sCmd ) | |||
297 | } | 302 | } |
298 | } | 303 | } |
299 | 304 | ||
305 | void GameState::execOption( int idx ) | ||
306 | { | ||
307 | pGame->getSituation( sCurSituation )->execOption( *this, idx ); | ||
308 | } | ||
309 | |||
300 | bool GameState::hasVariable( const Bu::String &sName, ScopeId id ) | 310 | bool GameState::hasVariable( const Bu::String &sName, ScopeId id ) |
301 | { | 311 | { |
302 | switch( id ) | 312 | switch( id ) |