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::string displayName;
79 std::string 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::string sanitizeModName(
const std::string &name);
144 static std::vector<SaveInfo> getList(
Language *lang,
bool autoquick);
146 void load(
const std::string &filename,
Mod *mod);
148 void save(
const std::string &filename)
const;
150 std::string getName()
const;
152 void setName(
const std::string &name);
154 GameDifficulty getDifficulty()
const;
156 void setDifficulty(GameDifficulty difficulty);
158 int getDifficultyCoefficient()
const;
160 GameEnding getEnding()
const;
162 void setEnding(GameEnding end);
164 bool isIronman()
const;
166 void setIronman(
bool ironman);
168 int64_t getFunds()
const;
170 std::vector<int64_t> &getFundsList();
172 void setFunds(int64_t funds);
174 double getGlobeLongitude()
const;
176 void setGlobeLongitude(
double lon);
178 double getGlobeLatitude()
const;
180 void setGlobeLatitude(
double lat);
182 int getGlobeZoom()
const;
184 void setGlobeZoom(
int zoom);
186 void monthlyFunding();
192 int getId(
const std::string &name);
194 const std::map<std::string, int> &getAllIds()
const;
196 void setAllIds(
const std::map<std::string, int> &ids);
198 std::vector<Country*> *getCountries();
200 int getCountryFunding()
const;
202 std::vector<Region*> *getRegions();
204 std::vector<Base*> *getBases();
206 const std::vector<Base*> *getBases()
const;
208 int getBaseMaintenance()
const;
210 std::vector<Ufo*> *getUfos();
212 std::vector<Waypoint*> *getWaypoints();
214 std::vector<MissionSite*> *getMissionSites();
220 void addFinishedResearchSimple(
const RuleResearch *research);
222 void addFinishedResearch(
const RuleResearch *research,
const Mod *mod,
Base *base,
bool score =
true);
224 const std::vector<const RuleResearch*> & getDiscoveredResearch()
const;
226 void getAvailableResearchProjects(std::vector<RuleResearch*> & projects,
const Mod *mod,
Base *base,
bool considerDebugMode =
false)
const;
228 void getNewlyAvailableResearchProjects(std::vector<RuleResearch*> & before, std::vector<RuleResearch*> & after, std::vector<RuleResearch*> & diff)
const;
230 void getAvailableProductions(std::vector<RuleManufacture*> & productions,
const Mod *mod,
Base *base)
const;
232 void getDependableManufacture(std::vector<RuleManufacture*> & dependables,
const RuleResearch *research,
const Mod *mod,
Base *base)
const;
234 bool hasUndiscoveredProtectedUnlock(
const RuleResearch * r,
const Mod * mod)
const;
236 bool isResearched(
const std::string &research,
bool considerDebugMode =
true)
const;
238 bool isResearched(
const std::vector<std::string> &research,
bool considerDebugMode =
true)
const;
240 Soldier *getSoldier(
int id)
const;
242 bool handlePromotions(std::vector<Soldier*> &participants);
246 Soldier *inspectSoldiers(std::vector<Soldier*> &soldiers, std::vector<Soldier*> &participants,
int rank);
248 std::vector<AlienBase*> *getAlienBases();
252 bool getDebugMode()
const;
254 std::vector<int64_t> &getMaintenances();
256 void addResearchScore(
int score);
258 std::vector<int> &getResearchScores();
260 std::vector<int64_t> &getIncomes();
262 std::vector<int64_t> &getExpenditures();
264 bool getWarned()
const;
266 void setWarned(
bool warned);
276 AlienMission *findAlienMission(
const std::string ®ion, MissionObjective objective)
const;
278 Region *locateRegion(
double lon,
double lat)
const;
282 int getMonthsPassed()
const;
284 const std::string &getGraphRegionToggles()
const;
286 const std::string &getGraphCountryToggles()
const;
288 const std::string &getGraphFinanceToggles()
const;
290 void setGraphRegionToggles(
const std::string &value);
292 void setGraphCountryToggles(
const std::string &value);
294 void setGraphFinanceToggles(
const std::string &value);
302 void removePoppedResearch(
const RuleResearch* research);
304 std::vector<Soldier*> *getDeadSoldiers();
306 Base *getSelectedBase();
308 void setSelectedBase(
size_t base);
310 int getSoldierScore(
Soldier *soldier);
312 void setLastSelectedArmor(
const std::string &value);
314 std::string getLastSelectedArmor()
const;
316 Craft *findCraftByUniqueId(
const CraftId& craftId)
const;
318 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
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:268
Contains all the game-specific static data that never changes throughout the game, like rulesets and resources.
Definition: Mod.h:87
Container for battle unit kills statistics.
Definition: BattleUnitStatistics.h:32
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:272
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
const AlienStrategy & getAlienStrategy() const
Read-only access to the alien strategy data.
Definition: SavedGame.h:270
Base class for targets on the globe with a set of radian coordinates.
Definition: Target.h:35
Container for savegame info displayed on listings.
Definition: SavedGame.h:74
const std::vector< AlienMission * > & getAlienMissions() const
Read-only access to the current alien missions.
Definition: SavedGame.h:274
Definition: BaseInfoState.cpp:40