mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-17 21:51:20 +02:00
Add ctrl+u shortcut to reset ambient heat
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -69,5 +69,7 @@ site_scons/site_tools/mfprogram/*.pyc
|
|||||||
site_scons/site_tools/gch/*.pyc
|
site_scons/site_tools/gch/*.pyc
|
||||||
.vscode/
|
.vscode/
|
||||||
.vs/
|
.vs/
|
||||||
|
# Intentional merge conflict (meson stuff)
|
||||||
|
subprojects/
|
||||||
|
|
||||||
screenshot_*
|
screenshot_*
|
||||||
|
@@ -885,6 +885,11 @@ bool GameController::GetAHeatEnable()
|
|||||||
return gameModel->GetAHeatEnable();
|
return gameModel->GetAHeatEnable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameController::ResetAHeat()
|
||||||
|
{
|
||||||
|
gameModel->ResetAHeat();
|
||||||
|
}
|
||||||
|
|
||||||
void GameController::ToggleNewtonianGravity()
|
void GameController::ToggleNewtonianGravity()
|
||||||
{
|
{
|
||||||
gameModel->SetNewtonianGravity(!gameModel->GetNewtonianGrvity());
|
gameModel->SetNewtonianGravity(!gameModel->GetNewtonianGrvity());
|
||||||
|
@@ -161,6 +161,7 @@ public:
|
|||||||
void SwitchAir();
|
void SwitchAir();
|
||||||
void ToggleAHeat();
|
void ToggleAHeat();
|
||||||
bool GetAHeatEnable();
|
bool GetAHeatEnable();
|
||||||
|
void ResetAHeat();
|
||||||
void ToggleNewtonianGravity();
|
void ToggleNewtonianGravity();
|
||||||
|
|
||||||
bool LoadClipboard();
|
bool LoadClipboard();
|
||||||
|
@@ -1018,6 +1018,11 @@ bool GameModel::GetAHeatEnable()
|
|||||||
return sim->aheat_enable;
|
return sim->aheat_enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameModel::ResetAHeat()
|
||||||
|
{
|
||||||
|
sim->air->ClearAirH();
|
||||||
|
}
|
||||||
|
|
||||||
void GameModel::SetNewtonianGravity(bool newtonainGravity)
|
void GameModel::SetNewtonianGravity(bool newtonainGravity)
|
||||||
{
|
{
|
||||||
if (newtonainGravity)
|
if (newtonainGravity)
|
||||||
|
@@ -171,16 +171,17 @@ public:
|
|||||||
void SetSaveFile(SaveFile * newSave, bool invertIncludePressure);
|
void SetSaveFile(SaveFile * newSave, bool invertIncludePressure);
|
||||||
void AddObserver(GameView * observer);
|
void AddObserver(GameView * observer);
|
||||||
|
|
||||||
bool GetPaused();
|
|
||||||
void SetPaused(bool pauseState);
|
void SetPaused(bool pauseState);
|
||||||
bool GetDecoration();
|
bool GetPaused();
|
||||||
void SetDecoration(bool decorationState);
|
void SetDecoration(bool decorationState);
|
||||||
bool GetAHeatEnable();
|
bool GetDecoration();
|
||||||
void SetAHeatEnable(bool aHeat);
|
void SetAHeatEnable(bool aHeat);
|
||||||
bool GetNewtonianGrvity();
|
bool GetAHeatEnable();
|
||||||
|
void ResetAHeat();
|
||||||
void SetNewtonianGravity(bool newtonainGravity);
|
void SetNewtonianGravity(bool newtonainGravity);
|
||||||
bool GetGravityGrid();
|
bool GetNewtonianGrvity();
|
||||||
void ShowGravityGrid(bool showGrid);
|
void ShowGravityGrid(bool showGrid);
|
||||||
|
bool GetGravityGrid();
|
||||||
void ClearSimulation();
|
void ClearSimulation();
|
||||||
std::vector<Menu*> GetMenuList();
|
std::vector<Menu*> GetMenuList();
|
||||||
std::vector<QuickOption*> GetQuickOptions();
|
std::vector<QuickOption*> GetQuickOptions();
|
||||||
|
@@ -1387,6 +1387,9 @@ void GameView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl,
|
|||||||
ui::Engine::Ref().ConfirmExit();
|
ui::Engine::Ref().ConfirmExit();
|
||||||
break;
|
break;
|
||||||
case SDL_SCANCODE_U:
|
case SDL_SCANCODE_U:
|
||||||
|
if (ctrl)
|
||||||
|
c->ResetAHeat();
|
||||||
|
else
|
||||||
c->ToggleAHeat();
|
c->ToggleAHeat();
|
||||||
break;
|
break;
|
||||||
case SDL_SCANCODE_N:
|
case SDL_SCANCODE_N:
|
||||||
|
Reference in New Issue
Block a user