26 #include "../Mod/RuleAlienMission.h" 27 #include "../Savegame/Craft.h" 39 class SavedBattleGame;
43 class ResearchProject;
45 class RuleManufacture;
53 struct MissionStatistics;
54 struct BattleUnitKills;
59 enum GameDifficulty { DIFF_BEGINNER = 0, DIFF_EXPERIENCED, DIFF_VETERAN, DIFF_GENIUS, DIFF_SUPERHUMAN };
64 enum SaveType { SAVE_DEFAULT, SAVE_QUICK, SAVE_AUTO_GEOSCAPE, SAVE_AUTO_BATTLESCAPE, SAVE_IRONMAN, SAVE_IRONMAN_END };
69 enum GameEnding { END_NONE, END_WIN, END_LOSE };
77 std::wstring displayName;
79 std::wstring isoDate, isoTime;
81 std::vector<std::string> mods;
91 PromotionInfo(): totalCommanders(0), totalColonels(0), totalCaptains(0), totalSergeants(0){}
103 GameDifficulty _difficulty;
107 std::vector<int> _researchScores;
108 std::vector<int64_t> _funds, _maintenance, _incomes, _expenditures;
109 double _globeLon, _globeLat;
111 std::map<std::string, int> _ids;
112 std::vector<Country*> _countries;
113 std::vector<Region*> _regions;
114 std::vector<Base*> _bases;
115 std::vector<Ufo*> _ufos;
116 std::vector<Waypoint*> _waypoints;
117 std::vector<MissionSite*> _missionSites;
118 std::vector<AlienBase*> _alienBases;
121 std::vector<const RuleResearch*> _discovered;
122 std::vector<AlienMission*> _activeMissions;
123 bool _debug, _warned;
125 std::string _graphRegionToggles;
126 std::string _graphCountryToggles;
127 std::string _graphFinanceToggles;
128 std::vector<const RuleResearch*> _poppedResearch;
129 std::vector<Soldier*> _deadSoldiers;
130 size_t _selectedBase;
131 std::string _lastselectedArmor;
132 std::vector<MissionStatistics*> _missionStatistics;
136 static const std::string AUTOSAVE_GEOSCAPE, AUTOSAVE_BATTLESCAPE, QUICKSAVE;
142 static std::vector<SaveInfo> getList(
Language *lang,
bool autoquick);
144 void load(
const std::string &filename,
Mod *mod);
146 void save(
const std::string &filename)
const;
148 std::wstring getName()
const;
150 void setName(
const std::wstring &name);
152 GameDifficulty getDifficulty()
const;
154 void setDifficulty(GameDifficulty difficulty);
156 int getDifficultyCoefficient()
const;
158 GameEnding getEnding()
const;
160 void setEnding(GameEnding end);
162 bool isIronman()
const;
164 void setIronman(
bool ironman);
166 int64_t getFunds()
const;
168 std::vector<int64_t> &getFundsList();
170 void setFunds(int64_t funds);
172 double getGlobeLongitude()
const;
174 void setGlobeLongitude(
double lon);
176 double getGlobeLatitude()
const;
178 void setGlobeLatitude(
double lat);
180 int getGlobeZoom()
const;
182 void setGlobeZoom(
int zoom);
184 void monthlyFunding();
190 int getId(
const std::string &name);
192 const std::map<std::string, int> &getAllIds()
const;
194 void setAllIds(
const std::map<std::string, int> &ids);
196 std::vector<Country*> *getCountries();
198 int getCountryFunding()
const;
200 std::vector<Region*> *getRegions();
202 std::vector<Base*> *getBases();
204 const std::vector<Base*> *getBases()
const;
206 int getBaseMaintenance()
const;
208 std::vector<Ufo*> *getUfos();
210 std::vector<Waypoint*> *getWaypoints();
212 std::vector<MissionSite*> *getMissionSites();
218 void addFinishedResearchSimple(
const RuleResearch *research);
220 void addFinishedResearch(
const RuleResearch *research,
const Mod *mod,
Base *base,
bool score =
true);
222 const std::vector<const RuleResearch*> & getDiscoveredResearch()
const;
224 void getAvailableResearchProjects(std::vector<RuleResearch*> & projects,
const Mod *mod,
Base *base,
bool considerDebugMode =
false)
const;
226 void getNewlyAvailableResearchProjects(std::vector<RuleResearch*> & before, std::vector<RuleResearch*> & after, std::vector<RuleResearch*> & diff)
const;
228 void getAvailableProductions(std::vector<RuleManufacture*> & productions,
const Mod *mod,
Base *base)
const;
230 void getDependableManufacture(std::vector<RuleManufacture*> & dependables,
const RuleResearch *research,
const Mod *mod,
Base *base)
const;
232 bool hasUndiscoveredProtectedUnlock(
const RuleResearch * r,
const Mod * mod)
const;
234 bool isResearched(
const std::string &research,
bool considerDebugMode =
true)
const;
236 bool isResearched(
const std::vector<std::string> &research,
bool considerDebugMode =
true)
const;
238 Soldier *getSoldier(
int id)
const;
240 bool handlePromotions(std::vector<Soldier*> &participants);
244 Soldier *inspectSoldiers(std::vector<Soldier*> &soldiers, std::vector<Soldier*> &participants,
int rank);
246 std::vector<AlienBase*> *getAlienBases();
250 bool getDebugMode()
const;
252 std::vector<int64_t> &getMaintenances();
254 void addResearchScore(
int score);
256 std::vector<int> &getResearchScores();
258 std::vector<int64_t> &getIncomes();
260 std::vector<int64_t> &getExpenditures();
262 bool getWarned()
const;
264 void setWarned(
bool warned);
274 AlienMission *findAlienMission(
const std::string ®ion, MissionObjective objective)
const;
276 Region *locateRegion(
double lon,
double lat)
const;
280 int getMonthsPassed()
const;
282 const std::string &getGraphRegionToggles()
const;
284 const std::string &getGraphCountryToggles()
const;
286 const std::string &getGraphFinanceToggles()
const;
288 void setGraphRegionToggles(
const std::string &value);
290 void setGraphCountryToggles(
const std::string &value);
292 void setGraphFinanceToggles(
const std::string &value);
300 void removePoppedResearch(
const RuleResearch* research);
302 std::vector<Soldier*> *getDeadSoldiers();
304 Base *getSelectedBase();
306 void setSelectedBase(
size_t base);
308 int getSoldierScore(
Soldier *soldier);
310 void setLastSelectedArmor(
const std::string &value);
312 std::string getLastSelectedArmor()
const;
314 Craft *findCraftByUniqueId(
const CraftId& craftId)
const;
316 std::vector<MissionStatistics*> *getMissionStatistics();
Represents a craft stored in a base.
Definition: Craft.h:45
Stores the information about alien strategy.
Definition: AlienStrategy.h:31
Represents an ongoing alien mission.
Definition: AlienMission.h:46
const std::vector< AlienMission * > & getAlienMissions() const
Read-only access to the current alien missions.
Definition: SavedGame.h:272
The game data that gets written to disk when the game is saved.
Definition: SavedGame.h:99
AlienStrategy & getAlienStrategy()
Full access to the alien strategy data.
Definition: SavedGame.h:266
Contains all the game-specific static data that never changes throughout the game, like rulesets and resources.
Definition: Mod.h:87
const AlienStrategy & getAlienStrategy() const
Read-only access to the alien strategy data.
Definition: SavedGame.h:268
Container for battle unit kills statistics.
Definition: BattleUnitStatistics.h:31
Contains strings used throughout the game for localization.
Definition: Language.h:39
Stores the current ingame time/date according to GMT.
Definition: GameTime.h:38
Represents a soldier hired by the player.
Definition: Soldier.h:48
Represents a player base on the globe.
Definition: Base.h:45
Represents one research project.
Definition: RuleResearch.h:38
std::vector< AlienMission * > & getAlienMissions()
Full access to the current alien missions.
Definition: SavedGame.h:270
The battlescape data that gets written to disk when the game is saved.
Definition: SavedBattleGame.h:47
Represents a region of the world.
Definition: Region.h:33
Base class for targets on the globe with a set of radian coordinates.
Definition: Target.h:33
Container for savegame info displayed on listings.
Definition: SavedGame.h:74
Definition: BaseInfoState.cpp:40