mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
End turn autosave support + making it default
This commit is contained in:
parent
616916714a
commit
ad66acdd79
@ -235,7 +235,10 @@ void CPlayerInterface::yourTurn()
|
||||
GH.curInt = this;
|
||||
|
||||
NotificationHandler::notify("Your turn");
|
||||
performAutosave();
|
||||
if(settings["general"]["startTurnAutosave"].Bool())
|
||||
{
|
||||
performAutosave();
|
||||
}
|
||||
|
||||
if (CSH->howManyPlayerInterfaces() > 1) //hot seat message
|
||||
{
|
||||
|
@ -205,6 +205,7 @@ public: // public interface for use by client via LOCPLINT access
|
||||
void tryDigging(const CGHeroInstance *h);
|
||||
void showShipyardDialogOrProblemPopup(const IShipyard *obj); //obj may be town or shipyard;
|
||||
void proposeLoadingGame();
|
||||
void performAutosave();
|
||||
|
||||
///returns true if all events are processed internally
|
||||
bool capturedAllEvents();
|
||||
@ -236,8 +237,6 @@ private:
|
||||
void doMoveHero(const CGHeroInstance *h, CGPath path);
|
||||
void setMovementStatus(bool value);
|
||||
|
||||
/// Performs autosave, if needed according to settings
|
||||
void performAutosave();
|
||||
};
|
||||
|
||||
/// Provides global access to instance of interface of currently active player
|
||||
|
@ -418,6 +418,12 @@ void AdventureMapInterface::hotkeyEndingTurn()
|
||||
|
||||
LOCPLINT->makingTurn = false;
|
||||
LOCPLINT->cb->endTurn();
|
||||
|
||||
if(!settings["general"]["startTurnAutosave"].Bool())
|
||||
{
|
||||
LOCPLINT->performAutosave();
|
||||
}
|
||||
|
||||
mapAudio->onPlayerTurnEnded();
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,8 @@
|
||||
"longTouchTimeMilliseconds",
|
||||
"autosaveCountLimit",
|
||||
"useSavePrefix",
|
||||
"savePrefix"
|
||||
"savePrefix",
|
||||
"startTurnAutosave"
|
||||
],
|
||||
"properties" : {
|
||||
"playerName" : {
|
||||
@ -121,6 +122,10 @@
|
||||
"savePrefix" : {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"startTurnAutosave" : {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user