MCPcopy Create free account
hub / github.com/SimHacker/micropolis / saveCity

Method saveCity

MicropolisCore/src/MicropolisEngine/src/fileio.cpp:564–581  ·  view source on GitHub ↗

* Try to save the game. * @todo This is a no-op if the Micropolis::cityFileName is empty. * In that case, we should probably warn the user about the failure. */

Source from the content-addressed store, hash-verified

562 * In that case, we should probably warn the user about the failure.
563 */
564void Micropolis::saveCity()
565{
566 if (cityFileName.length() > 0) {
567
568 doSaveCityAs();
569
570 } else {
571 if (saveFile(cityFileName.c_str())) {
572
573 didSaveCity();
574
575 } else {
576
577 didntSaveCity(cityFileName.c_str());
578
579 }
580 }
581}
582
583
584/** Report to the frontend that the city is being saved. */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected