forked from cataclysmbnteam/Cataclysm-BN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
monfaction.h
40 lines (30 loc) · 870 Bytes
/
monfaction.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
#pragma once
#ifndef CATA_SRC_MONFACTION_H
#define CATA_SRC_MONFACTION_H
#include <unordered_map>
#include "type_id.h"
class JsonObject;
enum mf_attitude {
MFA_BY_MOOD = 0, // Hostile if angry
MFA_NEUTRAL, // Neutral even when angry
MFA_FRIENDLY, // Friendly
MFA_HATE // Attacks on sight
};
using mfaction_att_map = std::unordered_map< mfaction_id, mf_attitude >;
namespace monfactions
{
void reset();
void finalize();
void load_monster_faction( const JsonObject &jo );
mfaction_id get_or_add_faction( const mfaction_str_id &id );
} // namespace monfactions
class monfaction
{
public:
mfaction_id loadid;
mfaction_id base_faction;
mfaction_str_id id;
mfaction_att_map attitude_map;
mf_attitude attitude( const mfaction_id &other ) const;
};
#endif // CATA_SRC_MONFACTION_H