--- a/rust/hedgewars-server/src/server/client.rs Wed Apr 10 23:56:53 2019 +0300
+++ b/rust/hedgewars-server/src/server/client.rs Thu Apr 11 01:13:29 2019 +0300
@@ -10,6 +10,7 @@
const IS_JOINED_MID_GAME = 0b0001_0000;
const IS_CHECKER = 0b0010_0000;
const IS_CONTRIBUTOR = 0b0100_0000;
+ const HAS_SUPER_POWER = 0b1000_0000;
const NONE = 0b0000_0000;
const DEFAULT = Self::NONE.bits;
@@ -70,6 +71,9 @@
pub fn is_contributor(&self) -> bool {
self.contains(ClientFlags::IS_CONTRIBUTOR)
}
+ pub fn has_super_power(&self) -> bool {
+ self.contains(ClientFlags::HAS_SUPER_POWER)
+ }
pub fn set_is_admin(&mut self, value: bool) {
self.set(ClientFlags::IS_ADMIN, value)
@@ -92,4 +96,7 @@
pub fn set_is_contributor(&mut self, value: bool) {
self.set(ClientFlags::IS_CONTRIBUTOR, value)
}
+ pub fn set_has_super_power(&mut self, value: bool) {
+ self.set(ClientFlags::HAS_SUPER_POWER, value)
+ }
}