From e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 6 Feb 2012 01:21:36 -0700 Subject: Option input type situations almost done. Interfaces just need some work. --- src/gamestate.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gamestate.cpp') 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 throw Bu::ExceptionBase("Type unknown: %d", dynamic_cast(*i)->getValue() ); } +class Situation *GameState::getCurSituation() +{ + return pGame->getSituation( sCurSituation ); +} + void GameState::parse( class AstBranch *pAst ) { if( pAst->getType() != AstNode::tScope ) @@ -297,6 +302,11 @@ void GameState::execCommand( const Bu::String &sCmd ) } } +void GameState::execOption( int idx ) +{ + pGame->getSituation( sCurSituation )->execOption( *this, idx ); +} + bool GameState::hasVariable( const Bu::String &sName, ScopeId id ) { switch( id ) -- cgit v1.2.3