diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2013-05-11 10:52:35 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2013-05-11 10:52:35 (GMT) |
| commit | c2cdec9e621a2af25a256a484fdf68adc46ea96f (patch) | |
| tree | 69aee231e52e8ef85842b6b695c10f6f04aa4b25 /src/gui/game/GameController.cpp | |
| parent | d1c8978a34906c1adb6bdc3fbae7f12c06aa8324 (diff) | |
| download | powder-c2cdec9e621a2af25a256a484fdf68adc46ea96f.zip powder-c2cdec9e621a2af25a256a484fdf68adc46ea96f.tar.gz | |
Togglable lua scripting
Diffstat (limited to 'src/gui/game/GameController.cpp')
| -rw-r--r-- | src/gui/game/GameController.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp index ed1a866..d7b808b 100644 --- a/src/gui/game/GameController.cpp +++ b/src/gui/game/GameController.cpp @@ -145,8 +145,12 @@ GameController::GameController(): gameView->AttachController(this); gameModel->AddObserver(gameView); - commandInterface = new LuaScriptInterface(this, gameModel);//new TPTScriptInterface(); +#ifdef LUACONSOLE + commandInterface = new LuaScriptInterface(this, gameModel); ((LuaScriptInterface*)commandInterface)->SetWindow(gameView); +#else + commandInterface = new TPTScriptInterface(this, gameModel); +#endif commandInterface->OnBrushChanged(gameModel->GetBrushID(), gameModel->GetBrush()->GetRadius().X, gameModel->GetBrush()->GetRadius().X); ActiveToolChanged(0, gameModel->GetActiveTool(0)); @@ -706,7 +710,9 @@ void GameController::Tick() { if(firstTick) { +#ifdef LUACONSOLE ((LuaScriptInterface*)commandInterface)->Init(); +#endif if(!Client::Ref().GetPrefBool("InstallCheck", false)) { Client::Ref().SetPref("InstallCheck", true); |
