summaryrefslogtreecommitdiff
path: root/src/gui/game/GameController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/game/GameController.cpp')
-rw-r--r--src/gui/game/GameController.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp
index 6b3e4f2..7312cbe 100644
--- a/src/gui/game/GameController.cpp
+++ b/src/gui/game/GameController.cpp
@@ -1001,6 +1001,8 @@ void GameController::SetActiveTool(int toolSelection, Tool * tool)
toolSelection = 0;
gameModel->SetActiveTool(toolSelection, tool);
gameModel->GetRenderer()->gravityZonesEnabled = false;
+ if (toolSelection == 3)
+ gameModel->GetSimulation()->replaceModeSelected = tool->GetToolID();
gameModel->SetLastTool(tool);
for(int i = 0; i < 3; i++)
{
@@ -1011,6 +1013,16 @@ void GameController::SetActiveTool(int toolSelection, Tool * tool)
}
}
+int GameController::GetReplaceModeFlags()
+{
+ return gameModel->GetSimulation()->replaceModeFlags;
+}
+
+void GameController::SetReplaceModeFlags(int flags)
+{
+ gameModel->GetSimulation()->replaceModeFlags = flags;
+}
+
void GameController::OpenSearch()
{
if(!search)