ed_journals/modules/status/models/
flags2.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)]
5pub struct Flags2(u64);
6
7impl Flags2 {
8 pub fn on_foot(&self) -> bool {
10 self.0 & 1 != 0
11 }
12
13 pub fn in_taxi(&self) -> bool {
15 self.0 & 2 != 0
16 }
17
18 pub fn in_multicrew(&self) -> bool {
20 self.0 & 4 != 0
21 }
22
23 pub fn on_foot_in_station(&self) -> bool {
25 self.0 & 8 != 0
26 }
27
28 pub fn on_foot_on_planet(&self) -> bool {
30 self.0 & 16 != 0
31 }
32
33 pub fn aim_down_sight(&self) -> bool {
35 self.0 & 32 != 0
36 }
37
38 pub fn low_oxygen(&self) -> bool {
40 self.0 & 64 != 0
41 }
42
43 pub fn low_health(&self) -> bool {
45 self.0 & 128 != 0
46 }
47
48 pub fn cold(&self) -> bool {
50 self.0 & 256 != 0
51 }
52
53 pub fn hot(&self) -> bool {
55 self.0 & 512 != 0
56 }
57
58 pub fn very_cold(&self) -> bool {
60 self.0 & 1024 != 0
61 }
62
63 pub fn very_hot(&self) -> bool {
65 self.0 & 2048 != 0
66 }
67
68 pub fn glide_mode(&self) -> bool {
69 self.0 & 4096 != 0
70 }
71
72 pub fn on_foot_in_hangar(&self) -> bool {
74 self.0 & 8192 != 0
75 }
76
77 pub fn on_foot_social_space(&self) -> bool {
79 self.0 & 16384 != 0
80 }
81
82 pub fn on_foot_exterior(&self) -> bool {
83 self.0 & 32768 != 0
84 }
85
86 pub fn breathable_atmosphere(&self) -> bool {
88 self.0 & 65536 != 0
89 }
90
91 pub fn telepresence_multicrew(&self) -> bool {
92 self.0 & 131072 != 0
93 }
94
95 pub fn physical_multicrew(&self) -> bool {
96 self.0 & 262144 != 0
97 }
98
99 pub fn fsd_hyperdrive_charging(&self) -> bool {
101 self.0 & 524288 != 0
102 }
103}