forked from miki151/keeperrl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
collective_builder.h
43 lines (38 loc) · 1.05 KB
/
collective_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
#ifndef _COLLECTIVE_BUILDER_H
#define _COLLECTIVE_BUILDER_H
#include "enums.h"
#include "util.h"
#include "minion_task.h"
#include "collective_config.h"
class Tribe;
class Level;
class Creature;
struct ImmigrantInfo;
class Position;
class CollectiveBuilder {
public:
CollectiveBuilder(CollectiveConfig, TribeId);
CollectiveBuilder& setLevel(Level*);
CollectiveBuilder& setCredit(map<CollectiveResourceId, int>);
CollectiveBuilder& addCreature(Creature*);
CollectiveBuilder& addSquares(const vector<Vec2>&);
CollectiveBuilder& addSquares(const vector<Position>&);
CollectiveBuilder& setLocationName(const string&);
CollectiveBuilder& setRaceName(const string&);
PCollective build();
bool hasCreatures() const;
private:
Level* level = nullptr;
struct CreatureInfo {
Creature* creature;
EnumSet<MinionTrait> traits;
};
vector<CreatureInfo> creatures;
CollectiveConfig config;
TribeId tribe;
map<CollectiveResourceId, int> credit;
vector<Vec2> squares;
optional<string> locationName;
optional<string> raceName;
};
#endif