prevent people from stealing the 404 save
This commit is contained in:
parent
5dd01e9976
commit
bd7f9fa247
@ -195,6 +195,7 @@ GameView::GameView():
|
|||||||
ren(NULL),
|
ren(NULL),
|
||||||
activeBrush(NULL),
|
activeBrush(NULL),
|
||||||
saveSimulationButtonEnabled(false),
|
saveSimulationButtonEnabled(false),
|
||||||
|
saveReuploadAllowed(true),
|
||||||
drawMode(DrawPoints),
|
drawMode(DrawPoints),
|
||||||
drawPoint1(0, 0),
|
drawPoint1(0, 0),
|
||||||
drawPoint2(0, 0),
|
drawPoint2(0, 0),
|
||||||
@ -939,6 +940,7 @@ void GameView::NotifyInfoTipChanged(GameModel * sender)
|
|||||||
|
|
||||||
void GameView::NotifySaveChanged(GameModel * sender)
|
void GameView::NotifySaveChanged(GameModel * sender)
|
||||||
{
|
{
|
||||||
|
saveReuploadAllowed = true;
|
||||||
if (sender->GetSave())
|
if (sender->GetSave())
|
||||||
{
|
{
|
||||||
if (introText > 50)
|
if (introText > 50)
|
||||||
@ -998,6 +1000,9 @@ void GameView::NotifySaveChanged(GameModel * sender)
|
|||||||
tagSimulationButton->SetText("[no tags set]");
|
tagSimulationButton->SetText("[no tags set]");
|
||||||
}
|
}
|
||||||
currentSaveType = 1;
|
currentSaveType = 1;
|
||||||
|
int saveID = sender->GetSave()->GetID();
|
||||||
|
if (saveID == 404 || saveID == 2157797)
|
||||||
|
saveReuploadAllowed = false;
|
||||||
}
|
}
|
||||||
else if (sender->GetSaveFile())
|
else if (sender->GetSaveFile())
|
||||||
{
|
{
|
||||||
@ -1032,7 +1037,7 @@ void GameView::NotifySaveChanged(GameModel * sender)
|
|||||||
tagSimulationButton->SetText("[no tags set]");
|
tagSimulationButton->SetText("[no tags set]");
|
||||||
currentSaveType = 0;
|
currentSaveType = 0;
|
||||||
}
|
}
|
||||||
saveSimulationButton->Enabled = (saveSimulationButtonEnabled || ctrlBehaviour);
|
saveSimulationButton->Enabled = (saveSimulationButtonEnabled && saveReuploadAllowed) || ctrlBehaviour;
|
||||||
SetSaveButtonTooltips();
|
SetSaveButtonTooltips();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2045,7 +2050,7 @@ void GameView::disableCtrlBehaviour()
|
|||||||
saveSimulationButton->Appearance.BackgroundInactive = ui::Colour(0, 0, 0);
|
saveSimulationButton->Appearance.BackgroundInactive = ui::Colour(0, 0, 0);
|
||||||
saveSimulationButton->Appearance.BackgroundHover = ui::Colour(20, 20, 20);
|
saveSimulationButton->Appearance.BackgroundHover = ui::Colour(20, 20, 20);
|
||||||
saveSimulationButton->Appearance.TextInactive = saveSimulationButton->Appearance.TextHover = ui::Colour(255, 255, 255);
|
saveSimulationButton->Appearance.TextInactive = saveSimulationButton->Appearance.TextHover = ui::Colour(255, 255, 255);
|
||||||
saveSimulationButton->Enabled = saveSimulationButtonEnabled;
|
saveSimulationButton->Enabled = saveSimulationButtonEnabled && saveReuploadAllowed;
|
||||||
SetSaveButtonTooltips();
|
SetSaveButtonTooltips();
|
||||||
searchButton->Appearance.BackgroundInactive = ui::Colour(0, 0, 0);
|
searchButton->Appearance.BackgroundInactive = ui::Colour(0, 0, 0);
|
||||||
searchButton->Appearance.BackgroundHover = ui::Colour(20, 20, 20);
|
searchButton->Appearance.BackgroundHover = ui::Colour(20, 20, 20);
|
||||||
|
@ -86,6 +86,7 @@ private:
|
|||||||
ui::Button * reloadButton;
|
ui::Button * reloadButton;
|
||||||
ui::Button * saveSimulationButton;
|
ui::Button * saveSimulationButton;
|
||||||
bool saveSimulationButtonEnabled;
|
bool saveSimulationButtonEnabled;
|
||||||
|
bool saveReuploadAllowed;
|
||||||
ui::Button * downVoteButton;
|
ui::Button * downVoteButton;
|
||||||
ui::Button * upVoteButton;
|
ui::Button * upVoteButton;
|
||||||
ui::Button * tagSimulationButton;
|
ui::Button * tagSimulationButton;
|
||||||
|
Reference in New Issue
Block a user