forked from pioneerspacesim/pioneer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Polit.h
76 lines (65 loc) · 1.79 KB
/
Polit.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
68
69
70
71
72
73
74
75
76
// Copyright © 2008-2012 Pioneer Developers. See AUTHORS.txt for details
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
#ifndef _POLIT_H
#define _POLIT_H
#include "EquipType.h"
#include "Serializer.h"
class StarSystem;
class SysPolit;
class Ship;
namespace Polit {
enum Crime { // <enum scope='Polit' name=PolitCrime prefix=CRIME_>
CRIME_TRADING_ILLEGAL_GOODS = (1<<0),
CRIME_WEAPON_DISCHARGE = (1<<1),
CRIME_PIRACY = (1<<2),
CRIME_MURDER = (1<<3),
};
enum PolitEcon { // <enum scope='Polit' name=PolitEcon prefix=ECON_>
ECON_NONE,
ECON_VERY_CAPITALIST,
ECON_CAPITALIST,
ECON_MIXED,
ECON_PLANNED,
ECON_MAX // <enum skip>
};
enum GovType { // <enum scope='Polit' name=PolitGovType prefix=GOV_>
GOV_INVALID, // <enum skip>
GOV_NONE,
GOV_EARTHCOLONIAL,
GOV_EARTHDEMOC,
GOV_EMPIRERULE,
GOV_CISLIBDEM,
GOV_CISSOCDEM,
GOV_LIBDEM,
GOV_CORPORATE,
GOV_SOCDEM,
GOV_EARTHMILDICT,
GOV_MILDICT1,
GOV_MILDICT2,
GOV_EMPIREMILDICT,
GOV_COMMUNIST,
GOV_PLUTOCRATIC,
GOV_DISORDER,
GOV_MAX, // <enum skip>
GOV_RAND_MIN = GOV_NONE+1, // <enum skip>
GOV_RAND_MAX = GOV_MAX-1, // <enum skip>
};
void NotifyOfCrime(Ship *s, enum Crime c);
void GetSysPolitStarSystem(const StarSystem *s, const fixed human_infestedness, SysPolit &outSysPolit);
bool IsCommodityLegal(const StarSystem *s, const Equip::Type t);
void Init();
void Serialize(Serializer::Writer &wr);
void Unserialize(Serializer::Reader &rd);
void AddCrime(Sint64 crimeBitset, Sint64 addFine);
void GetCrime(Sint64 *crimeBitset, Sint64 *fine);
extern const char *crimeNames[64];
}
class SysPolit {
public:
const char *GetGovernmentDesc() const;
const char *GetEconomicDesc() const;
const char *GetAllegianceDesc() const;
Polit::GovType govType;
fixed lawlessness;
};
#endif /* _POLIT_H */