|
|
@@ -46,6 +46,9 @@ DLL_LINKAGE std::ostream & operator<<(std::ostream & os, const EVictoryLossCheck
|
|
|
class DLL_LINKAGE CGameState : public CNonConstInfoCallback, public Serializeable
|
|
|
{
|
|
|
friend class CGameStateCampaign;
|
|
|
+
|
|
|
+ std::unique_ptr<StartInfo> initialOpts; //copy of settings received from pregame (not randomized)
|
|
|
+ std::unique_ptr<StartInfo> scenarioOps;
|
|
|
public:
|
|
|
/// Stores number of times each artifact was placed on map via randomization
|
|
|
std::map<ArtifactID, int> allocatedArtifacts;
|
|
|
@@ -71,8 +74,6 @@ public:
|
|
|
void init(const IMapService * mapService, StartInfo * si, Load::ProgressAccumulator &, bool allowSavingRandomMap = true);
|
|
|
void updateOnLoad(StartInfo * si);
|
|
|
|
|
|
- ConstTransitivePtr<StartInfo> scenarioOps;
|
|
|
- ConstTransitivePtr<StartInfo> initialOpts; //copy of settings received from pregame (not randomized)
|
|
|
ui32 day; //total number of days in game
|
|
|
ConstTransitivePtr<CMap> map;
|
|
|
std::map<PlayerColor, PlayerState> players;
|
|
|
@@ -123,6 +124,19 @@ public:
|
|
|
void obtainPlayersStats(SThievesGuildInfo & tgi, int level); //fills tgi with info about other players that is available at given level of thieves' guild
|
|
|
const IGameSettings & getSettings() const;
|
|
|
|
|
|
+ StartInfo * getStartInfo()
|
|
|
+ {
|
|
|
+ return scenarioOps.get();
|
|
|
+ }
|
|
|
+ const StartInfo * getStartInfo() const final
|
|
|
+ {
|
|
|
+ return scenarioOps.get();
|
|
|
+ }
|
|
|
+ const StartInfo * getInitialStartInfo() const final
|
|
|
+ {
|
|
|
+ return initialOpts.get();
|
|
|
+ }
|
|
|
+
|
|
|
bool isVisible(int3 pos, const std::optional<PlayerColor> & player) const override;
|
|
|
bool isVisible(const CGObjectInstance * obj, const std::optional<PlayerColor> & player) const override;
|
|
|
|