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,
|
||||
}
|
||||
}
|
||||
pub fn global_viewed(&self) -> bool {
|
||||
match self {
|
||||
Conscrit {
|
||||
captured,
|
||||
mallette,
|
||||
invisible,
|
||||
..
|
||||
} => (*captured || *mallette) && !*invisible,
|
||||
Vieux { invisible, .. } => !*invisible,
|
||||
}
|
||||
}
|
||||
pub fn color(&self) -> u8 {
|
||||
match self {
|
||||
Vieux { color, .. } => *color,
|
||||
|
@ -230,7 +219,7 @@ pub fn apparent_info(
|
|||
if watcher.id == team.id {
|
||||
None
|
||||
} else if let Conscrit {
|
||||
captured, mallette, ..
|
||||
captured, ..
|
||||
} = watcher.state
|
||||
{
|
||||
if captured {
|
||||
|
@ -250,11 +239,7 @@ pub fn apparent_info(
|
|||
Some(base_view(team))
|
||||
}
|
||||
} else {
|
||||
if mallette || team.state.global_viewed() {
|
||||
Some(base_view(team))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Some(admin_view(team).into())
|
||||
|
|
Loading…
Reference in a new issue