Permalink
Browse files

add hidden settings for not including/loading pressure in saves, closes

#524

If I ever redo the options menu, there will be an actual checkbox for these
  • Loading branch information...
jacob1 committed Mar 7, 2018
1 parent 68efe49 commit 5eb0d1bd27e09bd056093b2fd7b00e0f8dd13885
Showing with 14 additions and 4 deletions.
  1. +14 −4 src/gui/game/GameController.cpp
@@ -329,6 +329,10 @@ std::string GameController::GetSignText(int signID)

void GameController::PlaceSave(ui::Point position, bool includePressure)
{
bool incPressure = Client::Ref().GetPrefBool("Simulation.LoadPressure", true);
if (!incPressure)
includePressure = !includePressure;

GameSave *placeSave = gameModel->GetPlaceSave();
if (placeSave)
{
@@ -571,8 +575,11 @@ void GameController::ToolClick(int toolSelection, ui::Point point)

std::string GameController::StampRegion(ui::Point point1, ui::Point point2, bool includePressure)
{
GameSave * newSave;
newSave = gameModel->GetSimulation()->Save(point1.X, point1.Y, point2.X, point2.Y, includePressure);
bool incPressure = Client::Ref().GetPrefBool("Simulation.IncludePressure", true);
if (!incPressure)
includePressure = !includePressure;

GameSave * newSave = gameModel->GetSimulation()->Save(point1.X, point1.Y, point2.X, point2.Y, includePressure);
if(newSave)
{
newSave->paused = gameModel->GetPaused();
@@ -590,8 +597,11 @@ std::string GameController::StampRegion(ui::Point point1, ui::Point point2, bool

void GameController::CopyRegion(ui::Point point1, ui::Point point2, bool includePressure)
{
GameSave * newSave;
newSave = gameModel->GetSimulation()->Save(point1.X, point1.Y, point2.X, point2.Y, includePressure);
bool incPressure = Client::Ref().GetPrefBool("Simulation.IncludePressure", true);
if (!incPressure)
includePressure = !includePressure;

GameSave * newSave = gameModel->GetSimulation()->Save(point1.X, point1.Y, point2.X, point2.Y, includePressure);
if(newSave)
{
Json::Value clipboardInfo;

0 comments on commit 5eb0d1b

Please sign in to comment.