-
-
Notifications
You must be signed in to change notification settings - Fork 110
/
campaign_builder.h
54 lines (48 loc) · 1.83 KB
/
campaign_builder.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#include "campaign.h"
#include "biome_id.h"
#include "retired_games.h"
struct CampaignSetup;
struct VillainCounts;
struct CampaignInfo;
class GameConfig;
struct AvatarInfo;
class ContentFactory;
using VillainsTuple = map<VillainGroup, vector<Campaign::VillainInfo>>;
using GameIntros = vector<string>;
class CampaignBuilder {
public:
CampaignBuilder(View*, RandomGen&, Options*, VillainsTuple, GameIntros, const AvatarInfo&);
optional<CampaignSetup> prepareCampaign(ContentFactory*, function<optional<RetiredGames>(CampaignType)>,
CampaignType defaultType, string worldName);
static CampaignSetup getEmptyCampaign();
static CampaignSetup getWarlordCampaign(const vector<RetiredGames::RetiredGame>&,
const string& gameName);
private:
View* view;
RandomGen& random;
Options* options;
VillainsTuple villains;
GameIntros gameIntros;
const AvatarInfo& avatarInfo;
vector<OptionId> getCampaignOptions(CampaignType) const;
vector<OptionId> getPrimaryOptions() const;
const char* getIntroText() const;
void setPlayerPos(Campaign&, Vec2, ViewIdList, ContentFactory*);
vector<CampaignType> getAvailableTypes() const;
bool placeVillains(const ContentFactory*, Campaign&, Table<bool>&, vector<Campaign::SiteInfo::Dweller>, int count,
Range playerDist);
vector<Campaign::VillainInfo> getVillains(const vector<VillainGroup>&, VillainType);
bool placeVillains(const ContentFactory*, Campaign&, const VillainCounts&, const optional<RetiredGames>&,
const vector<VillainGroup>&);
const vector<string>& getIntroMessages(CampaignType) const;
void setCountLimits(const CampaignInfo&);
};
struct CampaignSetup {
Campaign campaign;
string gameIdentifier;
string gameDisplayName;
vector<string> introMessages;
optional<ExternalEnemiesType> externalEnemies;
EnemyAggressionLevel enemyAggressionLevel;
};