mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix #562 Confusing chat alias
This commit is contained in:
parent
c4cd2f5283
commit
288c7cdbfa
@ -408,10 +408,12 @@ impl<'a> System<'a> for Sys {
|
||||
let _ = speech_bubbles.insert(entity, bubble);
|
||||
match players.get(entity) {
|
||||
Some(player) => {
|
||||
let stat =
|
||||
stats.get(entity).expect("Expected stat.name for player");
|
||||
if admins.get(entity).is_some() {
|
||||
format!("[ADMIN][{}] {}", &player.alias, message)
|
||||
format!("[ADMIN][{}] {}", &stat.name, message)
|
||||
} else {
|
||||
format!("[{}] {}", &player.alias, message)
|
||||
format!("[{}] {}", &stat.name, message)
|
||||
}
|
||||
},
|
||||
None => format!("[<Unknown>] {}", message),
|
||||
|
@ -193,12 +193,17 @@ impl<'a> Widget for Social<'a> {
|
||||
.color(TEXT_COLOR)
|
||||
.set(ids.online_title, ui);
|
||||
for (i, (_, player_alias)) in self.client.player_list.iter().enumerate() {
|
||||
Text::new(player_alias)
|
||||
.down(3.0)
|
||||
.font_size(self.fonts.cyri.scale(15))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(ids.player_names[i], ui);
|
||||
Text::new(&format!(
|
||||
"({}) {} Lvl {}",
|
||||
player_alias,
|
||||
self.client.character_list.characters[i].character.alias,
|
||||
self.client.character_list.characters[i].level
|
||||
))
|
||||
.down(3.0)
|
||||
.font_size(self.fonts.cyri.scale(15))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(ids.player_names[i], ui);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user