diff options
Diffstat (limited to 'src/gui/game/GameController.cpp')
| -rw-r--r-- | src/gui/game/GameController.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp index 1235848..a114b82 100644 --- a/src/gui/game/GameController.cpp +++ b/src/gui/game/GameController.cpp @@ -1389,6 +1389,16 @@ std::string GameController::ElementResolve(int type, int ctype) return ""; } +bool GameController::IsValidElement(int type) +{ + if(gameModel && gameModel->GetSimulation()) + { + return (type > 0 && type < PT_NUM && gameModel->GetSimulation()->elements[type].Enabled); + } + else + return false; +} + std::string GameController::WallName(int type) { if(gameModel && gameModel->GetSimulation() && gameModel->GetSimulation()->wtypes && type >= 0 && type < UI_WALLCOUNT) |
