mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Restore player alias being displayed in chat
This commit is contained in:
parent
66f6368e83
commit
636fcafd2e
@ -406,16 +406,22 @@ impl<'a> System<'a> for Sys {
|
|||||||
} else {
|
} else {
|
||||||
let bubble = SpeechBubble::player_new(message.clone(), *time);
|
let bubble = SpeechBubble::player_new(message.clone(), *time);
|
||||||
let _ = speech_bubbles.insert(entity, bubble);
|
let _ = speech_bubbles.insert(entity, bubble);
|
||||||
match stats.get(entity) {
|
format!(
|
||||||
Some(stat) => {
|
"{}[{}] {}: {}",
|
||||||
if admins.get(entity).is_some() {
|
match admins.get(entity) {
|
||||||
format!("[ADMIN][{}] {}", &stat.name, message)
|
Some(_) => "[ADMIN]",
|
||||||
} else {
|
None => "",
|
||||||
format!("[{}] {}", &stat.name, message)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
None => format!("[<Unknown>] {}", message),
|
match players.get(entity) {
|
||||||
}
|
Some(player) => &player.alias,
|
||||||
|
None => "<Unknown>",
|
||||||
|
},
|
||||||
|
match stats.get(entity) {
|
||||||
|
Some(stat) => &stat.name,
|
||||||
|
None => "<Unknown>",
|
||||||
|
},
|
||||||
|
message
|
||||||
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message
|
message
|
||||||
|
Loading…
Reference in New Issue
Block a user