blob: be46165f02564e438161963c3205c12d3e77fbac (
plain)
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
|
#pragma once
#include "StarJson.hpp"
#include "StarBiMap.hpp"
#include "StarEither.hpp"
namespace Star {
enum class PlayerMode {
Casual,
Survival,
Hardcore
};
extern EnumMap<PlayerMode> const PlayerModeNames;
enum class PlayerBusyState {
None,
Chatting,
Menu
};
extern EnumMap<PlayerBusyState> const PlayerBusyStateNames;
struct PlayerWarpRequest {
String action;
Maybe<String> animation;
bool deploy;
};
struct PlayerModeConfig {
explicit PlayerModeConfig(Json config = {});
bool hunger;
bool allowBeamUpUnderground;
float reviveCostPercentile;
Either<String, StringList> deathDropItemTypes;
bool permadeath;
};
struct ShipUpgrades {
explicit ShipUpgrades(Json config = {});
Json toJson() const;
ShipUpgrades& apply(Json const& upgrades);
bool operator==(ShipUpgrades const& rhs) const;
unsigned shipLevel;
unsigned maxFuel;
unsigned crewSize;
float fuelEfficiency;
float shipSpeed;
StringSet capabilities;
};
DataStream& operator>>(DataStream& ds, ShipUpgrades& upgrades);
DataStream& operator<<(DataStream& ds, ShipUpgrades const& upgrades);
}
|