-
-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathbiome_info.h
67 lines (61 loc) · 2.52 KB
/
biome_info.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
55
56
57
58
59
60
61
62
63
64
65
66
67
#pragma once
#include "util.h"
#include "furniture_type.h"
#include "square_attrib.h"
#include "item_list_id.h"
#include "furniture_list_id.h"
#include "creature_list.h"
#include "enemy_id.h"
#include "view_id.h"
struct MountainInfo {
int SERIAL(numMountainLevels) = 10;
double SERIAL(lowlandRatio);
double SERIAL(hillRatio);
FurnitureType SERIAL(hill);
FurnitureType SERIAL(grass);
FurnitureType SERIAL(mountain);
FurnitureType SERIAL(mountainDeep);
FurnitureType SERIAL(mountainFloor);
SERIALIZE_ALL(NAMED(lowlandRatio), NAMED(hillRatio), NAMED(hill), NAMED(grass), NAMED(mountain), NAMED(mountainDeep), NAMED(mountainFloor), OPTION(numMountainLevels))
};
struct ForestInfo {
double SERIAL(ratio);
double SERIAL(density);
FurnitureType SERIAL(onType);
FurnitureListId SERIAL(trees);
SERIALIZE_ALL(NAMED(ratio), NAMED(density), NAMED(onType), NAMED(trees))
};
struct BiomeEnemyInfo {
EnemyId SERIAL(id);
Range SERIAL(count) = Range::singleElem(1);
double SERIAL(probability) = 1;
SERIALIZE_ALL(NAMED(id), OPTION(count), OPTION(probability))
};
struct BiomeInfo {
optional<FurnitureType> SERIAL(overrideWaterType);
FurnitureType SERIAL(sandType) = FurnitureType("SAND");
struct LakeInfo {
Range SERIAL(size);
Range SERIAL(count);
optional<FurnitureType> SERIAL(treeType);
SquareAttrib SERIAL(where) = SquareAttrib::LOWLAND;
SERIALIZE_ALL(NAMED(size), NAMED(count), OPTION(treeType), OPTION(where))
};
optional<LakeInfo> SERIAL(lakes);
ItemListId SERIAL(items);
Range SERIAL(itemCount) = Range::singleElem(0);
MountainInfo SERIAL(mountains);
vector<ForestInfo> SERIAL(forests);
CreatureList SERIAL(wildlife);
vector<BiomeEnemyInfo> SERIAL(darkKeeperEnemies);
vector<BiomeEnemyInfo> SERIAL(whiteKeeperEnemies);
vector<BiomeEnemyInfo> SERIAL(darkKeeperBaseEnemies);
vector<BiomeEnemyInfo> SERIAL(whiteKeeperBaseEnemies);
vector<pair<Range, BiomeEnemyInfo>> SERIAL(mountainEnemies);
optional<MusicType> SERIAL(overrideMusic);
int SERIAL(sightRange) = 100;
ViewId SERIAL(viewId);
string SERIAL(name);
SERIALIZE_ALL(NAMED(overrideWaterType), OPTION(sandType), NAMED(lakes), OPTION(items), OPTION(itemCount), NAMED(mountains), OPTION(forests), OPTION(wildlife), OPTION(darkKeeperEnemies), OPTION(whiteKeeperEnemies), OPTION(darkKeeperBaseEnemies), OPTION(whiteKeeperBaseEnemies), NAMED(overrideMusic), OPTION(sightRange), OPTION(mountainEnemies), NAMED(viewId), NAMED(name))
};
static_assert(std::is_nothrow_move_constructible<BiomeInfo>::value, "T should be noexcept MoveConstructible");