mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-08 23:36:33 +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;
|
GH.curInt = this;
|
||||||
|
|
||||||
NotificationHandler::notify("Your turn");
|
NotificationHandler::notify("Your turn");
|
||||||
|
if(settings["general"]["startTurnAutosave"].Bool())
|
||||||
|
{
|
||||||
performAutosave();
|
performAutosave();
|
||||||
|
}
|
||||||
|
|
||||||
if (CSH->howManyPlayerInterfaces() > 1) //hot seat message
|
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 tryDigging(const CGHeroInstance *h);
|
||||||
void showShipyardDialogOrProblemPopup(const IShipyard *obj); //obj may be town or shipyard;
|
void showShipyardDialogOrProblemPopup(const IShipyard *obj); //obj may be town or shipyard;
|
||||||
void proposeLoadingGame();
|
void proposeLoadingGame();
|
||||||
|
void performAutosave();
|
||||||
|
|
||||||
///returns true if all events are processed internally
|
///returns true if all events are processed internally
|
||||||
bool capturedAllEvents();
|
bool capturedAllEvents();
|
||||||
@ -236,8 +237,6 @@ private:
|
|||||||
void doMoveHero(const CGHeroInstance *h, CGPath path);
|
void doMoveHero(const CGHeroInstance *h, CGPath path);
|
||||||
void setMovementStatus(bool value);
|
void setMovementStatus(bool value);
|
||||||
|
|
||||||
/// Performs autosave, if needed according to settings
|
|
||||||
void performAutosave();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Provides global access to instance of interface of currently active player
|
/// Provides global access to instance of interface of currently active player
|
||||||
|
@ -418,6 +418,12 @@ void AdventureMapInterface::hotkeyEndingTurn()
|
|||||||
|
|
||||||
LOCPLINT->makingTurn = false;
|
LOCPLINT->makingTurn = false;
|
||||||
LOCPLINT->cb->endTurn();
|
LOCPLINT->cb->endTurn();
|
||||||
|
|
||||||
|
if(!settings["general"]["startTurnAutosave"].Bool())
|
||||||
|
{
|
||||||
|
LOCPLINT->performAutosave();
|
||||||
|
}
|
||||||
|
|
||||||
mapAudio->onPlayerTurnEnded();
|
mapAudio->onPlayerTurnEnded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,8 @@
|
|||||||
"longTouchTimeMilliseconds",
|
"longTouchTimeMilliseconds",
|
||||||
"autosaveCountLimit",
|
"autosaveCountLimit",
|
||||||
"useSavePrefix",
|
"useSavePrefix",
|
||||||
"savePrefix"
|
"savePrefix",
|
||||||
|
"startTurnAutosave"
|
||||||
],
|
],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"playerName" : {
|
"playerName" : {
|
||||||
@ -121,6 +122,10 @@
|
|||||||
"savePrefix" : {
|
"savePrefix" : {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": ""
|
"default": ""
|
||||||
|
},
|
||||||
|
"startTurnAutosave" : {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user