tracked see each other
This commit is contained in:
parent
57f64ad046
commit
ecd879f32f
1 changed files with 2 additions and 17 deletions
|
@ -61,17 +61,6 @@ impl TrackedState {
|
||||||
Vieux { .. } => false,
|
Vieux { .. } => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn global_viewed(&self) -> bool {
|
|
||||||
match self {
|
|
||||||
Conscrit {
|
|
||||||
captured,
|
|
||||||
mallette,
|
|
||||||
invisible,
|
|
||||||
..
|
|
||||||
} => (*captured || *mallette) && !*invisible,
|
|
||||||
Vieux { invisible, .. } => !*invisible,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pub fn color(&self) -> u8 {
|
pub fn color(&self) -> u8 {
|
||||||
match self {
|
match self {
|
||||||
Vieux { color, .. } => *color,
|
Vieux { color, .. } => *color,
|
||||||
|
@ -230,7 +219,7 @@ pub fn apparent_info(
|
||||||
if watcher.id == team.id {
|
if watcher.id == team.id {
|
||||||
None
|
None
|
||||||
} else if let Conscrit {
|
} else if let Conscrit {
|
||||||
captured, mallette, ..
|
captured, ..
|
||||||
} = watcher.state
|
} = watcher.state
|
||||||
{
|
{
|
||||||
if captured {
|
if captured {
|
||||||
|
@ -250,11 +239,7 @@ pub fn apparent_info(
|
||||||
Some(base_view(team))
|
Some(base_view(team))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if mallette || team.state.global_viewed() {
|
|
||||||
Some(base_view(team))
|
Some(base_view(team))
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Some(admin_view(team).into())
|
Some(admin_view(team).into())
|
||||||
|
|
Loading…
Reference in a new issue