diff options
| author | jacob1 <jfu614@gmail.com> | 2013-05-12 01:47:13 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-05-12 01:47:13 (GMT) |
| commit | 51f27bfad72e7fbc72388f63c3b8a48162e509a1 (patch) | |
| tree | abd95cad4e12085fb8a67f63bce788db44f61f03 /src/gui/game | |
| parent | 9d89d4b79b26584490e55cfb992fc58d3e11ea2b (diff) | |
| parent | a0a0e305a92b41923f7634fca1d30b0e71ee12e0 (diff) | |
| download | powder-51f27bfad72e7fbc72388f63c3b8a48162e509a1.zip powder-51f27bfad72e7fbc72388f63c3b8a48162e509a1.tar.gz | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/gui/game')
| -rw-r--r-- | src/gui/game/GameController.cpp | 8 | ||||
| -rw-r--r-- | src/gui/game/GameController.h | 5 | ||||
| -rw-r--r-- | src/gui/game/PropertyTool.cpp | 2 | ||||
| -rw-r--r-- | src/gui/game/RenderPreset.h | 2 | ||||
| -rw-r--r-- | src/gui/game/Tool.cpp | 2 |
5 files changed, 14 insertions, 5 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); diff --git a/src/gui/game/GameController.h b/src/gui/game/GameController.h index c34d44a..f2cf26b 100644 --- a/src/gui/game/GameController.h +++ b/src/gui/game/GameController.h @@ -14,8 +14,11 @@ #include "gui/console/ConsoleController.h" #include "gui/localbrowser/LocalBrowserController.h" #include "gui/options/OptionsController.h" -//#include "cat/TPTScriptInterface.h" +#ifdef LUACONSOLE #include "cat/LuaScriptInterface.h" +#else +#include "cat/TPTScriptInterface.h" +#endif #include "client/ClientListener.h" #include "RenderPreset.h" #include "Menu.h" diff --git a/src/gui/game/PropertyTool.cpp b/src/gui/game/PropertyTool.cpp index 05726d3..aff535e 100644 --- a/src/gui/game/PropertyTool.cpp +++ b/src/gui/game/PropertyTool.cpp @@ -232,4 +232,4 @@ void PropertyWindow::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl void PropertyTool::Click(Simulation * sim, Brush * brush, ui::Point position) { new PropertyWindow(this, sim, position); -}
\ No newline at end of file +} diff --git a/src/gui/game/RenderPreset.h b/src/gui/game/RenderPreset.h index 9cc9f4c..91689c7 100644 --- a/src/gui/game/RenderPreset.h +++ b/src/gui/game/RenderPreset.h @@ -16,4 +16,4 @@ public: ColourMode(colourMode) {} }; -#endif
\ No newline at end of file +#endif diff --git a/src/gui/game/Tool.cpp b/src/gui/game/Tool.cpp index def6e46..ed43da7 100644 --- a/src/gui/game/Tool.cpp +++ b/src/gui/game/Tool.cpp @@ -212,4 +212,4 @@ void Element_TESC_Tool::DrawFill(Simulation * sim, Brush * brush, ui::Point posi void PlopTool::Click(Simulation * sim, Brush * brush, ui::Point position) { sim->create_part(-1, position.X, position.Y, toolID); -}
\ No newline at end of file +} |
